Subversion Repositories SmartDukaan

Rev

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

Rev 8190 Rev 8202
Line 89... Line 89...
89
        todate = datetime.datetime.now()
89
        todate = datetime.datetime.now()
90
        if 'endOn' in args and todate > to_py_date(args['endOn']) :
90
        if 'endOn' in args and todate > to_py_date(args['endOn']) :
91
            return {0:'This coupon has expired'}
91
            return {0:'This coupon has expired'}
92
        
92
        
93
        if 'minDiscountableVal' in args and total_amount < int(args['minDiscountableVal']):
93
        if 'minDiscountableVal' in args and total_amount < int(args['minDiscountableVal']):
94
            return {0:'This coupon is valid for purchases equal to or more than Rs.' + (args['minDiscountableVal'])}
94
            return {0:'This coupon is valid for purchases equal to or more than Rs.' + str((args['minDiscountableVal']))}
95
    
95
    
96
        if 'couponType' not in args or args['couponType'] not in ('recharge','both'):
96
        if 'couponType' not in args or args['couponType'] not in ('recharge','both'):
97
            return {0:'Invalid Coupon'}
97
            return {0:'Invalid Coupon'}
98
        
98
        
99
        isUserSpecific = False
99
        isUserSpecific = False