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 Estimates?Search Forum

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

 New Topic 
 
 Post Reply 
[1]  
 How do I create Estimates? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-02-26 16:45:54

FOR USA QUICKBOOKS USERS

INSERT INTO "EstimateLine" ("EstimateLineItemRefListID", "EstimateLineDesc",
"EstimateLineRate", "EstimateLineAmount", "EstimateLineSalesTaxCodeRefListID",
"FQSaveToCache") VALUES ('250000-933272656', 'Building permit 1',
1.00000, 1.00, '20000-999022286', 1)

INSERT INTO "EstimateLine" ("EstimateLineItemRefListID", "EstimateLineDesc",
"EstimateLineRate", "EstimateLineAmount", "EstimateLineSalesTaxCodeRefListID",
"FQSaveToCache") VALUES ('250000-933272656', 'Building permit 2',
2.00000, 2.00, '20000-999022286', 1)

INSERT INTO "EstimateLine" ("EstimateLineItemRefListID", "EstimateLineDesc",
"EstimateLineRate", "EstimateLineAmount", "EstimateLineSalesTaxCodeRefListID",
"FQSaveToCache") VALUES ('250000-933272656', 'Building permit 3',
3.00000, 3.00, '20000-999022286', 1)

INSERT INTO "Estimate" ("CustomerRefListID", "TxnDate", "RefNumber",
"BillAddressAddr1", "BillAddressAddr2", "BillAddressCity", "BillAddressState",
"BillAddressPostalCode", "BillAddressCountry", "TermsRefListID", "DueDate",
"ItemSalesTaxRefListID", "Memo", "CustomerSalesTaxCodeRefListID") VALUES
('470001-1071525403', {d'2002-10-01'}, '1', 'Brad Lamb', '1921 Appleseed Lane',
'Bayshore', 'CA', '94326', 'USA', '10000-933272658', {d'2002-10-31'},
'2E0000-933272656', 'Memo Test', '10000-999022286')

The resulting Esitmate in QuickBooks 2006 Premier:

FOR NON-USA QUICKBOOKS USERS

This creates one Estimate with three lines. Note the FQSaveToCache field, set to True except on the last line.

INSERT INTO "EstimateLine" ("CustomerRefListID", "RefNumber", "EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID", "FQSaveToCache") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 1', 1.00000, 1.00, '20000-999022286', 1)

INSERT INTO "EstimateLine" ("CustomerRefListID", "RefNumber", "EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID", "FQSaveToCache") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 2', 2.00000, 2.00, '20000-999022286', 1)

INSERT INTO "EstimateLine" ("CustomerRefListID", "RefNumber", "EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID", "FQSaveToCache") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 3', 3.00000, 3.00, '20000-999022286', 0)

This creates three Estimates with one line each. Note the FQSaveToCache field is not specified (or can be set to false)

INSERT INTO "EstimateLine" ("CustomerRefListID", "RefNumber", "EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 1', 1.00000, 1.00, '20000-999022286')

INSERT INTO "EstimateLine" ("CustomerRefListID", "RefNumber", "EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 2', 2.00000, 2.00, '20000-999022286')

INSERT INTO "EstimateLine" ("CustomerRefListID", "RefNumber", "EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 3', 3.00000, 3.00, '20000-999022286')

This creates one Estimate with three lines. Note the FQSaveToCache field, set to True. Saving the Estimate saves the lines with it.

INSERT INTO "EstimateLine" ("EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID", "FQSaveToCache") VALUES ('250000-933272656', 'Building permit 1', 1.00000, 1.00, '20000-999022286', 1)

INSERT INTO "EstimateLine" ("EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID", "FQSaveToCache") VALUES ('250000-933272656', 'Building permit 2', 2.00000, 2.00, '20000-999022286', 1)

INSERT INTO "EstimateLine" ("EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID", "FQSaveToCache") VALUES ('250000-933272656', 'Building permit 3', 3.00000, 3.00, '20000-999022286', 1)

INSERT INTO "Estimate" ("CustomerRefListID", "TxnDate", "RefNumber", "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity", "BillAddressCounty", "BillAddressPostalCode", "BillAddressCountry", "TermsRefListID", "DueDate", "ItemSalesTaxRefListID", "Memo", "CustomerTaxCodeRefListID") VALUES ('470001-1071525403', {d'2002-10-01'}, '1', 'Brad Lamb', '1921 Appleseed Lane', 'Bayshore', 'CA', '94326', 'USA', '10000-933272658', {d'2002-10-31'}, '2E0000-933272656', 'Memo Test', '10000-999022286')

 

  Top 
  Piyush Varma 
  
 Group: Members 
 Posts: 66 
 Joined: 2006-04-06 
 Profile
 Posted : 2006-05-26 03:27:10
Under which circumstances should I use EstimateLine over Estimate table to create a new estimate please? - Thanks. Piyush Varma 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-05-26 08:25:29

For multi-line Estimates, some may find it easier to not include the header information with each line item, but rather to have seperate smaller commands for each of the Estimate Lines and a final big INSERT for the Estimate header with all the Billing address details if required. The last example above shows a billing address and memo being added to the Estimate via the Estimate header table.

 

  Top 
  Piyush Varma 
  
 Group: Members 
 Posts: 66 
 Joined: 2006-04-06 
 Profile
 Posted : 2006-05-26 10:11:20
I am using Quick Books Premier 2006 version. Where do I find the 'Ship To Address' column names for an Estimate please? Thank you. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-05-26 10:30:53
Sorry, a "Ship To Address" is only available in Sales Orders and Invoices. 

  Top 
  Julie Alley 
  
 Group: Members 
 Posts: 18 
 Joined: 2006-09-27 
 Profile
 Posted : 2006-11-17 03:11:04
I have what is perhaps a silly question.

How do I come up with what EstimateLineItemRefListID to use for a new estimate?  It appears this and the EstimateLineSalesTaxCodeRefListID have to be known items before creating a new estimate.

Sorry for the novice question.

ECCS
 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-11-17 08:21:39

All the values used are found in the tables of their name.

For Example:
EstimateLineItemRefListID is '250000-933272656'  and found like this:

Select ListId, FullName from Item where FullName like 'P%'

EstimateLineSalesTaxCodeRefListID is '20000-999022286' and found like this:

Select ListId, Name from SalesTaxCode where Name like 'N%'

CustomerRefListID is '470001-1071525403' and found like this:

Select ListId, FullName from Customer where FullName like 'Lamb%'

ItemSalesTaxRefListID is '2E0000-933272656' and found like this:

Select ListId, Name from ItemSalesTax where Name like 'San%'

CustomerSalesTaxCodeRefListID is '10000-999022286' and found like this:

Select ListId, Name from SalesTaxCode where Name like 'T%'

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to