Skip to content

Commit

Permalink
fix: consider leaves taken while calculating expired carry-forwarded …
Browse files Browse the repository at this point in the history
…leaves
  • Loading branch information
ruchamahabal committed Mar 10, 2023
1 parent b70a37f commit e74e02b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/hr/doctype/leave_application/leave_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ def _get_remaining_leaves(remaining_leaves, end_date):
if cf_expiry and allocation.unused_leaves:
if getdate(date) > getdate(cf_expiry):
# carry forwarded leave expiry date passed
cf_leaves = remaining_cf_leaves = 0
cf_leaves = remaining_cf_leaves = flt(leaves_taken)
else:
cf_leaves = flt(allocation.unused_leaves) + flt(leaves_taken)
remaining_cf_leaves = _get_remaining_leaves(cf_leaves, cf_expiry)
Expand Down

0 comments on commit e74e02b

Please sign in to comment.