| Line 2680... |
Line 2680... |
| 2680 |
if warehouse.billingType == BillingType.OURS_EXTERNAL:
|
2680 |
if warehouse.billingType == BillingType.OURS_EXTERNAL:
|
| 2681 |
warehouseClient.scanForOursExternalSaleReturn(order.id, lineitem.transfer_price)
|
2681 |
warehouseClient.scanForOursExternalSaleReturn(order.id, lineitem.transfer_price)
|
| 2682 |
|
2682 |
|
| 2683 |
if order.source == 2 and order.status in (OrderStatus.SUBMITTED_FOR_PROCESSING, OrderStatus.ACCEPTED, OrderStatus.INVENTORY_LOW, OrderStatus.CANCEL_REQUEST_CONFIRMED):
|
2683 |
if order.source == 2 and order.status in (OrderStatus.SUBMITTED_FOR_PROCESSING, OrderStatus.ACCEPTED, OrderStatus.INVENTORY_LOW, OrderStatus.CANCEL_REQUEST_CONFIRMED):
|
| 2684 |
storeOrderDetail = StoreOrderDetail.query.filter(StoreOrderDetail.orderId == order.id).filter(StoreOrderDetail.storeId == order.storeId).first()
|
2684 |
storeOrderDetail = StoreOrderDetail.query.filter(StoreOrderDetail.orderId == order.id).filter(StoreOrderDetail.storeId == order.storeId).first()
|
| - |
|
2685 |
|
| 2685 |
if order.created_timestamp.date() == datetime.datetime.now().date():
|
2686 |
if order.created_timestamp.date() == datetime.datetime.now().date() and storeOrderDetail.cardType != "debit":
|
| 2686 |
__push_store_collection_to_hotspot(order, "RefundFromStore", -storeOrderDetail.cashRefundAmount, -storeOrderDetail.cardRefundAmount)
|
2687 |
__push_store_collection_to_hotspot(order, "RefundFromStore", -storeOrderDetail.cashRefundAmount, -storeOrderDetail.cardRefundAmount)
|
| 2687 |
storeOrderDetail.payStatus = StorePaymentStatus.ADV_REFUNDED
|
2688 |
storeOrderDetail.payStatus = StorePaymentStatus.ADV_REFUNDED
|
| 2688 |
else:
|
2689 |
else:
|
| 2689 |
if order.advanceAmount - storeOrderDetail.cashRefundAmount == 0:
|
2690 |
if storeOrderDetail.cardRefundAmount == 0:
|
| 2690 |
storeOrderDetail.payStatus = StorePaymentStatus.ADV_REFUNDED
|
2691 |
storeOrderDetail.payStatus = StorePaymentStatus.ADV_REFUNDED
|
| 2691 |
else:
|
2692 |
else:
|
| 2692 |
storeOrderDetail.payStatus = StorePaymentStatus.REFUND_REQUESTED
|
2693 |
storeOrderDetail.payStatus = StorePaymentStatus.REFUND_REQUESTED
|
| 2693 |
|
2694 |
|
| 2694 |
if storeOrderDetail.cashRefundAmount > 0:
|
2695 |
if storeOrderDetail.cashRefundAmount > 0:
|
| Line 5673... |
Line 5674... |
| 5673 |
ds_storeOrderDetail.payStatus = thrift_storeOrderDetail.payStatus
|
5674 |
ds_storeOrderDetail.payStatus = thrift_storeOrderDetail.payStatus
|
| 5674 |
ds_storeOrderDetail.cardRefundAmount = thrift_storeOrderDetail.cardRefundAmount
|
5675 |
ds_storeOrderDetail.cardRefundAmount = thrift_storeOrderDetail.cardRefundAmount
|
| 5675 |
ds_storeOrderDetail.cashRefundAmount = thrift_storeOrderDetail.cashRefundAmount
|
5676 |
ds_storeOrderDetail.cashRefundAmount = thrift_storeOrderDetail.cashRefundAmount
|
| 5676 |
ds_storeOrderDetail.edcBank = thrift_storeOrderDetail.edcBank
|
5677 |
ds_storeOrderDetail.edcBank = thrift_storeOrderDetail.edcBank
|
| 5677 |
ds_storeOrderDetail.approvalCode = thrift_storeOrderDetail.approvalCode
|
5678 |
ds_storeOrderDetail.approvalCode = thrift_storeOrderDetail.approvalCode
|
| - |
|
5679 |
ds_storeOrderDetail.cardType = thrift_storeOrderDetail.cardType
|
| 5678 |
session.commit()
|
5680 |
session.commit()
|
| 5679 |
return True
|
5681 |
return True
|
| 5680 |
|
5682 |
|
| 5681 |
def get_store_order_detail(orderId, storeId):
|
5683 |
def get_store_order_detail(orderId, storeId):
|
| 5682 |
storeOrderDetail = StoreOrderDetail.query.filter(StoreOrderDetail.orderId == orderId).filter(StoreOrderDetail.storeId == storeId).first()
|
5684 |
storeOrderDetail = StoreOrderDetail.query.filter(StoreOrderDetail.orderId == orderId).filter(StoreOrderDetail.storeId == storeId).first()
|