I found this issue through one of my application consultant. She wanted to delete some purchase orders that are already invoiced (fully).
Administration → IT Administration → Data Deletion → Purchase Documents → Delete Invoiced Purchase Orders Report
The report is standard one, should delete the Purchase Orders that are completely invoiced, i.e. Qty to invoice is zero, Qty to Receive also zero and Quantity=Quantity Received=Quantity Invoiced like this…!!!
But it doesn’t do this… because there is a problem…!!!
Though, its normal order, purchase line type is Item, report code will look for the field Qty. Assigned (flowfield used for Item Charge Assignment).
What I believe, in normal order it should be blank, because its used for type Charge (Item) only.
I just want to know, is it the bug or its just I am not getting the logic of the report. Report ID 499 (NAV 5.0 SP1)
I have modified as per my understanding, and add one more condition there to validate the Qty Assigned field only if purchase line type is Charge (Item).
So, am I right or …???
Please advice me…!!!
i had a doubt that why the PO is not deleted even if it is fully invoiced.
it should be deleted automatically when it is fuly invoiced.
Thats what I am saying…
If you’re on NAV right now, you just check the code, you will find the condition for Qty. Assigned that is not related in normal situations…!!!
I tested the same for type Charge (Item) and its working, it deletes the PO if its fully invoiced, but not for other types of purchase lines…!!!
I just wanted to know I am right or wrong because i have to deploy the solution with documentation and some explanation for track.
just now i checked in my local database. some PO’s are still ther even if the qty is fully invoiced. but some were deleted.
i too donno that in which case it happens… (it does only when the receive and invoice is done seperately)
but one thing i should confirm that when the PO is received and invoiced at once then PO is deleted what ever the line type it may be.
Its deleting only for Purchase Line Type Charge (Item) , else its not deleting it…!!!
If you can open the report 499 in design mode, just check it… there will be a condition for Qty. Assigned, just check it…
I don’t think it works only when Receive and Invoice is done seperately…!!! because, it just checks for Qty. invoiced must not be zero, and Qty. Received must not be zero…!!!
I am waiting for some expert to confirm this…!!!
Thanks for your reply Ravi, but if possible for you, just check the code of the report once…!!!
If you post the receipt & invoice from the order screen and if the order is completly invoices then it is deleted automatically.
But if you manually create an invoice & use the get receipt functionality then the order is not deleted automatically.
After checking the code it seems that the lines which is totally invoices and does not have any outstanding quantity is only deleted from the purchase order where there are multiple lines.
is there to a way to stop the auto deletion when you use “recieve & invoice”?
Welcome to DUG Paul
Yes, you need to customize.