Reputation: 470
I want to get the invoice no. and list id of the invoice when I do a ReceivePaymentQueryRq with QBXML to know against which invoice the payment is being received. The quickbooks version is Enterprise 7.0 and sdk version in 13.0. Please help.
Upvotes: 0
Views: 300
Reputation: 27962
Do a ReceivePaymentQueryRq
, making sure to specify that you want the line items back:
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<ReceivePaymentQueryRq>
....
<IncludeLineItems>true</IncludeLineItems>
<IncludeRetElement>true</IncludeRetElement>
</ReceivePaymentQueryRq>
</QBXMLMsgsRq>
</QBXML>
You'll get back nodes like this:
...
<AppliedToTxnRet>
<TxnID>ABCD-1234</TxnID>
<TxnType>Invoice</TxnType>
<TxnDate>2015-02-03</TxnDate>
<RefNumber>1234</RefNumber>
<BalanceRemaining>50.00</BalanceRemaining>
<Amount>25.00</Amount>
</AppliedToTxnRet>
...
Which will tell you what invoices the payment was applied to.
You may need to upgrade QuickBooks to do this. QuickBooks 7 is 8 years old now, and has been unsupported for many years now.
Upvotes: 2
Reputation: 71
Looks to me like the AppliedToTxnRet group contains the information you seek. I have not actually used this but looking at the fields in ReceivePaymentQueryRs AppliedToTxnRet I see TxnID and RefNumber.
Upvotes: 0