Skip to content

Commit 7879d82

Browse files
AyshaHakeemmergify[bot]
authored andcommitted
fix: calculation of future recurring period for recurring additional salary which effects annual income or ctc amount
(cherry picked from commit 360bad9)
1 parent 5992172 commit 7879d82

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hrms/payroll/doctype/salary_slip/salary_slip.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,6 +1770,9 @@ def get_future_recurring_period(
17701770

17711771
future_recurring_period = ((to_date.year - from_date.year) * 12) + (to_date.month - from_date.month)
17721772

1773+
if future_recurring_period > 0 and to_date.month == from_date.month:
1774+
future_recurring_period -= 1
1775+
17731776
return future_recurring_period
17741777

17751778
def get_future_recurring_additional_amount(self, additional_salary, monthly_additional_amount):

0 commit comments

Comments
 (0)