From 3324b78db6faba4c31f0cb09862498e70ef3800d Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Fri, 13 Jun 2025 18:54:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_salary/models/inherit_hr_payslip.py | 4 ++++ yuthon_salary/models/yuthon_payroll_project.py | 5 ++++- yuthon_salary/views/inherit_hr_payslip_views.xml | 8 ++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py index a55c8e2fe..60c4cde4c 100644 --- a/yuthon_salary/models/inherit_hr_payslip.py +++ b/yuthon_salary/models/inherit_hr_payslip.py @@ -108,6 +108,8 @@ class InheritHrPayslip(models.Model): seniority_allowance = fields.Float(string='工龄补贴') safety_subsidy = fields.Float(string='安全生产管理补贴') job_performance = fields.Float(string='岗位绩效') + leave_allowance = fields.Float(string='请假扣款/补发') + comprehensive_subsidy = fields.Float(string='综合补贴') excellent_employees = fields.Float(string='优秀部门经理/员工奖励') duty = fields.Float(string='值班(含节日加班)') annuity = fields.Float(string='年金') @@ -149,6 +151,8 @@ class InheritHrPayslip(models.Model): rec.rank_salary = line.total if line.name == '岗位补贴': rec.position_subsidy = line.total + if line.name == '工龄补贴': + rec.seniority_allowance = line.total if line.name == '岗位工资': rec.position_salary = line.total if line.name == '基本工资': diff --git a/yuthon_salary/models/yuthon_payroll_project.py b/yuthon_salary/models/yuthon_payroll_project.py index d3122de4e..43cd8259d 100644 --- a/yuthon_salary/models/yuthon_payroll_project.py +++ b/yuthon_salary/models/yuthon_payroll_project.py @@ -230,9 +230,12 @@ class YuthonPayrollInsurances (models.Model): if ins.company_id.name == '天河物管': code = 'WGQYNJ' formula_salary = "result = 0.0 if employee.total_coefficients == 0 else round((employee.converted/employee.total_coefficients * employee.calculation_totals * 0.08 * 0.5)/12, 2)" - else: + elif ins.company_id.name == '集团本部': code = 'QYNJ' formula_salary = "result = round((employee.last_year_salary * 0.02), 0)" + else: + code = 'LCQYNJ' + formula_salary = "result = round((employee.last_year_salary * 0.02), 2)" if ins.name not in sal.rule_ids.mapped('name'): rule_list.append([0, 0, { 'name': ins.name, diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml index 4ea969cfc..456588764 100644 --- a/yuthon_salary/views/inherit_hr_payslip_views.xml +++ b/yuthon_salary/views/inherit_hr_payslip_views.xml @@ -43,6 +43,7 @@ + @@ -51,6 +52,7 @@ + @@ -65,7 +67,7 @@ - + @@ -235,6 +237,7 @@ + @@ -242,6 +245,7 @@ + @@ -256,7 +260,7 @@ - + From 0ea81563909f195d0d78c2427f31e32a1d9ac8c3 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Fri, 13 Jun 2025 19:00:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_salary/models/inherit_hr_payslip.py | 6 ++++++ yuthon_salary/views/inherit_hr_payslip_views.xml | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py index 60c4cde4c..d33a97065 100644 --- a/yuthon_salary/models/inherit_hr_payslip.py +++ b/yuthon_salary/models/inherit_hr_payslip.py @@ -147,6 +147,12 @@ class InheritHrPayslip(models.Model): for rec in self: if rec.line_ids: for line in rec.line_ids: + if line.name == '值班费': + rec.duty_fee = line.total + if line.name == '综合补贴': + rec.comprehensive_subsidy = line.total + if line.name == '安全生产管理补贴': + rec.safety_subsidy = line.total if line.name == '职级工资': rec.rank_salary = line.total if line.name == '岗位补贴': diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml index 456588764..79ce0bff3 100644 --- a/yuthon_salary/views/inherit_hr_payslip_views.xml +++ b/yuthon_salary/views/inherit_hr_payslip_views.xml @@ -66,7 +66,7 @@ - + @@ -259,7 +259,7 @@ - +