You have three options to cancel an invoice.
1. The first option, and most common, is to cancel your invoice with a credit (total or partial). To do so, click on Create credit note from the preview of your invoice.
In accounting, a credit note is a "negative invoice." You can also create a credit note on the fly, by clicking on Documents then Create credit note. This works only for invoices. Estimates can be directly deleted.
2. The second option is to remove (delete) the document by clicking on the Delete button from the document overview of your invoice. The invoice will be completely removed from your account. Since the numbering of invoices should be continuous, it is recommended to use this option on the last invoice(s).
3. Finally, if you prefer to cancel the document, you can simply click and choose Change Status then Cancelled. The document will remain in your log but will no longer be included in your statistics.