To cancel a receipt or invoice we can access to:

Finance--> Sales and listings -->Receipts or Invoices.

Once there we will see the list of receipts/invoices we have, the ones paid, outstanding and the credit notes.

We can click the icon  on the receipt/invoice we wish to cancel and at the bottom we will see the following:

To cancel it, click on Rectificate Payment.

We can also press to cancel it directly.

When we click, we will see the following window and we can click on Accept:

Then you'll see a credit note that cancels the receipt or invoice on the customer file / billing and collection.