A credit note is the formal document that reverses all or part of an invoice already issued, so that your accounts and tax records show the corrected amount. In the EU it has legal weight: the VAT Directive treats “any document or message that amends and refers specifically and unambiguously to the initial invoice” as an invoice (Article 219), and allows the taxable amount to be reduced when a sale is cancelled or the price is cut after supply, under conditions each member state sets (Article 90). It is a separate document that quotes the original invoice's number and date and the amounts being reversed. In the books it mirrors that invoice: your revenue, the amount receivable and the VAT you owe go down, and a client that deducted the VAT must adjust its deduction (Article 185). Example: INV-0107 billed €1,000 plus €210 VAT; a quarter of the order comes back, so CN-0012 cites INV-0107 and credits €250 plus €52.50 VAT, leaving €907.50 due. Common mistakes: crediting the net amount but not the VAT, and reporting the correction in whichever VAT period is convenient rather than the one your national rules specify.
Try it: Credit note generator.