| Line 123... |
Line 123... |
| 123 |
warehouse_id, items_in_inventory = client.getItemAvailabilityAtLocation(warehouse_loc, itemId)
|
123 |
warehouse_id, items_in_inventory = client.getItemAvailabilityAtLocation(warehouse_loc, itemId)
|
| 124 |
except Exception as ex:
|
124 |
except Exception as ex:
|
| 125 |
raise LogisticsServiceException(103, "Unable to fetch inventory information about this item.")
|
125 |
raise LogisticsServiceException(103, "Unable to fetch inventory information about this item.")
|
| 126 |
if items_in_inventory < self.stock_threshold :
|
126 |
if items_in_inventory < self.stock_threshold :
|
| 127 |
delivery_time = delivery_time + self.time_to_producre
|
127 |
delivery_time = delivery_time + self.time_to_producre
|
| - |
|
128 |
|
| - |
|
129 |
if itemId == 1502:
|
| - |
|
130 |
delivery_time = delivery_time + 48
|
| - |
|
131 |
|
| 128 |
delivery_time = int(math.ceil(delivery_time/24.0))
|
132 |
delivery_time = int(math.ceil(delivery_time/24.0))
|
| 129 |
|
133 |
|
| 130 |
logistics_info = LogisticsInfo()
|
134 |
logistics_info = LogisticsInfo()
|
| 131 |
logistics_info.deliveryTime = delivery_time
|
135 |
logistics_info.deliveryTime = delivery_time
|
| 132 |
logistics_info.providerId = delivery_estimate.provider_id
|
136 |
logistics_info.providerId = delivery_estimate.provider_id
|