This error occurs when the data contains duplicate document numbers. To fix that issue:
Rename the document number from the database viewer.
Go to Housekeeping, Administrative Tools, Database Viewer.
Search from Database Table for the table name: invhead.
Click Edit and look for the Identical record for Invno.
Rename the Invno of one identical record.
Close the database viewer and proceed to fix & Reverse.
