From 78f4f95a4bf484104430144fece95749f0dd82a1 Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Thu, 6 Dec 2018 13:14:13 +0100 Subject: [PATCH] [IMP] l10n_be_hr_payroll: Merge both miscellaneous onss rules This is useless to have 2 separate rules. --- .../data/l10n_be_hr_payroll_data.xml | 68 ++++++++----------- 1 file changed, 27 insertions(+), 41 deletions(-) diff --git a/addons/l10n_be_hr_payroll/data/l10n_be_hr_payroll_data.xml b/addons/l10n_be_hr_payroll/data/l10n_be_hr_payroll_data.xml index f7caf5787a7..534f12d8594 100644 --- a/addons/l10n_be_hr_payroll/data/l10n_be_hr_payroll_data.xml +++ b/addons/l10n_be_hr_payroll/data/l10n_be_hr_payroll_data.xml @@ -187,52 +187,40 @@ result = - categories.GROSSIP * contract.ip_wage_rate / 100.0 - + Special social cotisation - M.ONSS.1 + M.ONSS fix 165 - python - result = (((employee.marital in ['divorced', 'single', 'widower']) or (employee.marital in ['married', 'cohabitant'] and employee.spouse_fiscal_status=='without income')) and (employee.resident_bool!=True)) code wage = categories.BASIC -if wage >= 0.01 and wage <= 1095.09: +if employee.resident_bool: result = 0.0 -elif wage >= 1095.10 and wage <= 1945.38: - result = 0.0 -elif wage >= 1945.39 and wage <= 2190.18: - result = -min((wage - 1945.38) * 0.076, 18.60) -elif wage >= 2190.19 and wage <= 6038.82: - result = -min(18.60 + (wage - 2190.18) * 0.011, 60.94) -else: - result = -60.94 - - - - - Special social cotisation - M.ONSS.2 - fix - 165 - python - - result = (((employee.marital in ['married', 'cohabitant'] and employee.spouse_fiscal_status=='with income')) and (employee.resident_bool!=True)) - code - -wage = categories.BASIC -if wage >= 0.01 and wage <= 1095.09: - result = 0.0 -elif wage >= 1095.10 and wage <= 1945.38: - result = -9.30 -elif wage >= 1945.39 and wage <= 2190.18: - result = -min(max((wage - 1945.38) * 0.076, 9.30), 18.60) -elif wage >= 2190.19 and wage <= 6038.82: - result = -min(18.60 + (wage - 2190.18) * 0.011, 51.64) -else: - result = -51.64 +elif employee.marital in ['divorced', 'single', 'widower'] or (employee.marital in ['married', 'cohabitant'] and employee.spouse_fiscal_status=='without income'): + if wage >= 0.01 and wage <= 1095.09: + result = 0.0 + elif wage >= 1095.10 and wage <= 1945.38: + result = 0.0 + elif wage >= 1945.39 and wage <= 2190.18: + result = -min((wage - 1945.38) * 0.076, 18.60) + elif wage >= 2190.19 and wage <= 6038.82: + result = -min(18.60 + (wage - 2190.18) * 0.011, 60.94) + else: + result = -60.94 +elif employee.marital in ['married', 'cohabitant'] and employee.spouse_fiscal_status=='with income': + if wage >= 0.01 and wage <= 1095.09: + result = 0.0 + elif wage >= 1095.10 and wage <= 1945.38: + result = -9.30 + elif wage >= 1945.39 and wage <= 2190.18: + result = -min(max((wage - 1945.38) * 0.076, 9.30), 18.60) + elif wage >= 2190.19 and wage <= 6038.82: + result = -min(18.60 + (wage - 2190.18) * 0.011, 51.64) + else: + result = -51.64 @@ -514,8 +502,7 @@ result = -min(ip_amount * tax_rate, 11745) ref('hr_payroll_rules_bareme'), ref('hr_payroll_rules_ch_worker'), ref('hr_payroll_rules_reim_travel'), - ref('hr_payroll_rules_mis_ex_onss_1'), - ref('hr_payroll_rules_mis_ex_onss_2'), + ref('hr_payroll_rules_mis_ex_onss'), ref('hr_salary_rule_representation_fees'), ref('hr_payroll_rules_suppl_net'), ref('hr_payroll_rules_retained_net'), @@ -537,8 +524,7 @@ result = -min(ip_amount * tax_rate, 11745) ref('hr_payroll_rules_bareme'), ref('hr_payroll_rules_ch_worker'), ref('hr_payroll_rules_reim_travel'), - ref('hr_payroll_rules_mis_ex_onss_1'), - ref('hr_payroll_rules_mis_ex_onss_2'), + ref('hr_payroll_rules_mis_ex_onss'), ref('hr_salary_rule_representation_fees'), ref('hr_payroll_rules_suppl_net'), ref('hr_payroll_rules_retained_net'),