You can prevent the system from allowing you to enter a purchase that has the same Suppliers Reference number as a previous purchase from that supplier.
Essentially, this should stop you accidentally entering the same purchase twice if you are using the Suppliers Reference field to show the suppliers invoice number.
To enable this option go to Settings -> Purchase Options. Then tick the first option “Don’t let me enter a purchase if the Suppliers Reference I provide has already been entered for that supplier”