Skip to content

Inconsistent leave carry information #2770

@git-avc

Description

@git-avc

Information about bug

Hi:

  1. Holiday list for 2024 just contains saturdays and sundays
  2. Have an employee with 22 privilege leaves allocated for period 2024-01-01 to 2024-12-31
  3. On 2024-08-01 (posting_date) I submit a leave application for 2024-08-12 to 2024-08-25. Approve it. So, 10 days used.
  4. 2024-08-10. Company decides to add 2024-08-16 to holiday list.
  5. At the end of the year, leave balance report shows 9 days used, so 13 remaining. But … leave allocation (manual or assignment via policy) gets 10 days used, and carry 12 days. Should be 13.

Leave balance report calculate it taking on account the holiday list, but leave allocation carry mechanism seems to use total_leaves_allocated from each previous period leave allocation.

This is an edge case, when holiday list is modified after leave application, but it should be considered someway.

Options …

  • Blocking holiday list after first application?
  • Check existing leave applications on updating holiday list?
  • Change carry calculus on leave allocation
  • What do you think?

Reference
https://discuss.frappe.io/t/leave-carry-forward-calculation-after-holiday-list-update/142066

Thanks

Module

HR

Version

Tested on version-14, version-15 and develop

Installation method

None

Relevant log output / Stack trace / Full Error Message.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions