| Line 4074... |
Line 4074... |
| 4074 |
#Order has not been delivered yet. No way we can receive the payment.
|
4074 |
#Order has not been delivered yet. No way we can receive the payment.
|
| 4075 |
unprocessed_awbs[awb] = "Payment has been received for order: " + str(order.id) + " before delivery reconciliation"
|
4075 |
unprocessed_awbs[awb] = "Payment has been received for order: " + str(order.id) + " before delivery reconciliation"
|
| 4076 |
continue
|
4076 |
continue
|
| 4077 |
|
4077 |
|
| 4078 |
##As per ticket #743 if amount difference less than 0.5 we should reconcile
|
4078 |
##As per ticket #743 if amount difference less than 0.5 we should reconcile
|
| 4079 |
if abs(amount - (order.total_amount - order.gvAmount)) > 0.5:
|
4079 |
if abs(amount - (order.total_amount + order.shippingCost - order.gvAmount)) > 0.5:
|
| 4080 |
#Received amount is less than or more than the order amount. Mustn't let the user proceed.
|
4080 |
#Received amount is less than or more than the order amount. Mustn't let the user proceed.
|
| 4081 |
unprocessed_awbs[awb] = "Payment of Rs. " + str(amount) + " has been received against the total value of Rs. " + str(order.total_amount-order.gvAmount) + " for order: " + str(order.id)
|
4081 |
unprocessed_awbs[awb] = "Payment of Rs. " + str(amount) + " has been received against the total value of Rs. " + str(order.total_amount-order.gvAmount) + " for order: " + str(order.id)
|
| 4082 |
continue
|
4082 |
continue
|
| 4083 |
|
4083 |
|
| 4084 |
try:
|
4084 |
try:
|
| Line 4098... |
Line 4098... |
| 4098 |
logistics_client = LogisticsClient().get_client()
|
4098 |
logistics_client = LogisticsClient().get_client()
|
| 4099 |
provider = logistics_client.getProvider(logisticsProviderId)
|
4099 |
provider = logistics_client.getProvider(logisticsProviderId)
|
| 4100 |
|
4100 |
|
| 4101 |
if provider.groupShipmentAllowed:
|
4101 |
if provider.groupShipmentAllowed:
|
| 4102 |
for order in orders:
|
4102 |
for order in orders:
|
| 4103 |
totalOrdersAmount = totalOrdersAmount + (order.total_amount-order.gvAmount)
|
4103 |
totalOrdersAmount = totalOrdersAmount + (order.total_amount+order.shippingCost-order.gvAmount)
|
| 4104 |
|
4104 |
|
| 4105 |
if abs(amount - (totalOrdersAmount)) > 0.5:
|
4105 |
if abs(amount - (totalOrdersAmount)) > 0.5:
|
| 4106 |
unprocessed_awbs[awb] = "Payment of Rs. " + str(amount) + " has been received against the total value of Rs. " + str(totalOrdersAmount) + " for Master Order Id: " + orders[0].logisticsTransactionId
|
4106 |
unprocessed_awbs[awb] = "Payment of Rs. " + str(amount) + " has been received against the total value of Rs. " + str(totalOrdersAmount) + " for Master Order Id: " + orders[0].logisticsTransactionId
|
| 4107 |
continue
|
4107 |
continue
|
| 4108 |
try:
|
4108 |
try:
|