| Line 17... |
Line 17... |
| 17 |
get_cust_count_with_successful_txn, get_valid_orders_amount_range,\
|
17 |
get_cust_count_with_successful_txn, get_valid_orders_amount_range,\
|
| 18 |
get_valid_orders, toggle_doa_flag, request_pickup_number, authorize_pickup,\
|
18 |
get_valid_orders, toggle_doa_flag, request_pickup_number, authorize_pickup,\
|
| 19 |
receive_return, validate_doa, reship_order, refund_order, get_return_orders,\
|
19 |
receive_return, validate_doa, reship_order, refund_order, get_return_orders,\
|
| 20 |
process_return, get_return_order, mark_doas_as_picked_up,\
|
20 |
process_return, get_return_order, mark_doas_as_picked_up,\
|
| 21 |
create_purchase_order, verify_order, is_alive, get_orders_by_shipping_date,\
|
21 |
create_purchase_order, verify_order, is_alive, get_orders_by_shipping_date,\
|
| 22 |
update_weight, change_warehouse, change_product, add_delay_reason
|
22 |
update_weight, change_warehouse, change_product, add_delay_reason,\
|
| - |
|
23 |
reconcile_cod_collection
|
| 23 |
|
24 |
|
| 24 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
25 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
| 25 |
to_t_alert, to_t_order, to_t_lineitem
|
26 |
to_t_alert, to_t_order, to_t_lineitem
|
| 26 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
27 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
| 27 |
LineItem, Order, TransactionServiceException
|
28 |
LineItem, Order, TransactionServiceException
|
| Line 806... |
Line 807... |
| 806 |
try:
|
807 |
try:
|
| 807 |
return add_delay_reason(orderId, delayReason)
|
808 |
return add_delay_reason(orderId, delayReason)
|
| 808 |
finally:
|
809 |
finally:
|
| 809 |
close_session()
|
810 |
close_session()
|
| 810 |
|
811 |
|
| - |
|
812 |
def reconcileCodCollection(self, collectedAmountMap, xferBy, xferTxnId, xferDate):
|
| - |
|
813 |
"""
|
| - |
|
814 |
Marks the COD orders with given AWB nos. as having been processed.
|
| - |
|
815 |
Updates the captured amount for the corresponding payment.
|
| - |
|
816 |
|
| - |
|
817 |
Returns a map of AWBs which were not processed and the associated reason. An AWB is not processed if:
|
| - |
|
818 |
1. There is no order corresponding to an AWB number.
|
| - |
|
819 |
2. The captured amount for a payment exceeds the total payment.
|
| - |
|
820 |
3. The order corresponding to an AWB no. is in a state prior to DELIVERY_SUCCESS.
|
| - |
|
821 |
|
| - |
|
822 |
Parameters:
|
| - |
|
823 |
- collectedAmountMap
|
| - |
|
824 |
- xferBy
|
| - |
|
825 |
- xferTxnId
|
| - |
|
826 |
- xferDate
|
| - |
|
827 |
"""
|
| - |
|
828 |
try:
|
| - |
|
829 |
return reconcile_cod_collection(collectedAmountMap, xferBy, xferTxnId, xferDate)
|
| - |
|
830 |
finally:
|
| - |
|
831 |
close_session()
|
| - |
|
832 |
|
| 811 |
def closeSession(self, ):
|
833 |
def closeSession(self, ):
|
| 812 |
close_session()
|
834 |
close_session()
|
| 813 |
|
835 |
|
| 814 |
def isAlive(self, ):
|
836 |
def isAlive(self, ):
|
| 815 |
"""
|
837 |
"""
|