Subversion Repositories SmartDukaan

Rev

Rev 19474 | Rev 19536 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19474 Rev 19534
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
428
            delivery_time = 24 * (costingAndDeliveryEstimateObj.deliveryTime + costingAndDeliveryEstimateObj.delivery_delay)
430
            delivery_time = 24 * (costingAndDeliveryEstimateObj.deliveryTime + costingAndDeliveryEstimateObj.delivery_delay)
429
            shipping_delay = 0
431
            shipping_delay = 0
430
            
432
            
431
            #Further increase the estimate if it's late in the day
433
            #Further increase the estimate if it's late in the day
432
            current_hour = datetime.datetime.now().hour
434
            current_hour = datetime.datetime.now().hour