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 : Inputting checksSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Support Forum

 New Topic 
 
 Post Reply 
[1]  
 Inputting checks 
 Author   Message 
  Chrixxer 
  
 Group: Members 
 Posts: 3 
 Joined: 2007-06-21 
 Profile
 Posted : 2007-06-21 17:32:42
I've read the other posts on this forum regarding checks, and attempted verbatim SQL statements using those examples, but I'm not getting this to work.  We have a business where we write thousands of checks a month to our clients; there's no bill or invoice created, these are commission checks that go out automatically (from a UNIX machine with a specialty printer).  We have a log of the check number, payee, date the check was cut, and the dollar amount.  It's my job to get these logs into QuickBooks.  I'm, I think, halfway there.  I'm successfully able to insert (or retrieve the ListId value for) clients into the Vendor table.  I understand that I can't write directly into Check, but my attempt to write to CheckExpenseLine also fail.  Here's what I'm seeing from the log files:

QODBCLOG:

2007-06-21 00:07:34 QODBC Ver:  7.00.00.214 *********************************************************************************************************************
IsAService: False
SQL Statement: INSERT INTO CheckExpenseLine (ExpenseLineAccountRefListID, ExpenseLineAmount, ExpenseLineMemo, ExpenseLineCustomerRefListID, ExpenseLineBillableStatus, FQSaveToCache) VALUES ('80000004-1178573259', 600.00, 'Check Memo 1',  '80000018-1182407586', 'Billable', 0)
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">
        <CheckAddRq requestID = "1">
            <CheckAdd defMacro = "TxnID:B57820AB-AD8C-4C45-A5F8-DD411C48BF66">
                <ExpenseLineAdd>
                    <AccountRef>
                        <ListID>80000004-1178573259</ListID>
                    </AccountRef>
                    <Amount>600.00</Amount>
                    <Memo>Check Memo 1</Memo>
                    <CustomerRef>
                        <ListID>80000018-1182407586</ListID>
                    </CustomerRef>
                    <BillableStatus>Billable</BillableStatus>
                </ExpenseLineAdd>
            </CheckAdd>
        </CheckAddRq>
    </QBXMLMsgsRq>
</QBXML>

qbsdklog:
20070621.000734    I    1744    QBSDKProcessRequest    Application named 'FLEXquarters QODBC' starting requests (process 716).
20070621.000734    E    1744    XercesSAXErrorHandler    Element 'ExpenseLineAdd' is not valid for content model: '(AccountRef,PayeeEntityRef?,RefNumber?,TxnDate?,Memo?,Address?,IsToBePrinted?,IsTaxIncluded?,SalesTaxCodeRef?,ExpenseLineAdd*,((ItemLineAdd|ItemGroupLineAdd))*)' -- error at line 7, column 261 in XML data.
20070621.000734    I    1744    MsgSetHandler    Parser error, finishing.
20070621.000734    I    1744    QBSDKProcessRequest    Application named 'FLEXquarters QODBC' finishing requests (process 716), ret = 1.
20070621.000734    E    716    RequestProcessor    Process Request error = 80042500, There was an error when parsing the provided XML file.



Don't know if it matters but I'm accessing QODBC via Win32::ODBC under ActivePerl.

All I want to do is create a single simple check, to a particular Vendor's ListId (as, evidently, Check.PayeeEntityRefListId), with a check number (Check.RefNumber), date written (Check.TxnDate), and the dollar amount (Check.Amount), against a particular bank account (Check.AccountRefListId). 

Can anyone please help me out with the SQL syntax?  I know SQL and ODBC, I just don't know QuickBooks' peculiarities!

Many, many thanks!
 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-06-22 05:25:06

A check drawing bank account AccountRefListID or AccountRefFullName needs to be given as well as who you are paying as PayeeEntityRefListID or PayeeEntityRefFullName. In the examples given this is done on the header (2nd) insert:

INSERT INTO "CheckExpenseLine" ("ExpenseLineAccountRefListID", "ExpenseLineAmount",
"ExpenseLineMemo", "ExpenseLineCustomerRefListID", "ExpenseLineBillableStatus", "FQSaveToCache")
VALUES ('320000-933270542', 600.00, 'Expense Memo 1', '250000-933272658', 'Billable', 1)

INSERT INTO "Check" ("AccountRefListID", "PayeeEntityRefListID", "TxnDate",
"RefNumber", "Memo", "IsToBePrinted") VALUES ('20000-933270541', '300000-933272659',
{d'2002-10-01'}, '1', 'Check Memo 1', 0)

But you can combine the two insert statements into a single insert like this to make things easier:

INSERT INTO "CheckExpenseLine" ("AccountRefListID", "PayeeEntityRefListID", "RefNumber",
"TxnDate", "Memo", "IsToBePrinted", "ExpenseLineAccountRefListID", "ExpenseLineAmount",
"ExpenseLineMemo", "ExpenseLineCustomerRefListID", "ExpenseLineBillableStatus", "FQSaveToCache")
VALUES ('20000-933270541', '300000-933272659', '1001',
{d'2007-06-21'}, 'Commission Check for Tom', 0, '320000-933270542', 600.00,
'Expense for great SQL Insert Statement', '250000-933272658', 'Billable', 0)

 

  Top 
  Chrixxer 
  
 Group: Members 
 Posts: 3 
 Joined: 2007-06-21 
 Profile
 Posted : 2007-06-28 04:09:59
If you do the inserts as separate, can you do checkexpenseline INSERT INTO "CheckExpenseLine" ("ExpenseLineAccountRefListID", "ExpenseLineAmount",
"ExpenseLineMemo", "ExpenseLineCustomerRefListID", "ExpenseLineBillableStatus", "FQSaveToCache")
VALUES ('320000-933270542', 600.00, 'Expense Memo 1', '250000-933272658', 'Billable', 1) 
without check expense? INSERT INTO "Check" ("AccountRefListID", "PayeeEntityRefListID", "TxnDate",
"RefNumber", "Memo", "IsToBePrinted") VALUES ('20000-933270541', '300000-933272659',
{d'2002-10-01'}, '1', 'Check Memo 1', 0)

 I only want to enter the checks as coming out of the account, and not as cleared.  Combining the statements put them in more easily, but they really shouldn't both be in there to begin with, will the program accept only a checkexpenseline entry?

If not, how is it possible to delete them without deleting the entire transaction?   Any help appreciated.  Thanks! 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-06-28 11:07:51

The previous post shows how to write a check using either two SQL insert statements or just the one. Regardless which method you use, a check drawing bank account AccountRefListID or AccountRefFullName needs to be given as well as who you are paying as PayeeEntityRefListID or PayeeEntityRefFullName. If you're using QuickBooks 2007 (USA version only) you can now modify checks.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to