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
|
|
Error parsing complete XML when creating multi-line invoice with Exchange Rate |
Author |
Message |
|
Posted : 2006-07-21 08:15:19 |
Using QuickBooks 2004 Premier (NZ Edition, multicurrency)
I am trying to create a multi-line invoice by inserting 2 InvoiceLine statements with FQSaveToCache set to 1, followed by an Invoice statement, as shown in the sample SQL scripts
It is coming up with an error "[QODBC] Error parsing complete XML return string"
I have checked the forum, and have made sure my columns are being inserted in the correct order, according to "sp_columns InvoiceLine" and "sp_columns Invoice" - what am I missing?
-------
INSERT INTO InvoiceLine (InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineClassRefListID, InvoiceLineAmount, InvoiceLineTaxCodeRefListID, FQSaveToCache) VALUES ('900000-1089602908', 'Adventure trip - Frank Bunce', 1, 2799, '1F30000-1136416834', 2799, '40000-1089600287', 1)
INSERT INTO InvoiceLine (InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineClassRefListID, InvoiceLineAmount, InvoiceLineTaxCodeRefListID, FQSaveToCache) VALUES ('1F0000-1089602904', 'Multiday Option:Mountain-Biking on Rimu trip - Frank Patrick', 1, 349, '1F30000-1136416834', 349, '40000-1089600287', 1)
INSERT INTO Invoice (CustomerRefListID, ARAccountRefListID, TxnDate, TermsRefListID, DueDate, Memo, ExchangeRate) VALUES ('17D20000-1136416712', '160002-1089687130', {d'2006-11-06'}, '70000-1090903319', {d'2006-09-07'}, 'Patrick', 1.62575) |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-07-21 10:38:57 |
The error occurs currently because of the Exchange Rate column in your Invoice insert. The workaround is to update the currency table first with the exchange rate you want to use and then create the invoice. For example:
UPDATE Currency SET ExchangeRate=1.62575 where Name='United States of America Dollar'
INSERT INTO InvoiceLine (InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineClassRefListID, InvoiceLineAmount, InvoiceLineTaxCodeRefListID, FQSaveToCache) VALUES ('900000-1089602908', 'Adventure trip - Frank Bunce', 1, 2799, '1F30000-1136416834', 2799, '40000-1089600287', 1)
INSERT INTO Invoice (CustomerRefListID, ARAccountRefListID, TxnDate, TermsRefListID, DueDate, Memo) VALUES ('17D20000-1136416712', '160002-1089687130', {d'2006-11-06'}, '70000-1090903319', {d'2006-09-07'}, 'Patrick') |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-08-10 09:51:17 |
When using Exchange Rates, you always need to use the same table for all inserts. In other words the final Insert should be to InvoiceLine without the FQSaveToCache or with FQSaveToCache set to false. You cannot use both InvoiceLine and Invoice (unless you update the exchange rate as shown in my previous reply).
For example, this insert created a invoice using the exchange rate I specified:
INSERT INTO InvoiceLine (CustomerRefListID, InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineClassRefListID, InvoiceLineAmount, InvoiceLineTaxCodeRefListID, ExchangeRate, FQSaveToCache) VALUES ('2E0000-1197674120','2B0000-1197674351', 'QODBC v7 Driver for QuickBooks 2007', 1, 199, '30000-1045538607', 199, '70000-1045536338', 1.4222, 0)
|
|
|
|
|