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
|
|
Insert invoice and InvoiceLine |
Author |
Message |
|
Posted : 2008-06-25 08:43:05 |
Hi,
I'm using : Qodbc 8.00.00.242 and QuickBook Succès PME Pro 2007 R4P
I want add a new invoice which VB6.
SQL = "SP_LASTINSERTID invoice" enrg.Open SQL, OBJdbConnectionQuickBook 'it is ok but return a recorset null enrg.Close
SQL = "select Top 1 TxnID, InvoiceLineTxnLineId, InvoiceLineSeqNo from InvoiceLine " enrg.Open SQL, OBJdbConnectionQuickBook TxnID = enrg("TxnID") InvoiceLineTxnLineId = enrg("InvoiceLineTxnLineId") InvoiceLineSeqNo = enrg("InvoiceLineSeqNo") enrg.Close 'It is ok
SQL = "INSERT INTO InvoiceLine (CustomerRefListID,TxnID,InvoiceLineItemRefListID,InvoiceLineDesc,InvoiceLineRate, InvoiceLineQuantity) VALUES" SQL = SQL & " ('30000-1213845372','" & TxnID & "', '20000-1213840642', 'Tableau',500.00, 1.00)" enrg.Open SQL, OBJdbConnectionQuickBook 'it is not ok !! :-( enrg.Close
Thank you for help and sorry for my english... do you speak french ??
GregMtl |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2008-06-25 11:39:46 |
|
|
|
|
Posted : 2008-06-25 11:43:49 |
Thank you, for you response, But I want to created a new invoice and new line ??
Thank you |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2008-06-25 15:46:14 |
Just delete the TxnID from your statement ....
SQL = "INSERT INTO InvoiceLine (CustomerRefListID, InvoiceLineItemRefListID,InvoiceLineDesc,InvoiceLineRate, InvoiceLineQuantity) VALUES" SQL = SQL & " ('30000-1213845372', '20000-1213840642', 'Tableau',500.00, 1.00)" |
|
|
|
|
Posted : 2008-06-26 00:31:09 |
Hi,
Thank you !! It is ok .... !!! but I want 2 lines for 1 invoice !! then I'm writting :
SQL = "INSERT INTO InvoiceLine (CustomerRefListID,InvoiceLineItemRefListID,InvoiceLineDesc,InvoiceLineRate, InvoiceLineQuantity) VALUES" SQL = SQL & " ('30000-1213845372', '20000-1213840642', 'Tableau',500.00, 1.00)" OBJdbConnectionQuickBook.Execute SQL SQL = "INSERT INTO InvoiceLine (CustomerRefListID,InvoiceLineItemRefListID,InvoiceLineDesc,InvoiceLineRate, InvoiceLineQuantity) VALUES" SQL = SQL & " ('30000-1213845372', '20000-1213840642', 'Tableau2',600.00, 1.00)" OBJdbConnectionQuickBook.Execute SQL
But this is creating 2 invoices which 1 line and not 1 invoice which 2 lines...
Thank you very much and sorry for my english.
|
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2008-06-26 15:45:07 |
Please read: How can I create multiple lines in the Invoice, Purchase, Journal and other tables?
You need to add the FQSaveToCache column and do:
SQL = "INSERT INTO InvoiceLine (CustomerRefListID,InvoiceLineItemRefListID,InvoiceLineDesc,InvoiceLineRate, InvoiceLineQuantity, FQSaveToCache) VALUES" SQL = SQL & " ('30000-1213845372', '20000-1213840642', 'Tableau',500.00, 1.00, 1)" OBJdbConnectionQuickBook.Execute SQL SQL = "INSERT INTO InvoiceLine (CustomerRefListID,InvoiceLineItemRefListID,InvoiceLineDesc,InvoiceLineRate, InvoiceLineQuantity, FQSaveToCache) VALUES" SQL = SQL & " ('30000-1213845372', '20000-1213840642', 'Tableau2',600.00, 1.00, 0)" OBJdbConnectionQuickBook.Execute SQL
|
|
|
|
|