When do you issue a credit note?
Whenever an invoice turns out to be wrong or the customer is entitled to pay less: goods returned, a price agreed down after a dispute, work not completed, or a simple error in the original. The invoice stays exactly as issued, and the credit note records the reduction against it.
This matters because an invoice, once sent, is part of the record. Editing it after the fact means the customer's copy and yours disagree, and if VAT has already been reported the return is now wrong too. A credit note leaves the trail intact.
A credit note carries the same details as an invoice: a number, the date, the customer, the original invoice it relates to, the amounts net and VAT, and the reason. It can be offset against the original invoice, against a future one, or refunded in cash.