Opening Balance and Leave allocation limit

As per our policy, the maximum earned leave allocated for a leave period is 24 days. We also need to allocate the 28 accrued leaves from the previous year. I am not able to manually allocate more than 24 days. It says, the allocation exceeds the maximum allocated leaves.

Also, when I check the box, “Add unused leaves from previous allocations”, it deducts the leaves from 24 and shows the remainder. It is supposed to add leaves but it is subtracting the old allocation. Please help.

1 Like

Hi Tamil,
It took my team countless times to figure out how the ERPNext leave calculation works. There are a few things to consider.
II. In the Leave Type screen

  1. The Maximum Leave Allocation Allowed - should be the total number of days that the employee can have at any period. Keep it something like: 100 or more (depending on your policy)
  2. Carry Forward: Maximum number of Carry Forward (from earlier period). Keep it like 70
  3. You need to enable “earned leave” to add leaves your employee at end of the month

    II. In the Leave Policy:

    Create a new Leave Policy for this Annual Leave. The system will automatically fill the Annual Allocation = Maximum Leave Allocation Allowed … > You can change it to 24 or 30 depending on your policy

III. Transactions:

  1. You need to allocate the 28 days from the previous period say 01-01-2021 to 31-12-2021
  2. You need to add the Leave policy mentioned earlier (II), in Leave Policy Assignment for the employee - enable the check box "add unused from previous allocation.

The result will be last year allocation days + 2 days monthly (for a 24 days / year). If you are in June 2022, it will be 24+10 = 34


This is by far the best write-up on Carry Forward. This must make its way into the official documentation.

Maximum Leave Allocation Allowed: If you put in, for instance, 30 days, it means that when you try to carry forward the leave for another 30 days making it 60 days in total, this cannot work because you have set the leave to have a maximum number of 30 days.

In order to solve this, you must have an idea of how many carry forwards can be done. For example, if employees can carry forward 30-day annual leave for 3 years, that would mean an employee, all things being equal, might have a total allocation of 90 days. In this case, Maximum Leave Allocation Allowed must be set to 90.

This is what makes Carry Forward actually work

1 Like