Error 3120 - Inserting a receivePaymentLine Record |
Author |
Message |
robc |
|
Group | : Members |
Posts | : 13 |
Joined | : 2006-04-27 |
|
Profile |
|
Posted : 2006-06-08 05:50:18 |
I am inserting a record using the query below. I get an error 3120 - object "24D63-1056992623" specified in the request cannot be found. The object in question is the TxnId for an invoice. When I query the invoice table for that invoice, it does exist and there are already rows existing in the receivePaymentLine table that have this ID in the appliedToTxnTxnID column.
Can you help me determine why I am getting this error?
Thanks.
Insert into receivePaymentLine (customerRefListId, customerRefFullName, appliedToTxnTxnID, TxnDate, TotalAmount, RefNumber, paymentMethodRefListId, depositToAccountRefListId, Memo) values ('45F0000-1025192820','ART Co,'24D63-1056992623', {d'2006-06-06'}, 10, '123', '20000-916432954', 'F70000-920993005', 'Memodata')
|
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-06-08 09:03:49 |
|
|
|
robc |
|
Group | : Members |
Posts | : 13 |
Joined | : 2006-04-27 |
|
Profile |
|
Posted : 2006-06-09 04:01:27 |
I see. The invoice I am referencing has isPaid = true. That is why the error message says that it is not found. Can't post a payment to a paid invoice.
Thank you for you help. |
|
|
|
|
Posted : 2007-03-27 04:58:17 |
I was seeing this same problem, and after reading this post I realized that I was creating an invoice with an amount of 0, which means that the invoice is paid. I was then trying to insert a payment on this invoice, the payment being 0. This didn't work. Thanks for the help! |
|
|
|
|
Posted : 2008-12-04 09:26:07 |
Hi,
I am running a query: INSERT INTO ReceivePaymentLine (AppliedToTxnTxnID,AppliedToTxnPaymentAmount,FQSaveToCache) Values ('8A6A1-1222137381',100,True) INSERT INTO ReceivePayment (CustomerRefListID,ARAccountRefListID,TxnDate,RefNumber,TotalAmount,PaymentMethodRefListID,DepositToAccountRefListID,Memo) Values ('80001171-1228276005','2C0000-1182395184',{d'2008-11-03'},'1015371',100,'B0001-1184537282','2D0000-1182395224','1015371') and it gives me the same error ([QODBC] Error: 3120 - Object "8A6A1-1222137381" specified in the request cannot be found.). I've seen this error before and in previous cases it was caused by either paid invoices or multiple AR's. This time The invoice is definitely not paid (checking the invoice in QBs as well as querying for it, output below)
TxnID TimeCreated TimeModified EditSequence TxnNumber CustomerRefListID CustomerRefFullName ClassRefListID ClassRefFullName ARAccountRefListID ARAccountRefFullName TemplateRefListID TemplateRefFullName TxnDate TxnDateMacro RefNumber BillAddressAddr1 BillAddressAddr2 BillAddressAddr3 BillAddressAddr4 BillAddressAddr5 BillAddressCity BillAddressState BillAddressProvince BillAddressCounty BillAddressPostalCode BillAddressCountry BillAddressNote BillAddressBlockAddr1 BillAddressBlockAddr2 BillAddressBlockAddr3 BillAddressBlockAddr4 BillAddressBlockAddr5 ShipAddressAddr1 ShipAddressAddr2 ShipAddressAddr3 ShipAddressAddr4 ShipAddressAddr5 ShipAddressCity ShipAddressState ShipAddressProvince ShipAddressCounty ShipAddressPostalCode ShipAddressCountry ShipAddressNote ShipAddressBlockAddr1 ShipAddressBlockAddr2 ShipAddressBlockAddr3 ShipAddressBlockAddr4 ShipAddressBlockAddr5 IsPending IsFinanceCharge PONumber TermsRefListID TermsRefFullName DueDate SalesRepRefListID SalesRepRefFullName FOB ShipDate ShipMethodRefListID ShipMethodRefFullName Subtotal ItemSalesTaxRefListID ItemSalesTaxRefFullName SalesTaxPercentage SalesTaxTotal Memo CustomerMsgRefListID CustomerMsgRefFullName IsToBePrinted IsToBeEmailed IsTaxIncluded CustomerSalesTaxCodeRefListID CustomerSalesTaxCodeRefFullName CustomerTaxCodeRefListID CustomerTaxCodeRefFullName SuggestedDiscountAmount SuggestedDiscountDate CustomFieldOther LinkToTxnID1 Tax1Total Tax2Total ExchangeRate AmountIncludesVAT CustomFieldEDINetwork CustomFieldEDIRefNo CustomFieldEDIStatus 8A6A1-1222137381 23/09/2008 2:36:21 a.m. 23/09/2008 2:36:21 a.m. 1222137381 68136 80001156-1222137253 Sh*** Limited 20000-1201577790 Pon 2C0000-1182395184 Accounts Receivable 60000-1173393480 FM Invoice 26/08/2008 All 1015371 Sh*** Limited Sh*** Limited False False 26/08/2008 26/08/2008 88.89 12.5 11.11 False False
There are no associated payment for this invoice.
This environment is running QBs Pro 2008/09 QBi and QODBC v9.00.00.253
On a side note I am still wondering why IsPaid field has been removed... |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2008-12-06 09:58:52 |
It's kind of hard to work out what's wrong with this complex method. Try stripping it back to the basics:
INSERT INTO ReceivePaymentLine (CustomerRefListID, DepositToAccountRefListID, TotalAmount, AppliedToTxnTxnID, AppliedToTxnPaymentAmount, TxnDate, FQSaveToCache) Values ('80001171-1228276005', '2D0000-1182395224', 100.00, '8A6A1-1222137381', 100.00, {d'2008-11-03'} ,0)
and go from there. The "IsPaid" really applies to Invoice headers only. |
|
|
|
|
Posted : 2008-12-08 10:45:01 |
Thanks Tom.
I did try using just the Insert Into ..Lines - same result...
And I cannot use the ISPaid column on Invoice table either - running Select TxnID,IsPaid From Invoice Where refnumber='ORD0013478' gives me ODBC SqlState: 42S00 Native Error Code: 11021 [QODBC] Column not found: IsPaid |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2008-12-08 20:51:02 |
What does:
Select * from Invoice where TxnID='8A6A1-1222137381'
return? |
|
|
|
|
Posted : 2008-12-09 06:47:25 |
The result of Select * from Invoice where TxnID='8A6A1-1222137381' is in my first post in blue after the queries for inserting payment. Cheers. |
|
|
|
|
Posted : 2008-12-12 10:05:08 |
Tom, any comments on the absence of the IsPaid field?.. |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2008-12-14 16:52:58 |
|
|
|
|
Posted : 2008-12-15 08:22:44 |
Here they are: sp_columns invoice
sp_columns invoiceline
Thanks. |
|
|
|
|
Posted : 2009-01-12 08:14:34 |
Merry Christmas and Happy New Year Tom! Any news on this issue? |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2009-01-12 12:24:38 |
The IsPaid missing bug was reported to the QODBC Software Engineer on QSupport Ticket ID: BR00000095 dated 15 Dec 2008 08:53:25. It has to do with Intuit adding SDK 6.1 as opposed to calling it 6.0. We have some fields that got redefined in 7.0 so we had last version 6.0 on the old field and those should have been changed to 6.1 when that was added. We have fixed them and will let you know when a hot fix is available. Fix should be in version QODBC v9.00.00.256 or above. |
|
|
|
|
Posted : 2009-01-12 12:50:57 |
Thanks Tom. Looking forward to the fix. |
|
|
|
|
Posted : 2009-02-04 15:50:15 |
Hi Tom, I was wondering if there was any news on if the hot fix has been released for this issue thanks? |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2009-02-04 17:14:10 |
Fix should be in version QODBC v9.00.00.256 or above..... whenever that happens. Sorry but I have no control over the programming team. |
|
|
|