Eddie Monster
4th October 2005, 16:35
We are currently using several different Order Types for purchasing purposes. Each order type currently has the Print Purchase Invoices step as a listed procedure. Our Finance department wants to remove the print purchase invoice step from the order types, but they do not want to lose the ability to use the Maintain Prices/Deliveries After Maintain Receipts session. Since we run the Process Delivered Purchase Order session on a nightly basis (and with wide-open selection criteria), removing the Print Purchase Invoices step would leave only a small window of opportunity to be able to use the Maintain Prices/Deliveries After Maintain Receipts.

What we proposed was to disable the nightly run of the Process Delivered Purchase Order session and write a customized session that would look for purchase receipts at procedure 9 (Process Delivered Purchase Orders) and see if an ACP invoice had been matched to it. If it has, then we would run Process Delivered Purchase Orders. If not, then we would not run the session and the Finance department would still be able to change the PO price if there was a difference from the invoiced price. Essentially we would only run the Process Delivered Purchase Orders session for purchase orders that have been matched and approved by the Finance department.

If I simply select all lines in tdpur045 with tdpur045.spur = 9 (Process Delivered Purchase Orders) and which has a value in the tdpur045.invn field not only do I select the records which need processed, I get all the records that are sitting at 'Deleting Line...' because they retain the tdpur045.spur = 9 also.

Does anyone have any suggestions to modify the query to only pull the records I need?

Thank you for any information you can provide. It is greatly appreciated.

ltannous
6th October 2005, 19:50
If you are writing a query you can select also the tdpsc045.stsd status that is free to limit the search

Eddie Monster
6th October 2005, 21:19
Itannous,

Thank you very much for the information.

I believe you meant tdPUR045.stsd and this appears to be what I'm looking for. Do you happen to know what events change the status. I imagine the matching of the PO line to an ACP document changes the status to 'Matched' and the approval of that document in ACP changes the status to 'Approved'.

What changes it to 'all.approved'. Can you or someone else confirm the events triggering the status change?

Evert-Jan Bosch
7th October 2005, 11:13
During the acp process, when the order line is completely matched and approved, the status goes to all.approved.