Subversion Repositories SmartDukaan

Rev

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

Rev 11896 Rev 11912
Line 6488... Line 6488...
6488
    print to_java_date(order.created_timestamp)
6488
    print to_java_date(order.created_timestamp)
6489
    return to_java_date(order.created_timestamp)
6489
    return to_java_date(order.created_timestamp)
6490
 
6490
 
6491
def is_private_deal_transaction(transaction_id):
6491
def is_private_deal_transaction(transaction_id):
6492
    result = False
6492
    result = False
6493
    transaction = Transaction.get_by(id = transaction_id)
6493
    transaction = Transaction.get_by(id=transaction_id)
6494
    if transaction:
6494
    if transaction:
6495
        if transaction.coupon_code is None or transaction.coupon_code=="":
6495
        if transaction.coupon_code is None or transaction.coupon_code=="":
6496
            return result
6496
            return result
6497
        else:
6497
        else:
6498
            promotion_client  = PromotionClient().get_client()
6498
            promotion_client  = PromotionClient().get_client()
6499
            coupon = promotion_client.getCoupon(transaction.coupon_code)
6499
            coupon = promotion_client.getCoupon(transaction.coupon_code)
6500
            if(coupon.promotion.ruleExecutionSrc=='rule_private_deals'):
6500
            if(coupon.promotion.ruleExecutionSrc=='rule_private_deals'):
6501
                result = True
6501
                result = True
6502
    return False
6502
    return result
6503
 
6503
 
6504
def update_snapdeal_orders_status(orders):
6504
def update_snapdeal_orders_status(orders):
6505
    for statusString, orderList in orders.iteritems():
6505
    for statusString, orderList in orders.iteritems():
6506
        if statusString == "Cancelled":
6506
        if statusString == "Cancelled":
6507
            try:
6507
            try: