[QODBC-Desktop] How to create a Purchase Order using QODBC
Posted by brad waddell on 12 March 2009 05:21 PM
|
|
An Example of creating a PurchaseOrderNote: This example creates one PurchaseOrder with three lines. Note the FQSaveToCache field, set to TRUE (1) except on the last line. First Line INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber",
Second Line INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber",
Third (Last) Line INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber",
Results in QuickBooksThis results in the following Purchase Order being created by QODBC using the QuickBooks 2022 Enterprise USA Edition and the Sample company file as an example:
Related Data DescriptionVendorRefListID is the ListID for the Vendor found by doing : Select * from Vendor PurchaseOrderLineItemRefListID is the existing Inventory Item ListID found by using: Select ListID, FullName, Description, Type FROM Item PurchaseOrderLineCustomerRefListID is the ListID for the customer found by doing : Select * from Customer
Note: If you want to create Purchase Order without using CustomerRefListID, then you can remove it from your query because it is optional. Please refer below sample query: INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber", "PurchaseOrderLineItemRefListID", "PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", "PurchaseOrderLineRate",
Insert into PurchaseOrder with All Shared Header InformationNote: The FQSaveToCache field, set to True on all the PurchaseOrderLines. Saving the Purchase Order header saves the lines with it. Here is an example that creates one Purchase Order with three lines. First Line INSERT INTO "PurchaseOrderLine" ("PurchaseOrderLineItemRefListID", Second Line INSERT INTO "PurchaseOrderLine" ("PurchaseOrderLineItemRefListID", Third Line INSERT INTO "PurchaseOrderLine" ("PurchaseOrderLineItemRefListID", Shared Header Information INSERT INTO "PurchaseOrder" ("VendorRefListID", "RefNumber", "Memo", | |
|