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 : Linking Purchase Orders With Received ItemsSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v6 Forum

 New Topic 
 
 Post Reply 
[1]  
 Linking Purchase Orders With Received Items 
 Author   Message 
  Jack Nichols 
  
 Group: Members 
 Posts: 14 
 Joined: 2006-06-01 
 Profile
 Posted : 2006-06-01 04:10:36

I have created purchase orders and received orders using VB6 and the QODBC driver, however I cannot link the received orders to the purchase orders. I have tried writing to the Transaction table and the ItemReceiptLinkedTxn tables and get the following error from the log: Error Add not supported on this table in BuildXMLHeader

Any Ideas?

 

 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-06-05 10:05:17

To understand the process, I will do a simple one line purchase order example.

FIRST TO CREATE THE PURCHASE ORDER
The following SQL statement will create a new purchase order:

INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber",
"PurchaseOrderLineItemRefListID", "PurchaseOrderLineDesc",
"PurchaseOrderLineQuantity", "PurchaseOrderLineRate",
"PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID",
"FQSaveToCache") VALUES ('C0000-933272656', '201', '440001-1071511796',
'standard interior door frame', 1.0, 12.00, 12.00, 'AB0000-1197756245', 0)

which results in the following purchase order in the QuickBooks 2006 Premier USA Edition - Sample Rock Castle Construction company file:

In QuickBooks you have two options when Receiving Inventory:-

  • Receive Inventory with Bill
  • Receive Inventory without Bill

RECEIVE INVENTORY WITH BILL: TO CREATE A BILL FROM A PURCHASE ORDER

When we're ready to receive the item (with the bill)  we can read the Purchase Order table and insert it into the BillItemLine table like this:

INSERT INTO "BillItemLine" ("VendorRefListID", "RefNumber",
"ItemLineItemRefListID", "ItemLineDesc",
"ItemLineQuantity", "ItemLineCost",
"ItemLineAmount", "ItemLineCustomerRefListID",
"FQSaveToCache")
Select "VendorRefListID", {fn CONCAT('B', "RefNumber")},
"PurchaseOrderLineItemRefListID", "PurchaseOrderLineDesc",
"PurchaseOrderLineQuantity", "PurchaseOrderLineRate",
"PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID",
0 as "FQSaveToCache" from PurchaseOrderLine
where "VendorRefFullName" ='Perry Windows & Doors' and "RefNumber"='201'
and "PurchaseOrderLineSeqNo"=1

Note: This is one complete SQL statement, for multiple purchase order lines you would set FQSaveToCache to 1 instead (using: 1 as "FQSaveToCache") and loop the PurchaseOrderLineSeqNos until the last one setting FQSaveToCache to 0.

The Purchase Order now appears as a Bill in QuickBooks but is unlinked to the Purchase Order line at this stage. (See further down below for more on how to create a linked Bill).


RECEIVE INVENTORY WITHOUT BILL: TO CREATE A ITEM RECEIPT FROM A PURCHASE ORDER

When we're ready to receive the item (without a bill) we can read the Purchase Order table and insert it into the ItemReceiptItemLine table like this:

INSERT INTO "ItemReceiptItemLine" ("VendorRefListID", "RefNumber",
"Memo","ItemLineItemRefListID", "ItemLineDesc",
"ItemLineQuantity", "ItemLineCost", "ItemLineAmount",
"ItemLineCustomerRefListID","ItemLineBillableStatus","FQSaveToCache")
Select "VendorRefListID", {fn CONCAT('ItemReceipt ', "RefNumber")},
'Received items (bill to follow)', "PurchaseOrderLineItemRefListID",
"PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", "PurchaseOrderLineRate",
"PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID",'Billable',
0 as "FQSaveToCache" from PurchaseOrderLine
where "VendorRefFullName" ='Perry Windows & Doors' and "RefNumber"='401'
and "PurchaseOrderLineSeqNo"=1

Note: This is one complete SQL statement, for multiple purchase order lines you would set FQSaveToCache to 1 instead (using: 1 as "FQSaveToCache") and loop the PurchaseOrderLineSeqNos until the last one setting FQSaveToCache to 0.

The Purchase Order now appears as a Item Receipt in QuickBooks but is unlinked to the Purchase Order line at this stage. (See: How do I receive Items against a Purchase Order? Receive Inventory without Bill? ItemReceipts for more details on how to link the Purchase Order instead).


RECEIVE INVENTORY WITH BILL: TO CREATE A LINKED BILL FROM A PURCHASE ORDER

When we're ready to receive the item (with the bill)  we can read the Purchase Order table and insert it into the BillItemLine table as a linked Bill like this:

INSERT INTO "BillItemLine" ("VendorRefListID", "RefNumber",
"ItemLineLinkToTxnTxnID", "ItemLineLinkToTxnTxnLineID",
"FQSaveToCache")
Select "VendorRefListID", {fn CONCAT('POLink', "RefNumber")},
"TxnID", "PurchaseOrderLineTxnLineID",
0 as "FQSaveToCache" from PurchaseOrderLine
where "VendorRefFullName" ='Perry Windows & Doors' and "RefNumber"='601'
and "PurchaseOrderLineSeqNo"=1

Note: This is one complete SQL statement, for multiple purchase order lines you would set FQSaveToCache to 1 instead (using: 1 as "FQSaveToCache") and loop the PurchaseOrderLineSeqNos until the last one setting FQSaveToCache to 0.

which results in the following linked Bill in the QuickBooks 2006 Premier USA Edition - Sample Rock Castle Construction company file:

and because there was only one line in the example Purchase Order, the Purchase Order has also been marked, "RECEIVED IN FULL".

 

  Top 
  Jack Nichols 
  
 Group: Members 
 Posts: 14 
 Joined: 2006-06-01 
 Profile
 Posted : 2006-06-07 11:45:26
I cant wait for the continuation ... we have a project hinging on weather or not we can link received item(s) to purchase orders using QODBC. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-06-08 12:33:55
This is a FREE self help support forum. If any matter is REALLY URGENT you should consider using our Priority Support system, click on the "Buy Support Incidents" link on the left side bar to find out more. 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to