From 5efc0aa61c8ad6735c8bf4afe6702bc4d7fddd58 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Fri, 4 Jul 2025 15:24:36 +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 | 13 ++++++++----- yuthon_salary/views/inherit_hr_payslip_views.xml | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py index 1e76b400c..29e51302e 100644 --- a/yuthon_salary/models/inherit_hr_payslip.py +++ b/yuthon_salary/models/inherit_hr_payslip.py @@ -126,6 +126,8 @@ class InheritHrPayslip(models.Model): # 粮储临时项 medical_fee = fields.Float(string='超出体检费标准') + retroactive_insurance = fields.Float(string='补扣保险') + distribution_part = fields.Float(string='扣除环境作业津贴多发放部分') performance_deduction = fields.Float(string='扣发绩效奖金', compute='_compute_deduction', store=True) commuting_deduction = fields.Float(string='扣发通信补贴', compute='_compute_deduction', store=True) @@ -284,12 +286,14 @@ class InheritHrPayslip(models.Model): @api.depends('year_compute', 'year_jie', 'year_gong', 'jing_te', 'study_on', 'seniority_allowance', 'position_salary', 'quality_allowance','high_subsidy', 'environmental_allowance', 'last_duty', 'seniority_salary', 'commuting_allowance','base_salary','performance_bonuses', 'comprehensive_subsidy', 'full_attendance_award', 'overtime_pay', 'based_pay', - 'january_performance','position_subsidy', 'safety_incentives', 'temporary_performance_bonus', 'performance_deduction','commuting_deduction', - 'base_salary_deduction', 'last_year_performance_evaluation', 'safety_subsidy', 'job_performance','leave_allowance', 'medical_fee', + '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','leave_allowance', 'distribution_part', 'duty', 'monthly_overtime', 'annuity', 'excellent_employees', 'leave_absence', 'retention_previous_year') def _compute_total_before_tax(self): for record in self: record.total_before_tax = ( + record.retroactive_insurance + + record.distribution_part + record.retention_previous_year + record.position_salary + record.high_subsidy + @@ -329,7 +333,6 @@ class InheritHrPayslip(models.Model): record.performance_deduction - record.commuting_deduction - record.base_salary_deduction - - record.medical_fee - record.leave_allowance # 请假扣发 ) @@ -337,10 +340,10 @@ class InheritHrPayslip(models.Model): # 本期应收 - 三险一金 - 年金 - 应补退税 - 工会会费 - 个税退回 # total_before_tax - three_one - b_year - union_dues - tax_payable - individual_tax_refund - @api.depends('total_before_tax', 'three_one', 'b_year', 'union_dues', 'tax_payable', 'individual_tax_refund') + @api.depends('total_before_tax', 'three_one', 'b_year', 'union_dues', 'tax_payable', 'individual_tax_refund', 'medical_fee') def _compute_actual_salary(self): for record in self: - record.actual_salary = (record.total_before_tax - record.three_one - record.b_year - record.union_dues - record.tax_payable + record.individual_tax_refund) + record.actual_salary = (record.total_before_tax - record.three_one - record.b_year - record.union_dues - record.tax_payable + record.individual_tax_refund - record.medical_fee) if record.employee_id.name == '罗梦烨': _logger.info("罗梦烨实发{} 本期应:{},31:{},年金:{}应补:{}工会{}个税{}".format(record.actual_salary, record.total_before_tax, record.three_one, record.b_year, record.union_dues, diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml index a38e06bb2..07d704ecf 100644 --- a/yuthon_salary/views/inherit_hr_payslip_views.xml +++ b/yuthon_salary/views/inherit_hr_payslip_views.xml @@ -293,6 +293,8 @@ + +