Problem: Error 3022 duplicate value in indexed field when loading a sale.
Cause: This can be caused by the file that holds receipt # information (rpronumb.dat) being corrupted of replaced with an out of date file. During loading a paid in full retail sale the contract # is taken from the receipt # for history, which is from rpronumb.dat.
Fix: This can be repaired by running the compress and repair program. In versions before 4.4.5 this problem may not be fixed by the repair program.
In the repair program before 4.4.5 when repairing rpronumb.dat the oldest history record’s receipt # +1 was used for the next receipt # to use. If payments or sales have been loaded after rpronumb.dat corruption that receipt # may not be the biggest thus still causing the probem when loading new sales.
After 4.4.5 of RTO Pro a new method of getting the biggest receipt # was implemented thus fixing the problem in all situations.