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 receive Items against a Purchase Order? Receive Inventory without Bill? ItemReceiptsSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 How do I receive Items against a Purchase Order? Receive Inventory without Bill? ItemReceipts 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-06-09 12:36:31

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', '401', '440001-1071511796',
'standard interior door frame', 2.0, 24.00, 24.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

NEXT, 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.


TO CREATE A LINKED ITEM RECEIPT FROM A PURCHASE ORDER

We can also receive the item (without a bill) by reading the Purchase Order table and inserting it into the ItemReceiptItemLine table as a linked Item Receipt like this instead:

INSERT INTO "ItemReceiptItemLine" ("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"='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 linked Item Receipt in QuickBooks:

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

 

  Top 
  Glade Warner 
  
 Group: Members 
 Posts: 9 
 Joined: 2006-07-08 
 Profile
 Posted : 2006-07-08 02:51:23
How do I receive over the PO expected quantity?

When I attempt to receive more than the expected quantity, the PO in QB shows only the expected quantity, and the line is closed.  Interestingly the  item shows the full quantity as specified in the item receipt. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-07-08 12:13:59

If you need to receive more than the quantity ordered, you should update the PurchaseOrderLineQuantity first.

UPDATE PurchaseOrderLine SET PurchaseOrderLineQuantity = 3.0 where "VendorRefFullName" ='Perry Windows & Doors' and "RefNumber"='401' and "PurchaseOrderLineSeqNo"=1

 

  Top 
  cameron 
  
 Group: Members 
 Posts: 17 
 Joined: 2006-03-22 
 Profile
 Posted : 2007-01-22 14:04:06

Hi Tom

What version of QODBC (or QuickBooks) is needed to create ItemReceipts.  doing a "sp_columns ItemReceiptItemLine" on either 2005-06 or 2006-07 QB NZ editions returns insertable=false on all columns of the table.  this using QODBC 7.0.0.204

Do I need the 2007-08 edition of QB? (which hopefully will be released here soon)

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-01-22 15:06:23

The QuickBooks qbXML SDK 4.0 that was released as part of QuickBooks 2005 in USA late in 2004 included the following enhancements:

  • Ability to add and modify Item Receipts.
  • Ability to create a bill or an Item Receipt from a Purchase Order.
  • Ability to link lines in new Bills or Item Receipts with lines in Purchase Orders.

Unfortunately Australia and New Zealand is still stuck on SDK 3.0 and will be even when QuickBooks 2007/08 is released later this year. Yes, we are three years behind. It's a SDK issue, not a QuickBooks year issue for everyone outside of USA.

See: QuickBooks SDK 4.0 for U.S. Editions of QuickBooks 2005 

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to