Skip to content

Leave policy assignment based on joining date only considering past 12 months period #121

Description

@beingeek

Information about bug

I tested Leave policy assignment based on joinong date for an Employee who's joining date was more then 3 years ago (40 months), but months_passed calculated were only 5 months. Because of this line:

https://github.com/frappe/erpnext/blob/v13.21.1/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment.py#L129

image

This simply should be difference months between from_date (joining_date) and to_date (effective_to)

I tested in ERPNext v13.21.1 but this bug is also present in version-14-beta, and i assume its also in v13.21.1 prior versions too.

Module

HR

Version

Frappe Framework: v13.21.0 (HEAD)
ERPNext: v13.21.1 (HEAD)

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

No response

Metadata

Metadata

Assignees

No one assigned

    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