[QODBC-Desktop] Troubleshooting: Error when apply payment to an invoice 'TxnID' Not Found
Posted by Rajendra Dewani (QODBC Support) on 26 December 2013 09:56 AM
I am attempting to apply payments to invoices. I have also determined the TxnID of the Invoice I want to apply a payment to and used it in the SQL code specified on How to apply a payment to an invoice.
I am getting the error 'Error: 3120 - Object "43AC05E5-1352851019" specified in the request cannot be found.'
I have checked that I have the correct TxnID. I can do a "SELECT * from Invoice WHERE TxnID='43AC05E5-1352851019, '" and it works. It's just when I try the Insert Into operation that things fail.
I have confirmed that I can successfully write to QuickBooks by creating an unapplied payment. It is just when trying to apply the payment to a specific invoice.
I created a new unapplied payment and then tried applying that payment to an open invoice, which didn't work either.
My SQL Statement:
Also, I verified the invoice 43A96469-1351099713 belongs the customer 80000DC6-1286995152
1) The Invoice or the Bill is already paid
2) The Invoice or the Bill you are trying to adjust does not belong to the same customer/vendor as the Payment or Check is
3) The ID you have specified does not exist.
4) Missing ARAccount
Your query is missing ARAccount related column.
You need to insert ARAccountRefListID in your insert query.
Please add the ARAccountRefListID of the invoice you want to apply for payment in your query.
The ARAccountRefListID of the invoice you want to apply the payment to is "400000-1095829128", So please add this value to your insert query.
Please try to run the below query:
INSERT INTO ReceivePaymentLine (CustomerRefListID, DepositToAccountRefListID, ARAccountRefListID, TotalAmount, AppliedToTxnTxnID, AppliedToTxnPaymentAmount, Memo) VALUES ('80000DC6-1286995152', '4D0000-1095982517', '400000-1095829128',281.98, '43A96469-1351099713', 281.98, 'Apply payment test')