Subversion Repositories SmartDukaan

Rev

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

Rev 6568 Rev 6571
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
-
 
8
from shop2020.utils.Utils import to_java_date
7
from shop2020.utils.Utils import to_java_date
9
 
8
 
10
def to_t_address(address):
9
def to_t_address(address):
11
    t_address = TAddress()
10
    t_address = TAddress()
12
    t_address.id = address.id
11
    t_address.id = address.id
Line 186... Line 185...
186
    t_coupon = TCoupon()
185
    t_coupon = TCoupon()
187
 
186
 
188
    if coupon:
187
    if coupon:
189
        t_coupon.couponCode = coupon.coupon_code
188
        t_coupon.couponCode = coupon.coupon_code
190
        t_coupon.promotion = to_t_promotion(coupon.promotion)
189
        t_coupon.promotion = to_t_promotion(coupon.promotion)
191
        t_coupon.arguments = json.dumps(eval(coupon.arguments))
190
        t_coupon.arguments = coupon.arguments
192
    
191
    
193
    return t_coupon
192
    return t_coupon
194
 
193
 
195
def to_t_item_coupon_discount(item_coupon_discount):
194
def to_t_item_coupon_discount(item_coupon_discount):
196
    t_item_coupon_discount = TItemCouponDiscount()
195
    t_item_coupon_discount = TItemCouponDiscount()