I have few Sales Invoices which I can not cancel because the linked Sales Orders are cancelled previously. I don’t know how it allowed me to Cancel the Sales Orders before without cancelling the Sales Invoices first, maybe it happened due to a workflow that I tried.
These Sales Invoices do not have any accounting impact but they are showing on some reports. I need help how to resolve this issue. Can I try deleting them using any database query? If so, what should I do?
Check in selling settings if the “Is Sales Order Required for Sales Invoice & Delivery Note Creation?” field is set to yes? If it is, then change it to NO and try again?
@michelle I can think of two possible ways. First, somehow making that linked Order completed/submitted. Second, un-linking the Invoice from the Order. But I don’t know how I can achieve that.
You have to enable the allow on submit option in the linked field from doctype if your developer mode is enabled after that you can unlinked your sales invoice from sales order.
Once you unlinked the same you can cancel or delete the invoices.
@Ranbir Thank you for your reply and I’m sorry that I couldn’t get back earlier.
I tried to understand the process you described but unfortunately I’m not sure how to do it. The application is in developer mode.
The only link field I found on the Sales doctype is the sale_order link field in sales_invoice_item doctype. I enabled the ‘Allow on Submit’ on that field and tried cancelling the Invoice again. Still same issue.
On the Sales Order/Sales Order Item doctype there is not link field to Sales Invoice.