commit
ea4522704d
|
|
@ -718,14 +718,14 @@ class HrTermination(models.Model):
|
||||||
total_allowance = 0.0
|
total_allowance = 0.0
|
||||||
for item in self.allowance_deduction_ids:
|
for item in self.allowance_deduction_ids:
|
||||||
if item.category_id.rule_type == 'deduction':
|
if item.category_id.rule_type == 'deduction':
|
||||||
total_deduction += item.amount
|
total_deduction += round(item.amount,2)
|
||||||
|
|
||||||
elif item.category_id.rule_type == 'allowance':
|
elif item.category_id.rule_type == 'allowance':
|
||||||
total_allowance += item.amount
|
total_allowance += round(item.amount,2)
|
||||||
|
|
||||||
# Other salary rules treat as allowance
|
# Other salary rules treat as allowance
|
||||||
elif item.category_id.rule_type != 'deduction':
|
elif item.category_id.rule_type != 'deduction':
|
||||||
total_allowance += item.amount
|
total_allowance += round(item.amount,2)
|
||||||
|
|
||||||
self.deduction_total = total_deduction
|
self.deduction_total = total_deduction
|
||||||
self.allowance_total = total_allowance
|
self.allowance_total = total_allowance
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue