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 do Inventory Adjustments?Search Forum

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

 New Topic 
 
 Post Reply 
[1]  
 How do I do Inventory Adjustments? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-02-21 12:15:51

This example creates one inventoryadjustment with three lines. Note the FQSaveToCache field, set to True except on the last one. Note: You must be in single user mode for this to work.

INSERT INTO "InventoryAdjustmentLine" ("AccountRefListID", "TxnDate", "RefNumber", "Memo", "InventoryAdjustmentLineItemRefListID", "InventoryAdjustmentLineQuantityAdjustmentNewQuantity", "FQSaveToCache") VALUES ('320000-933270542', {d'2003-12-15'}, '1', 'Memo 1', '160000-933272656', 200.0, 1)

INSERT INTO "InventoryAdjustmentLine" ("AccountRefListID", "TxnDate", "RefNumber", "Memo", "InventoryAdjustmentLineItemRefListID", "InventoryAdjustmentLineValueAdjustmentNewValue", "FQSaveToCache") VALUES ('10000-933270541', {d'2003-12-15'}, '1', 'Memo 2', '450000-1071511428', 100.0, 1)

INSERT INTO "InventoryAdjustmentLine" ("AccountRefListID", "TxnDate", "RefNumber", "Memo", "InventoryAdjustmentLineItemRefListID", "InventoryAdjustmentLineQuantityAdjustmentNewQuantity", "FQSaveToCache") VALUES ('10000-933270541', {d'2003-12-15'}, '1', 'Memo 3', '440001-1071511796', 30.0, 0)

 

  Top 
  Kevin 
  
 Group: Members 
 Posts: 9 
 Joined: 2006-09-24 
 Profile
 Posted : 2006-12-04 05:43:50
This seems to work as long as FQSaveToCache is true.  The final entry with FQSaveToCache set to false returns "Error parsing complete XML return string.". 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-12-04 08:44:29
I've just retested this example using QuickBooks 2006 Premier USA Edition with the Sample Rock Castle Construction company file, and QODBC v7.00.00.199, without any problems (other than you can only have one memo value, so "Memo 3" was written to QuickBooks). Because I had to retest, I've added the screen dumps. 

  Top 
  Kevin 
  
 Group: Members 
 Posts: 9 
 Joined: 2006-09-24 
 Profile
 Posted : 2006-12-04 09:12:55
I knew I'd figure it out as soon as I posted.  The QB file was configured as "Same as Company File" rather than explicitly as Single-User mode.  The file has only been opened in Single-User mode in QuickBooks. 

Since QuickBooks was not running and the only access to the file was the QODBC driver, I would have guessed that it gets opened in single-user mode.  Unfortunately the error message of XML parsing doesn't describe the actual problem.  When I set the configuration to explicitly use Single User mode, it worked.
 

  Top 
  vincent 
  
 Group: Members 
 Posts: 13 
 Joined: 2006-08-24 
 Profile
 Posted : 2007-05-23 11:02:38
Does anyone know if
i) Is it possible to create a new adjustment with Value Adjust set OFF?
ii) Is it possible to create a new adjustment specifying the value of Value Adjust?
iii) Is it possible to modify an existing adjustment's value of Value Adjust?
Cheers
Vincent 

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

Yes, you can adjust the value of a stock item without adjusting the stock quantity. Here is an example:

This item has a COGS Average Cost of $69.73429:

Using QODBC, I adjusted the opening balance equity cost of the stock item by $250.00 using the following SQL insert statement:

INSERT INTO "InventoryAdjustmentLine" ("AccountRefFullName", "TxnDate", "RefNumber", "Memo",
"InventoryAdjustmentLineItemRefFullName", "InventoryAdjustmentLineValueAdjustmentNewValue", "FQSaveToCache")
VALUES ('Opening Bal Equity', {d'2007-05-23'}, '110', 'Value Adj 250', 'Wood Door:Exterior', 250.0, 0)

This item now has a COGS Average Cost of $106.69857:

The value adjustment details can be seen in the Inventory Valuation Detail:

 

  Top 
  vincent 
  
 Group: Members 
 Posts: 13 
 Joined: 2006-08-24 
 Profile
 Posted : 2007-05-25 08:22:28
Thank you Tom for your reply, it must have taken a bit of time to prepare and i appreciate that.

However it does not answer any of my questions.

On the QB Dialog for an inventory adjustment there is a tick box labeled "Value Adjust". When this is ticked it sets the value of the transaction. I DO NOT want to do this, I need to be able to generate a quantity adjustment and to leave this box un-ticked. Adjustments like this then do not set the actual value of the adjustment which is instead calculated on the fly as per normal within quickbooks.

The background is that I use adjustments to perform builds because of some limitations in QB's method of making assembled items. Often I need to build an item and ship it as soon as the parts arrive. Sometimes I need to do this before the invoice arrives and for tax & auditing purposes I can not change the dates of the invoice. At the time i create the adjustment I sometimes do not have an accurate price so that there is a discrepancy once the invoice comes in. (I am currently importing my adjustments with IIF files but there appears to be a bug in that these do not import unless the value adjust flag is set on)  I am spending too much time at the moment correcting silly price discrepancies and i am trying to find a means to import adjustments without fixing the transaction's value.

Hence if I could restate my questions
i) Is it possible to create a new adjustment with the "Value Adjust" tick box set OFF?
ii) Is it possible to create a new adjustment specifying the value of the "Value Adjust" tick box?
iii) Is it possible to modify an existing adjustment's value of the "Value Adjust" tick box?

I have had a further thought though that could solve my problem if the answers to the above are all no.
I could manually create a batch of adjustments with the
"Value Adjust" tick box set OFF in quickbooks and could I then use QODBC to modify these adjustments to add in the line items setting the part numbers and quantities without setting the actual values?

Cheers
Vincent
PS. Do note that I'm using the 2006/7 version of QB for Australia & New Zealand. (I am waiting for a trial upgrade to 2007/08 to see if any of my underlying issues are resolved) 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-05-25 12:32:30

InventoryAdjustmentLine transactions cannot be edited, but to contiune my example, you can adjust the quantity on hand at any point by using the following adjustment example and QuickBooks will automatically do all the value adjustments for you:

INSERT INTO "InventoryAdjustmentLine" ("AccountRefFullName", "TxnDate", "RefNumber", "Memo",
"InventoryAdjustmentLineItemRefFullName", "InventoryAdjustmentLineQuantityAdjustmentNewQuantity", "FQSaveToCache")
VALUES ('Opening Bal Equity', {d'2007-05-23'}, '110', 'Qty Adj 4', 'Wood Door:Exterior', 4, 0)

and the on-hand quantity and average cost is adjusted regardless of the prevous value in the date sequence:

as can be seen here:

But using QODBC you can overhide everything and set the quantity on-hand and the value of the stock to whatever you want. In this example I've reset the quantity on-hand and the asset value by using this insert statement:

INSERT INTO "InventoryAdjustmentLine" ("AccountRefFullName", "TxnDate", "RefNumber", "Memo",
"InventoryAdjustmentLineItemRefFullName", "InventoryAdjustmentLineValueAdjustmentNewQuantity",
"InventoryAdjustmentLineValueAdjustmentNewValue", "FQSaveToCache")
VALUES ('Opening Bal Equity', {d'2007-12-16'}, '110', 'Qty Adj 10 Value 1200',
'Wood Door:Exterior', 10, 1200.0, 0)

which in turn has changed the average cost as $1200.00 / 10 = $120.00:

The value adjustment details can be seen in the Inventory Valuation Detail report:

 

 

  Top 
  phpmaven 
  
 Group: Members 
 Posts: 4 
 Joined: 2007-03-10 
 Profile
 Posted : 2007-12-22 08:42:15

INSERT INTO "InventoryAdjustmentLine" ("AccountRefFullName", "TxnDate", "RefNumber", "Memo",
"InventoryAdjustmentLineItemRefFullName", "InventoryAdjustmentLineValueAdjustmentNewQuantity",
"InventoryAdjustmentLineValueAdjustmentNewValue", "FQSaveToCache")
VALUES ('Opening Bal Equity', {d'2007-12-16'}, '110', 'Qty Adj 10 Value 1200',
'Wood Door:Exterior', 10, 1200.0, 0)[/quote]

When I run the above query using Quickbooks Enterprise 8.0, it runs without error and actually creates an inventory adjustment that I can see in the Inventory Valuation Detail Report but it doesn't actually change the quantity on hand in the item or it's value. Any ideas?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-12-25 22:49:48

By the sounds of things I think you are saying that you don't see the change in your ITEM table. The ITEM table is optimized and you need to do:

SELECT * from ITEM verify

to re-optimize the table.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to