To cancel the Invoice, if Payment is logged against it, Follow below steps:
[A] Go to Payment Module, Search for the receipt of logged Payment against the Invoice.
[B] Cancel the Receipt.
[C] Once you cancel the receipt, You can go to All documents Module or in Transaction Timeline, Search for the invoice to cancel.
[D] Click on "Other Action" Button in the Invoice, then click on cancel option. Your Invoice will be cancelled.
Follow the below link to cancel the receipt.
Keywords: Payment Logged, Cancel Invoice