To cancel cheques/checks, select ‘Cancel or re-issue Cheques/Checks’ from the ‘Accounts Payable’ menu as shown below.

You will then be presented with the following form.

From here you can select which bank account the cheque/check was drawn from, select the cheque/check number to cancel as well as choose whether the invoice as well needs to be cancelled/re-instated in a posted state or un-posted.
After you press OK the ledger entries will be made to cancel the cheque/check and related invoice as requested.