Link to home
Create AccountLog in
Avatar of Rajkumar Gs
Rajkumar GsFlag for India

asked on

QuickBooks - qbXML to add a bill with expense ( BillAddRq.xml )

Please see the related question. I got qbXML to add bill with item data. Now I am trying for expense data.

This is what I have now. In BillAddRs.xml in related question, this should be included. But showing error as it is invalid
<ExpenseLine> 
<AccountRef> 
	<FullName>430001-1197741385</FullName> 
</AccountRef> 
<Amount>901.45</Amount>
<Memo>1" cubed mice</Memo> 
</ExpenseLine> 

Open in new window


I got this information from this link
http://www.zed-systems.com/support/KB/a81/importing-bills-into-quickbooks.aspx

Tried 'ExpenseLineAdd' instead of 'ExpenseLine' - not working

Could you help me by providing right qbXML format to add expense with bill in QuickBooks ?
Raj
Avatar of guvera
guvera
Flag of India image

Hi raj ,

 Could you plz tell in which line shows the error that is invalid?

Thanks
Guvera
Avatar of Rajkumar Gs

ASKER

Entire qbXML is invalid. Response comes back from QuickBook Web Connector without any error line.

Error is in the part of the qbXML I posted in question.

Do you have experience in QuickBooks with qbXML ?
Raj
This is the working qbXML format (with expense part, it will work)

<?xml version="1.0"?>
<QBXML><QBXMLMsgsRq onError = "continueOnError">
<BillAddRq requestID = "1">
<BillAdd>
<VendorRef>
	<FullName>Green Taxi Company</FullName>
</VendorRef>
<TxnDate>2012-12-22</TxnDate>
<DueDate>2013-01-21</DueDate>
<RefNumber>499</RefNumber>
<TermsRef>
	<FullName>Net 30</FullName>
</TermsRef>
<Memo>via access</Memo>
<Address>
	<Addr1>1060 N Kings Hway Suite 220</Addr1>
	<City>Cherry Hill</City>
	<State>NJ</State>
	<PostalCode>08034</PostalCode>
	<Country></Country>
</Address>
<Phone>(856) 482-2424</Phone>
<Fax>(310) 927-8398</Fax>


<ItemLineAdd> 
<ItemRef> 
	<FullName>430001-1197741385</FullName> 
</ItemRef> 
<Desc>1" cubed mice</Desc> 
<Quantity>10</Quantity> 
<Cost>0.870</Cost> 
<Amount>901.45</Amount>
</ItemLineAdd> 
</BillAdd>
</BillAddRq>
</QBXMLMsgsRq>
</QBXML> 

Open in new window

Sorry. without expense part, it will work. see the qbXMl in previous comment.
Thanks Guvera,

But I couldn't find any useful information to fix my issue. - qbXML format to add Bill with Expense part.

Please explain in detail
Raj
ASKER CERTIFIED SOLUTION
Avatar of Rajkumar Gs
Rajkumar Gs
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
1. qbXML to add a NEW VENDOR in QuickBooks - VendorAddRq.xml

<?xml version="1.0" ?> 
  <?qbxml version="4.0"?> 
 <QBXML>
 <QBXMLMsgsRq onError="stopOnError">
 <VendorAddRq requestID="1">
 <VendorAdd>
  <Name>DELL Computer Ltd</Name> 
  <IsActive>1</IsActive> 
  <CompanyName /> 
  <Salutation /> 
  <FirstName /> 
  <LastName /> 
 <VendorAddress>
  <Addr1>1234 KingsHway</Addr1> 
  <Addr2 /> 
  <City>Cherry Hill</City> 
  <State>NJ</State> 
  <PostalCode>08034</PostalCode> 
  <Country /> 
  </VendorAddress>
  <Phone>(856) 482-2424</Phone> 
  <AltPhone>650-214-6549</AltPhone> 
  <Fax>(301) 927-8398</Fax> 
  <Email /> 
  <Contact>Shaun</Contact> 
  <NameOnCheck /> 
  <AccountNumber /> 
 <VendorTypeRef>
  <FullName>Materials</FullName> 
  </VendorTypeRef>
 <TermsRef>
  <FullName>1% 10 Net 30</FullName> 
  </TermsRef>
  <CreditLimit /> 
  </VendorAdd>
  </VendorAddRq>
  </QBXMLMsgsRq>
  </QBXML>

Open in new window


2. SUCCESS RESPONSE to Add Vendor Request

 
<?xml version="1.0" ?> 
 <QBXML>
 <QBXMLMsgsRs>
 <VendorAddRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
 <VendorRet>
  <ListID>8000004D-1293529277</ListID> 
  <TimeCreated>2010-12-28T04:41:17-05:00</TimeCreated> 
  <TimeModified>2010-12-28T04:41:17-05:00</TimeModified> 
  <EditSequence>1293529277</EditSequence> 
  <Name>DELL Computer Ltd</Name> 
  <IsActive>true</IsActive> 
 <VendorAddress>
  <Addr1>1234 KingsHway</Addr1> 
  <City>Cherry Hill</City> 
  <State>NJ</State> 
  <PostalCode>08034</PostalCode> 
  </VendorAddress>
  <Phone>(856) 482-2424</Phone> 
  <AltPhone>650-214-6549</AltPhone> 
  <Fax>(301) 927-8398</Fax> 
  <Contact>Shaun</Contact> 
 <VendorTypeRef>
  <ListID>80000006-1292947257</ListID> 
  <FullName>Materials</FullName> 
  </VendorTypeRef>
 <TermsRef>
  <ListID>80000001-1292873933</ListID> 
  <FullName>1% 10 Net 30</FullName> 
  </TermsRef>
  <IsVendorEligibleFor1099>false</IsVendorEligibleFor1099> 
  <Balance>0.00</Balance> 
  </VendorRet>
  </VendorAddRs>
  </QBXMLMsgsRs>
  </QBXML>

Open in new window


3. qbXML to ADD BILL with Expense & Item data in QuickBooks - BillAddRq.xml

<?xml version="1.0" ?> 
  <?qbxml version="4.0"?> 
 <QBXML>
 <QBXMLMsgsRq onError="continueOnError">
 <BillAddRq requestID="1">
 <BillAdd>
 <VendorRef>
  <FullName>DELL Computer Ltd</FullName> 
  </VendorRef>
  <TxnDate>2010-10-17</TxnDate> 
  <DueDate /> 
  <RefNumber /> 
 <TermsRef>
  <FullName>N/A</FullName> 
  </TermsRef>
  <Memo /> 
 <ExpenseLineAdd>
 <AccountRef>
  <FullName>Automobile Expense</FullName> 
  </AccountRef>
  <Amount>1000.00</Amount> 
  <Memo>Test Comments</Memo> 
  </ExpenseLineAdd>
 <ExpenseLineAdd>
 <AccountRef>
  <FullName>Computer and Internet Expenses</FullName> 
  </AccountRef>
  <Amount>555.15</Amount> 
  <Memo>Test Comments</Memo> 
  </ExpenseLineAdd>
 <ItemLineAdd>
 <ItemRef>
  <FullName>Digital Camera</FullName> 
  </ItemRef>
  <Desc>Digital Camera</Desc> 
  <Quantity>2</Quantity> 
  <Cost>6500.00</Cost> 
  <Amount>13000.00</Amount> 
  </ItemLineAdd>
 <ItemLineAdd>
 <ItemRef>
  <FullName>Laser Printer</FullName> 
  </ItemRef>
  <Desc>Laser Printer</Desc> 
  <Quantity>1</Quantity> 
  <Cost>5000.00</Cost> 
  <Amount>5000.00</Amount> 
  </ItemLineAdd>
  </BillAdd>
  </BillAddRq>
  </QBXMLMsgsRq>
  </QBXML>

Open in new window


4. SUCCESS RESPONSE to add a new bill from QuickBooks

<?xml version="1.0" ?> 
 <QBXML>
 <QBXMLMsgsRs>
 <BillAddRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
 <BillRet>
  <TxnID>182-1293529466</TxnID> 
  <TimeCreated>2010-12-28T04:44:26-05:00</TimeCreated> 
  <TimeModified>2010-12-28T04:44:26-05:00</TimeModified> 
  <EditSequence>1293529466</EditSequence> 
  <TxnNumber>113</TxnNumber> 
 <VendorRef>
  <ListID>8000004D-1293529277</ListID> 
  <FullName>DELL Computer Ltd</FullName> 
  </VendorRef>
 <APAccountRef>
  <ListID>8000002A-1292874349</ListID> 
  <FullName>Accounts Payable</FullName> 
  </APAccountRef>
  <TxnDate>2010-10-17</TxnDate> 
  <DueDate>2010-10-17</DueDate> 
  <AmountDue>19555.15</AmountDue> 
 <TermsRef>
  <ListID>80000008-1293434720</ListID> 
  <FullName>N/A</FullName> 
  </TermsRef>
  <IsPaid>false</IsPaid> 
 <ExpenseLineRet>
  <TxnLineID>184-1293529466</TxnLineID> 
 <AccountRef>
  <ListID>80000018-1292873933</ListID> 
  <FullName>Automobile Expense</FullName> 
  </AccountRef>
  <Amount>1000.00</Amount> 
  <Memo>Test Comments</Memo> 
  </ExpenseLineRet>
 <ExpenseLineRet>
  <TxnLineID>185-1293529466</TxnLineID> 
 <AccountRef>
  <ListID>8000001A-1292873933</ListID> 
  <FullName>Computer and Internet Expenses</FullName> 
  </AccountRef>
  <Amount>555.15</Amount> 
  <Memo>Test Comments</Memo> 
  </ExpenseLineRet>
 <ItemLineRet>
  <TxnLineID>186-1293529466</TxnLineID> 
 <ItemRef>
  <ListID>80000006-1293435012</ListID> 
  <FullName>Digital Camera</FullName> 
  </ItemRef>
  <Desc>Digital Camera</Desc> 
  <Quantity>2</Quantity> 
  <Cost>6500</Cost> 
  <Amount>13000.00</Amount> 
  </ItemLineRet>
 <ItemLineRet>
  <TxnLineID>187-1293529466</TxnLineID> 
 <ItemRef>
  <ListID>80000007-1293435039</ListID> 
  <FullName>Laser Printer</FullName> 
  </ItemRef>
  <Desc>Laser Printer</Desc> 
  <Quantity>1</Quantity> 
  <Cost>5000</Cost> 
  <Amount>5000.00</Amount> 
  </ItemLineRet>
  </BillRet>
  </BillAddRs>
  </QBXMLMsgsRs>
  </QBXML>

Open in new window

I got the solution as my own.

Thanks Guvera for your attempt to help me
Raj
Avatar of Member_2_7967223
Member_2_7967223

Thank you very much.. This code really helped me in getting suppliers and bills from a database and putting the data into quickbooks.
I really appreciate your good work.