[QODBC-Desktop] How to apply a payment to an invoice
Posted by Wilson (QODBC Support) on 07 February 2012 03:01 AM
How to Pay an Existing Invoice
How to apply a payment to the invoice
This article is about how to receive a payment and apply it to an existing invoice. But if you want to keep the payment as a customer credit, please refer: How to Receive A Payment not be Applied to an Invoice ( How to handle Customer credits on account )
Let's take an invoice called "west's test" in sample company file as an example to show how to do it. Here is the detail information about this information:
Find the TxnID of the Invoice you want to pay
First, you need to find out the TxnID of the invoice, the field RefNumber, CustomerRefFullName can be used as a filter.
In the example above, the TxnID is 648A-1481771732
Inserting the payment record
Use the below statement to insert a payment record:
INSERT INTO ReceivePaymentLine (CustomerRefListID, DepositToAccountRefListID, TotalAmount,
Beware of field BalanceRemaining, it indicates that how much left to pay, usually it is the same as the amount in the invoice, but if you enabled sales tax charge, this amount should plus sales tax.
QODBC Allows Invoice not Being Paid Fully
In the above statement, the payment amount was entered as 500, which is less than the Balance Due, let's see what we got after execution of the above query:
The insert is complete without any problems. And here is the result in QuickBooks:
As you can see, Amount due have been decreased by 500. Let’s finish the rest of the payment:
INSERT INTO ReceivePaymentLine (CustomerRefListID, DepositToAccountRefListID, TotalAmount, AppliedToTxnTxnID, AppliedToTxnPaymentAmount, Memo) Values (‘80000071-1481791895’, ‘20000-934380912’, 362.65, ‘648A-1481771732’, 362.65, 'Payment for Invoice test')
The invoice is fully paid and is off the pending list.
In case you are facing one of the following error,
Object "43AC05E5-1352851019" specified in the request cannot be found.'
Please refer to Error when applying the payment to an invoice 'TxnID' Not Found. You may not have supplied ARAccountRefListID or may not be matching with the invoice record.
Keywords: how to make payment through invoice using qodbc