| Line 173... |
Line 173... |
| 173 |
raise LogisticsServiceException(103, "Unable to fetch inventory information about this item.")
|
173 |
raise LogisticsServiceException(103, "Unable to fetch inventory information about this item.")
|
| 174 |
|
174 |
|
| 175 |
if pickUp == PickUpType.COURIER:
|
175 |
if pickUp == PickUpType.COURIER:
|
| 176 |
delivery_estimate = get_logistics_estimation(destination_pin, sellingPrice, weight, type, billingWarehouseId)
|
176 |
delivery_estimate = get_logistics_estimation(destination_pin, sellingPrice, weight, type, billingWarehouseId)
|
| 177 |
else:
|
177 |
else:
|
| 178 |
#if pickUp == PickUpType.RUNNER or pickUp == PickUpType.SELF:
|
- |
|
| 179 |
delivery_estimate = _DeliveryEstimateObject(0, 0, get_provider_for_pickup_type(pickUp), False, False)
|
178 |
delivery_estimate = _DeliveryEstimateObject(0, 0, get_provider_for_pickup_type(pickUp), False, False)
|
| 180 |
if delivery_estimate is None:
|
179 |
if delivery_estimate is None:
|
| 181 |
raise LogisticsServiceException(104, "Unable to fetch delivery estimate for this pincode.")
|
180 |
raise LogisticsServiceException(104, "Unable to fetch delivery estimate for this pincode.")
|
| 182 |
|
181 |
|
| 183 |
|
182 |
|
| Line 193... |
Line 192... |
| 193 |
'''
|
192 |
'''
|
| 194 |
We're now calculating the expected shipping delay which is independent of
|
193 |
We're now calculating the expected shipping delay which is independent of
|
| 195 |
the courier agency and is completely within our control (well, almost).
|
194 |
the courier agency and is completely within our control (well, almost).
|
| 196 |
'''
|
195 |
'''
|
| 197 |
#Always add the expected delay
|
196 |
#Always add the expected delay
|
| 198 |
#As per Deenanath This should be removed
|
197 |
#this is due to virtual inventory
|
| 199 |
shipping_delay = 24 * expected_delay
|
198 |
shipping_delay = 24 * expected_delay
|
| 200 |
|
199 |
|
| 201 |
# Sometimes we set negative shipping delay just in case we know time to procure will be less than the default.
|
200 |
# Sometimes we set negative shipping delay just in case we know time to procure will be less than the default.
|
| 202 |
# If we have received inventory and forgot to remove expected delay from item, it could lead to display negative shipping days.
|
201 |
# If we have received inventory and forgot to remove expected delay from item, it could lead to display negative shipping days.
|
| 203 |
if shipping_delay < 0:
|
202 |
if shipping_delay < 0:
|