Credit Note Cancel Invoice

How to cancel an invoice with a credit note