To keep track of a credit invoice you must generate it from the ordinary invoice More > Generate > Credit invoice.
If you want to offset those invoices, you must mark the regular invoice as collected and the credit invoice as paid.
This way both invoices will be cleared.
You can indicate in the Title of the credit invoice, "Credited", for this information. You can also indicate it on the credit invoice receipt, in the Item.
field.