Skip to content

Commit

Permalink
fix: Incorrect Earned Leaves Proration (#35156)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunKangChin authored May 21, 2023
1 parent eb243c2 commit dc04b24
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()

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
if date.day == date_of_joining.day:
if date.day >= date_of_joining.day:
months_passed += 1
else:
last_day_of_month = get_last_day(date)
Expand Down

0 comments on commit dc04b24

Please sign in to comment.