Cancellation of sales invoice

If you didn’t send the invoice to customer yet, just delete it.

Otherwise this has been already answered, see How to cancel an invoice?