| Line 3397... |
Line 3397... |
| 3397 |
if order.previousStatus in [OrderStatus.SUBMITTED_FOR_PROCESSING, OrderStatus.INVENTORY_LOW, OrderStatus.LOW_INV_PO_RAISED, OrderStatus.LOW_INV_REVERSAL_IN_PROCESS, OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT, OrderStatus.PAYMENT_FLAGGED, OrderStatus.ACCEPTED]:
|
3397 |
if order.previousStatus in [OrderStatus.SUBMITTED_FOR_PROCESSING, OrderStatus.INVENTORY_LOW, OrderStatus.LOW_INV_PO_RAISED, OrderStatus.LOW_INV_REVERSAL_IN_PROCESS, OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT, OrderStatus.PAYMENT_FLAGGED, OrderStatus.ACCEPTED]:
|
| 3398 |
__update_inventory_reservation(order, refund=True)
|
3398 |
__update_inventory_reservation(order, refund=True)
|
| 3399 |
order.statusDescription = "Order Cancelled on customer request"
|
3399 |
order.statusDescription = "Order Cancelled on customer request"
|
| 3400 |
elif order.previousStatus == OrderStatus.BILLED:
|
3400 |
elif order.previousStatus == OrderStatus.BILLED:
|
| 3401 |
__create_refund(order, order.wallet_amount, 'Order #{0} Cancelled on customer request'.format(order.id))
|
3401 |
__create_refund(order, order.wallet_amount, 'Order #{0} Cancelled on customer request'.format(order.id))
|
| 3402 |
order.logisticsTransactionId = None
|
- |
|
| 3403 |
order.billing_timestamp = None
|
- |
|
| 3404 |
order.invoice_number = None
|
- |
|
| 3405 |
order.statusDescription = "Order Cancelled on customer request"
|
3402 |
order.statusDescription = "Order Cancelled on customer request"
|
| 3406 |
|
3403 |
|
| 3407 |
elif order.status == OrderStatus.PAYMENT_FLAGGED:
|
3404 |
elif order.status == OrderStatus.PAYMENT_FLAGGED:
|
| 3408 |
__update_inventory_reservation(order, refund=True)
|
3405 |
__update_inventory_reservation(order, refund=True)
|
| 3409 |
order.statusDescription = "Order Cancelled due to payment flagged"
|
3406 |
order.statusDescription = "Order Cancelled due to payment flagged"
|