Subversion Repositories SmartDukaan

Rev

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

Rev 15679 Rev 15682
Line 959... Line 959...
959
        if CONTACT_PRIORITY.index(retailerContact.contact_type) > CONTACT_PRIORITY.index(contactType):
959
        if CONTACT_PRIORITY.index(retailerContact.contact_type) > CONTACT_PRIORITY.index(contactType):
960
            retailerContact.contact_type = contactType
960
            retailerContact.contact_type = contactType
961
 
961
 
962
def addAddressToRetailer(agentId, retailerId, address, storeName, pin, city,state, updateType):
962
def addAddressToRetailer(agentId, retailerId, address, storeName, pin, city,state, updateType):
963
    print "I am in addAddress"
963
    print "I am in addAddress"
-
 
964
    print agentId, retailerId, address, storeName, pin, city, state, updateType
964
    try:
965
    try:
965
        if updateType=='new':
966
        if updateType=='new':
966
            retailer = session.query(Retailers).filter_by(id=retailerId)
967
            retailer = session.query(Retailers).filter_by(id=retailerId)
967
            retailer.address = address
968
            retailer.address = address
968
            retailer.title = storeName
969
            retailer.title = storeName
969
            retailer.city = city
970
            retailer.city = city
970
            retailer.state = state
971
            retailer.state = state
971
            retailer.pin = pin
972
            retailer.pin = pin
972
        raddress = RetailerAddresses()
973
        raddress = RetailerAddresses()
973
        raddress.address = address
974
        raddress.address = address
-
 
975
        raddress.title = storeName
974
        raddress.agent_id = agentId
976
        raddress.agent_id = agentId
975
        raddress.city = city
977
        raddress.city = city
976
        raddress.pin = pin
978
        raddress.pin = pin
977
        raddress.retailer_id = retailerId
979
        raddress.retailer_id = retailerId
978
        raddress.state = state
980
        raddress.state = state