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: add manual override for "IR 5th Cat." calculation
This commit is contained in:
@@ -44,6 +44,15 @@
|
||||
|
||||
|
||||
<!-- EE Rules -->
|
||||
<record id="input_type_ee_ir_5ta_cat" model="hr.payslip.input.type">
|
||||
<field name="name">Manual IR 5th Cat.</field>
|
||||
<field name="code">EE_PE_IR_5TA_CAT</field>
|
||||
<field name="country_id" ref="base.pe" />
|
||||
<field name="struct_ids" eval="[
|
||||
(4, ref('l10n_pe_hr_payroll.hr_payroll_structure')),
|
||||
]" />
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_ir_5ta_cat" model="hr.salary.rule">
|
||||
<field name="sequence" eval="196"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
|
||||
@@ -8,6 +8,10 @@ _logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def ir_5ta_cat(payslip, categories, worked_days, inputs):
|
||||
if inputs.EE_PE_IR_5TA_CAT:
|
||||
# cannot look for amount because it could be forced to zero
|
||||
return inputs.EE_PE_IR_5TA_CAT.amount, 100.0
|
||||
|
||||
basic_wage = categories.BASIC
|
||||
if payslip.dict.contract_id.pe_payroll_config_value('ee_5ta_cat_exempt'):
|
||||
return 0.0, 0.0
|
||||
|
||||
Reference in New Issue
Block a user