A credit note reduces or cancels all or part of an invoice.
A sales credit note reduces the amount owed by a customer. A purchase credit note reduces the amount owed to a supplier.
Record it against the correct customer or supplier so the outstanding balance and VAT records remain accurate.