Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leave Policy Assignment: Pro-Rata Allocation for all the leaves may not be the correct assumption. #2483

Open
1 task done
mujeerhashmi opened this issue Dec 5, 2024 · 4 comments

Comments

@mujeerhashmi
Copy link
Contributor

Information about bug

We are not able to allocate leave policy assignment because yearly allocation is 3 and for an employee joining at the end of the leave period, the pro-rata basis of leave calculation is zero & the system throws exception during the leave policy assignment.

I think some leaves are fixed on the yearly basis irrespective of the joining date. The pro-rata assumptions for all the leave types is not correct.

Screenshot from 2024-12-05 18-01-26

Module

HR

Version

erpnext 15.34.0
frappe 15.39.1
hrms 15.27.2

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mujeerhashmi mujeerhashmi added the bug Something isn't working label Dec 5, 2024
@ruchamahabal
Copy link
Member

ruchamahabal commented Dec 5, 2024

You can try allocating it based on Joining Date if you don't want pro-rated allocation? And manually adjust the effective to date to end of the leave period.

I understand these options don't explicitly convey what goes on under the hood - need to be changed. No clue what was the original thought of the contributor behind doing so

@ruchamahabal ruchamahabal added feature-request and removed bug Something isn't working labels Dec 5, 2024
@mujeerhashmi
Copy link
Contributor Author

We were thinking of an option in leave type called "Is Pro-Rata Allocation". If not checked allocate the total leaves as in leave policy else do the pro-rata calculation for assignment.

Let us know if this works so that we can create a PR.

@mujeerhashmi
Copy link
Contributor Author

We are facing another challenge when leave policy is assigned based on joining date. We have annual sick leave of 30 days and 60 days of partial paid sick leaves. We are getting this error

Screenshot from 2024-12-05 19-26-52

We will need to handle such cases as well where the no. of days in the current leave period are less than the pro-rata calculation.

@ruchamahabal
Copy link
Member

We are facing another challenge when leave policy is assigned based on joining date. We have annual sick leave of 30 days and 60 days of partial paid sick leaves. We are getting this error

You can bypass this by enabling "Allow Over Allocation" in leave type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants