Deleting Purh. Rcpt. Lines with a Zero Qty.

atankersleyatankersley Member Posts: 32
edited 2011-12-18 in Navision Attain
I have made a custom program to link all purchase lines to either a transfer order to a branch or a sales order to a customer. Because we now print pick labels for the transfer and sales orders when we receive these purchase orders, we only post and receive one line at a time.
The problem is that we create a lot of Purh. Rcpt. Lines with a zero Qty. This is becoming an issue and I would like to first change the code in the Purch Post to not create Purh. Rcpt. Lines with a zero Qty and then delete out all Purh. Rcpt. Lines with a zero Qty. Will doing this cause any problems that you know of with other processes in the future?
tank

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    I have made a custom program to link all purchase lines to either a transfer order to a branch or a sales order to a customer. Because we now print pick labels for the transfer and sales orders when we receive these purchase orders, we only post and receive one line at a time.
    The problem is that we create a lot of Purh. Rcpt. Lines with a zero Qty. This is becoming an issue and I would like to first change the code in the Purch Post to not create Purh. Rcpt. Lines with a zero Qty and then delete out all Purh. Rcpt. Lines with a zero Qty. Will doing this cause any problems that you know of with other processes in the future?

    That's a bit of a baited question. :mrgreen:

    The answer is that if you do it right it wont be a problem. But don't mess it up or you could screw things up.
    David Singleton
  • atankersleyatankersley Member Posts: 32
    Any suggestions on how not to mess it up.
    tank
  • samblue600samblue600 Member Posts: 84
    Dont delete.. instead filter it, to show only whose quantity is greater than zero
  • LibertyMountainLibertyMountain Member Posts: 94
    We would like to do the same thing. here's the background info:

    we are using NAV2009 R2. We just merged operations with another company. We purchased their inventory using 2 large purchase orders (4000 lines and 2000 lines). we've made several (1000 or more) purchase receipts per PO. So we have millions of new purch. rcpt. line records -- most where qty = 0.

    to keep db small and not storing useless info, I'd like to purge all these purch. rcpt. line records where quantity = 0. Can I do this with a batch report? or directly in SQL?

    I know I can delete the header and it will delete the lines, but I'm not ready to purge the header for at least another year.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    We would like to do the same thing. here's the background info:

    we are using NAV2009 R2. We just merged operations with another company. We purchased their inventory using 2 large purchase orders (4000 lines and 2000 lines). we've made several (1000 or more) purchase receipts per PO. So we have millions of new purch. rcpt. line records -- most where qty = 0.

    to keep db small and not storing useless info, I'd like to purge all these purch. rcpt. line records where quantity = 0. Can I do this with a batch report? or directly in SQL?

    I know I can delete the header and it will delete the lines, but I'm not ready to purge the header for at least another year.


    As long as the receipt line has been invoiced, its no problem to delete it. just look at the code in the ondelete trigger and it will be obvious which lines can be deleted.
    David Singleton
Sign In or Register to comment.