IF I created the Purchase Invoice through purchase order then when the 3 fields ( Qty, Qty received, Qty Invoiced) have the same value then automatically Purchase order will delete.
But when I create the Purchase Invoice from Using the function “Get receipt lines “
Even the 3 fields are has same value ( qty, Qty Received, qty Invoiced ), still Purchase order is not removing automatically.
So when I know how to delete that purchase order when I use get receipt Lines fuction.
What my client asks that Purchase order should delete automatically when he create the Purchase invoice through Purchase Invoice form( Using the Function Get Receipt Lines ).
I checked the coding , but I could not find where I have to write the code.
So please let me know what is the code and where I have to write the code.
You just didn’t explain it very well. I couldn’t understand your English. But I get it now.
The system is doing like this because of the design. If you use the “Get Receipt Lines” function, then this is a function which can be used to get the receipt lines many times. If you want this function to delete the orders, then you need to write your code in this function job. Check the batch job (which Subrata also refers to) to delete orders for how to do it.
I think what you want is to add the functionality of Report 499, but it is easier just tu run this report - it will delete all Purchase Orders where Qty. = Qty.Invoiced.
Or you could actually insert the report into the Job Queue and have NAV automatically delete them every night (or every hour if the customer would prefer that) - but there’s not need to do any customizations here!