diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py index 4828fa67f..161d51002 100644 --- a/yuthon_salary/models/inherit_hr_payslip.py +++ b/yuthon_salary/models/inherit_hr_payslip.py @@ -111,6 +111,7 @@ class InheritHrPayslip(models.Model): duty = fields.Float(string='值班(含节日加班)') monthly_overtime = fields.Float(string='月加班') annuity = fields.Float(string='年金') + spring_festival = fields.Float(string='春节福利') # 物管临时项 excellent_employees = fields.Float(string='优秀部门经理/员工奖励') @@ -165,6 +166,8 @@ class InheritHrPayslip(models.Model): for rec in self: if rec.line_ids: for line in rec.line_ids: + if line.name == '春节福利': + rec.spring_festival = line.total if line.name == '上年社保补缴': rec.social_security = line.total if line.name == '上年年度清算': @@ -361,12 +364,13 @@ class InheritHrPayslip(models.Model): 'january_performance', 'position_subsidy', 'safety_incentives', 'temporary_performance_bonus', 'performance_deduction', 'commuting_deduction', 'retroactive_insurance', 'base_salary_deduction', 'last_year_performance_evaluation', 'safety_subsidy', 'job_performance', - 'distribution_part', 'minus_att', 'add_att', + 'distribution_part', 'minus_att', 'add_att', 'spring_festival', 'duty', 'monthly_overtime', 'annuity', 'excellent_employees', 'retention_previous_year') def _compute_total_before_tax(self): for record in self: record.total_before_tax = ( + record.spring_festival + record.liquidation_year + record.add_att + record.year_compute + diff --git a/yuthon_salary/models/yuthon_payroll_project.py b/yuthon_salary/models/yuthon_payroll_project.py index d279e6d90..9b3b5bb6c 100644 --- a/yuthon_salary/models/yuthon_payroll_project.py +++ b/yuthon_salary/models/yuthon_payroll_project.py @@ -95,6 +95,8 @@ class YuthonPayrollCommon(models.Model): formula_salary = "result = 0" if ins.name == '环境作业津贴': formula_salary = "result = 0" + if ins.name == '春节福利' and ins.company_id.name == '天河物管': + formula_salary = "result = 680 if employee.department_id.name != '领导班子' else 0" if ins.name == '质检员津贴': formula_salary = "result = employee.quality_inspector_amount" if ins.name == '工会会费' and ins.company_id.name in ['集团本部', '天河物管']: diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml index 3f0bd1e64..3a321a143 100644 --- a/yuthon_salary/views/inherit_hr_payslip_views.xml +++ b/yuthon_salary/views/inherit_hr_payslip_views.xml @@ -63,6 +63,7 @@ +