| Line 96... |
Line 96... |
| 96 |
except Exception as ex:
|
96 |
except Exception as ex:
|
| 97 |
print ex
|
97 |
print ex
|
| 98 |
raise LogisticsServiceException(103, "No Logistics partner listed for this destination pincode and the primary warehouse")
|
98 |
raise LogisticsServiceException(103, "No Logistics partner listed for this destination pincode and the primary warehouse")
|
| 99 |
|
99 |
|
| 100 |
def __get_logistics_provider_for_destination_pincode(destination_pin, item_selling_price, weight, type, billingWarehouseId):
|
100 |
def __get_logistics_provider_for_destination_pincode(destination_pin, item_selling_price, weight, type, billingWarehouseId):
|
| 101 |
if serviceable_location_cache.get(6).has_key(destination_pin):
|
- |
|
| 102 |
if weight < 480 and serviceable_location_cache.get(3).has_key(destination_pin) and type == DeliveryType.PREPAID:
|
- |
|
| 103 |
dest_code, exp, iscod, otgAvailable, websiteCodLimit, storeCodLimit, providerPrepaidLimit = serviceable_location_cache.get(3).get(destination_pin)
|
- |
|
| 104 |
if item_selling_price <= providerPrepaidLimit:
|
- |
|
| 105 |
iscod = iscod and item_selling_price <= websiteCodLimit
|
- |
|
| 106 |
otgAvailable = otgAvailable and item_selling_price >= 2000
|
- |
|
| 107 |
return 3, iscod, otgAvailable
|
- |
|
| 108 |
else:
|
- |
|
| 109 |
dest_code, exp, iscod, otgAvailable, websiteCodLimit, storeCodLimit, providerPrepaidLimit = serviceable_location_cache.get(6).get(destination_pin)
|
- |
|
| 110 |
if item_selling_price <= providerPrepaidLimit:
|
- |
|
| 111 |
iscod = iscod and item_selling_price <= websiteCodLimit
|
- |
|
| 112 |
otgAvailable = otgAvailable and item_selling_price >= 2000
|
- |
|
| 113 |
return 6, iscod, otgAvailable
|
- |
|
| 114 |
|
101 |
|
| 115 |
if serviceable_location_cache.get(3).has_key(destination_pin):
|
102 |
if serviceable_location_cache.get(3).has_key(destination_pin):
|
| 116 |
dest_code, exp, iscod, otgAvailable, websiteCodLimit, storeCodLimit, providerPrepaidLimit = serviceable_location_cache.get(3).get(destination_pin)
|
103 |
dest_code, exp, iscod, otgAvailable, websiteCodLimit, storeCodLimit, providerPrepaidLimit = serviceable_location_cache.get(3).get(destination_pin)
|
| 117 |
if item_selling_price <= providerPrepaidLimit:
|
104 |
if item_selling_price <= providerPrepaidLimit:
|
| 118 |
iscod = iscod and item_selling_price <= websiteCodLimit
|
105 |
iscod = iscod and item_selling_price <= websiteCodLimit
|