diff --git a/yuthon_salary/wizard/salary_compute_wizard.py b/yuthon_salary/wizard/salary_compute_wizard.py index 13f640673..5e39e8a2a 100644 --- a/yuthon_salary/wizard/salary_compute_wizard.py +++ b/yuthon_salary/wizard/salary_compute_wizard.py @@ -311,18 +311,17 @@ class SalaryComputeWizard(models.Model): result = abs(line.total)*-1 # 或其他合理默认值 elif field_name == 'b_year': if contract_end_date: - select_year = self.select_year - select_month = self.select_time + select_year = int(self.select_year) + select_month = int(self.select_time) next_month = contract_end_date.month + 1 next_year = contract_end_date.year if next_month > 12: next_month = 1 next_year += 1 - next_year_str = str(next_year) - next_month_str = str(next_month) + next_year = int(next_year) + next_month = int(next_month) # 判断:选中年月 >= 转正后下个月 - if (select_year > next_year_str) or \ - (select_year == next_year_str and select_month >= next_month_str): + if (select_year > next_year) or (select_year == next_year and select_month >= next_month): last_year_salary = internship_id.employee_id.last_year_salary or 0 result = last_year_salary * 0.002 else: