Subversion Repositories SmartDukaan

Rev

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

Rev 19421 Rev 19474
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