You have the ability to print a barcode at the bottom of each receipt that Idealpos prints.
This can be used to easily track the sale for refunds, Layby, credits and history if you require.
Go to Setup > Yes/No Options > Receipt/Kitchen > Print Bar Codes on Receipts.