Subversion Repositories SmartDukaan

Rev

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

Rev 5331 Rev 5353
Line 34... Line 34...
34
    count_coupon_usage = get_coupon_usage_count(coupon_code)
34
    count_coupon_usage = get_coupon_usage_count(coupon_code)
35
    
35
    
36
    if count_coupon_usage >= 100:
36
    if count_coupon_usage >= 100:
37
        raise PromotionException(112, 'This promotion is over.')
37
        raise PromotionException(112, 'This promotion is over.')
38
    
38
    
39
    if get_coupon_usage_count_by_user(coupon_code, user.id) > 0:
39
    if get_coupon_usage_count_by_user(coupon_code, user.userId) > 0:
40
        raise PromotionException(112, 'This promotion is over.')
40
        raise PromotionException(112, 'This promotion is over.')
41
    
41
    
42
    discounts = []
42
    discounts = []
43
    
43
    
44
    if cart.lines:
44
    if cart.lines: