SQL to Close POs but not Commit them to Inventory

I used the following script (from Ryan Sakry, thank you!) to close all my open POs prior to 10/01/2007:

UPDATE PurchaseOrder SET [Status] = 2 WHERE LastUpdated < '2007-10-01'

Now when I go to the PO screen I show all the affected above POs as closed (yellow icon) under the Status column, but when I click on any of these particular POs the status shows as Open and I am still able to click on Receive and make PO line entry changes (it should be grayed out) Any suggestions on how to fix/update this?

Basically what I want to do is mark all the pre 10/01/2007 POs as closed without actually receiving/committing them to inventory, but I still would like to be able to pull up these POs with their original line item entries and quantities (for viewing only) .

Thanks in advance (Ryan?)!

Reply to
Alex
Loading thread data ...

Alex, This is now because when you drill into the order RMS calculates closed on QuanityOnOrder vs QuantityReceivedToDate. Basically you either need to set these to the same number, delete the items, or zero out the quantity on order. I'd be more than happy to whip up a scrip for you that would accomplish this, I just need to know how you would like to handle it.

Reply to
rsakry

I would like to "pretend" that we received the PO as ordered (like a receive all) except I do NOT want it to affect my current inventory. We just want to have these POs for reference.

Reply to
Alex

Ok, just to recap, you'd like me to set the Quantity Received to Date equal to the Quantity On Order for all orders before 10/01/2007, but not make the changes in the Item table or the InventoryTransferLog table (Item Movement). If that's the case, just reply to me offline, snipped-for-privacy@rite.us, and I will send you back a script.

Reply to
rsakry

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.