diff --git a/l10n_pe_hr_payroll/data/ir_5ta_cat_rules.xml b/l10n_pe_hr_payroll/data/ir_5ta_cat_rules.xml index c296bbec..7d7d73d5 100644 --- a/l10n_pe_hr_payroll/data/ir_5ta_cat_rules.xml +++ b/l10n_pe_hr_payroll/data/ir_5ta_cat_rules.xml @@ -44,6 +44,15 @@ + + Manual IR 5th Cat. + EE_PE_IR_5TA_CAT + + + + diff --git a/l10n_pe_hr_payroll/models/rules/ir_5ta_cat.py b/l10n_pe_hr_payroll/models/rules/ir_5ta_cat.py index 6945274a..8164f6b0 100644 --- a/l10n_pe_hr_payroll/models/rules/ir_5ta_cat.py +++ b/l10n_pe_hr_payroll/models/rules/ir_5ta_cat.py @@ -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