From ddde8d8a5d9a359464495af97caccd4cb69adff1 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 5 Jun 2025 10:19:28 +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/wizard/salary_compute_wizard.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yuthon_salary/wizard/salary_compute_wizard.py b/yuthon_salary/wizard/salary_compute_wizard.py index 5bfbba7d3..24025c7cc 100644 --- a/yuthon_salary/wizard/salary_compute_wizard.py +++ b/yuthon_salary/wizard/salary_compute_wizard.py @@ -148,8 +148,6 @@ class SalaryComputeWizard(models.Model): result = line.total * internship_days / days + line.total * work_days / days else: result = line.total * internship_days / days - elif field_name == 'union_dues': - result = line.total elif field_name in ['rank_salary', 'base_salary']: int_value = int(line.total) ones_digit = int_value % 10 @@ -161,6 +159,9 @@ class SalaryComputeWizard(models.Model): result = rounded_value * 0.8 * internship_days / days + rounded_value * work_days / days else: result = rounded_value * 0.8 * internship_days / days + elif field_name == 'union_dues': # 单独处理工会会费 + base_salary = getattr(internship_id, 'base_salary', 0) + result = base_salary / 0.8 * 0.05 else: if work_days != days: result = line.total * 0.8 * internship_days / days + line.total * work_days / days