[FIX] l10n_pe_hr_payroll: December Grafit (not in January)

This commit is contained in:
Jared Kipe
2022-07-28 20:36:52 +00:00
parent 375c2cd966
commit 9fdb36bc6f

View File

@@ -49,7 +49,8 @@ class HRPayslip(models.Model):
full_months += 1
else:
for i in range(7, 13):
if date_hire < date(self.date_to.year-1, i, 15):
# note this is run in December, so it should look at current year
if date_hire < date(self.date_to.year, i, 15):
full_months += 1
return full_months