mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[FIX] l10n_pe_hr_payroll: sign on deductions
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result = categories.BASIC</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = categories.BASIC, payslip.rule_parameter('ee_afp_pensiones')</field>
|
||||
<field name="amount_python_compute">result, result_rate = categories.BASIC, -payslip.rule_parameter('ee_afp_pensiones')</field>
|
||||
<field name="partner_id" ref="res_partner_afp"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
@@ -64,7 +64,7 @@
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result = categories.BASIC</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = categories.BASIC, payslip.rule_parameter('ee_afp_seguro')</field>
|
||||
<field name="amount_python_compute">result, result_rate = categories.BASIC, -payslip.rule_parameter('ee_afp_seguro')</field>
|
||||
<field name="partner_id" ref="res_partner_afp"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
@@ -78,7 +78,7 @@
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result = categories.BASIC</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = categories.BASIC, payslip.rule_parameter('ee_afp_comision')</field>
|
||||
<field name="amount_python_compute">result, result_rate = categories.BASIC, -payslip.rule_parameter('ee_afp_comision')</field>
|
||||
<field name="partner_id" ref="res_partner_afp"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result = categories.BASIC</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = categories.BASIC, payslip.rule_parameter('er_essalud')</field>
|
||||
<field name="amount_python_compute">result, result_rate = categories.BASIC, -payslip.rule_parameter('er_essalud')</field>
|
||||
<field name="partner_id" ref="res_partner_afp"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
@@ -12,30 +12,12 @@ class Test2022(TestPePayslip):
|
||||
|
||||
# ER ESSALUD
|
||||
ER_ESSALUD = 0.0675 # 6.75%
|
||||
|
||||
# # FUTA Constants
|
||||
# FUTA_RATE_NORMAL = 0.6
|
||||
# FUTA_RATE_BASIC = 6.0
|
||||
# FUTA_RATE_EXEMPT = 0.0
|
||||
|
||||
# # Wage caps
|
||||
# FICA_SS_MAX_WAGE = 147000.0
|
||||
# FICA_M_MAX_WAGE = float_info.max
|
||||
# FICA_M_ADD_START_WAGE = 200000.0
|
||||
# FUTA_MAX_WAGE = 7000.0
|
||||
|
||||
# # Rates
|
||||
# FICA_SS = 6.2 / -100.0
|
||||
# FICA_M = 1.45 / -100.0
|
||||
# FUTA = FUTA_RATE_NORMAL / -100.0
|
||||
# FICA_M_ADD = 0.9 / -100.0
|
||||
|
||||
###
|
||||
# 2022 Taxes and Rates
|
||||
###
|
||||
|
||||
def test_2022_taxes(self):
|
||||
self.debug = True
|
||||
salary = 3290.0
|
||||
|
||||
employee = self._createEmployee()
|
||||
@@ -51,10 +33,10 @@ class Test2022(TestPePayslip):
|
||||
rules = self._getRules(payslip)
|
||||
# Employee
|
||||
self.assertPayrollEqual(cats['BASIC'], salary)
|
||||
self.assertPayrollEqual(rules['EE_PE_AFP_PENSIONES'], cats['BASIC'] * self.AFP_PENSIONES)
|
||||
self.assertPayrollEqual(rules['EE_PE_AFP_SEGURO'], cats['BASIC'] * self.AFP_SEGURO)
|
||||
self.assertPayrollEqual(rules['EE_PE_AFP_COMISION'], cats['BASIC'] * self.AFP_COMISION)
|
||||
self.assertPayrollEqual(rules['EE_PE_AFP_PENSIONES'], -cats['BASIC'] * self.AFP_PENSIONES)
|
||||
self.assertPayrollEqual(rules['EE_PE_AFP_SEGURO'], -cats['BASIC'] * self.AFP_SEGURO)
|
||||
self.assertPayrollEqual(rules['EE_PE_AFP_COMISION'], -cats['BASIC'] * self.AFP_COMISION)
|
||||
# Employer
|
||||
self.assertPayrollEqual(rules['ER_PE_ESSALUD'], cats['BASIC'] * self.ER_ESSALUD)
|
||||
self.assertPayrollEqual(rules['ER_PE_ESSALUD'], -cats['BASIC'] * self.ER_ESSALUD)
|
||||
|
||||
process_payslip(payslip)
|
||||
|
||||
Reference in New Issue
Block a user