While cancelling a leave application, it gives an error, “Only expired allocation can be cancelled”. There is no workflow created for the leave application doctype. Actually, when going to cancel a leave application, it shows a leave ledger entry linked with that leave application. So, while trying to cancel that “Leave Ledger Entry”, the system throws an error as “Only expired allocation can be cancelled”.
This is a normal case, say, for example, initially, I applied for a leave of next month which in turn got approved(Submitted) as well. Now, I want to cancel it to say there is a change in the plan and don’t want to avail leave. I guess this is a very common scenario that is not served in the ERPNext. Please help.