Subversion Repositories SmartDukaan

Rev

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

Rev 6348 Rev 6355
Line 3441... Line 3441...
3441
            pc = PromotionClient().get_client()
3441
            pc = PromotionClient().get_client()
3442
            enddate = datetime.datetime.now() + datetime.timedelta(days=45)
3442
            enddate = datetime.datetime.now() + datetime.timedelta(days=45)
3443
            while totalAmount > 0:
3443
            while totalAmount > 0:
3444
                gvAmount = totalAmount if totalAmount <= 250 else 250
3444
                gvAmount = totalAmount if totalAmount <= 250 else 250
3445
                totalAmount = totalAmount - gvAmount
3445
                totalAmount = totalAmount - gvAmount
3446
                gv = pc.createCoupon(26, to_java_date(enddate), recharge_order.userEmailId, gvAmount, 1)
3446
                gv = pc.createCoupon(26, to_java_date(enddate), recharge_order.userEmailId, gvAmount, False, 1)
3447
                gvs[gv] = gvAmount  
3447
                gvs[gv] = gvAmount  
3448
        except:
3448
        except:
3449
            print "Not able to create gift voucher for user " + recharge_order.userEmailId
3449
            print "Not able to create gift voucher for user " + recharge_order.userEmailId
3450
    return gvs     
3450
    return gvs     
3451
 
3451