Subversion Repositories SmartDukaan

Rev

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

Rev 6611 Rev 6615
Line 99... Line 99...
99
        dest_code, exp, iscod, otgAvailable = serviceable_location_cache.get(1).get(destination_pin)
99
        dest_code, exp, iscod, otgAvailable = serviceable_location_cache.get(1).get(destination_pin)
100
        iscod = iscod and item_selling_price <= 9600
100
        iscod = iscod and item_selling_price <= 9600
101
        otgAvailable = otgAvailable and item_selling_price >= 2000
101
        otgAvailable = otgAvailable and item_selling_price >= 2000
102
        return 1, iscod, otgAvailable
102
        return 1, iscod, otgAvailable
103
    else:
103
    else:
104
        return None, False, False    
104
        return None, False    
105
 
105
 
106
def get_destination_code(providerId, pinCode):
106
def get_destination_code(providerId, pinCode):
107
    serviceableLocationDetail = ServiceableLocationDetails.query.filter_by(provider_id = providerId, dest_pincode = pinCode).one()
107
    serviceableLocationDetail = ServiceableLocationDetails.query.filter_by(provider_id = providerId, dest_pincode = pinCode).one()
108
    return serviceableLocationDetail.dest_code
108
    return serviceableLocationDetail.dest_code
109
    
109
    
Line 199... Line 199...
199
    serviceableLocationDetails.station_type = stationType
199
    serviceableLocationDetails.station_type = stationType
200
    serviceableLocationDetails.otgAvailable = otgAvailable
200
    serviceableLocationDetails.otgAvailable = otgAvailable
201
    session.commit()
201
    session.commit()
202
 
202
 
203
def update_pincode(providerId, pincode, exp, cod, otgAvailable):
203
def update_pincode(providerId, pincode, exp, cod, otgAvailable):
204
    serviceableLocationDetails = ServiceableLocationDetails().get_by(provider_id = providerId, dest_pincode = pincode).one()
204
    serviceableLocationDetails = ServiceableLocationDetails.get_by(provider_id = providerId, dest_pincode = pincode)
205
    serviceableLocationDetails.exp = exp
205
    serviceableLocationDetails.exp = exp
206
    serviceableLocationDetails.cod = cod
206
    serviceableLocationDetails.cod = cod
207
    serviceableLocationDetails.otgAvailable = otgAvailable
207
    serviceableLocationDetails.otgAvailable = otgAvailable
208
    session.commit()
208
    session.commit()
209
209