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 create a Sales Order using QODBC?Search Forum

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

 New Topic 
 
 Post Reply 
 How do I create a Sales Order using QODBC? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-02-21 19:59:02

This example creates one Sales Order with 2 order lines. Note how the FQSaveToCache field is set to True except on the last line.

INSERT INTO "SalesOrderLine" ("CustomerRefListID", "TemplateRefListID","RefNumber", "SalesOrderLineItemRefListID", "SalesOrderLineDesc", "SalesOrderLineQuantity", "SalesOrderLineRate", "SalesOrderLineAmount", "SalesOrderLineSalesTaxCodeRefListID","FQSaveToCache") VALUES ('120000-1045537156','C0000-1080110273','1015', '90000-1045537150', '4m Steel Ladder', 1.00000, 1.00000, 150.00, '90000-1045536338', 1)

INSERT INTO "SalesOrderLine" ("CustomerRefListID", "TemplateRefListID","RefNumber", "SalesOrderLineItemRefListID", "SalesOrderLineDesc", "SalesOrderLineQuantity", "SalesOrderLineRate", "SalesOrderLineAmount", "SalesOrderLineSalesTaxCodeRefListID","FQSaveToCache") VALUES ('120000-1045537156','C0000-1080110273','1015', '150001-1045625669', 'Paint Brush:Big', 1.00000, 1.00000, 11.60, '90000-1045536338', 0)

Where:
CustomerRefListID is the existing Customer ListID
found by using "Select * from Customer"
TemplateRefListID is the Sales Order Template ListID
found by using "Select * from Template"
SalesOrderLineItemRefListID is the existing Inventory Item ListIDs
found by using:

SELECT ListID, FullName, Description, Type FROM Item

In my case, my Australian QuickBooks 2004 sample file returned the following items:

In the Sales Order inserts above I used the following Inventory Items:
"
4m Steel Ladder" ListID:'90000-1045537150' (in Row 17 above) and
"Paint Brush:Big" ListID:'150001-1045625669' (in Row 25 above)
SalesOrderLineSalesTaxCodeRefListID is the SalesTaxCode ListID
found by using "Select * from SalesTaxCode"

Note: Outside USA, SalesOrderLineSalesTaxCodeRefListID is SalesOrderLineTaxCodeRefListID instead to make:
SalesOrderLineTaxCodeRefListID the TaxCode ListID
found by using "Select * from TaxCode"

 

  Top 
 New Topic 
 
 Post Reply 

Jump to