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 : Invoice Group Line Items w/ SalesTaxSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Invoice Group Line Items w/ SalesTax 
 Author   Message 
  t.evert 
  
 Group: Members 
 Posts: 2 
 Joined: 2007-12-12 
 Profile
 Posted : 2007-12-12 05:12:52
I'm getting the following error when running "Insert Into Invoice..."

  • 3180 - There was an error when saving a Invoice.  QuickBooks error message: You can't set taxable if Sales tax is turned off or the item is not a taxable item type.

This only happens on in-state orders where SalesTax is supposed to be charged, and only when there are InvoiceLine items that are group items.

I'm presuming there's something in my SQL statements that's missing. Here's a sample:
  • INSERT INTO InvoiceLine (InvoiceLineGroupItemGroupRefListID, InvoiceLineGroupQuantity, InvoiceLineSalesTaxCodeRefListID, FQSaveToCache) VALUES ('800005C8-1195151234', 1, '10000-1043347491', 1)
  • INSERT INTO Invoice (TemplateRefListID, CustomerRefListID, ARAccountRefListID, TxnDate, IsPending, DueDate, ShipDate, Memo, ClassRefListID, ItemSalesTaxRefListID, IsToBePrinted ) VALUES ('B0000-942785993', '1A00000-944531014', '3D0000-940551035', #12/11/2007#, 0, #12/11/2007#, #11/23/2007#, 'Auto created 12/11/2007 10:09:40 AM', '10000-940534794', '10000-939594162', 1 )
And in case this helps at all, here's something I picked from the QODBCLOG.txt file:

2007-12-11 09:59:25 QODBC Ver:  8.00.00.240 *********************************************************************************************************************
IsAService: False
SQL Statement: INSERT INTO  "Invoice"  ("CustomerRefListID","ClassRefListID","ARAccountRefListID","TemplateRefListID","TxnDate","IsPending","DueDate","ShipDate","ItemSalesTaxRefListID","Memo","IsToBePrinted") VALUES (?,?,?,?,?,?,?,?,?,?,?)
3180 - There was an error when saving a Invoice.  QuickBooks error message: You can't set taxable if Sales tax is turned off or the item is not a taxable item type.
Input XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?qbxml version="6.0"?>
<QBXML>
    <QBXMLMsgsRq onError = "continueOnError" responseData = "includeAll">
        <InvoiceAddRq requestID = "1">
            <InvoiceAdd defMacro = "TxnID:B1A2FD2C-FDFB-4AD5-90F7-4B273FB67C01">
                <CustomerRef>
                    <ListID>1A00000-944531014</ListID>
                </CustomerRef>
                <ClassRef>
                    <ListID>10000-940534794</ListID>
                </ClassRef>
                <ARAccountRef>
                    <ListID>3D0000-940551035</ListID>
                </ARAccountRef>
                <TemplateRef>
                    <ListID>B0000-942785993</ListID>
                </TemplateRef>
                <TxnDate>2007-12-11</TxnDate>
                <IsPending>0</IsPending>
                <DueDate>2007-12-11</DueDate>
                <ShipDate>2007-11-23</ShipDate>
                <ItemSalesTaxRef>
                    <ListID>10000-939594162</ListID>
                </ItemSalesTaxRef>
                <Memo>Auto created from YD Subs db: 12/11/2007 9:59:24 AM</Memo>
                <IsToBePrinted>1</IsToBePrinted>
                <InvoiceLineAdd>
                    <SalesTaxCodeRef>
                        <ListID>10000-1043347491</ListID>
                    </SalesTaxCodeRef>
                </InvoiceLineAdd>
                <InvoiceLineAdd>
                    <SalesTaxCodeRef>
                        <ListID>10000-1043347491</ListID>
                    </SalesTaxCodeRef>
                </InvoiceLineAdd>
                <InvoiceLineGroupAdd>
                    <ItemGroupRef>
                        <ListID>800005B9-1195150953</ListID>
                    </ItemGroupRef>
                    <Quantity>4.00000</Quantity>
                </InvoiceLineGroupAdd>
                <InvoiceLineGroupAdd>
                    <ItemGroupRef>
                        <ListID>800005C8-1195151234</ListID>
                    </ItemGroupRef>
                    <Quantity>1.00000</Quantity>
                </InvoiceLineGroupAdd>
            </InvoiceAdd>
        </InvoiceAddRq>
    </QBXMLMsgsRq>
</QBXML>
Output XML:
<?xml version="1.0" ?>
<QBXML>
    <QBXMLMsgsRs>
        <InvoiceAddRs requestID="1" statusCode="3180" statusSeverity="Error" statusMessage="There was an error when saving a Invoice.  QuickBooks error message: You can&apos;t set taxable if Sales ta
            x is turned off or the item is not a taxable item type." />
    </QBXMLMsgsRs>
</QBXML>

Thanks for your help,

Tony 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-12-12 07:42:56
Try using the QuickBooks User Interface invoice pane to sort out the sales tax settings of the customer and items within the group. In my example, found at: How do I invoice item groups?, I don't use ItemSalesTaxRefListID and QuickBooks set the sales tax values for me depending on the customer. 

  Top 
  t.evert 
  
 Group: Members 
 Posts: 2 
 Joined: 2007-12-12 
 Profile
 Posted : 2007-12-12 08:47:43
I have no problems at all entering in these items in the Quickbooks UI.

I removed the reference to sales tax in the InvoiceLine statement and it worked on two test invoices. Let's hope it all works ok now. :-) Got several hundred invoices to run now. ;-) 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to