Subversion Repositories SmartDukaan

Rev

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

Rev 5387 Rev 5482
Line 29... Line 29...
29
                '110110','110112','110113','110114','110115','110116','110117','110118','110119','110120','110122','110124','110125','110301','110302',\
29
                '110110','110112','110113','110114','110115','110116','110117','110118','110119','110120','110122','110124','110125','110301','110302',\
30
                '110501','110502','110503','110504','110505','110510','110511','110512','110601','110602','110603','110604','110605','110606','110607',\
30
                '110501','110502','110503','110504','110505','110510','110511','110512','110601','110602','110603','110604','110605','110606','110607',\
31
                '110608','110609','122001','122002','122003','122005','122006','122008','122009','122010','122015','122017','201010','201011','201012',\
31
                '110608','110609','122001','122002','122003','122005','122006','122008','122009','122010','122015','122017','201010','201011','201012',\
32
                '201014','201301','201302','201303','201304','201305','201306','201307','201309','201310','201311']
32
                '201014','201301','201302','201303','201304','201305','201306','201307','201309','201310','201311']
33
 
33
 
-
 
34
chennai_pincodes = ['600001','600002','600003','600004','600005','600006','600007','600008','600009','600010','600011','600012','600013','600014',\
-
 
35
                    '600015','600016','600017','600018','600019','600020','600021','600022','600023','600024','600025','600026','600027','600028',\
-
 
36
                    '600029','600030','600031','600032','600033','600034','600035','600036','600037','600038','600039','600040','600041','600042',\
-
 
37
                    '600043','600044','600045','600046','600047','600049','600050','600051','600053','600054','600055','600056','600058','600059',\
-
 
38
                    '600060','600061','600062','600063','600064','600069','600070','600071','600073','600074','600075','600076','600077','600078',\
-
 
39
                    '600079','600080','600081','600082','600083','600084','600085','600086','600087','600088','600089','600090','600091','600092',\
-
 
40
                    '600093','600094','600095','600096','600097','600098','600099','600100','600101','600102','600104','600105','600106','600107',\
-
 
41
                    '600108','600110','600111','600112','600113','600118','600122','600126']
34
'''
42
'''
35
This class is for only data transfer. Never used outside this module.
43
This class is for only data transfer. Never used outside this module.
36
'''
44
'''
37
class _DeliveryEstimateObject:
45
class _DeliveryEstimateObject:
38
    def __init__(self, delivery_time, reliability, provider_id, warehouse_location, codAllowed):
46
    def __init__(self, delivery_time, reliability, provider_id, warehouse_location, codAllowed):
Line 106... Line 114...
106
 
114
 
107
def __get_logistics_provider_for_destination_pincode(type, destination_pin, item_selling_price):
115
def __get_logistics_provider_for_destination_pincode(type, destination_pin, item_selling_price):
108
    if ncr_pincodes.__contains__(destination_pin):
116
    if ncr_pincodes.__contains__(destination_pin):
109
        if item_selling_price <= 20000:
117
        if item_selling_price <= 20000:
110
            return 3, True
118
            return 3, True
-
 
119
    if type == DeliveryType.COD and chennai_pincodes.__contains__(destination_pin):
-
 
120
        if item_selling_price <= 10000:
-
 
121
            return 3, True        
111
    if serviceable_location_cache.get(1).has_key(destination_pin):
122
    if serviceable_location_cache.get(1).has_key(destination_pin):
112
        dest_code, exp, iscod, station_type = serviceable_location_cache.get(1).get(destination_pin)
123
        dest_code, exp, iscod, station_type = serviceable_location_cache.get(1).get(destination_pin)
113
        iscod = iscod and item_selling_price <= 10000
124
        iscod = iscod and item_selling_price <= 10000
114
        return 1, iscod
125
        return 1, iscod
-
 
126
    elif type == DeliveryType.PREPAID and chennai_pincodes.__contains__(destination_pin):
-
 
127
        return 3, False
115
    else:
128
    else:
116
        return None, False    
129
        return None, False    
117
 
130
 
118
        
131
        
119
def add_empty_AWBs(numbers, provider_id, type):
132
def add_empty_AWBs(numbers, provider_id, type):