Hmm...so much for one more question on this topic.
I'm using Quickbooks 2008 Canadian Version and now struggling with your first suggestion:
If I use the following sql code I can put in a one line item bill and it automatically calculates taxes (I assume it must get the correct tax code from the Vendor table)
sSQL = "INSERT INTO BillItemLine (VendorRefListID, RefNumber, ItemLineItemRefListID, ItemLineDesc, " & _ "ItemLineQuantity, ItemLineCost, Memo, TxnDate, TermsRefListID) " & _ "VALUES ('" & strVendorRefListID & "', '" & strRefNum & "', '" & strItemLineItemRefListID & "', " & _ "'" & strItemLineDesc & "', 1, " & dblItemLineCost & ", 'Bill created by xxx software', {d '" & strTxnDate & "'}, '" & strTermRefListID & "')"
In Quickbooks 2007 we successfully used the following sql code for a line item without taxes (where we would provide the blank tax code RefListID)
sSQL = "INSERT INTO BillItemLine (VendorRefListID, RefNumber, ItemLineItemRefListID, ItemLineDesc, " & _ "ItemLineQuantity, ItemLineCost, Memo, ItemLineTaxCodeRefListID, Tax1Total, TxnDate, TermsRefListID) " & _ "VALUES ('" & strVendorRefListID & "', '" & strRefNum & "', '" & strItemLineItemRefListID & "', " & _ "'" & strItemLineDesc & "', 1, " & dblItemLineCost & ", 'Bill created by xxx software', " & _ "'" & strItemLineTaxCodeRefListID & "', 0, {d '" & strTxnDate & "'}, '" & strTermRefListID & "')"
In Quickbook 2008 the above code does not work....again we have checked the values
Here is the bottom part of the Trace Log:
2008-07-30 11:26:24 QODBC Ver: 8.00.00.242 ********************************************************************************************************************* IsAService: False SQL Statement: INSERT INTO BillItemLine (VendorRefListID, RefNumber, ItemLineItemRefListID, ItemLineDesc, ItemLineQuantity, ItemLineCost, Memo, ItemLineTaxCodeRefListID, Tax1Total, TxnDate, TermsRefListID) VALUES ('800000FF-1217442310', '8000', '8000001C-1217442324 ', '2007 BMW 235 - Base Invoice', 1, 10000, 'Bill created by xxx software, '60000-1078291348', 0, {d '2008-07-27'}, '10000-1078292074') 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"> <BillAddRq requestID = "1"> <BillAdd defMacro = "TxnID:9361C369-72DE-40F1-92DD-E4F60221C105"> <VendorRef> <ListID>800000FF-1217442310</ListID> </VendorRef> <TxnDate>2008-07-27</TxnDate> <RefNumber>8000</RefNumber> <TermsRef> <ListID>10000-1078292074</ListID> </TermsRef> <Memo>Bill created by SureFire</Memo> <ItemLineAdd> <ItemRef> <ListID>8000001C-1217442324</ListID> </ItemRef> <Desc>2007 BMW 235 - Base Invoice</Desc> <Quantity>1.00000</Quantity> <Cost>10000.00000</Cost> <TaxCodeRef> <ListID>60000-1078291348</ListID> </TaxCodeRef> </ItemLineAdd> <Tax1Total>0.00</Tax1Total> </BillAdd> </BillAddRq> </QBXMLMsgsRq> </QBXML> ISAM_ERR_IN_COMP_SQL S0000 00000 [QODBC] Error parsing complete XML return string. ISAMGetErrorMessage 0x0BF056A8 [ISAM] S0000 00000 [QODBC] Error parsing complete XML return string. ISAMClearUpdateRecord 0x0BF056A8 [ISAM] 0x0C08DB38 [BillItemLine] NO_ISAM_ERR 00000 00000 ISAMCloseTable 0x0BF056A8 [ISAM] 0x0C08DB38 [BillItemLine] NO_ISAM_ERR 00000 00000 ISAMClose 0x0BF056A8 [ISAM] NO_ISAM_ERR 00000 00000 *********************************************************************************************************************
Would it be possible for you to provide an example of what Insert statements we would use to add in a line for a non-taxable item and a line for a taxable item?
Thx...Don |