Subversion Repositories SmartDukaan

Rev

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

Rev 7460 Rev 7486
Line 361... Line 361...
361
            
361
            
362
            catalog_client = CatalogClient().get_client() 
362
            catalog_client = CatalogClient().get_client() 
363
            voucherAmount = catalog_client.getVoucherAmount(item_id, VoucherType.SPICEDECK_MOBILE)
363
            voucherAmount = catalog_client.getVoucherAmount(item_id, VoucherType.SPICEDECK_MOBILE)
364
            if voucherAmount:
364
            if voucherAmount:
365
                __create_recharge_voucher_tracker(order, voucherAmount, VoucherType.SPICEDECK_MOBILE)
365
                __create_recharge_voucher_tracker(order, voucherAmount, VoucherType.SPICEDECK_MOBILE)
-
 
366
            #Note 2 Buy back Offer
-
 
367
            if item_id in (7974, 7558) and transaction.coupon_code is not None and transaction.coupon_code.lower() == "note2buyback":    
-
 
368
                order.status = OrderStatus.COD_VERIFICATION_PENDING
-
 
369
                order.statusDescription = "Note 2 Buy Back Offer - Approval Pending from CRM Team"
-
 
370
                
366
                                
371
                                
367
    elif new_status == TransactionStatus.COD_IN_PROCESS:
372
    elif new_status == TransactionStatus.COD_IN_PROCESS:
368
        for order in transaction.orders:
373
        for order in transaction.orders:
369
            order.status = OrderStatus.COD_VERIFICATION_PENDING
374
            order.status = OrderStatus.COD_VERIFICATION_PENDING
370
            order.statusDescription = "Verification Pending"
375
            order.statusDescription = "Verification Pending"
Line 414... Line 419...
414
            
419
            
415
            catalog_client = CatalogClient().get_client()
420
            catalog_client = CatalogClient().get_client()
416
            voucherAmount = catalog_client.getVoucherAmount(item_id, VoucherType.SPICEDECK_MOBILE)
421
            voucherAmount = catalog_client.getVoucherAmount(item_id, VoucherType.SPICEDECK_MOBILE)
417
            if voucherAmount:
422
            if voucherAmount:
418
                __create_recharge_voucher_tracker(order, voucherAmount, VoucherType.SPICEDECK_MOBILE)
423
                __create_recharge_voucher_tracker(order, voucherAmount, VoucherType.SPICEDECK_MOBILE)
-
 
424
                
-
 
425
            #Note 2 Buy back Offer    
-
 
426
            if item_id in (7974, 7558) and transaction.coupon_code is not None and transaction.coupon_code.lower() == "note2buyback":    
-
 
427
                order.status = OrderStatus.COD_VERIFICATION_PENDING
-
 
428
                order.statusDescription = "Note 2 Buy Back Offer - Approval Pending from CRM Team"
-
 
429
                    
419
    session.commit()
430
    session.commit()
420
 
431
 
421
    try:
432
    try:
422
        if order.source == OrderSource.WEBSITE:    
433
        if order.source == OrderSource.WEBSITE:    
423
            if new_status == TransactionStatus.COD_IN_PROCESS:
434
            if new_status == TransactionStatus.COD_IN_PROCESS: