PO Receipts error: Violation of Primary or Unique Key constraint "PK_PO_RECEIPTS" on table "PO_RECEIPTS"

This error occurs when the PO Receipts module is attempting to store a transaction using the next PO receipt number, but the number has already been used by a previous receipt. The next PO receipt number is specified under (Purch > Purchasing Setup > Purchasing Defaults > Next PO Receipt No.).

It's very rare that a company runs into this error, provided that the Next PO Receipt No setting was initially set and never altered afterward. In most situations, this setting never needs to be altered since it's just an internal number. In cases where it has been changed, this error can be encountered.

To determine the highest receipt number that currently exists in your database, you can go to (Purch > Data Views > PO Receipts) and provide a date range many years into the past and a few years into the future. This just ensures that you capture all data. Also, make sure to include items, descriptors and subcon lines. Click the 'View' button to run the report and choose the 'All Fields' layout. Click on the 'Batch No' column to sort it and then locate the largest number (make a note of that number).

Next go to (Purch > Purchasing Setup > Purchasing Defaults) and change the Next PO Receipt No. to a number equal to ONE MORE than the largest number noted above. This should allow you to proceed with your next PO Receipt. Our recommendation is to make no further changes to the Next PO Receipt No. setting after this change.