| Line 420... |
Line 420... |
| 420 |
try:
|
420 |
try:
|
| 421 |
return get_logistics_locations(destinationPin, sellingPriceList)
|
421 |
return get_logistics_locations(destinationPin, sellingPriceList)
|
| 422 |
finally:
|
422 |
finally:
|
| 423 |
close_session()
|
423 |
close_session()
|
| 424 |
|
424 |
|
| 425 |
def getCostingAndDeliveryEstimateForPincode(self, pincode, transactionAmount, isCod, weight, billingWarehouseId):
|
425 |
def getCostingAndDeliveryEstimateForPincode(self, pincode, transactionAmount, isCod, weight, billingWarehouseId, isCompleteTxn):
|
| 426 |
try:
|
426 |
try:
|
| 427 |
costingAndDeliveryEstimateObj = get_costing_and_delivery_estimate_for_pincode(pincode, transactionAmount, isCod, weight, billingWarehouseId)
|
427 |
costingAndDeliveryEstimateObj = get_costing_and_delivery_estimate_for_pincode(pincode, transactionAmount, isCod, weight, billingWarehouseId, isCompleteTxn)
|
| 428 |
delivery_time = 24 * (costingAndDeliveryEstimateObj.deliveryTime + costingAndDeliveryEstimateObj.delivery_delay)
|
428 |
delivery_time = 24 * (costingAndDeliveryEstimateObj.deliveryTime + costingAndDeliveryEstimateObj.delivery_delay)
|
| 429 |
shipping_delay = 0
|
429 |
shipping_delay = 0
|
| 430 |
|
430 |
|
| 431 |
#Further increase the estimate if it's late in the day
|
431 |
#Further increase the estimate if it's late in the day
|
| 432 |
current_hour = datetime.datetime.now().hour
|
432 |
current_hour = datetime.datetime.now().hour
|