Basic Salary 0 BASIC none code result = payslip.paid_amount Extra Hours 25% EXTRA_HOURS_25 1 input input Extra Hours 50% EXTRA_HOURS_50 2 input input Extra Hours 100% EXTRA_HOURS_100 3 input input Seniority SENIORITY 4 python months = (payslip.date_from.year - employee._get_first_version_date().year) * 12 + (payslip.date_from.month - employee._get_first_version_date().month) result = months >= 24 code months = (payslip.date_from.year - employee._get_first_version_date().year) * 12 + (payslip.date_from.month - employee._get_first_version_date().month) years = months / 12 basic_salary = categories['BASIC'] result = 0 for low, high, rate in payslip._rule_parameter('l10n_ma_seniority'): if low <= years <= high: result = basic_salary * rate break Kilometric Exemption KILOMETRIC_EXEMPTION 5 python result = version.l10n_ma_kilometric_exemption code result = version.l10n_ma_kilometric_exemption Transportation Exemption TRANSPORT_EXEMPTION 6 python result = version.l10n_ma_transport_exemption code result = version.l10n_ma_transport_exemption House Rent Allowance HRA 7 python result = version.l10n_ma_hra code result = version.l10n_ma_hra Dearness Allowance DA 8 python result = version.l10n_ma_da code result = version.l10n_ma_da Meal Allowance MEAL_A 9 python result = version.l10n_ma_meal_allowance code result = min(version.l10n_ma_meal_allowance, 0.2 * result_rules['BASIC']['total']) Medical Allowance MED_A 10 python result = version.l10n_ma_medical_allowance code result = version.l10n_ma_medical_allowance Taxable Salary 20 GROSS none code result = categories['BASIC'] + categories['ALW'] Employee CNSS E_CNSS 21 code gross_salary = result_rules['GROSS']['total'] cnss_coef = payslip._rule_parameter('l10n_ma_cnss') / 100 cnss_ceil = payslip._rule_parameter('l10n_ma_cnss_max') result = min(cnss_ceil, gross_salary) * cnss_coef Job Loss Allowance JOB_LOSS_ALW 22 code gross_salary = result_rules['GROSS']['total'] job_loss_coef = payslip._rule_parameter('l10n_ma_job_loss') / 100 job_loss_ceil = payslip._rule_parameter('l10n_ma_job_loss_max') result = min(job_loss_ceil, gross_salary * job_loss_coef) Employee AMO E_AMO 23 code gross_salary = result_rules['GROSS']['total'] amo_coef = payslip._rule_parameter('l10n_ma_job_loss') / 100 result = gross_salary * amo_coef Medical Allowance MEDICAL_ALW 24 code gross_salary = result_rules['GROSS']['total'] medical_alw_coef = payslip._rule_parameter('l10n_ma_medical_alw') / 100 result = gross_salary * medical_alw_coef CIMR CIMR 25 code gross_salary = result_rules['GROSS']['total'] cimr_coef = payslip._rule_parameter('l10n_ma_cimr') / 100 cimr_ceil = payslip._rule_parameter('l10n_ma_cimr_max') result = min(cimr_ceil, gross_salary * cimr_coef) Professional Contribution PRO_CONTRIBUTION 26 code gross_salary = result_rules['GROSS']['total'] cimr_coef = payslip._rule_parameter('l10n_ma_cimr') / 100 result = gross_salary * cimr_coef Total Untaxable Deductions TOTAL_UT_DED 30 code result = categories['UNTAXABLE_DED'] Gross Taxable GROSS_TAXABLE 40 code result = min( result_rules['GROSS']['total'] - categories['UNTAXABLE_DED'], payslip._rule_parameter('l10n_ma_social_security_ceil') ) Gross Income Tax GROSS_INCOME_TAX 50 code tax_breakdown = payslip._rule_parameter('l10n_ma_income_tax_breakdown') gross = result_rules['GROSS_TAXABLE']['total'] result = 0 for max_gross, coef, deduction in tax_breakdown: if gross > max_gross: continue result = gross * (coef / 100) - deduction break Family Charge FAMILY_CHARGE 51 code result = 0 if version.employee_id.marital == 'married': result+=30 if version.employee_id.children: result+=min(180, 30*version.employee_id.children) Net Income Tax NET_INCOME_TAX 60 code gross_ic = result_rules['GROSS_INCOME_TAX']['total'] fam_charge = result_rules['FAMILY_CHARGE']['total'] result = max(0, gross_ic - fam_charge) Social Contribution SOCIAL_CONTRIBUTION 61 code virtual_net = result_rules['GROSS']['total'] - categories['UNTAXABLE_DED'] - result_rules['NET_INCOME_TAX']['total'] coef = payslip._rule_parameter('l10n_ma_social_contribution_coef') / 100 min = payslip._rule_parameter('l10n_ma_min_net_for_soc_contr') result = 0 if virtual_net > min: result = coef * virtual_net AVS Avance sur Salaire 62 python code result = 'AVS' in inputs > 0 result = -inputs['AVS'].amount result_name = inputs['AVS'].name Attachment of Salary 174 ATTACH_SALARY python result = 'ATTACH_SALARY' in inputs code result = -inputs['ATTACH_SALARY'].amount result_name = inputs['ATTACH_SALARY'].name Assignment of Salary 174 ASSIG_SALARY python result = 'ASSIG_SALARY' in inputs code result = -inputs['ASSIG_SALARY'].amount result_name = inputs['ASSIG_SALARY'].name Child Support CHILD_SUPPORT code 174 python result = 'CHILD_SUPPORT' in inputs result = -inputs['CHILD_SUPPORT'].amount result_name = inputs['CHILD_SUPPORT'].name Deduction 198 DEDUCTION python result = 'DEDUCTION' in inputs code result = -inputs['DEDUCTION'].amount result_name = inputs['DEDUCTION'].name Reimbursement 199 REIMBURSEMENT python result = 'REIMBURSEMENT' in inputs code result = inputs['REIMBURSEMENT'].amount result_name = inputs['REIMBURSEMENT'].name Net Salary 200 NET none code result = result_rules['GROSS']['total'] - categories['DED'] - result_rules['NET_INCOME_TAX']['total']