Quantcast
Channel: FLEXquarters.com Limited
Viewing all articles
Browse latest Browse all 313

[QODBC-Desktop] How do I create a Purchase Order using a Item Gro...

$
0
0

An Example of PurchaseOrder Item Groups

Create an ItemGroup with Three Lines

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

First Line

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


Note: 
 VB DEMO is to be used for testing of QODBC SQL queries only and is not a development tool.

 

Second Line

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

Third (Last) Line

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

Result in QuickBooks

The result looks like this in QuickBooks 2013:

 

For more about creating ItemGroups, please see: How to create Item Groups using QODBC.

Locate the List ID of the New ItemGroup

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

SELECT ListID, Name, ItemDesc, IsActive FROM ItemGroup

Invoice the ItemGroup

 

Note: We can now create PurchaseOrder using the item group by using the ListID:'80000062-1513335790' and doing one simple QODBC insert statement below.

 

INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber",
"PurchaseOrderLineGroupItemGroupRefListID","FQSaveToCache")
VALUES ('800000B4-1197779815', 'Group2', '80000062-1513335790', 0)

Result in QuickBooks

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

Note: Qty, Rate and the Amount are shown as per Qty, Rate and the Amount for the service or stock item

 


Viewing all articles
Browse latest Browse all 313