| Line 423... |
Line 423... |
| 423 |
close_session()
|
423 |
close_session()
|
| 424 |
|
424 |
|
| 425 |
def getCostingAndDeliveryEstimateForPincode(self, pincode, transactionAmount, isCod, weight, billingWarehouseId, isCompleteTxn):
|
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, isCompleteTxn)
|
427 |
costingAndDeliveryEstimateObj = get_costing_and_delivery_estimate_for_pincode(pincode, transactionAmount, isCod, weight, billingWarehouseId, isCompleteTxn)
|
| 428 |
if costingAndDeliveryEstimateObj is None:
|
- |
|
| 429 |
return costingAndDeliveryEstimateObj
|
- |
|
| 430 |
delivery_time = 24 * (costingAndDeliveryEstimateObj.deliveryTime + costingAndDeliveryEstimateObj.delivery_delay)
|
428 |
delivery_time = 24 * (costingAndDeliveryEstimateObj.deliveryTime + costingAndDeliveryEstimateObj.delivery_delay)
|
| 431 |
shipping_delay = 0
|
429 |
shipping_delay = 0
|
| 432 |
|
430 |
|
| 433 |
#Further increase the estimate if it's late in the day
|
431 |
#Further increase the estimate if it's late in the day
|
| 434 |
current_hour = datetime.datetime.now().hour
|
432 |
current_hour = datetime.datetime.now().hour
|