| Line 118... |
Line 118... |
| 118 |
except Exception as ex:
|
118 |
except Exception as ex:
|
| 119 |
print ex
|
119 |
print ex
|
| 120 |
raise LogisticsServiceException(103, "No Logistics partner listed for this destination pincode and the primary warehouse")
|
120 |
raise LogisticsServiceException(103, "No Logistics partner listed for this destination pincode and the primary warehouse")
|
| 121 |
|
121 |
|
| 122 |
def __get_logistics_provider_for_destination_pincode(type, destination_pin, item_selling_price):
|
122 |
def __get_logistics_provider_for_destination_pincode(type, destination_pin, item_selling_price):
|
| 123 |
if ncr_pincodes.__contains__(destination_pin):
|
123 |
if ncr_pincodes.__contains__(destination_pin) and item_selling_price <= 20000:
|
| 124 |
if item_selling_price <= 20000:
|
- |
|
| 125 |
return 3, True
|
124 |
return 3, True
|
| 126 |
if type == DeliveryType.COD and chennai_pincodes.__contains__(destination_pin):
|
125 |
if type == DeliveryType.COD and (chennai_pincodes.__contains__(destination_pin) or hyd_pincodes.__contains__(destination_pin)) and item_selling_price <= 10000:
|
| 127 |
if item_selling_price <= 10000:
|
- |
|
| 128 |
return 3, True
|
- |
|
| 129 |
if type == DeliveryType.COD and hyd_pincodes.__contains__(destination_pin):
|
- |
|
| 130 |
if item_selling_price <= 10000:
|
- |
|
| 131 |
return 3, True
|
126 |
return 3, True
|
| 132 |
if type == DeliveryType.PREPAID and hyd_pincodes.__contains__(destination_pin):
|
127 |
if type == DeliveryType.PREPAID and (chennai_pincodes.__contains__(destination_pin) or hyd_pincodes.__contains__(destination_pin)) and item_selling_price <= 5000:
|
| 133 |
if item_selling_price <= 5000:
|
- |
|
| 134 |
return 3, True
|
128 |
return 3, True
|
| 135 |
if serviceable_location_cache.get(1).has_key(destination_pin):
|
129 |
if serviceable_location_cache.get(1).has_key(destination_pin):
|
| 136 |
dest_code, exp, iscod, station_type = serviceable_location_cache.get(1).get(destination_pin)
|
130 |
dest_code, exp, iscod, station_type = serviceable_location_cache.get(1).get(destination_pin)
|
| 137 |
iscod = iscod and item_selling_price <= 10000
|
131 |
iscod = iscod and item_selling_price <= 10000
|
| 138 |
return 1, iscod
|
132 |
return 1, iscod
|
| 139 |
elif type == DeliveryType.PREPAID and chennai_pincodes.__contains__(destination_pin):
|
133 |
elif type == DeliveryType.PREPAID and chennai_pincodes.__contains__(destination_pin):
|