Subversion Repositories SmartDukaan

Rev

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

Rev 4804 Rev 4848
Line 77... Line 77...
77
    return providers 
77
    return providers 
78
 
78
 
79
def is_cod_allowed(destination_pin):
79
def is_cod_allowed(destination_pin):
80
    cod = False
80
    cod = False
81
    try:
81
    try:
-
 
82
        #FIXME As per ticket location from where only Aramex is servicing, should not be given to Aramex.
82
        for value in serviceable_location_cache.itervalues():
83
        for provider_id, value in serviceable_location_cache.iteritems():
83
            cod = cod or value[destination_pin][2]
84
            dest_code, exp, iscod, station_type = value[destination_pin]
-
 
85
            if provider_id == 1:
-
 
86
                cod = cod or iscod
84
    except Exception as ex:
87
    except Exception as ex:
85
        print "Unexpected error:", sys.exc_info()[0]
88
        print "Unexpected error:", sys.exc_info()[0]
86
    
-
 
87
    return cod
89
    return cod
88
 
90
 
89
def get_logistics_estimation(destination_pin, item_selling_price, warehouse_location=None, type=DeliveryType.PREPAID):
91
def get_logistics_estimation(destination_pin, item_selling_price, warehouse_location=None, type=DeliveryType.PREPAID):
90
    logging.info("Getting logistics estimation for pincode:" + destination_pin + " and warehouse location: " + str(warehouse_location))
92
    logging.info("Getting logistics estimation for pincode:" + destination_pin + " and warehouse location: " + str(warehouse_location))
91
    if warehouse_location is None:
93
    if warehouse_location is None: