Cannot cancel Sales Invoice linked to Subscription

I want to amend a sales invoice, but when I try to cancel it, I get the error:

Cannot delete or cancel because Sales Invoice 2017-0122 is linked with Subscription SUB-00107

When I try to delete the linked subscription, I get the error:

Subscription SUB-00107: Submitted Record cannot be deleted.

Is there a way around this? I’m using ERPNext v9.0.6.

Thanks.

Did you disable the Subscription?
https://erpnext.org/docs/user/manual/en/subscription

Yes, the Subscription is disabled and stopped, but same result.

Hi @Baco
Please report this issue on github and we’ll take it up from there

Link to github issue: https://github.com/frappe/erpnext/issues/11032