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 receiving payment and applying it to an existing invoice. But if you want to keep the payment as 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 the sample company file as an example to show how to do it. Here is the detailed 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, and CustomerRefFullName can be used as a filter.

SQL Statement: select * from invoiceLine Where RefNumber='2' AND CustomerRefFullName='West Test'


Note: 
 QODBC Support Wizard is used only to test QODBC SQL queries and is not a development tool.

 

In the example above, the TxnID is 8C79-1481790565

Inserting the payment record

Use the below statement to insert a payment record:

INSERT INTO ReceivePaymentLine (CustomerRefListID, DepositToAccountRefListID, total amount,
AppliedToTxnTxnID, AppliedToTxnPaymentAmount, Memo)  
Values ('80000083-1481808249','30000-896814907', 500.00, '8C79-1481790565', 500.00,
'Payment for Invoice test')

Beware of the field BalanceRemaining. It indicates how much is left to pay. Usually, it is the same as the amount in the Invoice, but if you enabled the sales tax charge, this amount should be plus sales tax.

 

QODBC Allows Invoice not Being Paid Fully

The above statement's payment amount was entered as 500, which is less than the Balance Due. Let's see what we got after the execution of the above query:

Here is the result in QuickBooks:

As you can see, the amount due has been decreased by 500. Let’s finish the rest of the payment:

SQL Statement: INSERT INTO ReceivePaymentLine (CustomerRefListID, DepositToAccountRefListID, TotalAmount, AppliedToTxnTxnID, AppliedToTxnPaymentAmount, Memo) Values ('80000083-1481808249','30000-896814907', 362.65, '8C79-1481790565', 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 errors, 

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 it may not match 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).