Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : Allocate Payment to Invoice (QBi2008-09NZ, QODBCv9)Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v8 Forum

 New Topic 
 
 Post Reply 
[1]  
 Allocate Payment to Invoice (QBi2008-09NZ, QODBCv9) 
 Author   Message 
  cameron 
  
 Group: Members 
 Posts: 17 
 Joined: 2006-03-22 
 Profile
 Posted : 2008-09-17 12:55:36

Hi.

I am creating orders, invoices and payments through QODBC. The first two parts are working fine, orders and invoices for those orders are created successfully. However, I am having difficulties with payments...

Here are the queries I am running:

INSERT INTO ReceivePaymentLine (AppliedToTxnTxnID,AppliedToTxnPaymentAmount,FQSaveToCache) Values ('1CB13-1221433494',5,True)

INSERT INTO ReceivePayment (CustomerRefListID,CustomerRefFullName,ARAccountRefListID,TxnDate,RefNumber,TotalAmount,PaymentMethodRefListID,Memo,DepositToAccountRefListID,IsAutoApply) Values ('8000046C-1220841945','ZealdWebFlo2Cash0809','80000-1154528786',{d'2008-09-04'},'ORD0011971',5,'50000-1154528844','Zeald order ORD0011971 QB order 1CB02-1221179209 QB invoice','800000DB-1221444859',True)

(Invoice with TxnID 1CB13-1221433494 exists – I am checking that right before the query. )


Here’s the SDK messages:

20080916.093807              E              8180       XercesSAXErrorHandler                Element 'AppliedToTxnAdd' is not valid for content model: '(CustomerRef,ARAccountRef?,TxnDate?,RefNumber?,TotalAmount?,PaymentMethodRef?,Memo?,DepositToAccountRef?,CreditCardTxnInfo?,(IsAutoApply|AppliedToTxnAdd+))' -- error at line 7, column 597 in XML data.

20080916.093807              I               8180       MsgSetHandler Parser error, finishing.

20080916.093807              I               8180       QBSDKProcessRequest Application named 'FLEXquarters QODBC' finishing requests (process 6368), ret = 1.

20080916.093807              E              6368       RequestProcessor           Process Request error = 80042500, There was an error when parsing the provided XML file.

 

And the trace:

2008-09-16 09:53:11 QODBC Ver:  8.00.00.243 *********************************************************************************************************************

IsAService: False

SQL Statement: INSERT INTO ReceivePayment (CustomerRefListID,CustomerRefFullName,ARAccountRefListID,TxnDate,RefNumber,TotalAmount,PaymentMethodRefListID,Memo,DepositToAccountRefListID,IsAutoApply) Values ('8000046C-1220841945','ZealdWebFlo2Cash0809','80000-11545287

86',{d'2008-09-04'},'ORD0011971',5.63,'50000-1154528844','Zeald order ORD0011971 QB order 1CB02-1221179209 QB invoice','800000DB-1221444859',True)Error parsing complete XML return string (8)

Input XML:

<?xml version="1.0" encoding="ISO-8859-1"?>

<?qbxml version="6.0"?>

<QBXML>

    <QBXMLMsgsRq onError = "continueOnError" responseData = "includeAll">

        <ReceivePaymentAddRq requestID = "1">

            <ReceivePaymentAdd defMacro = "TxnID:553D13A6-055A-4011-883C-E9F2554B28F6">

                <CustomerRef>

                    <FullName>ZealdWebFlo2Cash0809</FullName>

                </CustomerRef>

                <ARAccountRef>

                    <ListID>80000-1154528786</ListID>

                </ARAccountRef>

                <TxnDate>2008-09-04</TxnDate>

                <RefNumber>ORD0011971</RefNumber>

                <TotalAmount>5.00</TotalAmount>

                <PaymentMethodRef>

                    <ListID>50000-1154528844</ListID>

                </PaymentMethodRef>

                <Memo>Zeald order ORD0011971 QB order 1CB02-1221179209 QB invoice</Memo>

                <DepositToAccountRef>

                    <ListID>800000DB-1221444859</ListID>

                </DepositToAccountRef>

                <IsAutoApply>1</IsAutoApply>

                <AppliedToTxnAdd>

                    <TxnID>1CB13-1221433494</TxnID>

                    <PaymentAmount>5.00</PaymentAmount>

                </AppliedToTxnAdd>

            </ReceivePaymentAdd>

        </ReceivePaymentAddRq>

    </QBXMLMsgsRq>

</QBXML>

    ISAM_ERR_IN_COMP_SQL S0000 00000 [QODBC] Error parsing complete XML return string.

ISAMGetErrorMessage

    0x001DADE0 [ISAM]

    S0000 00000 [QODBC] Error parsing complete XML return string.

ISAMClearUpdateRecord

    0x001DADE0 [ISAM]

    0x081F4618 [ReceivePayment]

    NO_ISAM_ERR 00000 00000

ISAMCloseTable

    0x001DADE0 [ISAM]

    0x081F4618 [ReceivePayment]

    NO_ISAM_ERR 00000 00000

ISAMCloseTable

    0x001DADE0 [ISAM]

    0x07A80048 [ReceivePayment] (ReceivePayment)

    NO_ISAM_ERR 00000 00000

ISAMCloseTable

    0x001DADE0 [ISAM]

    0x08040048 [ReceivePaymentLine] (ReceivePaymentLine)

    NO_ISAM_ERR 00000 00000

ISAMCloseTable

    0x001DADE0 [ISAM]

    0x07B0D6F8 [ReceivePayment] (ReceivePayment)

    NO_ISAM_ERR 00000 00000

ISAMCloseTable

    0x001DADE0 [ISAM]

    0x08085F38 [SalesOrder]

    NO_ISAM_ERR 00000 00000

ISAMCloseTable

    0x001DADE0 [ISAM]

    0x08111A28 [Invoice]

    NO_ISAM_ERR 00000 00000

ISAMCloseTable

    0x001DADE0 [ISAM]

    0x0819D980 [SalesOrderLine]

    NO_ISAM_ERR 00000 00000

ISAMClose

    0x001DADE0 [ISAM]

    NO_ISAM_ERR 00000 00000

It'd be great to hear some suggestions on what may be wrong, because I have tried everything I could think of to get this fixed.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-09-17 15:09:26

Sorry, but you will need to use the QODBC v9.00.00.250 Beta with QuickBooks QBi series 2008/09 (see: Release 9.0.0.250 Fixes ). Your trace shows QODBC v8.00.00.243.

TO RECEIVE A PAYMENT, THE SQL STATEMENT FORMAT IS:-

INSERT INTO ReceivePaymentLine (CustomerRefListID, DepositToAccountRefListID, TotalAmount,
AppliedToTxnTxnID, AppliedToTxnPaymentAmount, TxnDate, Memo)  
Values ('AC0000-1197757899', '80000-933270541', 200.00, '5BF9-1197759389', 200.00,
{d'2007-12-15'}, 'Payment for Invoice #QODBCcip')

See: How do I create a new Customer, invoice them and mark the invoice as paid? for more.

 

  Top 
  Dmitry S 
  
 Group: Members 
 Posts: 13 
 Joined: 2008-09-18 
 Profile
 Posted : 2008-09-18 09:09:39
(using my own account now)

Thanks Tom.

I have upgraded to QODBC v9.00.00.250 Beta and restructured the query. But I'm still getting nowhere... here's the SDK messages and the trace:

20080918.105627    I    8032    QBSDKProcessRequest    Application named 'FLEXquarters QODBC' starting requests (process 1296).
20080918.105627    I    8032    SpecVersion    Current version of qbXML in use: 6.1
20080918.105627    I    8032    QBSDKMsgSetHandler    ADD: Receive Payment
20080918.105628    E    8032    ReceivePaymentStorage::VerifyInvoiceTxnID    The TxnID doesn't match an invoice to pay for the specified customer:job and AR account or the invoice is already paid.: 1CC28-1221627374 HRESULT=0x80070057
20080918.105628    I    8032    QBSDKMsgSetHandler    Request 1 failed.
20080918.105628    I    8032    MsgSetHandler    Finished.


2008-09-18 10:56:28 QODBC Ver:  9.00.00.250 *********************************************************************************************************************
IsAService: False
SQL Statement: INSERT INTO ReceivePaymentLine (CustomerRefListID,ARAccountRefListID,TxnDate,TotalAmount,Memo,DepositToAccountRefListID,AppliedToTxnTxnID,AppliedToTxnPaymentAmount) Values ('8000046C-1220841945','80000-1154528786',{d'2008-09-04'},5,'ORD0011971(Flo2Ca
sh)','800000DB-1221444859','1CC28-1221627374',5)3120 - Object "1CC28-1221627374" specified in the request cannot be found.
Input XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?qbxml version="6.1"?>
<QBXML>
    <QBXMLMsgsRq onError = "continueOnError" responseData = "includeAll">
        <ReceivePaymentAddRq requestID = "1">
            <ReceivePaymentAdd defMacro = "TxnID:D97ED622-18BE-43E7-A369-31E75E3C140D">
                <CustomerRef>
                    <ListID>8000046C-1220841945</ListID>
                </CustomerRef>
                <ARAccountRef>
                    <ListID>80000-1154528786</ListID>
                </ARAccountRef>
                <TxnDate>2008-09-04</TxnDate>
                <TotalAmount>5.00</TotalAmount>
                <Memo>ORD0011971(Flo2Cash)</Memo>
                <DepositToAccountRef>
                    <ListID>800000DB-1221444859</ListID>
                </DepositToAccountRef>
                <AppliedToTxnAdd>
                    <TxnID>1CC28-1221627374</TxnID>
                    <PaymentAmount>5.00</PaymentAmount>
                </AppliedToTxnAdd>
            </ReceivePaymentAdd>
        </ReceivePaymentAddRq>
    </QBXMLMsgsRq>
</QBXML>
Output XML:
<?xml version="1.0" ?>
<QBXML>
    <QBXMLMsgsRs>
        <ReceivePaymentAddRs requestID="1" statusCode="3120" statusSeverity="Error" statusMessage="Object &quot;1CC28-1221627374&quot; specified in the request cannot be found. " />
    </QBXMLMsgsRs>
</QBXML>
    ISAM_UPDATE_SQL_ERR S0000 00000 [QODBC] Error: %s
ISAMGetErrorMessage
    0x00199CA8 [ISAM]
    S0000 00000 [QODBC] Error: 3120 - Object "1CC28-1221627374" specified in the request cannot be found.
ISAMClearUpdateRecord
    0x00199CA8 [ISAM]
    0x08D57008 [ReceivePaymentLine]
    NO_ISAM_ERR 00000 00000
ISAMCloseTable
    0x00199CA8 [ISAM]
    0x08D57008 [ReceivePaymentLine]
    NO_ISAM_ERR 00000 00000
ISAMCloseTable
    0x00199CA8 [ISAM]
    0x07FBA008 [ReceivePaymentLine] (ReceivePaymentLine)
    NO_ISAM_ERR 00000 00000
ISAMCloseTable
    0x00199CA8 [ISAM]
    0x07FFEFA8 [Invoice]
    NO_ISAM_ERR 00000 00000
ISAMClose
    0x00199CA8 [ISAM]
    NO_ISAM_ERR 00000 00000

The problem is that the invoice 1CC28-1221627374 does exist and it is not paid. The AR accounts used for the invoice and for the payment are the same.
Any suggestions? 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-09-18 12:45:13
Try using just DepositToAccountRefListID, without ARAccountRefListID. The QuickBooks error is saying: "The TxnID doesn't match an invoice to pay for the specified customer:job and AR account or the invoice is already paid." 

  Top 
  Dmitry S 
  
 Group: Members 
 Posts: 13 
 Joined: 2008-09-18 
 Profile
 Posted : 2008-09-18 13:00:05
DepositToAccountRefListID is already used in the query and exists. I have tried the query both with and without ARAccountRefListID - same effect.

INSERT INTO ReceivePaymentLine (CustomerRefListID,ARAccountRefListID,TxnDate,TotalAmount,Memo,DepositToAccountRefListID,AppliedToTxnTxnID,AppliedToTxnPaymentAmount) Values ('8000046C-1220841945','80000-1154528786',{d'2008-09-04'},5,'ORD0011971(Flo2Ca
sh)','800000DB-1221444859','1CC28-1221627374',5) 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-09-18 15:48:29
Are you sure you have the right CustomerRefListID for the invoice? Are you sure no other payments have already been applied to the invoice? 

  Top 
  Dmitry S 
  
 Group: Members 
 Posts: 13 
 Joined: 2008-09-18 
 Profile
 Posted : 2008-09-19 06:47:53
Absolutely positive. I am running a chain of actions that create Order, Invoice (for that order) and then the Payment (for the invoice). I have tried the sequence many times from scratch so there is definitely no payment for that invoice and 100% sure I am using the same CustomerRefListID. 

  Top 
  Dmitry S 
  
 Group: Members 
 Posts: 13 
 Joined: 2008-09-18 
 Profile
 Posted : 2008-09-29 07:32:30
Any other suggestions with regard to this?.. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-09-29 07:50:52
The normal reason for this error occurs when there's more than one A/R account as in: Error 3120 trying to post a ReceivePaymentLine or the invoice is paid or a 0 amount as in: Error 3120 - Inserting a receivePaymentLine Record  

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to