Subversion Repositories SmartDukaan

Rev

Rev 8575 | Rev 9964 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8575 Rev 9154
Line 91... Line 91...
91
    except Exception as ex:
91
    except Exception as ex:
92
        print ex
92
        print ex
93
        raise LogisticsServiceException(103, "No Logistics partner listed for this destination pincode and the primary warehouse")
93
        raise LogisticsServiceException(103, "No Logistics partner listed for this destination pincode and the primary warehouse")
94
 
94
 
95
def __get_logistics_provider_for_destination_pincode(destination_pin, item_selling_price, weight, type, billingWarehouseId):
95
def __get_logistics_provider_for_destination_pincode(destination_pin, item_selling_price, weight, type, billingWarehouseId):
96
    if billingWarehouseId not in [12,13] and serviceable_location_cache.get(6).has_key(destination_pin):
96
    if serviceable_location_cache.get(6).has_key(destination_pin):
97
        if weight < 480 and serviceable_location_cache.get(3).has_key(destination_pin) and (type == DeliveryType.PREPAID or item_selling_price < 3000):
97
        if weight < 480 and serviceable_location_cache.get(3).has_key(destination_pin) and type == DeliveryType.PREPAID:
98
            dest_code, exp, iscod, otgAvailable, websiteCodLimit, storeCodLimit, providerPrepaidLimit = serviceable_location_cache.get(3).get(destination_pin)
98
            dest_code, exp, iscod, otgAvailable, websiteCodLimit, storeCodLimit, providerPrepaidLimit = serviceable_location_cache.get(3).get(destination_pin)
99
            if item_selling_price <= providerPrepaidLimit:
99
            if item_selling_price <= providerPrepaidLimit:
100
                iscod = iscod and item_selling_price <= websiteCodLimit
100
                iscod = iscod and item_selling_price <= websiteCodLimit
101
                otgAvailable = otgAvailable and item_selling_price >= 2000
101
                otgAvailable = otgAvailable and item_selling_price >= 2000
102
                return 3, iscod, otgAvailable
102
                return 3, iscod, otgAvailable