diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py
index 3db44e06e..c16cb0c3b 100644
--- a/yuthon_salary/models/inherit_hr_payslip.py
+++ b/yuthon_salary/models/inherit_hr_payslip.py
@@ -151,6 +151,12 @@ class InheritHrPayslip(models.Model):
}
}
+
+ @api.onchange('year_compute', 'year_jie', 'year_gong')
+ def _onchange_calculate_total_before_tax(self):
+ change_amount = self.year_compute + self.year_jie + self.year_gong
+ self.total_before_tax += change_amount
+
def action_salary_payslip_wizard(self):
return {
"type": "ir.actions.act_window",
diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml
index 7329d9679..672f1a473 100644
--- a/yuthon_salary/views/inherit_hr_payslip_views.xml
+++ b/yuthon_salary/views/inherit_hr_payslip_views.xml
@@ -29,6 +29,7 @@
+
@@ -161,6 +162,7 @@
+
@@ -169,6 +171,9 @@
+
+
+
@@ -176,9 +181,6 @@
-
-
-
@@ -193,6 +195,7 @@
+