fix: future recurring period calculation

This commit is contained in:
Nabin Hait 2022-02-01 23:42:50 +05:30
parent 008b331f49
commit bf3caab63c

View File

@ -939,8 +939,8 @@ class SalarySlip(TransactionBase):
# If recurring period end date is beyond the payroll period,
# last day of payroll period should be considered for recurring period calculation
if getdate(to_date) > getdate(payroll_period.year_end_date):
to_date = getdate(payroll_period.year_end_date)
if getdate(to_date) > getdate(payroll_period.end_date):
to_date = getdate(payroll_period.end_date)
future_recurring_period = ((to_date.year - from_date.year) * 12) + (to_date.month - from_date.month)