Voiding an invoice turns allocated payments into credit and doesn't erase the invoice, but rather archives it for audit and fraud prevention purposes.
Go to Accounts > Invoices
Select and open the finalised invoice you want to void
Click on the Status drop-down menu and select Void, then Save
Go to Accounts > Invoices
Toggle 'Show voided' at the top right to ON
Note: You cannot un-void an invoice for auditing reasons. A new invoice will have to be recreated if required.