<?xml version="1.0" encoding="UTF-8" ?>
<odoo>

    <record id="res_partner_eftps_941" model="res.partner">
        <field name="name">US Federal 941 - EFTPS</field>
    </record>

    <record id="hr_payroll_category_ee_fed_941" model="hr.salary.rule.category">
        <field name="name">EE: Federal 941 FICA</field>
        <field name="code">EE_US_941_FICA</field>
        <field name="parent_id" ref="hr_payroll.DED"/>
    </record>

    <record id="hr_payroll_category_er_fed_941" model="hr.salary.rule.category">
        <field name="name">ER: Federal 941 FICA</field>
        <field name="code">ER_US_941_FICA</field>
        <field name="parent_id" ref="hr_payroll.COMP"/>
    </record>


    <!-- Social Security -->
    <record id="hr_payroll_rule_ee_fed_941_ss" model="hr.salary.rule">
        <field name="sequence" eval="190"/>
        <field name="struct_id" ref="hr_payroll_structure"/>
        <field name="category_id" ref="hr_payroll_category_ee_fed_941"/>
        <field name="name">EE: US FICA Social Security</field>
        <field name="code">EE_US_941_FICA_SS</field>
        <field name="condition_select">python</field>
        <field name="condition_python">result, _ = ee_us_941_fica_ss(payslip, categories, worked_days, inputs)</field>
        <field name="amount_select">code</field>
        <field name="amount_python_compute">result, result_rate = ee_us_941_fica_ss(payslip, categories, worked_days, inputs)</field>
        <field name="partner_id" ref="res_partner_eftps_941"/>
        <field name="appears_on_payslip" eval="True"/>
    </record>

    <record id="hr_payroll_rule_er_fed_941_ss" model="hr.salary.rule">
        <field name="sequence" eval="440"/>
        <field name="struct_id" ref="hr_payroll_structure"/>
        <field name="category_id" ref="hr_payroll_category_er_fed_941"/>
        <field name="name">ER: US FICA Social Security</field>
        <field name="code">ER_US_941_FICA_SS</field>
        <field name="condition_select">python</field>
        <field name="condition_python">result, _ = er_us_941_fica_ss(payslip, categories, worked_days, inputs)</field>
        <field name="amount_select">code</field>
        <field name="amount_python_compute">result, result_rate = er_us_941_fica_ss(payslip, categories, worked_days, inputs)</field>
        <field name="partner_id" ref="res_partner_eftps_941"/>
        <field name="appears_on_payslip" eval="False"/>
    </record>

    <!-- Medicare -->
    <record id="hr_payroll_rule_ee_fed_941_m" model="hr.salary.rule">
        <field name="sequence" eval="190"/>
        <field name="struct_id" ref="hr_payroll_structure"/>
        <field name="category_id" ref="hr_payroll_category_ee_fed_941"/>
        <field name="name">EE: US FICA Medicare</field>
        <field name="code">EE_US_941_FICA_M</field>
        <field name="condition_select">python</field>
        <field name="condition_python">result, _ = ee_us_941_fica_m(payslip, categories, worked_days, inputs)</field>
        <field name="amount_select">code</field>
        <field name="amount_python_compute">result, result_rate = ee_us_941_fica_m(payslip, categories, worked_days, inputs)</field>
        <field name="partner_id" ref="res_partner_eftps_941"/>
        <field name="appears_on_payslip" eval="True"/>
    </record>

    <record id="hr_payroll_rule_er_fed_941_m" model="hr.salary.rule">
        <field name="sequence" eval="440"/>
        <field name="struct_id" ref="hr_payroll_structure"/>
        <field name="category_id" ref="hr_payroll_category_er_fed_941"/>
        <field name="name">ER: US FICA Medicare</field>
        <field name="code">ER_US_941_FICA_M</field>
        <field name="condition_select">python</field>
        <field name="condition_python">result, _ = er_us_941_fica_m(payslip, categories, worked_days, inputs)</field>
        <field name="amount_select">code</field>
        <field name="amount_python_compute">result, result_rate = er_us_941_fica_m(payslip, categories, worked_days, inputs)</field>
        <field name="partner_id" ref="res_partner_eftps_941"/>
        <field name="appears_on_payslip" eval="False"/>
    </record>

    <!-- Medicare Additional -->
    <record id="hr_payroll_rule_ee_fed_941_m_add" model="hr.salary.rule">
        <field name="sequence" eval="190"/>
        <field name="struct_id" ref="hr_payroll_structure"/>
        <field name="category_id" ref="hr_payroll_category_ee_fed_941"/>
        <field name="name">EE: US FICA Medicare Additional</field>
        <field name="code">EE_US_941_FICA_M_ADD</field>
        <field name="condition_select">python</field>
        <field name="condition_python">result, _ = ee_us_941_fica_m_add(payslip, categories, worked_days, inputs)</field>
        <field name="amount_select">code</field>
        <field name="amount_python_compute">result, result_rate = ee_us_941_fica_m_add(payslip, categories, worked_days, inputs)</field>
        <field name="partner_id" ref="res_partner_eftps_941"/>
        <field name="appears_on_payslip" eval="True"/>
    </record>

</odoo>