Subversion Repositories SmartDukaan

Rev

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

Rev 5572 Rev 5605
Line 37... Line 37...
37
                    '600043','600044','600045','600046','600047','600049','600050','600051','600053','600054','600055','600056','600058','600059',\
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',\
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',\
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',\
40
                    '600093','600094','600095','600096','600097','600098','600099','600100','600101','600102','600104','600105','600106','600107',\
41
                    '600108','600110','600111','600112','600113','600118','600122','600126']
41
                    '600108','600110','600111','600112','600113','600118','600122','600126']
-
 
42
 
-
 
43
hyd_pincodes = ['500001','500002','500003','500004','500005','500006','500007','500008','500009','500010','500011','500012','500013','500014','500015',\
-
 
44
                '500016','500017','500018','500019','500020','500021','500022','500023','500024','500025','500026','500027','500028','500029','500030',\
-
 
45
                '500032','500033','500034','500035','500036','500037','500038','500039','500040','500041','500042','500044','500045','500047','500048',\
-
 
46
                '500049','500050','500051','500052','500053','500054','500055','500056','500057','500058','500059','500060','500061','500062','500063',\
-
 
47
                '500064','500065','500066','500067','500068','500069','500070','500071','500072','500073','500074','500076','500077','500079','500080',\
-
 
48
                '500081','500082','500085','500095']
42
'''
49
'''
43
This class is for only data transfer. Never used outside this module.
50
This class is for only data transfer. Never used outside this module.
44
'''
51
'''
45
class _DeliveryEstimateObject:
52
class _DeliveryEstimateObject:
46
    def __init__(self, delivery_time, reliability, provider_id, warehouse_location, codAllowed):
53
    def __init__(self, delivery_time, reliability, provider_id, warehouse_location, codAllowed):
Line 116... Line 123...
116
    if ncr_pincodes.__contains__(destination_pin):
123
    if ncr_pincodes.__contains__(destination_pin):
117
        if item_selling_price <= 20000:
124
        if item_selling_price <= 20000:
118
            return 3, True
125
            return 3, True
119
    if type == DeliveryType.COD and chennai_pincodes.__contains__(destination_pin):
126
    if type == DeliveryType.COD and chennai_pincodes.__contains__(destination_pin):
120
        if 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: 
121
            return 3, True        
131
            return 3, True
-
 
132
    if type == DeliveryType.PREPAID and hyd_pincodes.__contains__(destination_pin):
-
 
133
        if item_selling_price <= 5000: 
-
 
134
            return 3, True
122
    if serviceable_location_cache.get(1).has_key(destination_pin):
135
    if serviceable_location_cache.get(1).has_key(destination_pin):
123
        dest_code, exp, iscod, station_type = serviceable_location_cache.get(1).get(destination_pin)
136
        dest_code, exp, iscod, station_type = serviceable_location_cache.get(1).get(destination_pin)
124
        iscod = iscod and item_selling_price <= 10000
137
        iscod = iscod and item_selling_price <= 10000
125
        return 1, iscod
138
        return 1, iscod
126
    elif type == DeliveryType.PREPAID and chennai_pincodes.__contains__(destination_pin):
139
    elif type == DeliveryType.PREPAID and chennai_pincodes.__contains__(destination_pin):