Subversion Repositories SmartDukaan

Rev

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

Rev 6355 Rev 6367
Line 46... Line 46...
46
            PromotionDataAccessors.close_session()
46
            PromotionDataAccessors.close_session()
47
    
47
    
48
    def isGiftVoucher(self, coupon_code):
48
    def isGiftVoucher(self, coupon_code):
49
        isGiftVoucher = False
49
        isGiftVoucher = False
50
        try:
50
        try:
51
            isGiftVoucher = get_coupon(coupon_code).promotion.id == 26
51
            promotion_type = get_coupon(coupon_code).promotion.type
-
 
52
            isGiftVoucher = promotion_type == 1
52
        finally:
53
        finally:
53
            PromotionDataAccessors.close_session()
54
            PromotionDataAccessors.close_session()
54
            return isGiftVoucher
55
            return isGiftVoucher
55
    
56
    
56
    def isCodApplicable(self, coupon_code):
57
    def isCodApplicable(self, coupon_code):