fix: Incorrect Earned Leaves Proration (#35156)
This commit is contained in:
@@ -192,9 +192,9 @@ def add_current_month_if_applicable(months_passed, date_of_joining, based_on_doj
|
|||||||
date = getdate(frappe.flags.current_date) or getdate()
|
date = getdate(frappe.flags.current_date) or getdate()
|
||||||
|
|
||||||
if based_on_doj:
|
if based_on_doj:
|
||||||
# if leave type allocation is based on DOJ, and the date of assignment creation is same as DOJ,
|
# if leave type allocation is based on DOJ, and the date of assignment creation is after DOJ,
|
||||||
# then the month should be considered
|
# then the month should be considered
|
||||||
if date.day == date_of_joining.day:
|
if date.day >= date_of_joining.day:
|
||||||
months_passed += 1
|
months_passed += 1
|
||||||
else:
|
else:
|
||||||
last_day_of_month = get_last_day(date)
|
last_day_of_month = get_last_day(date)
|
||||||
|
|||||||
Reference in New Issue
Block a user