| Line 507... |
Line 507... |
| 507 |
billingWarehouseIdMap = {}
|
507 |
billingWarehouseIdMap = {}
|
| 508 |
billingWarehouseTxnMap = {}
|
508 |
billingWarehouseTxnMap = {}
|
| 509 |
|
509 |
|
| 510 |
|
510 |
|
| 511 |
|
511 |
|
| 512 |
## Assign runner in case of delhi pincodes
|
- |
|
| 513 |
if transaction.orders[0].pickupStoreId:
|
- |
|
| 514 |
logistics_client = LogisticsClient().get_client()
|
- |
|
| 515 |
store = logistics_client.getPickupStore(transaction.orders[0].pickupStoreId)
|
- |
|
| 516 |
if delhi_pincodes.__contains__(store.pin):
|
- |
|
| 517 |
pickUp = PickUpType.RUNNER
|
- |
|
| 518 |
|
- |
|
| 519 |
if new_status == TransactionStatus.FAILED:
|
512 |
if new_status == TransactionStatus.FAILED:
|
| 520 |
for order in transaction.orders:
|
513 |
for order in transaction.orders:
|
| 521 |
order.status = OrderStatus.PAYMENT_FAILED
|
514 |
order.status = OrderStatus.PAYMENT_FAILED
|
| 522 |
order.statusDescription = "Payment Failed"
|
515 |
order.statusDescription = "Payment Failed"
|
| 523 |
elif new_status == TransactionStatus.AUTHORIZED or new_status == TransactionStatus.FLAGGED:
|
516 |
elif new_status == TransactionStatus.AUTHORIZED or new_status == TransactionStatus.FLAGGED:
|
| Line 670... |
Line 663... |
| 670 |
order.lineitems[0].nlc = item_pricing.nlc
|
663 |
order.lineitems[0].nlc = item_pricing.nlc
|
| 671 |
except:
|
664 |
except:
|
| 672 |
print "Not able to get transfer price. Skipping"
|
665 |
print "Not able to get transfer price. Skipping"
|
| 673 |
|
666 |
|
| 674 |
catalog_client = CatalogClient().get_client()
|
667 |
catalog_client = CatalogClient().get_client()
|
| 675 |
voucherAmount = catalog_client.getVoucherAmount(item_id, VoucherType.SPICEDECK_MOBILE)
|
- |
|
| 676 |
if voucherAmount:
|
- |
|
| 677 |
__create_recharge_voucher_tracker(order, voucherAmount, VoucherType.SPICEDECK_MOBILE)
|
- |
|
| 678 |
|
- |
|
| 679 |
if transaction.payment_option == capitalFloatPayMethod:
|
- |
|
| 680 |
total_amount = 0
|
- |
|
| 681 |
singleOrder = transaction.orders[0]
|
- |
|
| 682 |
for order in transaction.orders:
|
- |
|
| 683 |
total_amount = total_amount + order.total_amount + order.shippingCost - order.gvAmount
|
- |
|
| 684 |
|
668 |
|
| 685 |
creditObj = __creditHistoryObj(singleOrder.customer_id, 1, transaction.id, total_amount, CreditTxnType.BLOCKED, str(transaction.id))
|
- |
|
| 686 |
creditTxns = []
|
- |
|
| 687 |
creditTxns.append(creditObj)
|
- |
|
| 688 |
process_credit_transaction(transaction.id, singleOrder.customer_id, 1, creditTxns)
|
- |
|
| 689 |
|
- |
|
| 690 |
for billingWarehouseId, orders in billingWarehouseIdMap.items():
|
669 |
for billingWarehouseId, orders in billingWarehouseIdMap.items():
|
| 691 |
logistics_client = LogisticsClient().get_client()
|
670 |
logistics_client = LogisticsClient().get_client()
|
| 692 |
transactionAmount , transactionWeight = billingWarehouseTxnMap.get(billingWarehouseId)
|
671 |
transactionAmount , transactionWeight = billingWarehouseTxnMap.get(billingWarehouseId)
|
| 693 |
costingAndDeliveryEstimateObj = None
|
672 |
costingAndDeliveryEstimateObj = None
|
| 694 |
try:
|
673 |
try:
|