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
|
|
How do I create a Purchase Order using QODBC? |
Author |
Message |
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-02-21 11:37:02 |
This example creates one PurchaseOrder with three lines. Note the FQSaveToCache field, set to TRUE (1) except on the last line.
INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber", "PurchaseOrderLineItemRefListID", "PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", "PurchaseOrderLineRate", "PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID", "FQSaveToCache") VALUES ('10000-933272655', '1', '250000-933272656', 'See Attached 1', 1.0, 1.0, 1.11, '580000-1071526281', 1)
INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber", "PurchaseOrderLineItemRefListID", "PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", "PurchaseOrderLineRate", "PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID", "FQSaveToCache") VALUES ('10000-933272655', '1', '250000-933272656', 'See Attached 2', 2.0, 2.0, 2.22, '580000-1071526281', 1)
INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber", "PurchaseOrderLineItemRefListID", "PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", "PurchaseOrderLineRate", "PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID", "FQSaveToCache") VALUES ('10000-933272655', '1', '250000-933272656', 'See Attached 3', 3.0, 3.0, 3.33, '580000-1071526281', 0)
This results in the following Purchase Order being created by QODBC using the QuickBooks 2006 Premier USA Edition and the Sample Rock Castle Construction company file:
Where: VendorRefListID 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
|
|
|
|
jeff |
|
Group | : Members |
Posts | : 76 |
Joined | : 2006-06-03 |
|
Profile |
|
Posted : 2006-10-18 09:14:57 |
Why doesn't purchase order support FQSaveToCache? I am attempting to insert multiple line items and then insert a purchase order header. However, the qodbc complains about the sql not being supported.
Insert into PurchaseOrder( VendorRefListID ,ClassRefListID ,VendorAddressAddr1 ,VendorAddressAddr2 ,VendorAddressAddr3 , VendorAddressCity ,VendorAddressState ,VendorAddressPostalCode ,TermsRefListID) Values ('6F0000-1197742736','10000-934380929','Bank of Anycity','Lisa Holzhauser','1935 Main Street','Middlefield','CA','94482','50000-934380930')
Is it posssible to use PurchaseOrderLine with FQSaveToCache = true and then insert into PurchaseOrder with all shared header information? |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-10-18 09:42:42 |
It actually does, this example creates one Purchase Order with three lines. Note: The FQSaveToCache field, set to True on all the PurchaseOrderLines. Saving the Purchase Order header saves the lines with it.
INSERT INTO "PurchaseOrderLine" ("PurchaseOrderLineItemRefListID", "PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", "PurchaseOrderLineRate", "PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID", "FQSaveToCache") VALUES ('250000-933272656', 'See Attached 1', 1.0, 1.0, 1.11, '580000-1071526281', 1)
INSERT INTO "PurchaseOrderLine" ("PurchaseOrderLineItemRefListID", "PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", "PurchaseOrderLineRate", "PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID", "FQSaveToCache") VALUES ('250000-933272656', 'See Attached 2', 2.0, 2.0, 2.22, '580000-1071526281', 1)
INSERT INTO "PurchaseOrderLine" ("PurchaseOrderLineItemRefListID", "PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", "PurchaseOrderLineRate", "PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID", "FQSaveToCache") VALUES ('250000-933272656', 'See Attached 3', 3.0, 3.0, 3.33, '580000-1071526281', 1)
INSERT INTO "PurchaseOrder" ("VendorRefListID", "RefNumber", "Memo", "IsToBePrinted") VALUES ('10000-933272655', '1', 'Memo Test', 0) |
|
|
|
|