| Line 1678... |
Line 1678... |
| 1678 |
update_insurance_details(order)
|
1678 |
update_insurance_details(order)
|
| 1679 |
except:
|
1679 |
except:
|
| 1680 |
print "Error generating insurance file for order " + str(order.id)
|
1680 |
print "Error generating insurance file for order " + str(order.id)
|
| 1681 |
session.rollback()
|
1681 |
session.rollback()
|
| 1682 |
return
|
1682 |
return
|
| - |
|
1683 |
|
| - |
|
1684 |
if order.source == 2:
|
| - |
|
1685 |
sod = StoreOrderDetail.get_by(orderId = order.id)
|
| - |
|
1686 |
sod.payStatus = StorePaymentStatus.FULL_PAY_RECEIVED
|
| 1683 |
session.commit()
|
1687 |
session.commit()
|
| 1684 |
|
1688 |
|
| 1685 |
if order.pickupStoreId and order.cod:
|
1689 |
if order.pickupStoreId and order.cod:
|
| 1686 |
__push_collection_to_hotspot(order, "SALE")
|
1690 |
__push_collection_to_hotspot(order, "SALE")
|
| 1687 |
|
1691 |
|
| Line 2595... |
Line 2599... |
| 2595 |
warehouseClient.scanForOursExternalSaleReturn(order.id, lineitem.transfer_price)
|
2599 |
warehouseClient.scanForOursExternalSaleReturn(order.id, lineitem.transfer_price)
|
| 2596 |
|
2600 |
|
| 2597 |
if order.source == 2 and order.status in (OrderStatus.SUBMITTED_FOR_PROCESSING, OrderStatus.ACCEPTED, OrderStatus.INVENTORY_LOW):
|
2601 |
if order.source == 2 and order.status in (OrderStatus.SUBMITTED_FOR_PROCESSING, OrderStatus.ACCEPTED, OrderStatus.INVENTORY_LOW):
|
| 2598 |
storeOrderDetail = StoreOrderDetail.query.filter(StoreOrderDetail.orderId == order.id).filter(StoreOrderDetail.storeId == order.storeId).first()
|
2602 |
storeOrderDetail = StoreOrderDetail.query.filter(StoreOrderDetail.orderId == order.id).filter(StoreOrderDetail.storeId == order.storeId).first()
|
| 2599 |
if order.created_timestamp.date() == datetime.datetime.now().date():
|
2603 |
if order.created_timestamp.date() == datetime.datetime.now().date():
|
| 2600 |
__push_store_collection_to_hotspot(order, "advanceRefund", -(storeOrderDetail.cashRefundAmount + storeOrderDetail.cardRefundAmount))
|
2604 |
__push_store_collection_to_hotspot(order, "RefundFromStore", -(storeOrderDetail.cashRefundAmount + storeOrderDetail.cardRefundAmount))
|
| 2601 |
storeOrderDetail.payStatus = StorePaymentStatus.ADV_REFUNDED
|
2605 |
storeOrderDetail.payStatus = StorePaymentStatus.ADV_REFUNDED
|
| 2602 |
else:
|
2606 |
else:
|
| 2603 |
__push_store_collection_to_hotspot(order, "advanceRefund", -(storeOrderDetail.cashRefundAmount))
|
2607 |
__push_store_collection_to_hotspot(order, "RefundFromHQ", -(storeOrderDetail.cashRefundAmount))
|
| 2604 |
if storeOrderDetail.cardRefundAmount > 0:
|
2608 |
if storeOrderDetail.cardRefundAmount > 0:
|
| 2605 |
storeOrderDetail.payStatus = StorePaymentStatus.REFUND_PENDING
|
2609 |
storeOrderDetail.payStatus = StorePaymentStatus.REFUND_PENDING
|
| 2606 |
else:
|
2610 |
else:
|
| 2607 |
storeOrderDetail.payStatus = StorePaymentStatus.ADV_REFUNDED
|
2611 |
storeOrderDetail.payStatus = StorePaymentStatus.ADV_REFUNDED
|
| 2608 |
order.status = status_transition[order.status]
|
2612 |
order.status = status_transition[order.status]
|