Cant cancel submitted Purchase Invoice

I am using version
ERPNext: v12.14.0 (version-12)
Frappe Framework: v12.12.0 (version-12)

After creating and submitting a Purchase Invoice there is no way to cancel it.
The option does not appear anywhere.

With the same version (production) the Cancel button appears at the upper right , above the blue Create button.

This is likely a permissions issue. Have you checked that your user has cancel rights on Purchase Invoices?

It could be one of two things:

  1. You do not have the right to Cancel the invoice. This could be solved via the Role Permission Manager.

  2. Check if you have enabled a workflow against this. You can add a new state to allow cancellation or simply disable the workflow.

I found the problem. It was option 2.
Someone had created a workflow that altered the sequence.
Thank you for your help