Problem in Days calculation in Leave application

Hello For all…

I’ve noticed that the system doesn’t have precise calculations for leave days in the leave allocation. For example, if each employee can take 1.65 days of leave per month, and an employee Bob for example joins on 1/1/2024 and wants to take leave on 20/2/2024, his leave allocation only shows 1.65 days instead of 2.79 days.

Could you advise on which DocType I need to edit to make this calculation more accurate?"

Hi,

System will allocate the leave on the last day of the calendar month. Leave allocation only happens once a month and not on a daily basis.

Thanks,

Divyesh Mangroliya

@mangroliya So we can’t change that to make it dynamic so it calculate the Leave for each day…?

Hi,

Unfortunately, no, you can do it only by Monthly, Quarterly, Half-Yearly or Yearly.

Also, as work around, you can allocate on the first of month instead of Last day.

Thanks,

Divyesh Mangroliya

1 Like

@mangroliya Hello My friend…
Just to confirm, if we were to modify the leave_application.py file to make it dynamic and calculate leave on a daily basis, would that approach work.? Or are there constraints within the system that would still prevent this from being implemented…?

Looking to your feedback.

Hi,

I think, you need to override following function to add the Daily Leave allocation funcationality.

Thanks,

Divyesh Mangroliya