| 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 |
'''
|
| - |
|
102 |
if serviceable_location_cache.get(6).has_key(destination_pin):
|
| - |
|
103 |
if weight < 480 and serviceable_location_cache.get(3).has_key(destination_pin) and type == DeliveryType.PREPAID:
|
| - |
|
104 |
dest_code, exp, iscod, otgAvailable, websiteCodLimit, storeCodLimit, providerPrepaidLimit = serviceable_location_cache.get(3).get(destination_pin)
|
| - |
|
105 |
if item_selling_price <= providerPrepaidLimit:
|
| - |
|
106 |
iscod = iscod and item_selling_price <= websiteCodLimit
|
| - |
|
107 |
otgAvailable = otgAvailable and item_selling_price >= 2000
|
| - |
|
108 |
return 3, iscod, otgAvailable
|
| - |
|
109 |
else:
|
| - |
|
110 |
dest_code, exp, iscod, otgAvailable, websiteCodLimit, storeCodLimit, providerPrepaidLimit = serviceable_location_cache.get(6).get(destination_pin)
|
| - |
|
111 |
if item_selling_price <= providerPrepaidLimit:
|
| - |
|
112 |
iscod = iscod and item_selling_price <= websiteCodLimit
|
| - |
|
113 |
otgAvailable = otgAvailable and item_selling_price >= 2000
|
| - |
|
114 |
return 6, iscod, otgAvailable
|
| 101 |
|
115 |
'''
|
| 102 |
if serviceable_location_cache.get(3).has_key(destination_pin):
|
116 |
if serviceable_location_cache.get(3).has_key(destination_pin):
|
| 103 |
dest_code, exp, iscod, otgAvailable, websiteCodLimit, storeCodLimit, providerPrepaidLimit = serviceable_location_cache.get(3).get(destination_pin)
|
117 |
dest_code, exp, iscod, otgAvailable, websiteCodLimit, storeCodLimit, providerPrepaidLimit = serviceable_location_cache.get(3).get(destination_pin)
|
| 104 |
if item_selling_price <= providerPrepaidLimit:
|
118 |
if item_selling_price <= providerPrepaidLimit:
|
| 105 |
iscod = iscod and item_selling_price <= websiteCodLimit
|
119 |
iscod = iscod and item_selling_price <= websiteCodLimit
|
| 106 |
otgAvailable = otgAvailable and item_selling_price >= 2000
|
120 |
otgAvailable = otgAvailable and item_selling_price >= 2000
|