Subversion Repositories SmartDukaan

Rev

Rev 6394 | Rev 6571 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6394 Rev 6568
Line 2... Line 2...
2
    User as TUser, Cart as TCart, Line as TLine, MasterAffiliate as TMasterAffiliate, \
2
    User as TUser, Cart as TCart, Line as TLine, MasterAffiliate as TMasterAffiliate, \
3
    Affiliate as TAffiliate, Tracker as TTracker, TrackLog as TTrackLog, Promotion as TPromotion, \
3
    Affiliate as TAffiliate, Tracker as TTracker, TrackLog as TTrackLog, Promotion as TPromotion, \
4
    Coupon as TCoupon, Discount as TDiscount, ItemCouponDiscount as TItemCouponDiscount,\
4
    Coupon as TCoupon, Discount as TDiscount, ItemCouponDiscount as TItemCouponDiscount,\
5
    Voucher
5
    Voucher
6
    
6
    
-
 
7
import json
7
from shop2020.utils.Utils import to_java_date
8
from shop2020.utils.Utils import to_java_date
8
 
9
 
9
def to_t_address(address):
10
def to_t_address(address):
10
    t_address = TAddress()
11
    t_address = TAddress()
11
    t_address.id = address.id
12
    t_address.id = address.id
Line 185... Line 186...
185
    t_coupon = TCoupon()
186
    t_coupon = TCoupon()
186
 
187
 
187
    if coupon:
188
    if coupon:
188
        t_coupon.couponCode = coupon.coupon_code
189
        t_coupon.couponCode = coupon.coupon_code
189
        t_coupon.promotion = to_t_promotion(coupon.promotion)
190
        t_coupon.promotion = to_t_promotion(coupon.promotion)
190
        t_coupon.arguments = coupon.arguments
191
        t_coupon.arguments = json.dumps(eval(coupon.arguments))
191
    
192
    
192
    return t_coupon
193
    return t_coupon
193
 
194
 
194
def to_t_item_coupon_discount(item_coupon_discount):
195
def to_t_item_coupon_discount(item_coupon_discount):
195
    t_item_coupon_discount = TItemCouponDiscount()
196
    t_item_coupon_discount = TItemCouponDiscount()