From da7242733321162df107de804aa54296ae7bed3d Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Sat, 14 Jun 2025 15:35:53 +0800 Subject: [PATCH] =?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 | 16 +++++++++++----- yuthon_salary/models/yuthon_payroll_project.py | 6 +++--- yuthon_salary/views/inherit_hr_payslip_views.xml | 15 ++++++++------- yuthon_salary/wizard/salary_compute_wizard.py | 2 +- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py index 12541d983..314bf01b1 100644 --- a/yuthon_salary/models/inherit_hr_payslip.py +++ b/yuthon_salary/models/inherit_hr_payslip.py @@ -69,9 +69,9 @@ class InheritHrPayslip(models.Model): assessment_reserved_amount = fields.Float(string='考核保留量') last_year_safety = fields.Float(string='上年安全生产工作奖') last_year_performance_evaluation = fields.Float(string='上年绩效评优') - social_security = fields.Float(string='2024年社保补缴') + social_security = fields.Float(string='上年社保补缴') performance_up = fields.Float(string='上月多扣绩效补回') - individual_tax_refund = fields.Float(string='2024年个税退回') + individual_tax_refund = fields.Float(string='上年个税退回') liquidation_year = fields.Float(string='上年年度清算') safety_incentives = fields.Float(string='安全生产奖') is_push = fields.Boolean(string='推送') @@ -108,12 +108,17 @@ class InheritHrPayslip(models.Model): seniority_allowance = fields.Float(string='工龄补贴') safety_subsidy = fields.Float(string='安全生产管理补贴') job_performance = fields.Float(string='岗位绩效') - leave_allowance = fields.Float(string='请假扣款/补发') + leave_allowance = fields.Float(string='请假扣发') comprehensive_subsidy = fields.Float(string='综合补贴') - excellent_employees = fields.Float(string='优秀部门经理/员工奖励') duty = fields.Float(string='值班(含节日加班)') + monthly_overtime = fields.Float(string='月加班') annuity = fields.Float(string='年金') + # 物管临时项 + excellent_employees = fields.Float(string='优秀部门经理/员工奖励') + leave_absence = fields.Float(string='考勤补发') + + # 粮储常用项 quality_allowance = fields.Float(string='质检员津贴') environmental_allowance = fields.Float(string='环境作业津贴') @@ -270,11 +275,12 @@ class InheritHrPayslip(models.Model): @api.depends('year_compute', 'year_jie', 'year_gong', 'jing_te', 'study_on', 'post_salary', 'seniority_salary','commuting_allowance', 'base_salary' , 'performance_bonuses', - 'full_attendance_award', 'overtime_pay', 'based_pay', 'january_performance', + 'full_attendance_award', 'overtime_pay', 'based_pay', 'january_performance', 'position_subsidy', 'temporary_performance_bonus', 'performance_deduction', 'commuting_deduction', 'base_salary_deduction', 'last_year_performance_evaluation') def _compute_total_before_tax(self): for record in self: record.total_before_tax = ( + record.position_subsidy + record.last_year_performance_evaluation + record.temporary_performance_bonus + record.performance_bonuses + diff --git a/yuthon_salary/models/yuthon_payroll_project.py b/yuthon_salary/models/yuthon_payroll_project.py index 31848d8f1..71a9e2813 100644 --- a/yuthon_salary/models/yuthon_payroll_project.py +++ b/yuthon_salary/models/yuthon_payroll_project.py @@ -81,6 +81,8 @@ class YuthonPayrollCommon(models.Model): formula_salary = "result = 0" if ins.name == '优秀部门经理/员工': formula_salary = "result = 0" + if ins.name == '请假扣发': + formula_salary = "result = 0" if ins.name == '值班费': formula_salary = "result = 0" if ins.name == '上月值班费': @@ -93,10 +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 == '集团本部': + if ins.name == '工会会费' and ins.company_id.name == '集团本部' or ins.company_id.name == '天河物管': formula_salary = "result = round((payslip.base_salary * 0.005), 2)" - if ins.name == '工会会费' and ins.company_id.name == '天河物管': - formula_salary = "result = 0" if ins.name == '工会会费' and ins.company_id.name == '天河粮储': formula_salary = "result = 20 if employee.user_role_id.name in ['总经理', '副总经理'] else \ 15 if employee.user_role_id.name in ['部门经理', '部门副经理'] else \ diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml index ad9a4df39..8371628bb 100644 --- a/yuthon_salary/views/inherit_hr_payslip_views.xml +++ b/yuthon_salary/views/inherit_hr_payslip_views.xml @@ -63,6 +63,7 @@ + @@ -236,23 +237,21 @@ - - + + - - + - + - - + @@ -285,10 +284,12 @@ + + diff --git a/yuthon_salary/wizard/salary_compute_wizard.py b/yuthon_salary/wizard/salary_compute_wizard.py index bd320f2d8..1956c03ab 100644 --- a/yuthon_salary/wizard/salary_compute_wizard.py +++ b/yuthon_salary/wizard/salary_compute_wizard.py @@ -230,7 +230,7 @@ class SalaryComputeWizard(models.Model): return f'{month}月{day}日' def check_employee_dates(self, employee): - """检查员工入职日期和转正日期的月份是否等于 select_time 的月份""" + """检查员工为试用期入职日期和转正日期的月份 和退休(花名册)的是否等于 select_time 的月份""" if not self.select_time: return False # 未选择月份时返回 False