Knowledgebase
[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

Instructions

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.


Note: 
 VB DEMO is to be used for testing of QODBC SQL queries only and is not a development tool.

 

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,
AppliedToTxnTxnID, AppliedToTxnPaymentAmount, Memo)  
Values (‘80000071-1481791895', ‘20000-934380912', 500.00, '648A-1481771732', 500.00,
'Payment for Invoice test')

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.

 

NOTE:

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

 

(21 vote(s))
Helpful
Not helpful

Comments (2)
Chloe
09 January 2013 06:52 PM
How do you apply payments to a 0 balance invoice? We have invoices that represent contract that have not been imported yet, but we need to apply payments to an invoice. The invoice is empty with a dummy line item and $0 balance. When inserting the ReceivePaymentLine entry, I get "Object specified does not exist", which is referring to the AppliedToTxnTxnID. In the SDK messages it says "The TxnID doesn't match an invoice to pay for the specified customer:job and AR Account or the invoice is aready paid." When I look at the invoice in QB, it shows PAID.
Chloe Sowers
20 January 2013 02:13 AM
How do you apply payments to a 0 balance invoice? We have invoices that represent contract that have not been imported yet, but we need to apply payments to an invoice. The invoice is empty with a dummy line item and $0 balance. When inserting the ReceivePaymentLine entry, I get "Object specified does not exist", which is referring to the AppliedToTxnTxnID. In the SDK messages it says "The TxnID doesn't match an invoice to pay for the specified customer:job and AR Account or the invoice is aready paid." When I look at the invoice in QB, it shows PAID.
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).