diff --git a/SO_to_Inv/CustomerQuery.py b/SO_to_Inv/CustomerQuery.py index 08e5a83..6f99075 100644 --- a/SO_to_Inv/CustomerQuery.py +++ b/SO_to_Inv/CustomerQuery.py @@ -43,11 +43,17 @@ class CustomerQuery: PriceLevelName = None SP_PriceLevelName = None Addr1, Addr2, Addr3, Addr4, Addr5 = None, None, None, None, None - if CustomerRet.find('Addr1'): Addr1 = CustomerRet.find('Addr1').text - if CustomerRet.find('Addr2'): Addr2 = CustomerRet.find('Addr2').text - if CustomerRet.find('Addr3'): Addr3 = CustomerRet.find('Addr3').text - if CustomerRet.find('Addr4'): Addr4 = CustomerRet.find('Addr4').text - if CustomerRet.find('Addr5'): Addr5 = CustomerRet.find('Addr5').text + billaddressRet=CustomerRet.find('BillAddress') + # print(CustomerRet.find('.//Addr1')) #can + # print(CustomerRet.find('./Addr1')) #None + # print(CustomerRet.find('BillAddress/Addr1')) #can + if billaddressRet: + if billaddressRet.find('Addr1')!=None: Addr1 = billaddressRet.find('Addr1').text + if billaddressRet.find('Addr2')!=None: Addr2 = billaddressRet.find('Addr2').text + if billaddressRet.find('Addr3')!=None: Addr3 = billaddressRet.find('Addr3').text + if billaddressRet.find('Addr4')!=None: Addr4 = billaddressRet.find('Addr4').text + if billaddressRet.find('Addr5')!=None: Addr5 = billaddressRet.find('Addr5').text + print(Addr1, Addr2,) Addr1s.append(Addr1) Addr2s.append(Addr2) Addr3s.append(Addr3)