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 : How do I invoice item groups?Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Sample Scripts Forum

 New Topic 
 
 Post Reply 
[1]  
 How do I invoice item groups? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-07-19 12:30:32

Let's start by creating a new itemgroup example with three lines using QODBC. Note the FQSaveToCache field, set to True except on the last one.

INSERT INTO "ItemGroupLine" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "FQSaveToCache") VALUES ('Test1 W3 Lines 1', 1, 'Test Item Desc', 1, '390000-1071512145', 1.0, 1)

INSERT INTO "ItemGroupLine" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "FQSaveToCache") VALUES ('Test1 W3 Lines 2', 1, 'Test Item Desc', 1, '320000-1071525597', 2.0, 1)

INSERT INTO "ItemGroupLine" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "FQSaveToCache") VALUES ('Test1 W3 Lines 3', 1, 'Test Item Desc', 1, '10000-933272655', 3.0, 0)

and the result looks like this in QuickBooks 2006:



To locate the ListID of the new Item Group (or any group), simply do:

SELECT ListID, Name, ItemDesc, IsActive FROM ItemGroup

We can now invoice the item group by using the ListID: '580000-1197762645' and doing one simple QODBC insert statement:

INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber",
"InvoiceLineGroupItemGroupRefListID","FQSaveToCache")
VALUES ('470001-1071525403', 'Group2', '580000-1197762645', 0)

When we look at the new invoice in QuickBooks 2006 we will see:

Note: The Qty, Rate and the Amount are shown as 0 for Floor Plans and Concrete Slab, not because QODBC made a mistake. You simply need to correct the rate for the service or stock item:  

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-08-02 10:37:00

You can also add additional lines to the invoice later on by locating the TxnID for the Invoice by using (for example):

select Top 10 TxnID, RefNumber, CustomerRefFullname  from Invoice order by TimeCreated DESC

to get the TxnID of the invoice you inserted earlier 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')

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to