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 : Problem controlling order of Group Items on InvoiceSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC Bug Reports

 New Topic 
 
 Post Reply 
[1]  
 Problem controlling order of Group Items on Invoice 
 Author   Message 
  tcoyotl 
  
 Group: Members 
 Posts: 2 
 Joined: 2006-07-19 
 Profile
 Posted : 2006-08-01 02:12:06

 I make Invoices with Group items mixed with normal (non-group) items. I am having a problem controlling the order of how the items appear on the Invoice when viewed in QuickBooks.

I use the method where you do a SQL INSERT command for each InvoiceLine, setting the FQSaveToCache field to 1, and then insert the Invoice. If I first insert a normal item, then a Group item, and then a normal item, then when I view the Invoice the Group item appears at the bottom of the lineitem list.

I am assuming that the order in which you insert the InvoiceLines should be the order in which they appear on the Invoice. Is this a bug? or do I need to do something else to force the order of the lineitems?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-08-01 14:53:48

The ItemGroups are going to appear last as they processed by the (FQSaveToCache) transaction batch last by QuickBooks. This is because QuickBooks needs to go out and create all the InvoiceLines for the group(s), and group inserts are more than just the header line that you are inserting.

You can write the Invoice, use

SP_LASTINSERTID invoice

to get the TxnID of the invoice you just inserted and then add new normal line items after the group by doing, for example:

INSERT INTO "InvoiceLine" ("TxnID", "InvoiceLineItemRefListID", "InvoiceLineDesc",
"InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID")
VALUES ('5CFE-1197770436', '250000-933272656', 'Test Add a Line',
1.00000, 1.00, '20000-999022286')

See: How do I invoice item groups?  for more.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to