Subversion Repositories SmartDukaan

Rev

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

Rev 7627 Rev 7733
Line 225... Line 225...
225
    serviceableLocationDetails.dest_code = destCode
225
    serviceableLocationDetails.dest_code = destCode
226
    serviceableLocationDetails.exp = exp
226
    serviceableLocationDetails.exp = exp
227
    serviceableLocationDetails.cod = cod
227
    serviceableLocationDetails.cod = cod
228
    serviceableLocationDetails.station_type = stationType
228
    serviceableLocationDetails.station_type = stationType
229
    serviceableLocationDetails.otgAvailable = otgAvailable
229
    serviceableLocationDetails.otgAvailable = otgAvailable
230
    if provider == 1:
230
    if provider.id == 1:
231
        codlimit = 10000
231
        codlimit = 10000
232
        prepaidlimit = 50000
232
        prepaidlimit = 50000
233
    elif provider == 3:
233
    elif provider.id == 3:
234
        codlimit = 25000
234
        codlimit = 25000
235
        prepaidlimit = 100000
235
        prepaidlimit = 100000
236
    elif provider == 6:
236
    elif provider.id == 6:
237
        codlimit = 25000
237
        codlimit = 25000
238
        prepaidlimit = 100000
238
        prepaidlimit = 100000
239
    serviceableLocationDetails.providerPrepaidLimit = prepaidlimit
239
    serviceableLocationDetails.providerPrepaidLimit = prepaidlimit
240
    serviceableLocationDetails.providerCodLimit = codlimit
240
    serviceableLocationDetails.providerCodLimit = codlimit
241
    serviceableLocationDetails.websiteCodLimit = codlimit
241
    serviceableLocationDetails.websiteCodLimit = codlimit
Line 297... Line 297...
297
                return max(sp.minAdvancePrice, sp.recommendedPrice - storeCodLimit), True
297
                return max(sp.minAdvancePrice, sp.recommendedPrice - storeCodLimit), True
298
            if providerId == 1:
298
            if providerId == 1:
299
                return max(sp.minAdvancePrice, sp.recommendedPrice - storeCodLimit), True
299
                return max(sp.minAdvancePrice, sp.recommendedPrice - storeCodLimit), True
300
        else:
300
        else:
301
            return sp.recommendedPrice, False
301
            return sp.recommendedPrice, False
-
 
302
#Start:- Added by Manish Sharma for Multiple Pincode Updation on 05-Jul-2013
-
 
303
def get_Serviceable_Location_As_Per_ProviderId_And_Pincode(providerId, pincode):
-
 
304
    serviceableLocationDetails = ServiceableLocationDetails.get_by(provider_id = providerId, dest_pincode = pincode)
-
 
305
    session.commit()
-
 
306
    if serviceableLocationDetails:
-
 
307
        return True
-
 
308
    else:
-
 
309
        return False
302
 
310
    
-
 
311
def run_Complete_Update_For_Pincode():
-
 
312
    serviceableLocationDetails = ServiceableLocationDetails.query.all()
-
 
313
    for serviceableLocationDetail in serviceableLocationDetails:
-
 
314
        if serviceableLocationDetail.exp :
-
 
315
            serviceableLocationDetail.exp = False
-
 
316
        if  serviceableLocationDetail.cod :
-
 
317
            serviceableLocationDetail.cod = False
-
 
318
        if serviceableLocationDetail.otgAvailable :
-
 
319
            serviceableLocationDetail.otgAvailable = False
303
                
320
    session.commit()
-
 
321
#End:- Added by Manish Sharma for Multiple Pincode Updation on 05-Jul-2013             
304
            
322