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

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
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
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