Subversion Repositories SmartDukaan

Rev

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

Rev 5247 Rev 5270
Line 129... Line 129...
129
            #Get the id and location of actual warehouse that'll be used to fulfil this order.
129
            #Get the id and location of actual warehouse that'll be used to fulfil this order.
130
            warehouse_loc, fulfilmentWarehouseId, items_in_inventory, expected_delay, billingWarehouseId = client.getItemAvailabilityAtLocation(warehouse_loc, itemId)
130
            warehouse_loc, fulfilmentWarehouseId, items_in_inventory, expected_delay, billingWarehouseId = client.getItemAvailabilityAtLocation(warehouse_loc, itemId)
131
        except Exception as ex:
131
        except Exception as ex:
132
            raise LogisticsServiceException(103, "Unable to fetch inventory information about this item.")
132
            raise LogisticsServiceException(103, "Unable to fetch inventory information about this item.")
133
        
133
        
-
 
134
        
-
 
135
        
-
 
136
        ## Commented below part as we have only Delhi as warehouse city. If we will add some more warehouses in different cities, this could be  useful. 
134
        # We are revising the estimates based on the actual warehouse that this order will be assigned to.
137
        # We are revising the estimates based on the actual warehouse that this order will be assigned to.
135
        # This warehouse may be located in a zone which is different from the one we allocated for this pincode.
138
        # This warehouse may be located in a zone which is different from the one we allocated for this pincode.
136
        delivery_estimate = get_logistics_estimation(destination_pin, item.sellingPrice, warehouse_loc, type)
139
        #delivery_estimate = get_logistics_estimation(destination_pin, item.sellingPrice, warehouse_loc, type)
137
        if delivery_estimate is None:
140
        #if delivery_estimate is None:
138
            raise LogisticsServiceException(105, "Unable to fetch delivery estimate for pincode: " + destination_pin + " and revised location: " + str(warehouse_loc))
141
        #    raise LogisticsServiceException(105, "Unable to fetch delivery estimate for pincode: " + destination_pin + " and revised location: " + str(warehouse_loc))
139
        
142
        
140
        delivery_time = 24 * delivery_estimate.delivery_time
143
        delivery_time = 24 * delivery_estimate.delivery_time
141
        
144
        
142
        '''
145
        '''
143
        We're now calculating the expected shipping delay which is independent of
146
        We're now calculating the expected shipping delay which is independent of