Merge branch 'mig/12.0/l10n_us_hr_payroll__2020' into '12.0'

mig/12.0/l10n_us_hr_payroll__2020 into 12.0

See merge request hibou-io/hibou-odoo/suite!253
This commit is contained in:
Jared Kipe
2020-02-17 00:00:19 +00:00
49 changed files with 3708 additions and 84 deletions

View File

@@ -28,10 +28,18 @@ USA Payroll Rules.
'data/federal/fed_941_fica_rules.xml',
'data/federal/fed_941_fit_parameters.xml',
'data/federal/fed_941_fit_rules.xml',
'data/state/ar_arkansas.xml',
'data/state/az_arizona.xml',
'data/state/fl_florida.xml',
'data/state/ga_georgia.xml',
'data/state/il_illinois.xml',
'data/state/mi_michigan.xml',
'data/state/mn_minnesota.xml',
'data/state/mo_missouri.xml',
'data/state/ms_mississippi.xml',
'data/state/mt_montana.xml',
'data/state/nc_northcarolina.xml',
'data/state/nj_newjersey.xml',
'data/state/oh_ohio.xml',
'data/state/pa_pennsylvania.xml',
'data/state/tx_texas.xml',

View File

@@ -20,25 +20,89 @@
<field name="parent_id" ref="hr_payroll.DED"/>
</record>
<!-- Tax Exempt Benefits/Wage -->
<!-- IRS Publication 15-B Lists several categories of benefits, limits and classifications -->
<!-- If your rule is intended to add to gross wages or be pre-gross, use the ALW_ Categories -->
<record id="hr_payroll_category_alw_fit_exempt" model="hr.salary.rule.category">
<field name="name">Wage: US FIT Exempt</field>
<field name="code">ALW_FIT_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.ALW"/>
</record>
<record id="hr_payroll_category_alw_fit_fica_exempt" model="hr.salary.rule.category">
<field name="name">Wage: US FIT &amp; FICA Exempt</field>
<field name="code">ALW_FIT_FICA_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.ALW"/>
</record>
<record id="hr_payroll_category_alw_fit_futa_exempt" model="hr.salary.rule.category">
<field name="name">Wage: US FIT &amp; FUTA Exempt</field>
<field name="code">ALW_FIT_FUTA_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.ALW"/>
</record>
<record id="hr_payroll_category_alw_fit_fica_futa_exempt" model="hr.salary.rule.category">
<field name="name">Wage: US FIT &amp; FICA &amp; FUTA Exempt</field>
<field name="code">ALW_FIT_FICA_FUTA_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.ALW"/>
</record>
<record id="hr_payroll_category_alw_fica_exempt" model="hr.salary.rule.category">
<field name="name">Wage: US FICA Exempt</field>
<field name="code">ALW_FICA_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.ALW"/>
</record>
<record id="hr_payroll_category_alw_fica_futa_exempt" model="hr.salary.rule.category">
<field name="name">Wage: US FICA &amp; FUTA Exempt</field>
<field name="code">ALW_FICA_FUTA_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.ALW"/>
</record>
<record id="hr_payroll_category_alw_futa_exempt" model="hr.salary.rule.category">
<field name="name">Wage: US FUTA Exempt</field>
<field name="code">ALW_FUTA_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.ALW"/>
</record>
<!-- Tax Exempt Deductions -->
<!-- Deductions that reduce the wage for Federal Income Tax (e.g. 401k) -->
<!-- If your rule is intended to withhold from gross, use the DED_ Categories -->
<record id="hr_payroll_category_ded_fit_exempt" model="hr.salary.rule.category">
<field name="name">Deduction: US Federal Income Tax Exempt</field>
<field name="name">Deduction: US FIT Exempt</field>
<field name="code">DED_FIT_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.DED"/>
</record>
<!-- Generally speaking, deductions to FICA and FUTA should probably reduce GROSS itself, there may be special or rare cases -->
<!-- Deductions that reduce the wage for FICA -->
<record id="hr_payroll_category_ded_fit_fica_exempt" model="hr.salary.rule.category">
<field name="name">Deduction: US FIT &amp; FICA Exempt</field>
<field name="code">DED_FIT_FICA_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.DED"/>
</record>
<record id="hr_payroll_category_ded_fit_futa_exempt" model="hr.salary.rule.category">
<field name="name">Deduction: US FIT &amp; FUTA Exempt</field>
<field name="code">DED_FIT_FUTA_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.DED"/>
</record>
<record id="hr_payroll_category_ded_fit_fica_futa_exempt" model="hr.salary.rule.category">
<field name="name">Deduction: US FIT &amp; FICA &amp; FUTA Exempt</field>
<field name="code">DED_FIT_FICA_FUTA_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.DED"/>
</record>
<record id="hr_payroll_category_ded_fica_exempt" model="hr.salary.rule.category">
<field name="name">Deduction: US FICA Exempt</field>
<field name="code">DED_FICA_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.DED"/>
</record>
<!-- Deductions that reduce the wage for Unemployment Insurance/Tax -->
<record id="hr_payroll_category_ded_fica_futa_exempt" model="hr.salary.rule.category">
<field name="name">Deduction: US FICA &amp; FUTA Exempt</field>
<field name="code">DED_FICA_FUTA_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.DED"/>
</record>
<record id="hr_payroll_category_ded_futa_exempt" model="hr.salary.rule.category">
<field name="name">Deduction: US FUTA Exempt</field>
<field name="code">DED_FUTA_EXEMPT</field>

View File

@@ -16,11 +16,29 @@
ref('hr_payroll_rule_ee_fed_941_fit'),
ref('hr_payroll_rule_er_us_ar_suta'),
ref('hr_payroll_rule_ee_us_ar_sit'),
ref('hr_payroll_rule_er_us_az_suta'),
ref('hr_payroll_rule_ee_us_az_sit'),
ref('hr_payroll_rule_er_us_fl_suta'),
ref('hr_payroll_rule_er_us_ga_suta'),
ref('hr_payroll_rule_ee_us_ga_sit'),
ref('hr_payroll_rule_er_us_il_suta'),
ref('hr_payroll_rule_ee_us_il_sit'),
ref('hr_payroll_rule_er_us_mn_suta'),
ref('hr_payroll_rule_ee_us_mn_sit'),
ref('hr_payroll_rule_er_us_mi_suta'),
ref('hr_payroll_rule_ee_us_mi_sit'),
ref('hr_payroll_rule_er_us_mo_suta'),
ref('hr_payroll_rule_ee_us_mo_sit'),
ref('hr_payroll_rule_er_us_ms_suta'),
ref('hr_payroll_rule_ee_us_ms_sit'),
@@ -28,6 +46,19 @@
ref('hr_payroll_rule_er_us_mt_suta_aft'),
ref('hr_payroll_rule_ee_us_mt_sit'),
ref('hr_payroll_rule_er_us_nc_suta'),
ref('hr_payroll_rule_ee_us_nc_sit'),
ref('hr_payroll_rule_er_us_nj_suta'),
ref('hr_payroll_rule_ee_us_nj_suta'),
ref('hr_payroll_rule_er_us_nj_sdi'),
ref('hr_payroll_rule_ee_us_nj_sdi'),
ref('hr_payroll_rule_er_us_nj_wf'),
ref('hr_payroll_rule_ee_us_nj_wf'),
ref('hr_payroll_rule_er_us_nj_fli'),
ref('hr_payroll_rule_ee_us_nj_fli'),
ref('hr_payroll_rule_ee_us_nj_sit'),
ref('hr_payroll_rule_er_us_oh_suta'),
ref('hr_payroll_rule_ee_us_oh_sit'),

View File

@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Wage Base -->
<data noupdate="1">
<record id="rule_parameter_us_ar_suta_wage_base_2019" model="hr.payroll.rate">
<field name="name">US AR Arkansas SUTA Wage Base</field>
<field name="code">us_ar_suta_wage_base</field>
<field name="parameter_value">10000.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_ar_suta_wage_base_2020" model="hr.payroll.rate">
<field name="name">US AR Arkansas SUTA Wage Base</field>
<field name="code">us_ar_suta_wage_base</field>
<field name="parameter_value">8000.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Rate -->
<data noupdate="1">
<record id="rule_parameter_us_ar_suta_rate_2019" model="hr.payroll.rate">
<field name="name">US AR Arkansas SUTA Rate</field>
<field name="code">us_ar_suta_rate</field>
<field name="parameter_value">3.2</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_ar_suta_rate_2020" model="hr.payroll.rate">
<field name="name">US AR Arkansas SUTA Rate</field>
<field name="code">us_ar_suta_rate</field>
<field name="parameter_value">2.9</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_ar_sit_tax_rate_2019" model="hr.payroll.rate">
<field name="name">US AR Arkansas SIT Tax Rate</field>
<field name="code">us_ar_sit_tax_rate</field>
<field name="parameter_value">[
( 4599, 0.0, 0.00),
( 9099, 2.0, 91.98),
( 13699, 3.0, 182.97),
( 22599, 3.4, 237.77),
( 37899, 5.0, 421.46),
( 80800, 5.9, 762.55),
( 81800, 6.6, 1243.40),
( 82800, 6.6, 1143.40),
( 84100, 6.6, 1043.40),
( 85200, 6.6, 943.40),
( 86200, 6.6, 843.40),
( 'inf', 6.6, 803.40),
]</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_ar_sit_tax_rate_2020" model="hr.payroll.rate">
<field name="name">US AR Arkansas SIT Tax Rate</field>
<field name="code">us_ar_sit_tax_rate</field>
<field name="parameter_value">[
( 4599, 0.0, 0.00),
( 9099, 2.0, 91.98),
( 13699, 3.0, 182.97),
( 22599, 3.4, 237.77),
( 37899, 5.0, 421.46),
( 80800, 5.9, 762.55),
( 81800, 6.6, 1243.40),
( 82800, 6.6, 1143.40),
( 84100, 6.6, 1043.40),
( 85200, 6.6, 943.40),
( 86200, 6.6, 843.40),
( 'inf', 6.6, 803.40),
]</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_ar_sit_standard_deduction_rate_2019" model="hr.payroll.rate">
<field name="name">US AR Arkansas Allowances Rate</field>
<field name="code">us_ar_sit_standard_deduction_rate</field>
<field name="parameter_value">2200.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_ar_sit_standard_deduction_rate_2020" model="hr.payroll.rate">
<field name="name">US AR Arkansas Allowances Rate</field>
<field name="code">us_ar_sit_standard_deduction_rate</field>
<field name="parameter_value">2200.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Partners and Contribution Registers -->
<record id="res_partner_us_ar_dor" model="res.partner">
<field name="name">US Arkansas - Department of Workforce Solutions - Unemployment Tax</field>
</record>
<record id="contrib_register_us_ar_dor" model="hr.contribution.register">
<field name="name">US Arkansas - Department of Workforce Solutions - Unemployment Tax</field>
<field name="partner_id" ref="res_partner_us_ar_dor"/>
</record>
<record id="res_partner_us_ar_dor_sit" model="res.partner">
<field name="name">US Arkansas - Department of Financial Administration - Income Tax</field>
</record>
<record id="contrib_register_us_ar_dor_sit" model="hr.contribution.register">
<field name="name">US Arkansas - Department of Financial Administration - Income Tax</field>
<field name="partner_id" ref="res_partner_us_ar_dor_sit"/>
</record>
<!-- Categories -->
<!-- Rules -->
<record id="hr_payroll_rule_er_us_ar_suta" model="hr.salary.rule">
<field name="sequence" eval="450"/>
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
<field name="name">ER: US AR Arkansas State Unemployment</field>
<field name="code">ER_US_AR_SUTA</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_ar_suta_wage_base', rate='us_ar_suta_rate', state_code='AR')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_ar_suta_wage_base', rate='us_ar_suta_rate', state_code='AR')</field>
<field name="register_id" ref="contrib_register_us_ar_dor"/>
<field name="appears_on_payslip" eval="False"/>
</record>
<record id="hr_payroll_rule_ee_us_ar_sit" model="hr.salary.rule">
<field name="sequence" eval="195"/>
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
<field name="name">EE: US AR Arkansas State Income Tax Withholding</field>
<field name="code">EE_US_AR_SIT</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = ar_arkansas_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = ar_arkansas_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="register_id" ref="contrib_register_us_ar_dor_sit"/>
<field name="appears_on_payslip" eval="True"/>
</record>
</odoo>

View File

@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Wage Base -->
<data noupdate="1">
<record id="rule_parameter_us_az_suta_wage_base_2019" model="hr.payroll.rate">
<field name="name">US AZ Arizona SUTA Wage Base</field>
<field name="code">us_az_suta_wage_base</field>
<field name="parameter_value">7000.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_az_suta_wage_base_2020" model="hr.payroll.rate">
<field name="name">US AZ Arizona SUTA Wage Base</field>
<field name="code">us_az_suta_wage_base</field>
<field name="parameter_value">7000.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Rate -->
<data noupdate="1">
<record id="rule_parameter_us_az_suta_rate_2019" model="hr.payroll.rate">
<field name="name">US AZ Arizona SUTA Rate</field>
<field name="code">us_az_suta_rate</field>
<field name="parameter_value">2.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_az_suta_rate_2020" model="hr.payroll.rate">
<field name="name">US AZ Arizona SUTA Rate</field>
<field name="code">us_az_suta_rate</field>
<field name="parameter_value">2.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Partners and Contribution Registers -->
<record id="res_partner_us_az_dor" model="res.partner">
<field name="name">US Arizona - Department of Economic Security (ADES) - Unemployment Tax</field>
</record>
<record id="contrib_register_us_az_dor" model="hr.contribution.register">
<field name="name">US Arizona - Department of Economic Security (ADES) - Unemployment Tax</field>
<field name="partner_id" ref="res_partner_us_az_dor"/>
</record>
<record id="res_partner_us_az_dor_sit" model="res.partner">
<field name="name">US Arizona - Department of Revenue (ADOR) - Income Tax</field>
</record>
<record id="contrib_register_us_az_dor_sit" model="hr.contribution.register">
<field name="name">US Arizona - Department of Revenue (ADOR) - Unemployment Tax</field>
<field name="partner_id" ref="res_partner_us_az_dor_sit"/>
</record>
<!-- Categories -->
<!-- Rules -->
<record id="hr_payroll_rule_er_us_az_suta" model="hr.salary.rule">
<field name="sequence" eval="450"/>
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
<field name="name">ER: US AZ Arizona State Unemployment</field>
<field name="code">ER_US_AZ_SUTA</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_az_suta_wage_base', rate='us_az_suta_rate', state_code='AZ')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_az_suta_wage_base', rate='us_az_suta_rate', state_code='AZ')</field>
<field name="register_id" ref="contrib_register_us_az_dor"/>
<field name="appears_on_payslip" eval="False"/>
</record>
<record id="hr_payroll_rule_ee_us_az_sit" model="hr.salary.rule">
<field name="sequence" eval="195"/>
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
<field name="name">EE: US AZ Arizona State Income Tax Withholding</field>
<field name="code">EE_US_AZ_SIT</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = az_arizona_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = az_arizona_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="register_id" ref="contrib_register_us_az_dor_sit"/>
<field name="appears_on_payslip" eval="True"/>
</record>
</odoo>

View File

@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Wage Base -->
<data noupdate="1">
<record id="rule_parameter_us_il_suta_wage_base_2019" model="hr.payroll.rate">
<field name="name">US IL Illinois SUTA Wage Base</field>
<field name="code">us_il_suta_wage_base</field>
<field name="parameter_value">12960.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_il_suta_wage_base_2020" model="hr.payroll.rate">
<field name="name">US IL Illinois SUTA Wage Base</field>
<field name="code">us_il_suta_wage_base</field>
<field name="parameter_value">12740.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Rate -->
<data noupdate="1">
<record id="rule_parameter_us_il_suta_rate_2019" model="hr.payroll.rate">
<field name="name">US IL Illinois SUTA Rate</field>
<field name="code">us_il_suta_rate</field>
<field name="parameter_value">3.175</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_il_suta_rate_2020" model="hr.payroll.rate">
<field name="name">US IL Illinois SUTA Rate</field>
<field name="code">us_il_suta_rate</field>
<field name="parameter_value">3.125</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_il_sit_basic_allowances_rate_2019" model="hr.payroll.rate">
<field name="name">US IL Illinois Basic Allowances Rate</field>
<field name="code">us_il_sit_basic_allowances_rate</field>
<field name="parameter_value">2275.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_il_sit_basic_allowances_rate_2020" model="hr.payroll.rate">
<field name="name">US IL Illinois Basic Allowances Rate</field>
<field name="code">us_il_sit_basic_allowances_rate</field>
<field name="parameter_value">2325.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_il_sit_additional_allowances_rate_2019" model="hr.payroll.rate">
<field name="name">US IL Illinois Additional Allowances Rate</field>
<field name="code">us_il_sit_additional_allowances_rate</field>
<field name="parameter_value">1000.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_il_sit_additional_allowances_rate_2020" model="hr.payroll.rate">
<field name="name">US IL Illinois Additional Allowances Rate</field>
<field name="code">us_il_sit_additional_allowances_rate</field>
<field name="parameter_value">1000.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Partners and Contribution Registers -->
<record id="res_partner_us_il_dor" model="res.partner">
<field name="name">US Illinois - Department of Economic Security (IDES) - Unemployment Tax</field>
</record>
<record id="contrib_register_us_il_dor" model="hr.contribution.register">
<field name="name">US Illinois - Department of Economic Security (IDES) - Unemployment Tax</field>
<field name="partner_id" ref="res_partner_us_il_dor"/>
</record>
<record id="res_partner_us_il_dor_sit" model="res.partner">
<field name="name">US Illinois - Department of Revenue (IDOR) - Income Tax</field>
</record>
<record id="contrib_register_us_il_dor_sit" model="hr.contribution.register">
<field name="name">US Illinois - Department of Revenue (IDOR) - Unemployment Tax</field>
<field name="partner_id" ref="res_partner_us_il_dor_sit"/>
</record>
<!-- Categories -->
<!-- Rules -->
<record id="hr_payroll_rule_er_us_il_suta" model="hr.salary.rule">
<field name="sequence" eval="450"/>
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
<field name="name">ER: US IL Illinois State Unemployment</field>
<field name="code">ER_US_IL_SUTA</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_il_suta_wage_base', rate='us_il_suta_rate', state_code='IL')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_il_suta_wage_base', rate='us_il_suta_rate', state_code='IL')</field>
<field name="register_id" ref="contrib_register_us_il_dor"/>
<field name="appears_on_payslip" eval="False"/>
</record>
<record id="hr_payroll_rule_ee_us_il_sit" model="hr.salary.rule">
<field name="sequence" eval="195"/>
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
<field name="name">EE: US IL Illinois State Income Tax Withholding</field>
<field name="code">EE_US_IL_SIT</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = il_illinois_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = il_illinois_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="register_id" ref="contrib_register_us_il_dor_sit"/>
<field name="appears_on_payslip" eval="True"/>
</record>
</odoo>

View File

@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Wage Base -->
<data noupdate="1">
<record id="rule_parameter_us_mi_suta_wage_base_2019" model="hr.payroll.rate">
<field name="name">US MI Michigan SUTA Wage Base</field>
<field name="code">us_mi_suta_wage_base</field>
<field name="parameter_value">9500.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_mi_suta_wage_base_2020" model="hr.payroll.rate">
<field name="name">US MI Michigan SUTA Wage Base</field>
<field name="code">us_mi_suta_wage_base</field>
<field name="parameter_value">9000.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Rate -->
<data noupdate="1">
<record id="rule_parameter_us_mi_suta_rate_2019" model="hr.payroll.rate">
<field name="name">US MI Michigan SUTA Rate</field>
<field name="code">us_mi_suta_rate</field>
<field name="parameter_value">2.7</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_mi_suta_rate_2020" model="hr.payroll.rate">
<field name="name">US MI Michigan SUTA Rate</field>
<field name="code">us_mi_suta_rate</field>
<field name="parameter_value">2.7</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_mi_sit_exemption_rate_2019" model="hr.payroll.rate">
<field name="name">US MI Michigan Exemption Rate</field>
<field name="code">us_mi_sit_exemption_rate</field>
<field name="parameter_value">4400.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_mi_sit_exemption_rate_2020" model="hr.payroll.rate">
<field name="name">US MI Michigan Exemption Rate</field>
<field name="code">us_mi_sit_exemption_rate</field>
<field name="parameter_value">4750.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Partners and Contribution Registers -->
<record id="res_partner_us_mi_dor" model="res.partner">
<field name="name">US Michigan - Unemployment Insurance Agency - Unemployment Tax</field>
</record>
<record id="contrib_register_us_mi_dor" model="hr.contribution.register">
<field name="name">US Michigan - Unemployment Insurance Agency - Unemployment Tax</field>
<field name="partner_id" ref="res_partner_us_mi_dor"/>
</record>
<record id="res_partner_us_mi_dor_sit" model="res.partner">
<field name="name">US Michigan - Department of Treasury - Income Tax</field>
</record>
<record id="contrib_register_us_mi_dor_sit" model="hr.contribution.register">
<field name="name">US Michigan - Department of Treasury - Income Tax</field>
<field name="partner_id" ref="res_partner_us_mi_dor_sit"/>
</record>
<!-- Categories -->
<!-- Rules -->
<record id="hr_payroll_rule_er_us_mi_suta" model="hr.salary.rule">
<field name="sequence" eval="450"/>
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
<field name="name">ER: US MI Michigan State Unemployment</field>
<field name="code">ER_US_MI_SUTA</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_mi_suta_wage_base', rate='us_mi_suta_rate', state_code='MI')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_mi_suta_wage_base', rate='us_mi_suta_rate', state_code='MI')</field>
<field name="register_id" ref="contrib_register_us_mi_dor"/>
<field name="appears_on_payslip" eval="False"/>
</record>
<record id="hr_payroll_rule_ee_us_mi_sit" model="hr.salary.rule">
<field name="sequence" eval="195"/>
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
<field name="name">EE: US MI Michigan State Income Tax Withholding</field>
<field name="code">EE_US_MI_SIT</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = mi_michigan_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = mi_michigan_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="register_id" ref="contrib_register_us_mi_dor_sit"/>
<field name="appears_on_payslip" eval="True"/>
</record>
</odoo>

View File

@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Wage Base -->
<data noupdate="1">
<record id="rule_parameter_us_mn_suta_wage_base_2019" model="hr.payroll.rate">
<field name="name">US MN Minnesota SUTA Wage Base</field>
<field name="code">us_mn_suta_wage_base</field>
<field name="parameter_value">34000.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_mn_suta_wage_base_2020" model="hr.payroll.rate">
<field name="name">US MN Minnesota SUTA Wage Base</field>
<field name="code">us_mn_suta_wage_base</field>
<field name="parameter_value">35000.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Rate -->
<data noupdate="1">
<record id="rule_parameter_us_mn_suta_rate_2019" model="hr.payroll.rate">
<field name="name">US MN Minnesota SUTA Rate</field>
<field name="code">us_mn_suta_rate</field>
<field name="parameter_value">1.11</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_mn_suta_rate_2020" model="hr.payroll.rate">
<field name="name">US MN Minnesota SUTA Rate</field>
<field name="code">us_mn_suta_rate</field>
<field name="parameter_value">1.11</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_mn_sit_tax_rate_2019" model="hr.payroll.rate">
<field name="name">US MN Minnesota SIT Tax Rate</field>
<field name="code">us_mn_sit_tax_rate</field>
<field name="parameter_value">{
'single': [
( 28920, 2400, 5.35, 0.00),
( 89510, 28920, 7.05, 1418.82),
(166290, 89510, 7.85, 5690.42),
( 'inf', 166290, 9.85, 11717.65),
],
'married': [
( 47820, 9050, 5.35, 0.00),
( 163070, 47820, 7.05, 2074.20),
( 282200, 163070, 7.85, 10199.33),
( 'inf', 282200, 9.85, 19551.04),
],
}</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_mn_sit_tax_rate_2020" model="hr.payroll.rate">
<field name="name">US MN Minnesota SIT Tax Rate</field>
<field name="code">us_mn_sit_tax_rate</field>
<field name="parameter_value">{
'single': [
( 30760, 3800, 5.35, 0.00),
( 92350, 30760, 6.80, 1442.36),
(168200, 92350, 7.85, 5630.48),
( 'inf', 168200, 9.85, 11584.71),
],
'married': [
( 51310, 11900, 5.35, 0.00),
( 168470, 51310, 6.80, 2108.44),
( 285370, 168470, 7.85, 10075.32),
( 'inf', 285370, 9.85, 19251.97),
],
}</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_mn_sit_allowances_rate_2019" model="hr.payroll.rate">
<field name="name">US MN Minnesota Allowances Rate</field>
<field name="code">us_mn_sit_allowances_rate</field>
<field name="parameter_value">4250.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_mn_sit_allowances_rate_2020" model="hr.payroll.rate">
<field name="name">US MN Minnesota Allowances Rate</field>
<field name="code">us_mn_sit_allowances_rate</field>
<field name="parameter_value">4300.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Partners and Contribution Registers -->
<record id="res_partner_us_mn_dor" model="res.partner">
<field name="name">US Minnesota - Unemployment Insurance Agency - Unemployment Tax</field>
</record>
<record id="contrib_register_us_mn_dor" model="hr.contribution.register">
<field name="name">US Minnesota - Unemployment Insurance Agency - Unemployment Tax</field>
<field name="partner_id" ref="res_partner_us_mn_dor"/>
</record>
<record id="res_partner_us_mn_dor_sit" model="res.partner">
<field name="name">US Minnesota - Department of Treasury - Income Tax</field>
</record>
<record id="contrib_register_us_mn_dor_sit" model="hr.contribution.register">
<field name="name">US Minnesota - Department of Treasury - Income Tax</field>
<field name="partner_id" ref="res_partner_us_mn_dor_sit"/>
</record>
<!-- Categories -->
<!-- Rules -->
<record id="hr_payroll_rule_er_us_mn_suta" model="hr.salary.rule">
<field name="sequence" eval="450"/>
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
<field name="name">ER: US MN Minnesota State Unemployment</field>
<field name="code">ER_US_MN_SUTA</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_mn_suta_wage_base', rate='us_mn_suta_rate', state_code='MN')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_mn_suta_wage_base', rate='us_mn_suta_rate', state_code='MN')</field>
<field name="register_id" ref="contrib_register_us_mn_dor"/>
<field name="appears_on_payslip" eval="False"/>
</record>
<record id="hr_payroll_rule_ee_us_mn_sit" model="hr.salary.rule">
<field name="sequence" eval="195"/>
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
<field name="name">EE: US MN Minnesota State Income Tax Withholding</field>
<field name="code">EE_US_MN_SIT</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = mn_minnesota_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = mn_minnesota_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="register_id" ref="contrib_register_us_mn_dor_sit"/>
<field name="appears_on_payslip" eval="True"/>
</record>
</odoo>

View File

@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Wage Base -->
<data noupdate="1">
<record id="rule_parameter_us_mo_suta_wage_base_2019" model="hr.payroll.rate">
<field name="name">US MO Missouri SUTA Wage Base</field>
<field name="code">us_mo_suta_wage_base</field>
<field name="parameter_value">12000.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_mo_suta_wage_base_2020" model="hr.payroll.rate">
<field name="name">US MO Missouri SUTA Wage Base</field>
<field name="code">us_mo_suta_wage_base</field>
<field name="parameter_value">11500.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Rate -->
<data noupdate="1">
<record id="rule_parameter_us_mo_suta_rate_2019" model="hr.payroll.rate">
<field name="name">US MO Missouri SUTA Rate</field>
<field name="code">us_mo_suta_rate</field>
<field name="parameter_value">2.376</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_mo_suta_rate_2020" model="hr.payroll.rate">
<field name="name">US MO Missouri SUTA Rate</field>
<field name="code">us_mo_suta_rate</field>
<field name="parameter_value">2.376</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_mo_sit_rate_2019" model="hr.payroll.rate">
<field name="name">US MO Missouri SIT Rate Table</field>
<field name="code">us_mo_sit_rate</field>
<field name="parameter_value">[
(1053.0, 1.5),
(1053.0, 2.0),
(1053.0, 2.5),
(1053.0, 3.0),
(1053.0, 3.5),
(1053.0, 4.0),
(1053.0, 4.5),
(1053.0, 5.0),
( 'inf', 5.4),
]</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_mo_sit_rate_2020" model="hr.payroll.rate">
<field name="name">US MO Missouri SIT Rate Table</field>
<field name="code">us_mo_sit_rate</field>
<field name="parameter_value">[
(1073.0, 1.5),
(1073.0, 2.0),
(1073.0, 2.5),
(1073.0, 3.0),
(1073.0, 3.5),
(1073.0, 4.0),
(1073.0, 4.5),
(1073.0, 5.0),
( 'inf', 5.4),
]</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_mo_sit_deduction_2019" model="hr.payroll.rate">
<field name="name">US MO Missouri SIT Deduction</field>
<field name="code">us_mo_sit_deduction</field>
<field name="parameter_value">{
'single': 12400.0,
'married': 24800.0,
'head_of_household': 18650.0,
}</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_mo_sit_deduction_2020" model="hr.payroll.rate">
<field name="name">US MO Missouri SIT Deduction</field>
<field name="code">us_mo_sit_deduction</field>
<field name="parameter_value">{
'single': 12400.0,
'married': 24800.0,
'head_of_household': 18650.0,
}</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Partners and Contribution Registers -->
<record id="res_partner_us_mo_dor" model="res.partner">
<field name="name">US Missouri - Department of Taxation - Unemployment Tax</field>
</record>
<record id="contrib_register_us_mo_dor" model="hr.contribution.register">
<field name="name">US Missouri - Department of Taxation - Unemployment Tax</field>
<field name="partner_id" ref="res_partner_us_mo_dor"/>
</record>
<record id="res_partner_us_mo_dor_sit" model="res.partner">
<field name="name">US Missouri - Department of Taxation - Income Tax</field>
</record>
<record id="contrib_register_us_mo_dor_sit" model="hr.contribution.register">
<field name="name">US Missouri - Department of Taxation - Income Tax</field>
<field name="partner_id" ref="res_partner_us_mo_dor_sit"/>
</record>
<!-- Categories -->
<!-- Rules -->
<record id="hr_payroll_rule_er_us_mo_suta" model="hr.salary.rule">
<field name="sequence" eval="450"/>
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
<field name="name">ER: US MO Missouri State Unemployment</field>
<field name="code">ER_US_MO_SUTA</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_mo_suta_wage_base', rate='us_mo_suta_rate', state_code='MO')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_mo_suta_wage_base', rate='us_mo_suta_rate', state_code='MO')</field>
<field name="register_id" ref="contrib_register_us_mo_dor"/>
<field name="appears_on_payslip" eval="False"/>
</record>
<record id="hr_payroll_rule_ee_us_mo_sit" model="hr.salary.rule">
<field name="sequence" eval="195"/>
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
<field name="name">EE: US MO Missouri State Income Tax Withholding</field>
<field name="code">EE_US_MO_SIT</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = mo_missouri_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = mo_missouri_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="register_id" ref="contrib_register_us_mo_dor_sit"/>
<field name="appears_on_payslip" eval="True"/>
</record>
</odoo>

View File

@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Wage Base -->
<data noupdate="1">
<record id="rule_parameter_us_nc_suta_wage_base_2019" model="hr.payroll.rate">
<field name="name">US NC North Carolina SUTA Wage Base</field>
<field name="code">us_nc_suta_wage_base</field>
<field name="parameter_value">24300.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_nc_suta_wage_base_2020" model="hr.payroll.rate">
<field name="name">US NC North Carolina SUTA Wage Base</field>
<field name="code">us_nc_suta_wage_base</field>
<field name="parameter_value">25200.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Rate -->
<data noupdate="1">
<record id="rule_parameter_us_nc_suta_rate_2019" model="hr.payroll.rate">
<field name="name">US NC North Carolina SUTA Rate</field>
<field name="code">us_nc_suta_rate</field>
<field name="parameter_value">1.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_nc_suta_rate_2020" model="hr.payroll.rate">
<field name="name">US NC North Carolina SUTA Rate</field>
<field name="code">us_nc_suta_rate</field>
<field name="parameter_value">1.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_nc_sit_allowance_rate_2019" model="hr.payroll.rate">
<field name="name">US NC North Carolina Allowance Rate</field>
<field name="code">us_nc_sit_allowance_rate</field>
<field name="parameter_value">{
'weekly': {'allowance': 48.08, 'standard_deduction': 192.31, 'standard_deduction_hh': 288.46},
'bi-weekly': {'allowance': 96.15, 'standard_deduction': 384.62, 'standard_deduction_hh': 576.92},
'semi-monthly': {'allowance': 104.17, 'standard_deduction': 416.67, 'standard_deduction_hh': 625.00},
'monthly': {'allowance': 208.33, 'standard_deduction': 833.33, 'standard_deduction_hh': 1250.00},
}</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_nc_sit_allowance_rate_2020" model="hr.payroll.rate">
<field name="name">US NC North Carolina Allowance Rate</field>
<field name="code">us_nc_sit_allowance_rate</field>
<field name="parameter_value">{
'weekly': {'allowance': 48.08, 'standard_deduction': 206.73, 'standard_deduction_hh': 310.10},
'bi-weekly': {'allowance': 96.15, 'standard_deduction': 413.46, 'standard_deduction_hh': 620.19},
'semi-monthly': {'allowance': 104.17, 'standard_deduction': 447.92, 'standard_deduction_hh': 671.88},
'monthly': {'allowance': 208.33, 'standard_deduction': 895.83, 'standard_deduction_hh': 1343.75},
}</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Partners and Contribution Registers -->
<record id="res_partner_us_nc_dor" model="res.partner">
<field name="name">US North Carolina - Department of Taxation - Unemployment Tax</field>
</record>
<record id="contrib_register_us_nc_dor" model="hr.contribution.register">
<field name="name">US North Carolina - Department of Taxation - Unemployment Tax</field>
<field name="partner_id" ref="res_partner_us_nc_dor"/>
</record>
<record id="res_partner_us_nc_dor_sit" model="res.partner">
<field name="name">US North Carolina - Department of Taxation - Income Tax</field>
</record>
<record id="contrib_register_us_nc_dor_sit" model="hr.contribution.register">
<field name="name">US North Carolina - Department of Taxation - Income Tax</field>
<field name="partner_id" ref="res_partner_us_nc_dor_sit"/>
</record>
<!-- Categories -->
<!-- Rules -->
<record id="hr_payroll_rule_er_us_nc_suta" model="hr.salary.rule">
<field name="sequence" eval="450"/>
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
<field name="name">ER: US NC North Carolina State Unemployment</field>
<field name="code">ER_US_NC_SUTA</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nc_suta_wage_base', rate='us_nc_suta_rate', state_code='NC')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nc_suta_wage_base', rate='us_nc_suta_rate', state_code='NC')</field>
<field name="register_id" ref="contrib_register_us_nc_dor"/>
<field name="appears_on_payslip" eval="False"/>
</record>
<record id="hr_payroll_rule_ee_us_nc_sit" model="hr.salary.rule">
<field name="sequence" eval="195"/>
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
<field name="name">EE: US NC North Carolina State Income Tax Withholding</field>
<field name="code">EE_US_NC_SIT</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = nc_northcarolina_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = nc_northcarolina_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="register_id" ref="contrib_register_us_nc_dor_sit"/>
<field name="appears_on_payslip" eval="True"/>
</record>
</odoo>

View File

@@ -0,0 +1,426 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Wage Base -->
<data noupdate="1">
<record id="rule_parameter_us_nj_suta_wage_base_2019" model="hr.payroll.rate">
<field name="name">US NJ NewJersey SUTA Wage Base</field>
<field name="code">us_nj_suta_wage_base</field>
<field name="parameter_value">34400.00</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_nj_suta_wage_base_2020" model="hr.payroll.rate">
<field name="name">US NJ NewJersey SUTA Wage Base</field>
<field name="code">us_nj_suta_wage_base</field>
<field name="parameter_value">35300.00</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Rate -->
<!-- SUTA -->
<data noupdate="1">
<record id="rule_parameter_us_nj_suta_rate_2019" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employer Unemployment SUTA Rate</field>
<field name="code">us_nj_suta_rate</field>
<field name="parameter_value">2.6825</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_nj_suta_rate_2020" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employer Unemployment SUTA Rate</field>
<field name="code">us_nj_suta_rate</field>
<field name="parameter_value">2.6825</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_nj_suta_ee_rate_2019" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employee Unemployment SUTA Rate</field>
<field name="code">us_nj_suta_ee_rate</field>
<field name="parameter_value">0.3825</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_nj_suta_ee_rate_2020" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employee Unemployment SUTA Rate</field>
<field name="code">us_nj_suta_ee_rate</field>
<field name="parameter_value">0.3825</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- SDI -->
<data noupdate="1">
<record id="rule_parameter_us_nj_sdi_rate_2019" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employer State Disability Insurance Rate</field>
<field name="code">us_nj_sdi_rate</field>
<field name="parameter_value">0.5</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_nj_sdi_rate_2020" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employer State Disability Insurance Rate</field>
<field name="code">us_nj_sdi_rate</field>
<field name="parameter_value">0.5</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_nj_sdi_ee_rate_2019" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employee State Disability Insurance Rate</field>
<field name="code">us_nj_sdi_ee_rate</field>
<field name="parameter_value">0.17</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_nj_sdi_ee_rate_2020" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employee State Disability Insurance Rate</field>
<field name="code">us_nj_sdi_ee_rate</field>
<field name="parameter_value">0.26</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- WF -->
<data noupdate="1">
<record id="rule_parameter_us_nj_wf_rate_2019" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employer Workforce Development Rate</field>
<field name="code">us_nj_wf_rate</field>
<field name="parameter_value">0.1175</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_nj_wf_rate_2020" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employer Workforce Development Rate</field>
<field name="code">us_nj_wf_rate</field>
<field name="parameter_value">0.1175</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_nj_wf_ee_rate_2019" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employee Workforce Development Rate</field>
<field name="code">us_nj_wf_ee_rate</field>
<field name="parameter_value">0.0425</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_nj_wf_ee_rate_2020" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employee Workforce Development Rate</field>
<field name="code">us_nj_wf_ee_rate</field>
<field name="parameter_value">0.0425</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- FLI -->
<data noupdate="1">
<record id="rule_parameter_us_nj_fli_rate_2019" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employer Family Leave Insurance Rate</field>
<field name="code">us_nj_fli_rate</field>
<field name="parameter_value">0.0</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_nj_fli_rate_2020" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employer Family Leave Insurance Rate</field>
<field name="code">us_nj_fli_rate</field>
<field name="parameter_value">0.0</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_nj_fli_ee_rate_2019" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employee Family Leave Insurance Rate</field>
<field name="code">us_nj_fli_ee_rate</field>
<field name="parameter_value">0.08</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_nj_fli_ee_rate_2020" model="hr.payroll.rate">
<field name="name">US NJ New Jersey Employee Family Leave Insurance Rate</field>
<field name="code">us_nj_fli_ee_rate</field>
<field name="parameter_value">0.16</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- SIT -->
<data noupdate="1">
<record id="rule_parameter_us_nj_sit_rate_2019" model="hr.payroll.rate">
<field name="name">US NJ NewJersey SIT Rate Table</field>
<field name="code">us_nj_sit_rate</field>
<field name="parameter_value">{
'A': {
'weekly': ((385, 0.0, 1.50), (673, 5.77, 2.00), (769, 11.54, 3.90), (1442, 15.29, 6.10), (9615, 56.34, 7.00), (96154, 628.46, 9.90), ('inf', 9195.77, 11.80)),
'bi-weekly': ((769, 0.00, 1.50), (1346, 12.00, 2.00), (1538, 23.00, 3.90), (2885, 31.00, 6.10), (19231, 113.00, 7.00), (192308, 1257.00, 9.90), ('inf',18392.00, 11.80)),
'semi-monthly': ((833, 0.00, 1.50), (1458, 13.00, 2.00), (1667, 25.00, 3.90), (3125, 33.00, 6.10), (20833, 122.00, 7.00), (208333, 1362.00, 9.90), ('inf', 19924.00, 11.80)),
'monthly': ((1667, 0.00, 1.50), (2917, 25.00, 2.00), (3333, 50.00, 3.90), (6250, 66.00, 6.10), (41667, 244.00, 7.00), (416667, 2723.00, 9.90), ('inf', 39848.00, 11.80)),
'quarterly': ((5000, 0.00, 1.50), (8750, 75.00, 2.00), (10000, 150.00, 3.90), (18750, 198.75, 6.10), (125000, 732.50, 7.00), (1250000, 8170.00, 9.90), ('inf', 119545.00, 11.80)),
'semi-annual': ((10000, 0.00, 1.50), (17500, 150.00, 2.00), (20000, 300.00, 3.90), (37500, 397.50, 6.10), (250000, 1465.00, 7.00), (2500000, 16340.00, 9.90), ('inf', 239090.00, 11.80)),
'annual': ((20000, 0.0, 1.50), (35000, 300.00, 2.00), (40000, 600.00, 3.90), (75000, 795.00, 6.10), (500000, 2930.00, 7.00), (5000000, 32680.00, 9.90), ('inf', 478180.00, 11.80)),
},
'B': {
'weekly': ((385, 0.0, 1.50), (962, 5.77, 2.00), (1346, 17.31, 2.70), (1538, 27.69, 3.9), (2885, 35.19, 6.10), (9615, 117.31, 7.00), (96154, 588.46, 9.90), ('inf', 9155.77, 11.80)),
'bi-weekly': ((769, 0.0, 1.50), (1923, 12.00, 2.00), (2692, 35.00, 2.70), (3076, 55.00, 3.9), (5769, 70.00, 6.10), (19231, 235.00, 700), (192308, 1177.00, 9.90), ('inf', 18312.00, 11.80)),
'semi-monthly': ((833, 0.0, 1.50), (2083, 12.50, 2.00), (2917, 37.50, 2.70), (3333, 59.99, 3.9), (6250, 76.25, 6.10), (20833, 254.19, 7.00), (208333, 1275.00, 9.90), ('inf', 19838.00, 11.80)),
'monthly': ((1667, 0.0, 1.50), (4167, 25.00, 2.00), (5833, 75.00, 2.70), (6667, 120.00, 3.9), (12500, 153.00, 6.10), (41667, 508.00, 7.00), (416667, 2550.00, 9.90), ('inf', 39675.00, 11.80)),
'quarterly': ((5000, 0.0, 1.50), (12500, 75.00, 2.00), (17500, 225.00, 2.70), (20000, 360.00, 3.9), (37500, 397.50, 6.10), (125000, 1525.00, 7.00), (1250000, 7650.00, 9.90), ('inf', 119025.00, 11.80)),
'semi-annual': ((10000, 0.0, 1.50), (25000, 150.00, 2.00), (35000, 450.00, 2.70), (40000, 720.00, 3.9), (75000, 915.00, 6.10), (250000, 3050.00, 7.00), (2500000, 15300.00, 9.90), ('inf', 238050.00, 11.80)),
'annual': ((20000, 0.0, 1.50), (50000, 300.00, 2.00), (70000, 900.00, 2.70), (80000, 1440.00, 3.9), (150000, 1830.00, 6.10), (500000, 6100.00, 7.00), (5000000, 30600.00, 9.90), ('inf', 476100.00, 11.80)),
},
'C': {
'weekly': ((385, 0.0, 1.50), (769, 5.77, 2.30), (962, 14.62, 2.80), (1154, 20.00, 3.50), (2885, 26.73, 5.60), (9615, 123.65, 6.60), (96154, 567.88, 9.90), ('inf', 9135.19, 11.80)),
'bi-weekly': ((769, 0.0, 1.50), (1538, 11.54, 2.30), (1923, 29.23, 2.80), (2308, 40.00, 3.50), (5769, 53.46, 5.60), (19231, 247.31, 6.60), (192308, 1135.77, 9.90), ('inf', 18270.38, 11.80)),
'semi-monthly': ((833, 0.0, 1.50), (1667, 12.50, 2.30), (2083, 31.67, 2.80), (2500, 43.33, 3.50), (6250, 57.92, 5.60), (20833, 267.92, 6.60), (208333, 1230.42, 9.90), ('inf', 19792.92, 11.80)),
'monthly': ((1667, 0.0, 1.50), (3333, 25.00, 2.30), (4167, 63.33, 2.80), (5000, 86.67, 3.50), (12500, 115.83, 5.60), (41667, 535.85, 6.60), (416667, 2460.83, 9.90), ('inf', 39585.83, 11.80)),
'quarterly': ((5000, 0.0, 1.50), (10000, 75.00, 2.30), (12500, 190.00, 2.80), (15000, 260.00, 3.50), (37500, 347.50, 5.60), (125000, 1607.50, 6.60), (1250000, 7382.50, 9.90), ('inf', 118757.50, 11.80)),
'semi-annual': ((10000, 0.0, 1.50), (20000, 150.00, 2.30), (25000, 380.00, 2.80), (30000, 520.00, 3.50), (75000, 695.00, 5.60), (250000, 3215.00, 6.60), (2500000, 14765.00, 9.90), ('inf', 237515.00, 11.80)),
'annual': ((20000, 0.0, 1.50), (40000, 300.00, 2.30), (50000, 760.00, 2.80), (60000, 1040.00, 3.50), (150000, 1390.00, 5.60), (500000, 6430.00, 6.60), (5000000, 29530.00, 9.90), ('inf', 475030.00, 11.80)),
},
'D': {
'weekly': ((385, 0.0, 1.50), (769, 5.77, 2.70), (962, 16.15, 3.40), (1154, 22.69, 4.30), (2885, 30.96, 5.60), (9615, 127.88, 6.50), (96154, 565.38, 9.90), ('inf', 9132.69, 11.80)),
'bi-weekly': ((769, 0.0, 1.50), (1538, 11.54, 2.70), (1923, 32.31, 3.40), (2308, 45.38, 4.30), (5769, 61.92, 5.60), (19231, 255.77, 6.50), (192308, 1130.77, 9.90), ('inf', 18265.38, 11.80)),
'semi-monthly': ((833, 0.0, 1.50), (1667, 12.50, 2.70), (2083, 35.00, 3.40), (2500, 49.17, 4.30), (6250, 67.08, 5.60), (20833, 277.08, 6.50), (208333, 1225.00, 9.90), ('inf', 19787.50, 11.80)),
'monthly': ((1667, 0.0, 1.50), (3333, 25.00, 2.70), (4167, 70.00, 3.40), (5000, 98.33, 4.00), (12500, 134.17, 5.60), (41667, 554.17, 6.50), (416667, 2450.00, 9.90), ('inf', 39575.00, 11.80)),
'quarterly': ((5000, 0.0, 1.50), (10000, 75.00, 2.07), (12500, 210.00, 3.40), (15000, 295.00, 4.30), (37500, 402.50, 5.60), (125000, 1662.50, 6.50), (1250000, 7350.00, 9.90), ('inf', 118725.00, 11.80)),
'semi-annual': ((10000, 0.0, 1.50), (20000, 150.00, 2.70), (25000, 420.00, 3.40), (30000, 590.00, 4.30), (75000, 805.00, 5.60), (250000, 3325.00, 6.50), (2500000, 14700.00, 9.90), ('inf', 237450.00, 11.80)),
'annual': ((20000, 0.0, 1.50), (40000, 300.00, 2.70), (50000, 840.00, 3.40), (60000, 1180.00, 4.30), (150000, 1610.00, 5.60), (250000, 6650.00, 6.50), (2500000, 29400.00, 9.90), ('inf', 474900.00, 11.80)),
},
'E': {
'weekly': ((385, 0.0, 1.50), (673, 5.77, 2.00), (1923, 11.54, 5.80), (9615, 84.04, 6.50), (96154, 584.04, 9.90), ('inf', 9151.35, 11.80)),
'bi-weekly': ((769, 0.0, 1.50), (1346, 12.00, 2.00), (3846, 23.00, 5.80), (19231, 168.00, 6.50), (192308, 1168.00, 9.90), ('inf', 18303.00, 11.80)),
'semi-monthly': ((833, 0.0, 1.50), (1458, 13.00, 2.00), (4167, 25.00, 5.80), (20833, 182.00, 6.50), (208333, 1265.00, 9.90), ('inf', 19828.00, 11.80)),
'monthly': ((1667, 0.0, 1.50), (2916, 25.00, 2.00), (8333, 50.00, 5.80), (41667, 364.00, 6.50), (416667, 2531.00, 9.90), ('inf', 39656, 11.80)),
'quarterly': ((5000, 0.0, 1.50), (8750, 75.00, 2.00), (25000, 150.00, 5.80), (125000, 1092.50, 6.50), (1250000, 7592.50, 9.90), ('inf', 118967.50, 11.80)),
'semi-annual': ((10000, 0.0, 1.50), (17500, 150.00, 2.00), (50000, 300.00, 5.80), (250000, 2185.00, 6.50), (2500000, 15185.00, 9.90), ('inf', 237935.00, 11.80)),
'annual': ((20000, 0.0, 1.50), (35000, 300.00, 2.00), (100000, 600.00, 5.80), (500000, 4370.00, 6.50), (5000000, 30370.00, 9.90), ('inf', 475870.00, 11.80)),
},
}</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_nj_sit_rate_2020" model="hr.payroll.rate">
<field name="name">US NJ NewJersey SIT Rate Table</field>
<field name="code">us_nj_sit_rate</field>
<field name="parameter_value">{
'A': {
'weekly': ((385, 0.0, 1.50), (673, 5.77, 2.00), (769, 11.54, 3.90), (1442, 15.29, 6.10), (9615, 56.34, 7.00), (96154, 628.46, 9.90), ('inf', 9195.77, 11.80)),
'bi-weekly': ((769, 0.00, 1.50), (1346, 12.00, 2.00), (1538, 23.00, 3.90), (2885, 31.00, 6.10), (19231, 113.00, 7.00), (192308, 1257.00, 9.90), ('inf',18392.00, 11.80)),
'semi-monthly': ((833, 0.00, 1.50), (1458, 13.00, 2.00), (1667, 25.00, 3.90), (3125, 33.00, 6.10), (20833, 122.00, 57.00), (208333, 1362.00, 9.90), ('inf', 19924.00, 11.80)),
'monthly': ((1667, 0.00, 1.50), (2917, 25.00, 2.00), (3333, 50.00, 3.90), (6250, 66.00, 6.10), (41667, 244.00, 57.00), (416667, 2723.00, 9.90), ('inf', 39848.00, 11.80)),
'quarterly': ((5000, 0.00, 1.50), (8750, 75.00, 2.00), (10000, 150.00, 3.90), (18750, 198.75, 6.10), (125000, 732.50, 57.00), (1250000, 8170.00, 9.90), ('inf', 119545.00, 11.80)),
'semi-annual': ((10000, 0.00, 1.50), (17500, 150.00, 2.00), (20000, 300.00, 3.90), (37500, 397.50, 6.10), (250000, 1465.00, 57.00), (2500000, 16340.00, 9.90), ('inf', 239090.00, 11.80)),
'annual': ((20000, 0.0, 1.50), (35000, 300.00, 2.00), (40000, 600.00, 3.90), (75000, 795.00, 6.10), (500000, 2930.00, 57.00), (5000000, 32680.00, 9.90), ('inf', 478180.00, 11.80)),
},
'B': {
'weekly': ((385, 0.0, 1.50), (962, 5.77, 2.00), (1346, 17.31, 2.70), (1538, 27.69, 3.9), (2885, 35.19, 6.10), (9615, 117.31, 7.00), (96154, 588.46, 9.90), ('inf', 9155.77, 11.80)),
'bi-weekly': ((769, 0.0, 1.50), (1923, 12.00, 2.00), (2692, 35.00, 2.70), (3076, 55.00, 3.9), (5769, 70.00, 6.10), (19231, 235.00, 700), (192308, 1177.00, 9.90), ('inf', 18312.00, 11.80)),
'semi-monthly': ((833, 0.0, 1.50), (2083, 12.50, 2.00), (2917, 37.50, 2.70), (3333, 59.99, 3.9), (6250, 76.25, 6.10), (20833, 254.19, 7.00), (208333, 1275.00, 9.90), ('inf', 19838.00, 11.80)),
'monthly': ((1667, 0.0, 1.50), (4167, 25.00, 2.00), (5833, 75.00, 2.70), (6667, 120.00, 3.9), (12500, 153.00, 6.10), (41667, 508.00, 7.00), (416667, 2550.00, 9.90), ('inf', 39675.00, 11.80)),
'quarterly': ((5000, 0.0, 1.50), (12500, 75.00, 2.00), (17500, 225.00, 2.70), (20000, 360.00, 3.9), (37500, 397.50, 6.10), (125000, 1525.00, 7.00), (1250000, 7650.00, 9.90), ('inf', 119025.00, 11.80)),
'semi-annual': ((10000, 0.0, 1.50), (25000, 150.00, 2.00), (35000, 450.00, 2.70), (40000, 720.00, 3.9), (75000, 915.00, 6.10), (250000, 3050.00, 7.00), (2500000, 15300.00, 9.90), ('inf', 238050.00, 11.80)),
'annual': ((20000, 0.0, 1.50), (50000, 300.00, 2.00), (70000, 900.00, 2.70), (80000, 1440.00, 3.9), (150000, 1830.00, 6.10), (500000, 6100.00, 7.00), (5000000, 30600.00, 9.90), ('inf', 476100.00, 11.80)),
},
'C': {
'weekly': ((385, 0.0, 1.50), (769, 5.77, 2.30), (962, 14.62, 2.80), (1154, 20.00, 3.50), (2885, 26.73, 5.60), (9615, 123.65, 6.60), (96154, 567.88, 9.90), ('inf', 9135.19, 11.80)),
'bi-weekly': ((769, 0.0, 1.50), (1538, 11.54, 2.30), (1923, 29.23, 2.80), (2308, 40.00, 3.50), (5769, 53.46, 5.60), (19231, 247.31, 6.60), (192308, 1135.77, 9.90), ('inf', 18270.38, 11.80)),
'semi-monthly': ((833, 0.0, 1.50), (1667, 12.50, 2.30), (2083, 31.67, 2.80), (2500, 43.33, 3.50), (6250, 57.92, 5.60), (20833, 267.92, 6.60), (208333, 1230.42, 9.90), ('inf', 19792.92, 11.80)),
'monthly': ((1667, 0.0, 1.50), (3333, 25.00, 2.30), (4167, 63.33, 2.80), (5000, 86.67, 3.50), (12500, 115.83, 5.60), (41667, 535.85, 6.60), (416667, 2460.83, 9.90), ('inf', 39585.83, 11.80)),
'quarterly': ((5000, 0.0, 1.50), (10000, 75.00, 2.30), (12500, 190.00, 2.80), (15000, 260.00, 3.50), (37500, 347.50, 5.60), (125000, 1607.50, 6.60), (1250000, 7382.50, 9.90), ('inf', 118757.50, 11.80)),
'semi-annual': ((10000, 0.0, 1.50), (20000, 150.00, 2.30), (25000, 380.00, 2.80), (30000, 520.00, 3.50), (75000, 695.00, 5.60), (250000, 3215.00, 6.60), (2500000, 14765.00, 9.90), ('inf', 237515.00, 11.80)),
'annual': ((20000, 0.0, 1.50), (40000, 300.00, 2.30), (50000, 760.00, 2.80), (60000, 1040.00, 3.50), (150000, 1390.00, 5.60), (500000, 6430.00, 6.60), (5000000, 29530.00, 9.90), ('inf', 475030.00, 11.80)),
},
'D': {
'weekly': ((385, 0.0, 1.50), (769, 5.77, 2.70), (962, 16.15, 3.40), (1154, 22.69, 4.30), (2885, 30.96, 5.60), (9615, 127.88, 6.50), (96154, 565.38, 9.90), ('inf', 9132.69, 11.80)),
'bi-weekly': ((769, 0.0, 1.50), (1538, 11.54, 2.70), (1923, 32.31, 3.40), (2308, 45.38, 4.30), (5769, 61.92, 5.60), (19231, 255.77, 6.50), (192308, 1130.77, 9.90), ('inf', 18265.38, 11.80)),
'semi-monthly': ((833, 0.0, 1.50), (1667, 12.50, 2.70), (2083, 35.00, 3.40), (2500, 49.17, 4.30), (6250, 67.08, 5.60), (20833, 277.08, 6.50), (208333, 1225.00, 9.90), ('inf', 19787.50, 11.80)),
'monthly': ((1667, 0.0, 1.50), (3333, 25.00, 2.70), (4167, 70.00, 3.40), (5000, 98.33, 4.00), (12500, 134.17, 5.60), (41667, 554.17, 6.50), (416667, 2450.00, 9.90), ('inf', 39575.00, 11.80)),
'quarterly': ((5000, 0.0, 1.50), (10000, 75.00, 2.07), (12500, 210.00, 3.40), (15000, 295.00, 4.30), (37500, 402.50, 5.60), (125000, 1662.50, 6.50), (1250000, 7350.00, 9.90), ('inf', 118725.00, 11.80)),
'semi-annual': ((10000, 0.0, 1.50), (20000, 150.00, 2.70), (25000, 420.00, 3.40), (30000, 590.00, 4.30), (75000, 805.00, 5.60), (250000, 3325.00, 6.50), (2500000, 14700.00, 9.90), ('inf', 237450.00, 11.80)),
'annual': ((20000, 0.0, 1.50), (40000, 300.00, 2.70), (50000, 840.00, 3.40), (60000, 1180.00, 4.30), (150000, 1610.00, 5.60), (250000, 6650.00, 6.50), (2500000, 29400.00, 9.90), ('inf', 474900.00, 11.80)),
},
'E': {
'weekly': ((385, 0.0, 1.50), (673, 5.77, 2.00), (1923, 11.54, 5.80), (9615, 84.04, 6.50), (96154, 584.04, 9.90), ('inf', 9151.35, 11.80)),
'bi-weekly': ((769, 0.0, 1.50), (1346, 12.00, 2.00), (3846, 23.00, 5.80), (19231, 168.00, 6.50), (192308, 1168.00, 9.90), ('inf', 18303.00, 11.80)),
'semi-monthly': ((833, 0.0, 1.50), (1458, 13.00, 2.00), (4167, 25.00, 5.80), (20833, 182.00, 6.50), (208333, 1265.00, 9.90), ('inf', 19828.00, 11.80)),
'monthly': ((1667, 0.0, 1.50), (2916, 25.00, 2.00), (8333, 50.00, 5.80), (41667, 364.00, 6.50), (416667, 2531.00, 9.90), ('inf', 39656, 11.80)),
'quarterly': ((5000, 0.0, 1.50), (8750, 75.00, 2.00), (25000, 150.00, 5.80), (125000, 1092.50, 6.50), (1250000, 7592.50, 9.90), ('inf', 118967.50, 11.80)),
'semi-annual': ((10000, 0.0, 1.50), (17500, 150.00, 2.00), (50000, 300.00, 5.80), (250000, 2185.00, 6.50), (2500000, 15185.00, 9.90), ('inf', 237935.00, 11.80)),
'annual': ((20000, 0.0, 1.50), (35000, 300.00, 2.00), (100000, 600.00, 5.80), (500000, 4370.00, 6.50), (5000000, 30370.00, 9.90), ('inf', 475870.00, 11.80)),
},
}</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<data noupdate="1">
<record id="rule_parameter_us_nj_sit_allowance_rate_2019" model="hr.payroll.rate">
<field name="name">US NJ NewJersey SIT Allowance Rate</field>
<field name="code">us_nj_sit_allowance_rate</field>
<field name="parameter_value">{
'weekly': 19.20,
'bi-weekly': 38.40,
'semi-monthly': 41.60,
'monthly': 83.30,
'quarterly': 250.00,
'semi-annual': 500.00,
'annual': 1000.00,
'daily or miscellaneous': 2.70,
}</field>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_nj_sit_allowance_rate_2020" model="hr.payroll.rate">
<field name="name">US NJ NewJersey SIT Allowance Rate</field>
<field name="code">us_nj_sit_allowance_rate</field>
<field name="parameter_value">{
'weekly': 19.20,
'bi-weekly': 38.40,
'semi-monthly': 41.60,
'monthly': 83.30,
'quarterly': 250.00,
'semi-annual': 500.00,
'annual': 1000.00,
'daily or miscellaneous': 2.70,
}</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Partners and Contribution Registers -->
<record id="res_partner_us_nj_dor" model="res.partner">
<field name="name">US New Jersey - Division of Taxation - Unemployment Tax</field>
</record>
<record id="res_partner_us_nj_dor_sit" model="res.partner">
<field name="name">US New Jersey - Division of Taxation - Income Tax</field>
</record>
<record id="contrib_register_us_nj_dor" model="hr.contribution.register">
<field name="name">US New Jersey - Division of Taxation - Unemployment Tax</field>
<field name="partner_id" ref="res_partner_us_nj_dor"/>
</record>
<record id="contrib_register_us_nj_dor_sit" model="hr.contribution.register">
<field name="name">US New Jersey - Division of Taxation - Income Tax</field>
<field name="partner_id" ref="res_partner_us_nj_dor_sit"/>
</record>
<!-- Rules -->
<!-- SUTA -->
<record id="hr_payroll_rule_er_us_nj_suta" model="hr.salary.rule">
<field name="sequence" eval="450"/>
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
<field name="name">ER: US NJ New Jersey State Unemployment</field>
<field name="code">ER_US_NJ_SUTA</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_suta_rate', state_code='NJ')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_suta_rate', state_code='NJ')</field>
<field name="register_id" ref="contrib_register_us_nj_dor"/>
<field name="appears_on_payslip" eval="False"/>
</record>
<record id="hr_payroll_rule_ee_us_nj_suta" model="hr.salary.rule">
<field name="sequence" eval="195"/>
<field name="category_id" ref="hr_payroll_category_ee_us_suta"/>
<field name="name">EE: US NJ New Jersey State Unemployment</field>
<field name="code">EE_US_NJ_SUTA</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_suta_ee_rate', state_code='NJ')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_suta_ee_rate', state_code='NJ')</field>
<field name="register_id" ref="contrib_register_us_nj_dor_sit"/>
<field name="appears_on_payslip" eval="True"/>
</record>
<!-- SDI -->
<record id="hr_payroll_rule_er_us_nj_sdi" model="hr.salary.rule">
<field name="sequence" eval="450"/>
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
<field name="name">ER: US NJ New Jersey State Disability Insurance</field>
<field name="code">ER_US_NJ_SDI</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_sdi_rate', state_code='NJ')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_sdi_rate', state_code='NJ')</field>
<field name="register_id" ref="contrib_register_us_nj_dor"/>
<field name="appears_on_payslip" eval="False"/>
</record>
<record id="hr_payroll_rule_ee_us_nj_sdi" model="hr.salary.rule">
<field name="sequence" eval="195"/>
<field name="category_id" ref="hr_payroll_category_ee_us_suta"/>
<field name="name">EE: US NJ New Jersey State Disability Insurance</field>
<field name="code">EE_US_NJ_SDI</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_sdi_ee_rate', state_code='NJ')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_sdi_ee_rate', state_code='NJ')</field>
<field name="register_id" ref="contrib_register_us_nj_dor_sit"/>
<field name="appears_on_payslip" eval="True"/>
</record>
<!-- WF -->
<record id="hr_payroll_rule_er_us_nj_wf" model="hr.salary.rule">
<field name="sequence" eval="450"/>
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
<field name="name">ER: US NJ New Jersey Workforce Development</field>
<field name="code">ER_US_NJ_WF</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_wf_rate', state_code='NJ')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_wf_rate', state_code='NJ')</field>
<field name="register_id" ref="contrib_register_us_nj_dor"/>
<field name="appears_on_payslip" eval="False"/>
</record>
<record id="hr_payroll_rule_ee_us_nj_wf" model="hr.salary.rule">
<field name="sequence" eval="195"/>
<field name="category_id" ref="hr_payroll_category_ee_us_suta"/>
<field name="name">EE: US NJ New Jersey Workforce Development</field>
<field name="code">EE_US_NJ_WF</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_wf_ee_rate', state_code='NJ')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_wf_ee_rate', state_code='NJ')</field>
<field name="register_id" ref="contrib_register_us_nj_dor_sit"/>
<field name="appears_on_payslip" eval="True"/>
</record>
<!-- FLI -->
<record id="hr_payroll_rule_er_us_nj_fli" model="hr.salary.rule">
<field name="sequence" eval="450"/>
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
<field name="name">ER: US NJ New Jersey Family Leave Insurance</field>
<field name="code">ER_US_NJ_FLI</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_fli_rate', state_code='NJ')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_fli_rate', state_code='NJ')</field>
<field name="register_id" ref="contrib_register_us_nj_dor"/>
<field name="appears_on_payslip" eval="False"/>
</record>
<record id="hr_payroll_rule_ee_us_nj_fli" model="hr.salary.rule">
<field name="sequence" eval="195"/>
<field name="category_id" ref="hr_payroll_category_ee_us_suta"/>
<field name="name">EE: US NJ New Jersey Family Leave Insurance</field>
<field name="code">EE_US_NJ_FLI</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_fli_ee_rate', state_code='NJ')</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nj_suta_wage_base', rate='us_nj_fli_ee_rate', state_code='NJ')</field>
<field name="register_id" ref="contrib_register_us_nj_dor_sit"/>
<field name="appears_on_payslip" eval="True"/>
</record>
<record id="hr_payroll_rule_ee_us_nj_sit" model="hr.salary.rule">
<field name="sequence" eval="195"/>
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
<field name="name">EE: US NJ New Jersey State Income Tax Withholding</field>
<field name="code">EE_US_NJ_SIT</field>
<field name="condition_select">python</field>
<field name="condition_python">result, _ = nj_newjersey_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result, result_rate = nj_newjersey_state_income_withholding(payslip, categories, worked_days, inputs)</field>
<field name="register_id" ref="contrib_register_us_nj_dor_sit"/>
<field name="appears_on_payslip" eval="True"/>
</record>
</odoo>

View File

@@ -9,11 +9,33 @@ FIELDS_CONTRACT_TO_US_PAYROLL_FORMS_2020 = {
'fica_exempt': 'fed_941_fica_exempt',
'futa_type': 'fed_940_type',
# State
'ar_w4_allowances': 'ar_ar4ec_sit_allowances',
'ar_w4_tax_exempt': 'state_income_tax_exempt',
'ar_w4_additional_wh': 'state_income_tax_additional_withholding',
'az_a4_withholding_percentage': 'az_a4_sit_withholding_percentage',
'az_a4_additional_withholding': 'state_income_tax_additional_withholding',
'ga_g4_filing_status': 'ga_g4_sit_filing_status',
'ga_g4_dependent_allowances': 'ga_g4_sit_dependent_allowances',
'ga_g4_additional_allowances': 'ga_g4_sit_additional_allowances',
'ga_g4_additional_wh': 'state_income_tax_additional_withholding',
'il_w4_basic_allowances': 'il_w4_sit_basic_allowances',
'il_w4_additional_allowances': 'il_w4_sit_additional_allowances',
'il_w4_additional_wh': 'state_income_tax_additional_withholding',
'mi_w4_exemptions': 'mi_w4_sit_exemptions',
'mi_w4_tax_exempt': 'state_income_tax_exempt',
'mi_w4_additional_wh': 'state_income_tax_additional_withholding',
'mn_w4mn_filing_status': 'mn_w4mn_sit_filing_status',
'mn_w4mn_allowances': 'mn_w4mn_sit_allowances',
'mn_w4mn_additional_wh': 'state_income_tax_additional_withholding',
'mo_mow4_filing_status': 'mo_mow4_sit_filing_status',
'mo_mow4_additional_withholding': 'state_income_tax_additional_withholding',
'ms_89_350_filing_status': 'ms_89_350_sit_filing_status',
'ms_89_350_exemption': 'ms_89_350_sit_exemption_value',
'ms_89_350_additional_withholding': 'state_income_tax_additional_withholding',
@@ -22,6 +44,15 @@ FIELDS_CONTRACT_TO_US_PAYROLL_FORMS_2020 = {
'mt_mw4_exemptions': 'mt_mw4_sit_exemptions',
'mt_mw4_exempt': 'mt_mw4_sit_exempt',
'nc_nc4_filing_status': 'nc_nc4_sit_filing_status',
'nc_nc4_allowances': 'nc_nc4_sit_allowances',
'nc_nc4_additional_wh': 'state_income_tax_additional_withholding',
'nj_njw4_filing_status': 'nj_njw4_sit_filing_status',
'nj_njw4_allowances': 'nj_njw4_sit_allowances',
'nj_njw4_rate_table': 'nj_njw4_sit_rate_table',
'nj_additional_withholding': 'state_income_tax_additional_withholding',
'oh_additional_withholding': 'state_income_tax_additional_withholding',
'oh_income_allowances': 'oh_it4_sit_exemptions',
@@ -48,6 +79,16 @@ XMLIDS_TO_REMOVE_2020 = [
'l10n_us_hr_payroll.hr_payroll_rules_futa_wages_2018',
'l10n_us_hr_payroll.hr_payroll_rules_fed_inc_withhold_2018_married',
# State
'l10n_us_ar_hr_payroll.hr_payroll_ar_unemp_wages',
'l10n_us_ar_hr_payroll.hr_payroll_ar_unemp',
'l10n_us_ar_hr_payroll.hr_payroll_ar_income_withhold',
'l10n_us_ar_hr_payroll.hr_payroll_rules_ar_unemp_wages',
'l10n_us_az_hr_payroll.hr_payroll_az_unemp_wages',
'l10n_us_az_hr_payroll.hr_payroll_az_unemp',
'l10n_us_az_hr_payroll.hr_payroll_az_income_withhold',
'l10n_us_az_hr_payroll.hr_payroll_rules_az_unemp_wages',
'l10n_us_fl_hr_payroll.hr_payroll_fl_unemp_wages',
'l10n_us_fl_hr_payroll.hr_payroll_fl_unemp',
'l10n_us_fl_hr_payroll.hr_payroll_rules_fl_unemp_wages_2018',
@@ -57,6 +98,26 @@ XMLIDS_TO_REMOVE_2020 = [
'l10n_us_ga_hr_payroll.hr_payroll_ga_income_withhold',
'l10n_us_ga_hr_payroll.hr_payroll_rules_ga_unemp_wages',
'l10n_us_il_hr_payroll.hr_payroll_il_unemp_wages',
'l10n_us_il_hr_payroll.hr_payroll_il_unemp',
'l10n_us_il_hr_payroll.hr_payroll_il_income_withhold',
'l10n_us_il_hr_payroll.hr_payroll_rules_il_unemp_wages',
'l10n_us_mi_hr_payroll.hr_payroll_mi_unemp_wages',
'l10n_us_mi_hr_payroll.hr_payroll_mi_unemp',
'l10n_us_mi_hr_payroll.hr_payroll_mi_income_withhold',
'l10n_us_mi_hr_payroll.hr_payroll_rules_mi_unemp_wages',
'l10n_us_mn_hr_payroll.hr_payroll_mn_unemp_wages',
'l10n_us_mn_hr_payroll.hr_payroll_mn_unemp',
'l10n_us_mn_hr_payroll.hr_payroll_mn_income_withhold',
'l10n_us_mn_hr_payroll.hr_payroll_rules_mn_unemp_wages',
'l10n_us_mo_hr_payroll.hr_payroll_mo_unemp_wages',
'l10n_us_mo_hr_payroll.hr_payroll_mo_unemp',
'l10n_us_mo_hr_payroll.hr_payroll_mo_income_withhold',
'l10n_us_mo_hr_payroll.hr_payroll_rules_mo_unemp_wages_2018',
'l10n_us_ms_hr_payroll.hr_payroll_ms_unemp_wages',
'l10n_us_ms_hr_payroll.hr_payroll_ms_unemp',
'l10n_us_ms_hr_payroll.hr_payroll_ms_income_withhold',
@@ -67,6 +128,38 @@ XMLIDS_TO_REMOVE_2020 = [
'l10n_us_mt_hr_payroll.hr_payroll_mt_income_withhold',
'l10n_us_mt_hr_payroll.hr_payroll_rules_mt_unemp_wages',
'l10n_us_nc_hr_payroll.hr_payroll_nc_unemp_wages',
'l10n_us_nc_hr_payroll.hr_payroll_nc_unemp',
'l10n_us_nc_hr_payroll.hr_payroll_nc_income_withhold',
'l10n_us_nc_hr_payroll.hr_payroll_rules_nc_unemp_wages_2018',
'l10n_us_nj_hr_payroll.res_partner_njdor_unemp_company',
'l10n_us_nj_hr_payroll.res_partner_njdor_sdi_employee',
'l10n_us_nj_hr_payroll.res_partner_njdor_sdi_company',
'l10n_us_nj_hr_payroll.res_partner_njdor_fli',
'l10n_us_nj_hr_payroll.res_partner_njdor_wf',
'l10n_us_nj_hr_payroll.contrib_register_njdor_unemp_company',
'l10n_us_nj_hr_payroll.contrib_register_njdor_sdi_employee',
'l10n_us_nj_hr_payroll.contrib_register_njdor_sdi_company',
'l10n_us_nj_hr_payroll.contrib_register_njdor_fli',
'l10n_us_nj_hr_payroll.contrib_register_njdor_wf',
'l10n_us_nj_hr_payroll.hr_payroll_nj_unemp_wages',
'l10n_us_nj_hr_payroll.hr_payroll_nj_sdi_wages',
'l10n_us_nj_hr_payroll.hr_payroll_nj_fli_wages',
'l10n_us_nj_hr_payroll.hr_payroll_nj_wf_wages',
'l10n_us_nj_hr_payroll.hr_payroll_nj_unemp_employee',
'l10n_us_nj_hr_payroll.hr_payroll_nj_unemp_company',
'l10n_us_nj_hr_payroll.hr_payroll_nj_sdi_company',
'l10n_us_nj_hr_payroll.hr_payroll_nj_sdi_employee',
'l10n_us_nj_hr_payroll.hr_payroll_nj_fli',
'l10n_us_nj_hr_payroll.hr_payroll_nj_wf',
'l10n_us_nj_hr_payroll.hr_payroll_nj_wf_company',
'l10n_us_nj_hr_payroll.hr_payroll_nj_income_withhold',
'l10n_us_nj_hr_payroll.hr_payroll_rules_nj_unemp_wages_2018',
'l10n_us_nj_hr_payroll.hr_payroll_rules_nj_sdi_wages_2018',
'l10n_us_nj_hr_payroll.hr_payroll_rules_nj_fli_wages_2018',
'l10n_us_nj_hr_payroll.hr_payroll_rules_nj_wf_wages_2018',
'l10n_us_oh_hr_payroll.hr_payroll_oh_unemp_wages',
'l10n_us_oh_hr_payroll.hr_payroll_oh_unemp',
'l10n_us_oh_hr_payroll.hr_payroll_oh_income_withhold',
@@ -115,6 +208,20 @@ XMLIDS_TO_RENAME_2020 = {
'l10n_us_hr_payroll.hr_payroll_rules_fica_comp_m': 'l10n_us_hr_payroll.hr_payroll_rule_er_fed_941_m',
'l10n_us_hr_payroll.hr_payroll_rules_fed_inc_withhold_2018_single': 'l10n_us_hr_payroll.hr_payroll_rule_ee_fed_941_fit',
# State
'l10n_us_ar_hr_payroll.res_partner_ar_dws_unemp': 'l10n_us_hr_payroll.res_partner_us_ar_dor',
'l10n_us_ar_hr_payroll.res_partner_ar_dfa_withhold': 'l10n_us_hr_payroll.res_partner_us_ar_dor_sit',
'l10n_us_ar_hr_payroll.contrib_register_ar_dws_unemp': 'l10n_us_hr_payroll.contrib_register_us_ar_dor',
'l10n_us_ar_hr_payroll.contrib_register_ar_dfa_withhold': 'l10n_us_hr_payroll.contrib_register_us_ar_dor_sit',
'l10n_us_ar_hr_payroll.hr_payroll_rules_ar_unemp': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_ar_suta',
'l10n_us_ar_hr_payroll.hr_payroll_rules_ar_inc_withhold': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_ar_sit',
'l10n_us_az_hr_payroll.res_partner_az_des_unemp': 'l10n_us_hr_payroll.res_partner_us_az_dor',
'l10n_us_az_hr_payroll.res_partner_az_dor_withhold': 'l10n_us_hr_payroll.res_partner_us_az_dor_sit',
'l10n_us_az_hr_payroll.contrib_register_az_des_unemp': 'l10n_us_hr_payroll.contrib_register_us_az_dor',
'l10n_us_az_hr_payroll.contrib_register_az_dor_withhold': 'l10n_us_hr_payroll.contrib_register_us_az_dor_sit',
'l10n_us_az_hr_payroll.hr_payroll_az_unemp': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_az_suta',
'l10n_us_az_hr_payroll.hr_payroll_az_income_withhold': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_az_sit',
'l10n_us_fl_hr_payroll.hr_payroll_rules_fl_unemp_2018': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_fl_suta',
'l10n_us_fl_hr_payroll.res_partner_fldor': 'l10n_us_hr_payroll.res_partner_us_fl_dor',
'l10n_us_fl_hr_payroll.contrib_register_fldor': 'l10n_us_hr_payroll.contrib_register_us_fl_dor',
@@ -126,6 +233,34 @@ XMLIDS_TO_RENAME_2020 = {
'l10n_us_ga_hr_payroll.hr_payroll_rules_ga_unemp': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_ga_suta',
'l10n_us_ga_hr_payroll.hr_payroll_rules_ga_inc_withhold': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_ga_sit',
'l10n_us_il_hr_payroll.res_partner_il_des_unemp': 'l10n_us_hr_payroll.res_partner_us_il_dor',
'l10n_us_il_hr_payroll.res_partner_il_dor_withhold': 'l10n_us_hr_payroll.res_partner_us_il_dor_sit',
'l10n_us_il_hr_payroll.contrib_register_il_des_unemp': 'l10n_us_hr_payroll.contrib_register_us_il_dor',
'l10n_us_il_hr_payroll.contrib_register_il_dor_withhold': 'l10n_us_hr_payroll.contrib_register_us_il_dor_sit',
'l10n_us_il_hr_payroll.hr_payroll_rules_il_unemp': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_il_suta',
'l10n_us_il_hr_payroll.hr_payroll_rules_il_inc_withhold': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_il_sit',
'l10n_us_mi_hr_payroll.res_partner_mi_uia_unemp': 'l10n_us_hr_payroll.res_partner_us_mi_dor',
'l10n_us_mi_hr_payroll.res_partner_mi_dot_withhold': 'l10n_us_hr_payroll.res_partner_us_mi_dor_sit',
'l10n_us_mi_hr_payroll.contrib_register_mi_uia_unemp': 'l10n_us_hr_payroll.contrib_register_us_mi_dor',
'l10n_us_mi_hr_payroll.contrib_register_mi_dot_withhold': 'l10n_us_hr_payroll.contrib_register_us_mi_dor_sit',
'l10n_us_mi_hr_payroll.hr_payroll_rules_mi_unemp': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_mi_suta',
'l10n_us_mi_hr_payroll.hr_payroll_rules_mi_inc_withhold': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_mi_sit',
'l10n_us_mn_hr_payrol.res_partner_mn_ui_unemp': 'l10n_us_hr_payroll.res_partner_us_mn_dor',
'l10n_us_mn_hr_payrol.res_partner_mn_dor_withhold': 'l10n_us_hr_payroll.res_partner_us_mn_dor_sit',
'l10n_us_mn_hr_payrol.contrib_register_mn_ui_unemp': 'l10n_us_hr_payroll.contrib_register_us_mn_dor',
'l10n_us_mn_hr_payrol.contrib_register_mn_dor_withhold': 'l10n_us_hr_payroll.contrib_register_us_mn_dor_sit',
'l10n_us_mn_hr_payrol.hr_payroll_rules_mn_unemp': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_mn_suta',
'l10n_us_mn_hr_payrol.hr_payroll_rules_mn_inc_withhold': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_mn_sit',
'l10n_us_mo_hr_payroll.res_partner_modor_unemp': 'l10n_us_hr_payroll.res_partner_us_mo_dor',
'l10n_us_mo_hr_payroll.res_partner_modor_withhold': 'l10n_us_hr_payroll.res_partner_us_mo_dor_sit',
'l10n_us_mo_hr_payroll.contrib_register_modor_unemp': 'l10n_us_hr_payroll.contrib_register_us_mo_dor',
'l10n_us_mo_hr_payroll.contrib_register_modor_withhold': 'l10n_us_hr_payroll.contrib_register_us_mo_dor_sit',
'l10n_us_mo_hr_payroll.hr_payroll_rules_mo_unemp_2018': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_mo_suta',
'l10n_us_mo_hr_payroll.hr_payroll_rules_mo_inc_withhold_2018': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_mo_sit',
'l10n_us_ms_hr_payroll.res_partner_msdor_unemp': 'l10n_us_hr_payroll.res_partner_us_ms_dor',
'l10n_us_ms_hr_payroll.res_partner_msdor_withhold': 'l10n_us_hr_payroll.res_partner_us_ms_dor_sit',
'l10n_us_ms_hr_payroll.contrib_register_msdor_unemp': 'l10n_us_hr_payroll.contrib_register_us_ms_dor',
@@ -140,6 +275,26 @@ XMLIDS_TO_RENAME_2020 = {
'l10n_us_mt_hr_payroll.hr_payroll_rules_mt_unemp': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_mt_suta',
'l10n_us_mt_hr_payroll.hr_payroll_rules_mt_inc_withhold': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_mt_sit',
'l10n_us_nc_hr_payroll.res_partner_ncdor_unemp':'l10n_us_hr_payroll.res_partner_us_nc_dor',
'l10n_us_nc_hr_payroll.res_partner_ncdor_withhold': 'l10n_us_hr_payroll.res_partner_us_nc_dor_sit',
'l10n_us_nc_hr_payroll.contrib_register_ncdor_unemp': 'l10n_us_hr_payroll.contrib_register_us_nc_dor',
'l10n_us_nc_hr_payroll.contrib_register_ncdor_withhold': 'l10n_us_hr_payroll.contrib_register_us_nc_dor_sit',
'l10n_us_nc_hr_payroll.hr_payroll_rules_nc_unemp_2018': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_nc_suta',
'l10n_us_nc_hr_payroll.hr_payroll_rules_nc_inc_withhold_2018': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_nc_sit',
'l10n_us_nj_hr_payroll.res_partner_njdor_unemp_employee': 'l10n_us_hr_payroll.res_partner_us_nj_dor',
'l10n_us_nj_hr_payroll.res_partner_njdor_withhold': 'l10n_us_hr_payroll.res_partner_us_nj_dor_sit',
'l10n_us_nj_hr_payroll.contrib_register_njdor_unemp_employee': 'l10n_us_hr_payroll.contrib_register_us_nj_dor',
'l10n_us_nj_hr_payroll.contrib_register_njdor_withhold': 'l10n_us_hr_payroll.contrib_register_us_nj_dor_sit',
'l10n_us_nj_hr_payroll.hr_payroll_rules_nj_unemp_employee_2018': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_nj_suta',
'l10n_us_nj_hr_payroll.hr_payroll_rules_nj_unemp_company_2018': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_nj_suta',
'l10n_us_nj_hr_payroll.hr_payroll_rules_nj_sdi_employee_2018': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_nj_sdi',
'l10n_us_nj_hr_payroll.hr_payroll_rules_nj_sdi_company_2018': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_nj_sdi',
'l10n_us_nj_hr_payroll.hr_payroll_rules_nj_fli_2018': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_nj_fli',
'l10n_us_nj_hr_payroll.hr_payroll_rules_nj_wf_2018': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_nj_wf',
'l10n_us_nj_hr_payroll.hr_payroll_rules_nj_wf_er': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_nj_wf',
'l10n_us_nj_hr_payroll.hr_payroll_rules_nj_inc_withhold_2018': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_nj_sit',
'l10n_us_oh_hr_payroll.res_partner_ohdor_unemp': 'l10n_us_hr_payroll.res_partner_us_oh_dor',
'l10n_us_oh_hr_payroll.res_partner_ohdor_withhold': 'l10n_us_hr_payroll.res_partner_us_oh_dor_sit',
'l10n_us_oh_hr_payroll.res_partner_ohdor_unemp': 'l10n_us_hr_payroll.res_partner_us_oh_dor',
@@ -182,6 +337,9 @@ XMLIDS_COPY_ACCOUNTING_2020 = {
'l10n_us_hr_payroll.hr_payroll_rule_er_us_mt_suta': [
'l10n_us_hr_payroll.hr_payroll_rule_er_us_mt_suta_aft',
],
'l10n_us_hr_payroll.hr_payroll_rule_er_us_nj_wf': [
'l10n_us_hr_payroll.hr_payroll_rule_er_us_nj_fli',
],
'l10n_us_hr_payroll.hr_payroll_rule_er_us_wa_lni': [
'l10n_us_hr_payroll.hr_payroll_rule_er_us_wa_fml',
],

View File

@@ -1,9 +1,53 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
def futa_wage(payslip, categories):
"""
Returns FUTA eligible wage for current Payslip (no wage_base, just by categories)
WAGE = GROSS - ALW_FUTA_EXEMPT + DED_FUTA_EXEMPT
:return: wage
"""
wage = categories.GROSS
wage -= categories.ALW_FUTA_EXEMPT + \
categories.ALW_FIT_FUTA_EXEMPT + \
categories.ALW_FIT_FICA_FUTA_EXEMPT + \
categories.ALW_FICA_FUTA_EXEMPT
wage += categories.DED_FUTA_EXEMPT + \
categories.DED_FIT_FUTA_EXEMPT + \
categories.DED_FIT_FICA_FUTA_EXEMPT + \
categories.DED_FICA_FUTA_EXEMPT
return wage
def futa_wage_ytd(payslip, categories):
"""
Returns Year to Date FUTA eligible wages
WAGE = GROSS - ALW_FUTA_EXEMPT + DED_FUTA_EXEMPT
:return: wage
"""
year = payslip.dict.get_year()
ytd_wage = payslip.sum_category('GROSS', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage -= payslip.sum_category('ALW_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('ALW_FIT_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('ALW_FIT_FICA_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('ALW_FICA_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage += payslip.sum_category('DED_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('DED_FIT_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('DED_FIT_FICA_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('DED_FICA_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage += payslip.dict.contract_id.external_wages
return ytd_wage
def er_us_940_futa(payslip, categories, worked_days, inputs):
"""
Returns FUTA eligible wage and rate.
WAGE = GROSS + DED_FUTA_EXEMPT
:return: result, result_rate (wage, percent)
"""
@@ -17,16 +61,14 @@ def er_us_940_futa(payslip, categories, worked_days, inputs):
result_rate = -payslip.dict.rule_parameter('fed_940_futa_rate_normal')
# Determine Wage
year = payslip.dict.get_year()
ytd_wage = payslip.sum_category('GROSS', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage += payslip.sum_category('DED_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage += payslip.dict.contract_id.external_wages
wage = futa_wage(payslip, categories)
if not wage:
return 0.0, 0.0
ytd_wage = futa_wage_ytd(payslip, categories)
wage_base = payslip.dict.rule_parameter('fed_940_futa_wage_base')
remaining = wage_base - ytd_wage
wage = categories.GROSS + categories.DED_FUTA_EXEMPT
if remaining < 0.0:
result = 0.0
elif remaining < wage:

View File

@@ -4,10 +4,53 @@
# _logger = logging.getLogger(__name__)
def fica_wage(payslip, categories):
"""
Returns FICA eligible wage for current Payslip (no wage_base, just by categories)
WAGE = GROSS - ALW_FICA_EXEMPT + DED_FICA_EXEMPT
:return: wage
"""
wage = categories.GROSS
wage -= categories.ALW_FICA_EXEMPT + \
categories.ALW_FIT_FICA_EXEMPT + \
categories.ALW_FIT_FICA_FUTA_EXEMPT + \
categories.ALW_FICA_FUTA_EXEMPT
wage += categories.DED_FICA_EXEMPT + \
categories.DED_FIT_FICA_EXEMPT + \
categories.DED_FIT_FICA_FUTA_EXEMPT + \
categories.DED_FICA_FUTA_EXEMPT
return wage
def fica_wage_ytd(payslip, categories):
"""
Returns Year to Date FICA eligible wages
WAGE = GROSS - ALW_FICA_EXEMPT + DED_FICA_EXEMPT
:return: wage
"""
year = payslip.dict.get_year()
ytd_wage = payslip.sum_category('GROSS', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage -= payslip.sum_category('ALW_FICA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('ALW_FIT_FICA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('ALW_FIT_FICA_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('ALW_FICA_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage += payslip.sum_category('DED_FICA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('DED_FIT_FICA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('DED_FIT_FICA_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('DED_FICA_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage += payslip.dict.contract_id.external_wages
return ytd_wage
def ee_us_941_fica_ss(payslip, categories, worked_days, inputs):
"""
Returns FICA Social Security eligible wage and rate.
WAGE = GROSS + DED_FICA_EXEMPT
:return: result, result_rate (wage, percent)
"""
exempt = payslip.dict.contract_id.us_payroll_config_value('fed_941_fica_exempt')
@@ -18,16 +61,14 @@ def ee_us_941_fica_ss(payslip, categories, worked_days, inputs):
result_rate = -payslip.dict.rule_parameter('fed_941_fica_ss_rate')
# Determine Wage
year = payslip.dict.get_year()
ytd_wage = payslip.sum_category('GROSS', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage += payslip.sum_category('DED_FICA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage += payslip.dict.contract_id.external_wages
wage = fica_wage(payslip, categories)
if not wage:
return 0.0, 0.0
ytd_wage = fica_wage_ytd(payslip, categories)
wage_base = payslip.dict.rule_parameter('fed_941_fica_ss_wage_base')
remaining = wage_base - ytd_wage
wage = categories.GROSS + categories.DED_FICA_EXEMPT
if remaining < 0.0:
result = 0.0
elif remaining < wage:
@@ -44,7 +85,6 @@ er_us_941_fica_ss = ee_us_941_fica_ss
def ee_us_941_fica_m(payslip, categories, worked_days, inputs):
"""
Returns FICA Medicare eligible wage and rate.
WAGE = GROSS + DED_FICA_EXEMPT
:return: result, result_rate (wage, percent)
"""
exempt = payslip.dict.contract_id.us_payroll_config_value('fed_941_fica_exempt')
@@ -55,16 +95,14 @@ def ee_us_941_fica_m(payslip, categories, worked_days, inputs):
result_rate = -payslip.dict.rule_parameter('fed_941_fica_m_rate')
# Determine Wage
year = payslip.dict.get_year()
ytd_wage = payslip.sum_category('GROSS', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage += payslip.sum_category('DED_FICA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage += payslip.dict.contract_id.external_wages
wage = fica_wage(payslip, categories)
if not wage:
return 0.0, 0.0
ytd_wage = fica_wage_ytd(payslip, categories)
wage_base = float(payslip.dict.rule_parameter('fed_941_fica_m_wage_base')) # inf
remaining = wage_base - ytd_wage
wage = categories.GROSS + categories.DED_FICA_EXEMPT
if remaining < 0.0:
result = 0.0
elif remaining < wage:
@@ -81,8 +119,6 @@ er_us_941_fica_m = ee_us_941_fica_m
def ee_us_941_fica_m_add(payslip, categories, worked_days, inputs):
"""
Returns FICA Medicare Additional eligible wage and rate.
Note that this wage is not capped like the above rules.
WAGE = GROSS - WAGE_FICA_EXEMPT
:return: result, result_rate (wage, percent)
"""
exempt = payslip.dict.contract_id.us_payroll_config_value('fed_941_fica_exempt')
@@ -93,16 +129,14 @@ def ee_us_941_fica_m_add(payslip, categories, worked_days, inputs):
result_rate = -payslip.dict.rule_parameter('fed_941_fica_m_add_rate')
# Determine Wage
year = payslip.dict.get_year()
ytd_wage = payslip.sum_category('GROSS', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage += payslip.sum_category('DED_FICA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage += payslip.dict.contract_id.external_wages
wage = fica_wage(payslip, categories)
if not wage:
return 0.0, 0.0
ytd_wage = fica_wage_ytd(payslip, categories)
wage_start = payslip.dict.rule_parameter('fed_941_fica_m_add_wage_start')
existing_wage = ytd_wage - wage_start
wage = categories.GROSS + categories.DED_FICA_EXEMPT
if existing_wage >= 0.0:
result = wage
elif wage + existing_wage > 0.0:
@@ -113,11 +147,54 @@ def ee_us_941_fica_m_add(payslip, categories, worked_days, inputs):
return result, result_rate
def fit_wage(payslip, categories):
"""
Returns FIT eligible wage for current Payslip (no wage_base, just by categories)
WAGE = GROSS - ALW_FIT_EXEMPT + DED_FIT_EXEMPT
:return: wage
"""
wage = categories.GROSS
wage -= categories.ALW_FIT_EXEMPT + \
categories.ALW_FIT_FICA_EXEMPT + \
categories.ALW_FIT_FICA_FUTA_EXEMPT + \
categories.ALW_FIT_FUTA_EXEMPT
wage += categories.DED_FIT_EXEMPT + \
categories.DED_FIT_FICA_EXEMPT + \
categories.DED_FIT_FICA_FUTA_EXEMPT + \
categories.DED_FIT_FUTA_EXEMPT
return wage
def fit_wage_ytd(payslip, categories):
"""
Returns Year to Date FIT eligible wages
WAGE = GROSS - ALW_FIT_EXEMPT + DED_FIT_EXEMPT
:return: wage
"""
year = payslip.dict.get_year()
ytd_wage = payslip.sum_category('GROSS', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage -= payslip.sum_category('ALW_FIT_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('ALW_FIT_FICA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('ALW_FIT_FICA_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('ALW_FIT_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage += payslip.sum_category('DED_FIT_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('DED_FIT_FICA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('DED_FIT_FICA_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01') + \
payslip.sum_category('DED_FIT_FUTA_EXEMPT', str(year) + '-01-01', str(year+1) + '-01-01')
ytd_wage += payslip.dict.contract_id.external_wages
return ytd_wage
# Federal Income Tax
def ee_us_941_fit(payslip, categories, worked_days, inputs):
"""
Returns Wage and rate that is computed given the amount to withhold.
WAGE = GROSS + DED_FIT_EXEMPT
:return: result, result_rate (wage, percent)
"""
filing_status = payslip.dict.contract_id.us_payroll_config_value('fed_941_fit_w4_filing_status')
@@ -125,7 +202,8 @@ def ee_us_941_fit(payslip, categories, worked_days, inputs):
return 0.0, 0.0
schedule_pay = payslip.dict.contract_id.schedule_pay
wage = categories.GROSS + categories.DED_FIT_EXEMPT
wage = fit_wage(payslip, categories)
#_logger.warn('initial gross wage: ' + str(wage))
year = payslip.dict.get_year()
if year >= 2020:

View File

@@ -14,9 +14,17 @@ from .federal.fed_941 import ee_us_941_fica_ss, \
from .state.general import general_state_unemployment, \
general_state_income_withholding, \
is_us_state
from .state.ar_arkansas import ar_arkansas_state_income_withholding
from .state.az_arizona import az_arizona_state_income_withholding
from .state.ga_georgia import ga_georgia_state_income_withholding
from .state.il_illinois import il_illinois_state_income_withholding
from .state.mi_michigan import mi_michigan_state_income_withholding
from .state.mn_minnesota import mn_minnesota_state_income_withholding
from .state.mo_missouri import mo_missouri_state_income_withholding
from .state.ms_mississippi import ms_mississippi_state_income_withholding
from .state.mt_montana import mt_montana_state_income_withholding
from .state.nc_northcarolina import nc_northcarolina_state_income_withholding
from .state.nj_newjersey import nj_newjersey_state_income_withholding
from .state.oh_ohio import oh_ohio_state_income_withholding
from .state.va_virginia import va_virginia_state_income_withholding
from .state.wa_washington import wa_washington_fml_er, \
@@ -53,9 +61,17 @@ class HRPayslip(models.Model):
'general_state_unemployment': general_state_unemployment,
'general_state_income_withholding': general_state_income_withholding,
'is_us_state': is_us_state,
'ar_arkansas_state_income_withholding': ar_arkansas_state_income_withholding,
'az_arizona_state_income_withholding': az_arizona_state_income_withholding,
'ga_georgia_state_income_withholding': ga_georgia_state_income_withholding,
'il_illinois_state_income_withholding': il_illinois_state_income_withholding,
'mi_michigan_state_income_withholding': mi_michigan_state_income_withholding,
'mn_minnesota_state_income_withholding': mn_minnesota_state_income_withholding,
'mo_missouri_state_income_withholding': mo_missouri_state_income_withholding,
'ms_mississippi_state_income_withholding': ms_mississippi_state_income_withholding,
'mt_montana_state_income_withholding': mt_montana_state_income_withholding,
'nc_northcarolina_state_income_withholding': nc_northcarolina_state_income_withholding,
'nj_newjersey_state_income_withholding': nj_newjersey_state_income_withholding,
'oh_ohio_state_income_withholding': oh_ohio_state_income_withholding,
'va_virginia_state_income_withholding': va_virginia_state_income_withholding,
'wa_washington_fml_er': wa_washington_fml_er,

View File

@@ -0,0 +1,47 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .general import _state_applies, sit_wage
def ar_arkansas_state_income_withholding(payslip, categories, worked_days, inputs):
"""
Returns SIT eligible wage and rate.
:return: result, result_rate (wage, percent)
"""
state_code = 'AR'
if not _state_applies(payslip, state_code):
return 0.0, 0.0
if payslip.dict.contract_id.us_payroll_config_value('state_income_tax_exempt'):
return 0.0, 0.0
# Determine Wage
wage = sit_wage(payslip, categories)
if wage == 0.0:
return 0.0, 0.0
pay_periods = payslip.dict.get_pay_periods_in_year()
additional = payslip.dict.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
sit_tax_rate = payslip.dict.rule_parameter('us_ar_sit_tax_rate')
standard_deduction = payslip.dict.rule_parameter('us_ar_sit_standard_deduction_rate')
allowances = payslip.dict.contract_id.us_payroll_config_value('ar_ar4ec_sit_allowances')
allowances_amt = allowances * 26.0
taxable_income = (wage * pay_periods) - standard_deduction
if taxable_income < 87001.0:
taxable_income = (taxable_income // 50) * 50.0 + 50.0
withholding = 0.0
for row in sit_tax_rate:
cap, rate, adjust_amount = row
cap = float(cap)
if cap > taxable_income:
withholding = (((rate / 100.0) * taxable_income) - adjust_amount) - allowances_amt
break
# In case withholding or taxable_income is negative
withholding = max(withholding, 0.0)
withholding = round(withholding / pay_periods)
withholding += additional
return wage, -((withholding / wage) * 100.0)

View File

@@ -0,0 +1,35 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .general import _state_applies, sit_wage
def az_arizona_state_income_withholding(payslip, categories, worked_days, inputs):
"""
Returns SIT eligible wage and rate.
WAGE = GROSS + DED_FIT_EXEMPT
:return: result, result_rate (wage, percent)
"""
state_code = 'AZ'
if not _state_applies(payslip, state_code):
return 0.0, 0.0
# Determine Wage
wage = sit_wage(payslip, categories)
if not wage:
return 0.0, 0.0
schedule_pay = payslip.dict.contract_id.schedule_pay
additional = payslip.dict.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
withholding_percent = payslip.dict.contract_id.us_payroll_config_value('az_a4_sit_withholding_percentage')
if withholding_percent <= 0.0:
return 0.0, 0.0
wh_percentage = withholding_percent / 100.0
withholding = wage * wh_percentage
if withholding < 0.0:
withholding = 0.0
withholding += additional
return wage, -((withholding / wage) * 100.0)

View File

@@ -1,12 +1,11 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .general import _state_applies
from .general import _state_applies, sit_wage
def ga_georgia_state_income_withholding(payslip, categories, worked_days, inputs):
"""
Returns SIT eligible wage and rate.
WAGE = GROSS + DED_FIT_EXEMPT
:return: result, result_rate (wage, percent)
"""
@@ -18,7 +17,10 @@ def ga_georgia_state_income_withholding(payslip, categories, worked_days, inputs
return 0.0, 0.0
# Determine Wage
wage = categories.GROSS + categories.DED_FIT_EXEMPT
wage = sit_wage(payslip, categories)
if not wage:
return 0.0, 0.0
schedule_pay = payslip.dict.contract_id.schedule_pay
additional = payslip.dict.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
dependent_allowances = payslip.dict.contract_id.us_payroll_config_value('ga_g4_sit_dependent_allowances')
@@ -27,10 +29,7 @@ def ga_georgia_state_income_withholding(payslip, categories, worked_days, inputs
personal_allowance = payslip.dict.rule_parameter('us_ga_sit_personal_allowance').get(ga_filing_status, {}).get(schedule_pay)
deduction = payslip.dict.rule_parameter('us_ga_sit_deduction').get(ga_filing_status, {}).get(schedule_pay)
withholding_rate = payslip.dict.rule_parameter('us_ga_sit_rate').get(ga_filing_status, {}).get(schedule_pay)
if not all((dependent_allowance_rate, personal_allowance, deduction, withholding_rate)) or wage == 0.0:
return 0.0, 0.0
if wage == 0.0:
if not all((dependent_allowance_rate, personal_allowance, deduction, withholding_rate)):
return 0.0, 0.0
after_standard_deduction = wage - deduction

View File

@@ -1,9 +1,16 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from odoo.exceptions import UserError
from ..federal.fed_940 import futa_wage, futa_wage_ytd
from ..federal.fed_941 import fit_wage, fit_wage_ytd
# import logging
# _logger = logging.getLogger(__name__)
suta_wage = futa_wage
suta_wage_ytd = futa_wage_ytd
sit_wage = fit_wage
sit_wage_ytd = fit_wage_ytd
def _state_applies(payslip, state_code):
return state_code == payslip.dict.contract_id.us_payroll_config_value('state_code')
@@ -89,12 +96,12 @@ def general_state_unemployment(payslip, categories, worked_days, inputs, wage_ba
return 0.0, 0.0
# Determine Wage
year = payslip.dict.get_year()
ytd_wage = payslip.sum_category('GROSS', str(year) + '-01-01', str(year + 1) + '-01-01')
ytd_wage += payslip.sum_category('DED_FUTA_EXEMPT', str(year) + '-01-01', str(year + 1) + '-01-01')
ytd_wage += payslip.dict.contract_id.external_wages
wage = suta_wage(payslip, categories)
if not wage:
return 0.0, 0.0
ytd_wage = suta_wage_ytd(payslip, categories)
wage = categories.GROSS + categories.DED_FUTA_EXEMPT
return _general_rate(payslip, wage, ytd_wage, wage_base=wage_base, wage_start=wage_start, rate=rate)
@@ -112,12 +119,8 @@ def general_state_income_withholding(payslip, categories, worked_days, inputs, w
return 0.0, 0.0
# Determine Wage
year = payslip.dict.get_year()
ytd_wage = payslip.sum_category('GROSS', str(year) + '-01-01', str(year + 1) + '-01-01')
ytd_wage += payslip.sum_category('DED_FIT_EXEMPT', str(year) + '-01-01', str(year + 1) + '-01-01')
ytd_wage += payslip.dict.contract_id.external_wages
wage = categories.GROSS + categories.DED_FIT_EXEMPT
ytd_wage = sit_wage_ytd(payslip, categories)
wage = sit_wage(payslip, categories)
result, result_rate = _general_rate(payslip, wage, ytd_wage, wage_base=wage_base, wage_start=wage_start, rate=rate)
additional = payslip.dict.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
if additional:

View File

@@ -0,0 +1,35 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .general import _state_applies, sit_wage
def il_illinois_state_income_withholding(payslip, categories, worked_days, inputs):
"""
Returns SIT eligible wage and rate.
WAGE = GROSS + DED_FIT_EXEMPT
:return: result, result_rate (wage, percent)
"""
state_code = 'IL'
if not _state_applies(payslip, state_code):
return 0.0, 0.0
# Determine Wage
wage = sit_wage(payslip, categories)
if not wage:
return 0.0, 0.0
pay_periods = payslip.dict.get_pay_periods_in_year()
additional = payslip.dict.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
basic_allowances_rate = payslip.dict.rule_parameter('us_il_sit_basic_allowances_rate')
additional_allowances_rate = payslip.dict.rule_parameter('us_il_sit_additional_allowances_rate')
basic_allowances = payslip.dict.contract_id.us_payroll_config_value('il_w4_sit_basic_allowances')
additional_allowances = payslip.dict.contract_id.us_payroll_config_value('il_w4_sit_additional_allowances')
rate = 4.95 / 100.0
withholding = rate * (wage - (((basic_allowances * basic_allowances_rate) + (additional_allowances *
additional_allowances_rate)) / pay_periods))
if withholding < 0.0:
withholding = 0.0
withholding += additional
return wage, -((withholding / wage) * 100.0)

View File

@@ -0,0 +1,35 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .general import _state_applies, sit_wage
def mi_michigan_state_income_withholding(payslip, categories, worked_days, inputs):
"""
Returns SIT eligible wage and rate.
WAGE = GROSS + DED_FIT_EXEMPT
:return: result, result_rate (wage, percent)
"""
state_code = 'MI'
if not _state_applies(payslip, state_code):
return 0.0, 0.0
if payslip.dict.contract_id.us_payroll_config_value('state_income_tax_exempt'):
return 0.0, 0.0
# Determine Wage
wage = sit_wage(payslip, categories)
if not wage:
return 0.0, 0.0
pay_periods = payslip.dict.get_pay_periods_in_year()
additional = payslip.dict.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
exemption_rate = payslip.dict.rule_parameter('us_mi_sit_exemption_rate')
exemption = payslip.dict.contract_id.us_payroll_config_value('mi_w4_sit_exemptions')
annual_exemption = (exemption * exemption_rate) / pay_periods
withholding = ((wage - annual_exemption) * 0.0425)
if withholding < 0.0:
withholding = 0.0
withholding += additional
return wage, -((withholding / wage) * 100.0)

View File

@@ -0,0 +1,44 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .general import _state_applies, sit_wage
def mn_minnesota_state_income_withholding(payslip, categories, worked_days, inputs):
"""
Returns SIT eligible wage and rate.
WAGE = GROSS + DED_FIT_EXEMPT
:return: result, result_rate (wage, percent)
"""
state_code = 'MN'
if not _state_applies(payslip, state_code):
return 0.0, 0.0
filing_status = payslip.dict.contract_id.us_payroll_config_value('mn_w4mn_sit_filing_status')
if not filing_status:
return 0.0, 0.0
# Determine Wage
wage = sit_wage(payslip, categories)
if not wage:
return 0.0, 0.0
pay_periods = payslip.dict.get_pay_periods_in_year()
additional = payslip.dict.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
sit_tax_rate = payslip.dict.rule_parameter('us_mn_sit_tax_rate')[filing_status]
allowances_rate = payslip.dict.rule_parameter('us_mn_sit_allowances_rate')
allowances = payslip.dict.contract_id.us_payroll_config_value('mn_w4mn_sit_allowances')
taxable_income = (wage * pay_periods) - (allowances * allowances_rate)
withholding = 0.0
for row in sit_tax_rate:
cap, subtract_amt, rate, flat_fee = row
cap = float(cap)
if cap > taxable_income:
withholding = ((rate / 100.00) * (taxable_income - subtract_amt)) + flat_fee
break
withholding = round(withholding / pay_periods)
if withholding < 0.0:
withholding = 0.0
withholding += additional
return wage, -((withholding / wage) * 100.0)

View File

@@ -0,0 +1,53 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .general import _state_applies, sit_wage
def mo_missouri_state_income_withholding(payslip, categories, worked_days, inputs):
"""
Returns SIT eligible wage and rate.
WAGE = GROSS + DED_FIT_EXEMPT
:return: result, result_rate (wage, percent)
"""
state_code = 'MO'
if not _state_applies(payslip, state_code):
return 0.0, 0.0
filing_status = payslip.dict.contract_id.us_payroll_config_value('mo_mow4_sit_filing_status')
if not filing_status:
return 0.0, 0.0
# Determine Wage
wage = sit_wage(payslip, categories)
if not wage:
return 0.0, 0.0
reduced_withholding = payslip.contract_id.us_payroll_config_value('mo_mow4_sit_withholding')
if reduced_withholding:
return wage, -((reduced_withholding / wage) * 100.0)
pay_periods = payslip.dict.get_pay_periods_in_year()
additional = payslip.dict.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
sit_table = payslip.dict.rule_parameter('us_mo_sit_rate')
deduction = payslip.dict.rule_parameter('us_mo_sit_deduction')[filing_status]
gross_taxable_income = wage * pay_periods
gross_taxable_income -= deduction
remaining_taxable_income = gross_taxable_income
withholding = 0.0
for amt, rate in sit_table:
amt = float(amt)
rate = rate / 100.0
if (remaining_taxable_income - amt) > 0.0 or (remaining_taxable_income - amt) == 0.0:
withholding += rate * amt
else:
withholding += rate * remaining_taxable_income
break
remaining_taxable_income = remaining_taxable_income - amt
withholding /= pay_periods
withholding += additional
withholding = round(withholding)
return wage, -((withholding / wage) * 100.0)

View File

@@ -1,6 +1,6 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .general import _state_applies
from .general import _state_applies, sit_wage
def ms_mississippi_state_income_withholding(payslip, categories, worked_days, inputs):
@@ -19,8 +19,8 @@ def ms_mississippi_state_income_withholding(payslip, categories, worked_days, in
return 0.0, 0.0
# Determine Wage
wage = categories.GROSS + categories.DED_FIT_EXEMPT
if wage == 0.0:
wage = sit_wage(payslip, categories)
if not wage:
return 0.0, 0.0
pay_periods = payslip.dict.get_pay_periods_in_year()

View File

@@ -1,6 +1,6 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .general import _state_applies
from .general import _state_applies, sit_wage
def mt_montana_state_income_withholding(payslip, categories, worked_days, inputs):
@@ -18,13 +18,16 @@ def mt_montana_state_income_withholding(payslip, categories, worked_days, inputs
return 0.0, 0.0
# Determine Wage
wage = categories.GROSS + categories.DED_FIT_EXEMPT
wage = sit_wage(payslip, categories)
if not wage:
return 0.0, 0.0
schedule_pay = payslip.dict.contract_id.schedule_pay
additional = payslip.dict.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
exemptions = payslip.dict.contract_id.us_payroll_config_value('mt_mw4_sit_exemptions')
exemption_rate = payslip.dict.rule_parameter('us_mt_sit_exemption_rate').get(schedule_pay)
withholding_rate = payslip.dict.rule_parameter('us_mt_sit_rate').get(schedule_pay)
if not exemption_rate or not withholding_rate or wage == 0.0:
if not exemption_rate or not withholding_rate:
return 0.0, 0.0
adjusted_wage = wage - (exemption_rate * (exemptions or 0))

View File

@@ -0,0 +1,38 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .general import _state_applies, sit_wage
def nc_northcarolina_state_income_withholding(payslip, categories, worked_days, inputs):
"""
Returns SIT eligible wage and rate.
WAGE = GROSS + DED_FIT_EXEMPT
:return: result, result_rate (wage, percent)
"""
state_code = 'NC'
if not _state_applies(payslip, state_code):
return 0.0, 0.0
filing_status = payslip.dict.contract_id.us_payroll_config_value('nc_nc4_sit_filing_status')
if not filing_status:
return 0.0, 0.0
# Determine Wage
wage = sit_wage(payslip, categories)
if not wage:
return 0.0, 0.0
schedule_pay = payslip.dict.contract_id.schedule_pay
additional = payslip.dict.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
allowances = payslip.dict.contract_id.us_payroll_config_value('nc_nc4_sit_allowances')
allowances_rate = payslip.dict.rule_parameter('us_nc_sit_allowance_rate').get(schedule_pay)['allowance']
deduction = payslip.dict.rule_parameter('us_nc_sit_allowance_rate').get(schedule_pay)['standard_deduction'] if filing_status != 'head_household' else payslip.dict.rule_parameter('us_nc_sit_allowance_rate').get(schedule_pay)['standard_deduction_hh']
taxable_wage = round((wage - (deduction + (allowances * allowances_rate))) * 0.0535)
withholding = 0.0
if taxable_wage < 0.0:
withholding -= taxable_wage
withholding = taxable_wage
withholding += additional
return wage, -((withholding / wage) * 100.0)

View File

@@ -0,0 +1,52 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .general import _state_applies, sit_wage
def nj_newjersey_state_income_withholding(payslip, categories, worked_days, inputs):
"""
Returns SIT eligible wage and rate.
WAGE = GROSS + DED_FIT_EXEMPT
:return: result, result_rate (wage, percent)
"""
state_code = 'NJ'
if not _state_applies(payslip, state_code):
return 0.0, 0.0
filing_status = payslip.dict.contract_id.us_payroll_config_value('nj_njw4_sit_filing_status')
if not filing_status:
return 0.0, 0.0
# Determine Wage
wage = sit_wage(payslip, categories)
if not wage:
return 0.0, 0.0
allowances = payslip.dict.contract_id.us_payroll_config_value('nj_njw4_sit_allowances')
sit_rate_table_key = payslip.dict.contract_id.us_payroll_config_value('nj_njw4_sit_rate_table')
if not sit_rate_table_key and filing_status in ('single', 'married_joint'):
sit_rate_table_key = 'A'
elif not sit_rate_table_key:
sit_rate_table_key = 'B'
schedule_pay = payslip.dict.contract_id.schedule_pay
additional = payslip.dict.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
sit_table = payslip.dict.rule_parameter('us_nj_sit_rate')[sit_rate_table_key].get(schedule_pay)
allowance_value = payslip.dict.rule_parameter('us_nj_sit_allowance_rate')[schedule_pay]
if not allowances:
return 0.0, 0.0
gross_taxable_income = wage - (allowance_value * allowances)
withholding = 0.0
prior_wage_base = 0.0
for row in sit_table:
wage_base, base_amt, rate = row
wage_base = float(wage_base)
rate = rate / 100.0
if gross_taxable_income <= wage_base:
withholding = base_amt + ((gross_taxable_income - prior_wage_base) * rate)
break
prior_wage_base = wage_base
withholding += additional
return wage, -((withholding / wage) * 100.0)

View File

@@ -1,6 +1,6 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .general import _state_applies
from .general import _state_applies, sit_wage
def oh_ohio_state_income_withholding(payslip, categories, worked_days, inputs):
@@ -18,15 +18,16 @@ def oh_ohio_state_income_withholding(payslip, categories, worked_days, inputs):
return 0.0, 0.0
# Determine Wage
wage = categories.GROSS + categories.DED_FIT_EXEMPT
wage = sit_wage(payslip, categories)
if not wage:
return 0.0, 0.0
pay_periods = payslip.dict.get_pay_periods_in_year()
additional = payslip.dict.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
exemptions = payslip.dict.contract_id.us_payroll_config_value('oh_it4_sit_exemptions')
exemption_rate = payslip.dict.rule_parameter('us_oh_sit_exemption_rate')
withholding_rate = payslip.dict.rule_parameter('us_oh_sit_rate')
multiplier_rate = payslip.dict.rule_parameter('us_oh_sit_multiplier')
if wage == 0.0:
return 0.0, 0.0
taxable_wage = (wage * pay_periods) - (exemption_rate * (exemptions or 0))
withholding = 0.0

View File

@@ -1,6 +1,6 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .general import _state_applies
from .general import _state_applies, sit_wage
def va_virginia_state_income_withholding(payslip, categories, worked_days, inputs):
@@ -18,7 +18,10 @@ def va_virginia_state_income_withholding(payslip, categories, worked_days, input
return 0.0, 0.0
# Determine Wage
wage = categories.GROSS + categories.DED_FIT_EXEMPT
wage = sit_wage(payslip, categories)
if not wage:
return 0.0, 0.0
pay_periods = payslip.dict.get_pay_periods_in_year()
additional = payslip.dict.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
personal_exemptions = payslip.dict.contract_id.us_payroll_config_value('va_va4_sit_exemptions')
@@ -27,8 +30,6 @@ def va_virginia_state_income_withholding(payslip, categories, worked_days, input
other_exemption_rate = payslip.dict.rule_parameter('us_va_sit_other_exemption_rate')
deduction = payslip.dict.rule_parameter('us_va_sit_deduction')
withholding_rate = payslip.dict.rule_parameter('us_va_sit_rate')
if wage == 0.0:
return 0.0, 0.0
taxable_wage = (wage * pay_periods) - (deduction + (personal_exemptions * personal_exemption_rate) + (other_exemptions * other_exemption_rate))
withholding = 0.0

View File

@@ -51,6 +51,12 @@ class HRContractUSPayrollConfig(models.Model):
fed_941_fit_w4_additional_withholding = fields.Float(string='Federal W4 Additional Withholding [4(c)]',
help='Form W4 (2020+) 4(c)')
ar_ar4ec_sit_allowances = fields.Integer(string='Arkansas AR4EC allowances', help='AR4EC 3.')
az_a4_sit_withholding_percentage = fields.Float(
string='Arizona A-4 Withholding Percentage',
help='A-4 1. (0.8 or 1.3 or 1.8 or 2.7 or 3.6 or 4.2 or 5.1 or 0 for exempt.')
ga_g4_sit_filing_status = fields.Selection([
('exempt', 'Exempt'),
('single', 'Single'),
@@ -64,6 +70,26 @@ class HRContractUSPayrollConfig(models.Model):
ga_g4_sit_additional_allowances = fields.Integer(string='Georgia G-4 Additional Allowances',
help='G-4 5.')
il_w4_sit_basic_allowances = fields.Integer(string='Illinois IL-W-4 Number of Basic Allowances', help='IL-W-4 Step 1.')
il_w4_sit_additional_allowances = fields.Integer(string='Illinois IL-W-4 Number of Additional Allowances', help='IL-W-4 Step 2.')
mi_w4_sit_exemptions = fields.Integer(string='Michigan MI W-4 Exemptions', help='MI-W4 6.')
mn_w4mn_sit_filing_status = fields.Selection([
('', 'Exempt'),
('single', 'Single'),
('married', 'Married'),
], string='Minnesota W-4MN Marital Status', help='W-4MN')
mn_w4mn_sit_allowances = fields.Integer(string='Minnesota Allowances', help='W-4MN 1.')
mo_mow4_sit_filing_status = fields.Selection([
('', 'Exempt'),
('single', 'Single or Married Spouse Works or Married Filing Separate'),
('married', 'Married (Spouse does not work)'),
('head_of_household', 'Head of Household'),
], string='Missouri W-4 Filing Status', help='MO W-4 1.')
mo_mow4_sit_withholding = fields.Integer(string='Missouri MO W-4 Reduced Withholding', help='MO W-4 3.')
ms_89_350_sit_filing_status = fields.Selection([
('', 'Exempt'),
('single', 'Single'),
@@ -86,6 +112,32 @@ class HRContractUSPayrollConfig(models.Model):
('montana_for_marriage', 'Montana for Marriage'),
], string='Montana MW-4 Exempt from Withholding', help='MW-4 Section 2')
nc_nc4_sit_filing_status = fields.Selection([
('', 'Exempt'),
('single', 'Single'),
('married', 'Married'),
('surviving_spouse', 'Surviving Spouse'),
('head_household', 'Head of Household')
], string='North Carolina NC-4 Filing Status', help='NC-4')
nc_nc4_sit_allowances = fields.Integer(string='North Carolina NC-4 Allowances', help='NC-4 1.')
nj_njw4_sit_filing_status = fields.Selection([
('', 'Exempt'),
('single', 'Single'),
('married_separate', 'Married/Civil Union partner Separate'),
('married_joint', 'Married/Civil Union Couple Joint'),
('widower', 'Widower/Surviving Civil Union Partner'),
('head_household', 'Head of Household')
], string='New Jersey NJ-W4 Filing Status', help='NJ-W4 2.')
nj_njw4_sit_allowances = fields.Integer(string='New Jersey NJ-W4 Allowances', help='NJ-W4 4.')
nj_njw4_sit_rate_table = fields.Selection([
('A', 'A'),
('B', 'B'),
('C', 'C'),
('D', 'D'),
('E', 'E')
], string='New Jersey Wage Chart Letter', help='NJ-W4. 3.')
# Ohio will use generic SIT exempt and additional fields
oh_it4_sit_exemptions = fields.Integer(string='Ohio IT-4 Exemptions',
help='Line 4')

View File

@@ -4,18 +4,42 @@ from . import common
from . import test_us_payslip_2019
from . import test_us_payslip_2020
from . import test_us_ar_arkansas_payslip_2019
from . import test_us_ar_arkansas_payslip_2020
from . import test_us_az_arizona_payslip_2019
from . import test_us_az_arizona_payslip_2020
from . import test_us_fl_florida_payslip_2019
from . import test_us_fl_florida_payslip_2020
from . import test_us_ga_georgia_payslip_2019
from . import test_us_ga_georgia_payslip_2020
from . import test_us_il_illinois_payslip_2019
from . import test_us_il_illinois_payslip_2020
from . import test_us_mi_michigan_payslip_2019
from . import test_us_mi_michigan_payslip_2020
from . import test_us_mn_minnesota_payslip_2019
from . import test_us_mn_minnesota_payslip_2020
from . import test_us_mo_missouri_payslip_2019
from . import test_us_mo_missouri_payslip_2020
from . import test_us_ms_mississippi_payslip_2019
from . import test_us_ms_mississippi_payslip_2020
from . import test_us_mt_montana_payslip_2019
from . import test_us_mt_montana_payslip_2020
from . import test_us_nc_northcarolina_payslip_2019
from . import test_us_nc_northcarolina_payslip_2020
from . import test_us_nj_newjersey_payslip_2019
from . import test_us_nj_newjersey_payslip_2020
from . import test_us_oh_ohio_payslip_2019
from . import test_us_oh_ohio_payslip_2020

View File

@@ -177,7 +177,11 @@ class TestUsPayslip(common.TransactionCase):
cache[code] = us_state
return us_state
def _test_suta(self, category, state_code, rate, date, wage_base=None, **extra_contract):
def _test_suta(self, category, state_code, rate, date, wage_base=None, relaxed=False, **extra_contract):
if relaxed:
_assert = self.assertPayrollAlmostEqual
else:
_assert = self.assertPayrollEqual
if wage_base:
# Slightly larger than 1/2 the wage_base
wage = round(wage_base / 2.0) + 100.0
@@ -200,18 +204,18 @@ class TestUsPayslip(common.TransactionCase):
contract.us_payroll_config_id.fed_940_type = USHRContract.FUTA_TYPE_EXEMPT
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats.get(category, 0.0), 0.0)
_assert(cats.get(category, 0.0), 0.0)
contract.us_payroll_config_id.fed_940_type = USHRContract.FUTA_TYPE_BASIC
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats.get(category, 0.0), 0.0)
_assert(cats.get(category, 0.0), 0.0)
# Test Normal
contract.us_payroll_config_id.fed_940_type = USHRContract.FUTA_TYPE_NORMAL
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats.get(category, 0.0), wage * rate)
_assert(cats.get(category, 0.0), wage * rate)
process_payslip(payslip)
# Second Payslip
@@ -222,7 +226,7 @@ class TestUsPayslip(common.TransactionCase):
if wage_base:
remaining_unemp_wages = wage_base - wage
self.assertTrue((remaining_unemp_wages * rate) <= 0.01) # less than 0.01 because rate is negative
self.assertPayrollEqual(cats.get(category, 0.0), remaining_unemp_wages * rate)
_assert(cats.get(category, 0.0), remaining_unemp_wages * rate)
# As if they were paid once already, so the first "two payslips" would remove all of the tax obligation
# 1 wage - Payslip (confirmed)
@@ -231,12 +235,12 @@ class TestUsPayslip(common.TransactionCase):
contract.external_wages = wage
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats.get(category, 0.0), 0.0)
_assert(cats.get(category, 0.0), 0.0)
else:
self.assertPayrollEqual(cats.get(category, 0.0), wage * rate)
_assert(cats.get(category, 0.0), wage * rate)
def _test_er_suta(self, state_code, rate, date, wage_base=None, **extra_contract):
self._test_suta('ER_US_SUTA', state_code, rate, date, wage_base=wage_base, **extra_contract)
def _test_er_suta(self, state_code, rate, date, wage_base=None, relaxed=False, **extra_contract):
self._test_suta('ER_US_SUTA', state_code, rate, date, wage_base=wage_base, relaxed=relaxed, **extra_contract)
def _test_ee_suta(self, state_code, rate, date, wage_base=None, **extra_contract):
self._test_suta('EE_US_SUTA', state_code, rate, date, wage_base=wage_base, **extra_contract)
def _test_ee_suta(self, state_code, rate, date, wage_base=None, relaxed=False, **extra_contract):
self._test_suta('EE_US_SUTA', state_code, rate, date, wage_base=wage_base, relaxed=relaxed, **extra_contract)

View File

@@ -0,0 +1,72 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .common import TestUsPayslip, process_payslip
class TestUsARPayslip(TestUsPayslip):
# https://www.dfa.arkansas.gov/images/uploads/incomeTaxOffice/whformula.pdf Calculation based on this file.
AR_UNEMP_MAX_WAGE = 10000.00
AR_UNEMP = -3.2 / 100.0
AR_INC_TAX = -0.0535
def test_taxes_monthly(self):
salary = 2127.0
schedule_pay = 'monthly'
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('AR'),
state_income_tax_additional_withholding=0.0,
ar_ar4ec_sit_allowances=2.0,
state_income_tax_exempt=False,
schedule_pay='monthly')
self._log('2019 Arkansas tax first payslip weekly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
# Not exempt from rule 1 or rule 2 - unemployment wages., and actual unemployment.
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.AR_UNEMP)
process_payslip(payslip)
# Make a new payslip, this one will have maximums
remaining_AR_UNEMP_wages = self.AR_UNEMP_MAX_WAGE - salary if (self.AR_UNEMP_MAX_WAGE - 2*salary < salary) else salary
# We reached the cap of 10000.0 in the first payslip.
self._log('2019 Arkansas tax second payslip weekly:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_AR_UNEMP_wages * self.AR_UNEMP)
def test_additional_withholding(self):
salary = 5000.0
schedule_pay = 'monthly'
pay_periods = 12
allowances = 2
# TODO: comment on how it was calculated
test_ar_amt = 2598.60
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('AR'),
state_income_tax_additional_withholding=100.0,
ar_ar4ec_sit_allowances=2.0,
state_income_tax_exempt=False,
schedule_pay='monthly')
self._log('2019 Arkansas tax first payslip weekly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.AR_UNEMP)
# TODO: change to hand the test_ar_amt already be divided by pay periods
self.assertPayrollAlmostEqual(cats['EE_US_SIT'], -round(test_ar_amt / pay_periods) - 100)
process_payslip(payslip)

View File

@@ -0,0 +1,35 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from datetime import date, timedelta
from .common import TestUsPayslip
class TestUsARPayslip(TestUsPayslip):
# Taxes and Rates
AR_UNEMP_MAX_WAGE = 8000.0
AR_UNEMP = 2.9
def _test_sit(self, wage, exemptions, allowances, additional_withholding, schedule_pay, date_start, expected_withholding):
employee = self._createEmployee()
contract = self._createContract(employee,
wage=wage,
state_id=self.get_us_state('AR'),
state_income_tax_exempt=exemptions,
state_income_tax_additional_withholding=additional_withholding,
ar_ar4ec_sit_allowances=allowances,
schedule_pay=schedule_pay)
payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
payslip.compute_sheet()
cats = self._getCategories(payslip)
self._log('Computed period tax: ' + str(expected_withholding))
self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
def test_2020_taxes_example(self):
self._test_er_suta('AR', self.AR_UNEMP, date(2020, 1, 1), wage_base=self.AR_UNEMP_MAX_WAGE)
self._test_sit(5000.0, True, 0.0, 0, 'monthly', date(2020, 1, 1), 0.0)
self._test_sit(5000.0, False, 0.0, 0, 'monthly', date(2020, 1, 1), 221.0)
self._test_sit(5000.0, False, 0.0, 150, 'monthly', date(2020, 1, 1), 371.0)
self._test_sit(5000.0, False, 2.0, 0, 'monthly', date(2020, 1, 1), 217)
self._test_sit(5000.0, False, 2.0, 150, 'monthly', date(2020, 1, 1), 367)

View File

@@ -0,0 +1,72 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .common import TestUsPayslip, process_payslip
class TestUsAZPayslip(TestUsPayslip):
# TAXES AND RATES
AZ_UNEMP_MAX_WAGE = 7000.00
AZ_UNEMP = -(2.00 / 100.0)
def test_taxes_with_additional_wh(self):
salary = 15000.00
schedule_pay = 'weekly'
withholding_percentage = 5.1
percent_wh = (5.10 / 100) # 5.1%
additional_wh = 12.50
wh_to_test = -((percent_wh * salary) + additional_wh)
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('AZ'),
state_income_tax_additional_withholding=12.50,
az_a4_sit_withholding_percentage=withholding_percentage,
schedule_pay=schedule_pay)
self._log('2019 Arizona tax first payslip weekly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], self.AZ_UNEMP_MAX_WAGE * self.AZ_UNEMP)
self.assertPayrollEqual(cats['EE_US_SIT'], wh_to_test)
process_payslip(payslip)
remaining_AZ_UNEMP_wages = 0.0 # We already reached max unemployment wages.
self._log('2019 Arizona tax second payslip weekly:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_AZ_UNEMP_wages * self.AZ_UNEMP)
def test_taxes_monthly(self):
salary = 1000.00
schedule_pay = 'monthly'
withholding_percentage = 2.7
percent_wh = (2.70 / 100) # 2.7%
additional_wh = 0.0
wh_to_test = -((percent_wh * salary) + additional_wh)
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('AZ'),
state_income_tax_additional_withholding=0.0,
az_a4_sit_withholding_percentage=withholding_percentage,
schedule_pay=schedule_pay)
self._log('2019 Arizona tax first payslip monthly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.AZ_UNEMP)
self.assertPayrollEqual(cats['EE_US_SIT'], wh_to_test)
process_payslip(payslip)

View File

@@ -0,0 +1,33 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from datetime import date, timedelta
from .common import TestUsPayslip
class TestUsAZPayslip(TestUsPayslip):
# Taxes and Rates
AZ_UNEMP_MAX_WAGE = 7000.0
AZ_UNEMP = 2.0
def _test_sit(self, wage, additional_withholding, withholding_percent, schedule_pay, date_start, expected_withholding):
employee = self._createEmployee()
contract = self._createContract(employee,
wage=wage,
state_id=self.get_us_state('AZ'),
state_income_tax_additional_withholding=additional_withholding,
az_a4_sit_withholding_percentage=withholding_percent,
schedule_pay=schedule_pay)
payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
payslip.compute_sheet()
cats = self._getCategories(payslip)
self._log('Computed period tax: ' + str(expected_withholding))
self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
def test_2020_taxes_example(self):
self._test_er_suta('AZ', self.AZ_UNEMP, date(2020, 1, 1), wage_base=self.AZ_UNEMP_MAX_WAGE)
self._test_sit(1000.0, 0.0, 2.70, 'monthly', date(2020, 1, 1), 27.0)
self._test_sit(1000.0, 10.0, 2.70, 'monthly', date(2020, 1, 1), 37.0)
self._test_sit(15000.0, 0.0, 3.60, 'weekly', date(2020, 1, 1), 540.0)
self._test_sit(8000.0, 0.0, 4.20, 'semi-monthly', date(2020, 1, 1), 336.0)

View File

@@ -0,0 +1,71 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .common import TestUsPayslip, process_payslip
class TestUsILPayslip(TestUsPayslip):
# TAXES AND RATES
IL_UNEMP_MAX_WAGE = 12960.00
IL_UNEMP = -(3.175 / 100.0)
def test_taxes_monthly(self):
salary = 15000.00
schedule_pay = 'monthly'
basic_allowances = 1
additional_allowances = 1
flat_rate = (4.95 / 100)
wh_to_test = -(flat_rate * (salary - ((basic_allowances * 2275 + additional_allowances * 1000) / 12.0)))
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('IL'),
state_income_tax_additional_withholding=0.0,
il_w4_sit_basic_allowances=1.0,
il_w4_sit_additional_allowances=1.0,
schedule_pay='monthly')
self._log('2019 Illinois tax first payslip monthly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], self.IL_UNEMP_MAX_WAGE * self.IL_UNEMP)
self.assertPayrollEqual(cats['EE_US_SIT'], wh_to_test)
process_payslip(payslip)
remaining_IL_UNEMP_wages = 0.0 # We already reached max unemployment wages.
self._log('2019 Illinois tax second payslip monthly:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_IL_UNEMP_wages * self.IL_UNEMP)
def test_taxes_with_additional_wh(self):
salary = 15000.00
schedule_pay = 'monthly'
basic_allowances = 1
additional_allowances = 1
additional_wh = 15.0
flat_rate = (4.95 / 100)
wh_to_test = -(flat_rate * (salary - ((basic_allowances * 2275 + additional_allowances * 1000) / 12.0)) + additional_wh)
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('IL'),
state_income_tax_additional_withholding=15.0,
il_w4_sit_basic_allowances=1.0,
il_w4_sit_additional_allowances=1.0,
schedule_pay='monthly')
self._log('2019 Illinois tax first payslip monthly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], self.IL_UNEMP_MAX_WAGE * self.IL_UNEMP)
self.assertPayrollEqual(cats['EE_US_SIT'], wh_to_test)

View File

@@ -0,0 +1,36 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from datetime import date, timedelta
from .common import TestUsPayslip
class TestUsILPayslip(TestUsPayslip):
# Taxes and Rates
IL_UNEMP_MAX_WAGE = 12740.0
IL_UNEMP = 3.125
def _test_sit(self, wage, additional_withholding, basic_allowances, additional_allowances, schedule_pay, date_start, expected_withholding):
employee = self._createEmployee()
contract = self._createContract(employee,
wage=wage,
state_id=self.get_us_state('IL'),
state_income_tax_additional_withholding=additional_withholding,
il_w4_sit_basic_allowances=basic_allowances,
il_w4_sit_additional_allowances=additional_allowances,
schedule_pay=schedule_pay)
payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
payslip.compute_sheet()
cats = self._getCategories(payslip)
self._log('Computed period tax: ' + str(expected_withholding))
self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
def test_2020_taxes_example(self):
self._test_er_suta('IL', self.IL_UNEMP, date(2020, 1, 1), wage_base=self.IL_UNEMP_MAX_WAGE)
self._test_sit(800.0, 0.0, 2, 2, 'weekly', date(2020, 1, 1), 33.27)
self._test_sit(800.0, 10.0, 2, 2, 'weekly', date(2020, 1, 1), 43.27)
self._test_sit(2500.0, 0.0, 1, 1, 'monthly', date(2020, 1, 1), 110.04)
self._test_sit(2500.0, 0.0, 0, 0, 'monthly', date(2020, 1, 1), 123.75)
self._test_sit(3000.0, 15.0, 0, 0, 'quarterly', date(2020, 1, 1), 163.50)

View File

@@ -0,0 +1,194 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .common import TestUsPayslip, process_payslip
class TestUsMIPayslip(TestUsPayslip):
# Taxes and Rates
MI_UNEMP_MAX_WAGE = 9500.0
MI_UNEMP = - 2.7 / 100.0
MI_INC_TAX = - 4.25 / 100.0
ANNUAL_EXEMPTION_AMOUNT = 4400.00
PAY_PERIOD_DIVISOR = {
'weekly': 52.0,
'bi-weekly': 26.0,
'semi-monthly': 24.0,
'monthly': 12.0
}
def test_2019_taxes_weekly(self):
salary = 5000.0
schedule_pay = 'weekly'
exemptions = 1
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MI'),
state_income_tax_additional_withholding=0.0,
mi_w4_sit_exemptions=1.0,
schedule_pay='weekly')
allowance_amount = self.ANNUAL_EXEMPTION_AMOUNT / self.PAY_PERIOD_DIVISOR[schedule_pay]
wh = -((salary - (allowance_amount * exemptions)) * -self.MI_INC_TAX)
self._log('2019 Michigan tax first payslip weekly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.MI_UNEMP)
self.assertPayrollAlmostEqual(cats['EE_US_SIT'], wh)
#
process_payslip(payslip)
# Make a new payslip, this one will have maximums
remaining_MI_UNEMP_wages = self.MI_UNEMP_MAX_WAGE - salary if (self.MI_UNEMP_MAX_WAGE - 2*salary < salary) \
else salary
self._log('2019 Michigan tax second payslip weekly:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_MI_UNEMP_wages * self.MI_UNEMP)
def test_2019_taxes_biweekly(self):
salary = 5000.0
schedule_pay = 'bi-weekly'
allowance_amount = self.ANNUAL_EXEMPTION_AMOUNT / self.PAY_PERIOD_DIVISOR[schedule_pay]
exemption = 2
wh = -((salary - (allowance_amount * exemption)) * -self.MI_INC_TAX)
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MI'),
state_income_tax_additional_withholding=0.0,
mi_w4_sit_exemptions=2.0,
schedule_pay='bi-weekly')
self._log('2019 Michigan tax first payslip bi-weekly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.MI_UNEMP)
self.assertPayrollEqual(cats['EE_US_SIT'], wh)
process_payslip(payslip)
# Make a new payslip, this one will have maximums
remaining_MI_UNEMP_wages = self.MI_UNEMP_MAX_WAGE - salary if (self.MI_UNEMP_MAX_WAGE - 2*salary < salary) \
else salary
self._log('2019 Michigan tax second payslip bi-weekly:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_MI_UNEMP_wages * self.MI_UNEMP)
def test_2019_taxes_semimonthly(self):
salary = 5000.0
schedule_pay = 'semi-monthly'
allowance_amount = self.ANNUAL_EXEMPTION_AMOUNT / self.PAY_PERIOD_DIVISOR[schedule_pay]
exemption = 1
wh = -((salary - (allowance_amount * exemption)) * -self.MI_INC_TAX)
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MI'),
state_income_tax_additional_withholding=0.0,
mi_w4_sit_exemptions=1.0,
schedule_pay='semi-monthly')
self._log('2019 Michigan tax first payslip semi-monthly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.MI_UNEMP)
self.assertPayrollEqual(cats['EE_US_SIT'], wh)
process_payslip(payslip)
# Make a new payslip, this one will have maximums
remaining_MI_UNEMP_wages = self.MI_UNEMP_MAX_WAGE - salary if (self.MI_UNEMP_MAX_WAGE - 2 * salary < salary) \
else salary
self._log('2019 Michigan tax second payslip semi-monthly:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_MI_UNEMP_wages * self.MI_UNEMP)
def test_2019_taxes_monthly(self):
salary = 5000.0
schedule_pay = 'monthly'
allowance_amount = self.ANNUAL_EXEMPTION_AMOUNT / self.PAY_PERIOD_DIVISOR[schedule_pay]
exemption = 1
wh = -((salary - (allowance_amount * exemption)) * -self.MI_INC_TAX)
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MI'),
state_income_tax_additional_withholding=0.0,
mi_w4_sit_exemptions=1.0,
schedule_pay='monthly')
self._log('2019 Michigan tax first payslip monthly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.MI_UNEMP)
self.assertPayrollEqual(cats['EE_US_SIT'], wh)
process_payslip(payslip)
# Make a new payslip, this one will have maximums
remaining_MI_UNEMP_wages = self.MI_UNEMP_MAX_WAGE - salary if (
self.MI_UNEMP_MAX_WAGE - (2 * salary) < salary) \
else salary
self._log('2019 Michigan tax second payslip monthly:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_MI_UNEMP_wages * self.MI_UNEMP)
def test_additional_withholding(self):
salary = 5000.0
schedule_pay = 'weekly'
allowance_amount = 0.0
allowance_amount = self.ANNUAL_EXEMPTION_AMOUNT / self.PAY_PERIOD_DIVISOR[schedule_pay]
additional_wh = 40.0
exemption = 1
wh = -(((salary - (allowance_amount * exemption)) * -self.MI_INC_TAX) + additional_wh)
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MI'),
state_income_tax_additional_withholding=40.0,
mi_w4_sit_exemptions=1.0,
schedule_pay='weekly')
self._log('2019 Michigan tax first payslip with additional withholding:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.MI_UNEMP)
self.assertPayrollAlmostEqual(cats['EE_US_SIT'], wh)
process_payslip(payslip)

View File

@@ -0,0 +1,35 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from datetime import date, timedelta
from .common import TestUsPayslip
class TestUsMIPayslip(TestUsPayslip):
# Taxes and Rates
MI_UNEMP_MAX_WAGE = 9000.0
MI_UNEMP = 2.7
def _test_sit(self, wage, exemptions, additional_withholding, schedule_pay, date_start, expected_withholding):
employee = self._createEmployee()
contract = self._createContract(employee,
wage=wage,
state_id=self.get_us_state('MI'),
mi_w4_sit_exemptions=exemptions,
state_income_tax_additional_withholding=additional_withholding,
schedule_pay=schedule_pay)
payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
payslip.compute_sheet()
cats = self._getCategories(payslip)
self._log('Computed period tax: ' + str(expected_withholding))
self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
def test_2020_taxes_example(self):
self._test_er_suta('MI', self.MI_UNEMP, date(2020, 1, 1), wage_base=self.MI_UNEMP_MAX_WAGE)
self._test_sit(5000.0, 1, 100.0, 'weekly', date(2020, 1, 1), 308.62)
self._test_sit(5000.0, 1, 0.0, 'weekly', date(2020, 1, 1), 208.62)
self._test_sit(5000.0, 1, 5.0, 'semi-monthly', date(2020, 1, 1), 209.09)
self._test_sit(5000.0, 1, 5.0, 'monthly', date(2020, 1, 1), 200.68)
self._test_sit(5000.0, 200, 0.0, 'monthly', date(2020, 1, 1), 0.0)

View File

@@ -0,0 +1,159 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .common import TestUsPayslip, process_payslip
class TestUsMNPayslip(TestUsPayslip):
# TAXES AND RATES
MN_UNEMP_MAX_WAGE = 34000.0
MN_UNEMP = -1.11 / 100.0
def test_taxes_weekly(self):
salary = 30000.0
# Hand Calculated Amount to Test
# Step 1 -> 30000.00 for wages per period Step 2 -> 52.0 for weekly -> 30000 * 52 -> 1560000
# Step 3 -> allowances * 4250.0 -> 4250.00 in this case.
# Step 4 -> Step 2 - Step 3 -> 1560000 - 4250.00 -> 1555750
# Step 5 -> using chart -> we have last row -> ((1555750 - 166290) * (9.85 / 100)) + 11717.65 -> 148579.46
# Step 6 -> Convert back to pay period amount and round - > 2857.297 - > 2857.0
# wh = 2857.0
wh = -2857.0
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MN'),
mn_w4mn_sit_filing_status='single',
state_income_tax_additional_withholding=0.0,
mn_w4mn_sit_allowances=1.0,
schedule_pay='weekly')
self._log('2019 Minnesota tax first payslip weekly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.MN_UNEMP)
self.assertPayrollAlmostEqual(cats['EE_US_SIT'], wh) # Test numbers are off by 1 penny
process_payslip(payslip)
# Make a new payslip, this one will have maximums
remaining_MN_UNEMP_wages = self.MN_UNEMP_MAX_WAGE - salary if (self.MN_UNEMP_MAX_WAGE - 2*salary < salary) \
else salary
self._log('2019 Minnesota tax second payslip weekly:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_MN_UNEMP_wages * self.MN_UNEMP)
def test_taxes_married(self):
salary = 5000.00
# Hand Calculated Amount to Test
# Step 1 -> 5000.0 for wages per period Step 2 -> 52.0 for weekly -> 5000 * 52 -> 260,000
# Step 3 -> allowances * 4250.0 -> 4250.00 in this case.
# Step 4 -> Step 2 - Step 3 -> 260,000 - 4250.00 -> 255750.0
# For step five we used the married section
# Step 5 -> using chart -> we have 2nd last row -> ((255750 - 163070) * (7.85 / 100)) + 10199.33 ->
# Step 6 -> Convert back to pay period amount and round
# wh = 336.0
wh = -336.0
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MN'),
mn_w4mn_sit_filing_status='married',
state_income_tax_additional_withholding=0.0,
mn_w4mn_sit_allowances=1.0,
schedule_pay='weekly')
self._log('2019 Minnesota tax first payslip married:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.MN_UNEMP)
self.assertPayrollAlmostEqual(cats['EE_US_SIT'], wh)
def test_taxes_semimonthly(self):
salary = 6500.00
# Hand Calculated Amount to Test
# Step 1 -> 6500.00 for wages per period Step 2 -> 24 for semi-monthly -> 6500.00 * 24 -> 156000.00
# Step 3 -> allowances * 4250.0 -> 4250.00 in this case.
# Step 4 -> Step 2 - Step 3 -> 156000.00 - 4250.00 -> 151750.0
# Step 5 -> using chart -> we have 2nd last row -> ((151750.0- 89510) * (7.85 / 100)) + 5690.42 -> 10576.26
# Step 6 -> Convert back to pay period amount and round
# wh = -441
wh = -441.00
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MN'),
mn_w4mn_sit_filing_status='single',
state_income_tax_additional_withholding=0.0,
mn_w4mn_sit_allowances=1.0,
schedule_pay='semi-monthly')
self._log('2019 Minnesota tax first payslip semimonthly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.MN_UNEMP)
self.assertPayrollAlmostEqual(cats['EE_US_SIT'], wh)
def test_tax_exempt(self):
salary = 5500.00
wh = 0
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MN'),
mn_w4mn_sit_filing_status='',
state_income_tax_additional_withholding=0.0,
mn_w4mn_sit_allowances=2.0,
schedule_pay='weekly')
self._log('2019 Minnesota tax first payslip exempt:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.MN_UNEMP)
self.assertPayrollAlmostEqual(cats['EE_US_SIT'], wh)
def test_additional_withholding(self):
salary = 5500.0
# Hand Calculated Amount to Test
# Step 1 -> 5500 for wages per period Step 2 -> 52 for weekly -> 5500 * 52 -> 286000.00
# Step 3 -> allowances * 4250.0 -> 8500 in this case.
# Step 4 -> Step 2 - Step 3 -> 286000.00 - 8500 -> 277500
# Step 5 -> using chart -> we have last row -> ((277500- 166290) * (9.85 / 100)) + 11717.65 -> 22671.835
# Step 6 -> Convert back to pay period amount and round
# wh = -436.0
# Add additional_withholding
# wh = -436.0 + 40.0
wh = -476.0
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MN'),
mn_w4mn_sit_filing_status='single',
state_income_tax_additional_withholding=40.0,
mn_w4mn_sit_allowances=2.0,
schedule_pay='weekly')
self._log('2019 Minnesota tax first payslip additional withholding:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.MN_UNEMP)
self.assertPayrollAlmostEqual(cats['EE_US_SIT'], wh)

View File

@@ -0,0 +1,36 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from datetime import date, timedelta
from .common import TestUsPayslip
class TestUsMNPayslip(TestUsPayslip):
# TAXES AND RATES
MN_UNEMP_MAX_WAGE = 35000.0
MN_UNEMP = 1.11
def _test_sit(self, wage, filing_status, allowances, additional_withholding, schedule_pay, date_start, expected_withholding):
employee = self._createEmployee()
contract = self._createContract(employee,
wage=wage,
state_id=self.get_us_state('MN'),
mn_w4mn_sit_filing_status=filing_status,
state_income_tax_additional_withholding=additional_withholding,
mn_w4mn_sit_allowances=allowances,
schedule_pay=schedule_pay)
payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
payslip.compute_sheet()
cats = self._getCategories(payslip)
self._log('Computed period tax: ' + str(expected_withholding))
self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
def test_2020_taxes_example(self):
self._test_er_suta('MN', self.MN_UNEMP, date(2020, 1, 1), wage_base=self.MN_UNEMP_MAX_WAGE)
self._test_sit(5000.0, 'single', 1.0, 0.0, 'weekly', date(2020, 1, 1), 389.0)
self._test_sit(30000.0, 'single', 1.0, 0.0, 'weekly', date(2020, 1, 1), 2850.99)
self._test_sit(5000.0, 'married', 1.0, 0.0, 'weekly', date(2020, 1, 1), 325.0)
self._test_sit(6500.0, 'single', 1.0, 0.0, 'semi-monthly', date(2020, 1, 1), 429.0)
self._test_sit(5500.0, '', 2.0, 0.0, 'weekly', date(2020, 1, 1), 0.0)
self._test_sit(5500.0, 'single', 2.0, 40.0, 'weekly', date(2020, 1, 1), 470.0)

View File

@@ -0,0 +1,188 @@
from datetime import date
from .common import TestUsPayslip
class TestUsMoPayslip(TestUsPayslip):
# Calculations from http://dor.mo.gov/forms/4282_2019.pdf
SALARY = 12000.0
MO_UNEMP = -2.376 / 100.0
TAX = [
(1053.0, 1.5),
(1053.0, 2.0),
(1053.0, 2.5),
(1053.0, 3.0),
(1053.0, 3.5),
(1053.0, 4.0),
(1053.0, 4.5),
(1053.0, 5.0),
(999999999.0, 5.4),
]
def test_2019_taxes_single(self):
# Payroll Period Monthly
salary = self.SALARY
pp = 12.0
gross_salary = salary * pp
spouse_employed = False
# Single
standard_deduction = 12400.0
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MO'),
mo_mow4_sit_filing_status='single',
state_income_tax_additional_withholding=0.0,
schedule_pay='monthly')
self._log('2019 Missouri tax single first payslip:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.MO_UNEMP)
mo_taxable_income = gross_salary - standard_deduction
self._log('%s = %s - %s -' % (mo_taxable_income, gross_salary, standard_deduction))
remaining_taxable_income = mo_taxable_income
tax = 0.0
for amt, rate in self.TAX:
amt = float(amt)
rate = rate / 100.0
self._log(str(amt) + ' : ' + str(rate) + ' : ' + str(remaining_taxable_income))
if (remaining_taxable_income - amt) > 0.0 or (remaining_taxable_income - amt) == 0.0:
tax += rate * amt
else:
tax += rate * remaining_taxable_income
break
remaining_taxable_income = remaining_taxable_income - amt
tax = -tax
self._log('Computed annual tax: ' + str(tax))
tax = tax / pp
tax = round(tax)
self._log('Computed period tax: ' + str(tax))
self.assertPayrollEqual(cats['EE_US_SIT'], tax)
def test_2019_spouse_not_employed(self):
# Payroll Period Semi-monthly
salary = self.SALARY
pp = 24.0
gross_salary = salary * pp
# Married
standard_deduction = 24800.0
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MO'),
mo_mow4_sit_filing_status='married',
state_income_tax_additional_withholding=0.0,
schedule_pay='semi-monthly')
self._log('2019 Missouri tax first payslip:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
mo_taxable_income = gross_salary - standard_deduction
self._log(mo_taxable_income)
remaining_taxable_income = mo_taxable_income
tax = 0.0
for amt, rate in self.TAX:
amt = float(amt)
rate = rate / 100.0
self._log(str(amt) + ' : ' + str(rate) + ' : ' + str(remaining_taxable_income))
if (remaining_taxable_income - amt) > 0.0 or (remaining_taxable_income - amt) == 0.0:
tax += rate * amt
else:
tax += rate * remaining_taxable_income
break
remaining_taxable_income = remaining_taxable_income - amt
tax = -tax
self._log('Computed annual tax: ' + str(tax))
tax = tax / pp
tax = round(tax)
self._log('Computed period tax: ' + str(tax))
self.assertPayrollEqual(cats['EE_US_SIT'], tax)
def test_2019_head_of_household(self):
# Payroll Period Weekly
salary = self.SALARY
# Payroll Period Weekly
salary = self.SALARY
pp = 52.0
gross_salary = salary * pp
# Single HoH
standard_deduction = 18650.0
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MO'),
mo_mow4_sit_filing_status='head_of_household',
state_income_tax_additional_withholding=0.0,
schedule_pay='weekly')
self._log('2019 Missouri tax first payslip:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
mo_taxable_income = gross_salary - standard_deduction
self._log(mo_taxable_income)
remaining_taxable_income = mo_taxable_income
tax = 0.0
for amt, rate in self.TAX:
amt = float(amt)
rate = rate / 100.0
self._log(str(amt) + ' : ' + str(rate) + ' : ' + str(remaining_taxable_income))
if (remaining_taxable_income - amt) > 0.0 or (remaining_taxable_income - amt) == 0.0:
tax += rate * amt
else:
tax += rate * remaining_taxable_income
break
remaining_taxable_income = remaining_taxable_income - amt
tax = -tax
self._log('Computed annual tax: ' + str(tax))
tax = tax / pp
tax = round(tax)
self._log('Computed period tax: ' + str(tax))
self.assertPayrollEqual(cats['EE_US_SIT'], tax)
def test_2019_underflow(self):
# Payroll Period Weekly
salary = 200.0
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MO'))
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['EE_US_SIT'], 0.0)

View File

@@ -0,0 +1,105 @@
from datetime import date
from .common import TestUsPayslip
class TestUsMoPayslip(TestUsPayslip):
# Calculations from http://dor.mo.gov/forms/4282_2020.pdf
MO_UNEMP_MAX_WAGE = 11500.0
MO_UNEMP = 2.376
TAX = [
(1073.0, 1.5),
(1073.0, 2.0),
(1073.0, 2.5),
(1073.0, 3.0),
(1073.0, 3.5),
(1073.0, 4.0),
(1073.0, 4.5),
(1073.0, 5.0),
( 'inf', 5.4),
]
STD_DED = {
'': 0.0, # Exempt
'single': 12400.0,
'married': 24800.0,
'head_of_household': 18650.0,
}
def _test_sit(self, filing_status, schedule_pay):
wage = 5000.0
employee = self._createEmployee()
contract = self._createContract(employee,
wage=wage,
state_id=self.get_us_state('MO'),
mo_mow4_sit_filing_status=filing_status,
state_income_tax_additional_withholding=0.0,
schedule_pay=schedule_pay)
payslip = self._createPayslip(employee, '2020-01-01', '2020-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
pp = payslip.get_pay_periods_in_year()
gross_salary = wage * pp
standard_deduction = self.STD_DED[filing_status]
mo_taxable_income = gross_salary - standard_deduction
self._log('%s = %s - %s -' % (mo_taxable_income, gross_salary, standard_deduction))
remaining_taxable_income = mo_taxable_income
tax = 0.0
for amt, rate in self.TAX:
amt = float(amt)
rate = rate / 100.0
self._log(str(amt) + ' : ' + str(rate) + ' : ' + str(remaining_taxable_income))
if (remaining_taxable_income - amt) > 0.0 or (remaining_taxable_income - amt) == 0.0:
tax += rate * amt
else:
tax += rate * remaining_taxable_income
break
remaining_taxable_income = remaining_taxable_income - amt
tax = -tax
self._log('Computed annual tax: ' + str(tax))
tax = tax / pp
tax = round(tax)
self._log('Computed period tax: ' + str(tax))
self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), tax if filing_status else 0.0)
contract.us_payroll_config_id.state_income_tax_additional_withholding = 100.0
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), (tax - 100.0) if filing_status else 0.0)
contract.us_payroll_config_id.mo_mow4_sit_withholding = 200.0
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -200.0 if filing_status else 0.0)
def test_2020_taxes_single(self):
self._test_er_suta('MO', self.MO_UNEMP, date(2020, 1, 1), wage_base=self.MO_UNEMP_MAX_WAGE)
self._test_sit('single', 'weekly')
def test_2020_spouse_not_employed(self):
self._test_sit('married', 'semi-monthly')
def test_2020_head_of_household(self):
self._test_sit('head_of_household', 'monthly')
def test_2020_underflow(self):
# Payroll Period Weekly
salary = 200.0
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MO'))
payslip = self._createPayslip(employee, '2020-01-01', '2020-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['EE_US_SIT'], 0.0)

View File

@@ -0,0 +1,270 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .common import TestUsPayslip, process_payslip
class TestUsNCPayslip(TestUsPayslip):
###
# Taxes and Rates
###
NC_UNEMP_MAX_WAGE = 24300.0
NC_UNEMP = -1.0 / 100.0
NC_INC_TAX = -0.0535
def test_2019_taxes_weekly(self):
salary = 20000.0
# allowance_multiplier and Portion of Standard Deduction for weekly
allowance_multiplier = 48.08
PST = 192.31
exemption = 1
# Algorithm derived from percentage method in https://files.nc.gov/ncdor/documents/files/nc-30_book_web.pdf
wh = -round((salary - (PST + (allowance_multiplier * exemption))) * -self.NC_INC_TAX)
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('NC'),
nc_nc4_sit_filing_status='married',
state_income_tax_additional_withholding=0.0,
nc_nc4_sit_allowances=1.0,
schedule_pay='weekly')
self._log('2019 North Carolina tax first payslip weekly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['EE_US_SIT'], wh)
process_payslip(payslip)
# Make a new payslip, this one will have maximums
remaining_NC_UNEMP_wages = self.NC_UNEMP_MAX_WAGE - salary if (self.NC_UNEMP_MAX_WAGE - 2*salary < salary) \
else salary
self._log('2019 North Carolina tax second payslip weekly:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_NC_UNEMP_wages * self.NC_UNEMP)
def test_2019_taxes_with_external_weekly(self):
salary = 5000.0
schedule_pay = 'weekly'
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('NC'),
nc_nc4_sit_filing_status='married',
state_income_tax_additional_withholding=0.0,
nc_nc4_sit_allowances=1.0,
schedule_pay='weekly')
self._log('2019 NorthCarolina_external tax first payslip weekly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.NC_UNEMP)
def test_2019_taxes_biweekly(self):
salary = 5000.0
schedule_pay = 'bi-weekly'
# allowance_multiplier and Portion of Standard Deduction for weekly
allowance_multiplier = 96.15
PST = 384.62
allowances = 2
# Algorithm derived from percentage method in https://files.nc.gov/ncdor/documents/files/nc-30_book_web.pdf
wh = -round((salary - (PST + (allowance_multiplier * allowances))) * -self.NC_INC_TAX)
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('NC'),
nc_nc4_sit_filing_status='married',
state_income_tax_additional_withholding=0.0,
nc_nc4_sit_allowances=2.0,
schedule_pay='bi-weekly')
self._log('2019 North Carolina tax first payslip bi-weekly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.NC_UNEMP)
self.assertPayrollEqual(cats['EE_US_SIT'], wh)
process_payslip(payslip)
# Make a new payslip, this one will have maximums
remaining_NC_UNEMP_wages = self.NC_UNEMP_MAX_WAGE - salary if (self.NC_UNEMP_MAX_WAGE - 2*salary < salary) \
else salary
self._log('2019 North Carolina tax second payslip bi-weekly:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_NC_UNEMP_wages * self.NC_UNEMP)
def test_2019_taxes_semimonthly(self):
salary = 4000.0
# allowance_multiplier and Portion of Standard Deduction for weekly
allowance_multiplier = 104.17
PST = 625.00
allowances = 1
# Algorithm derived from percentage method in https://files.nc.gov/ncdor/documents/files/nc-30_book_web.pdf
wh = -round((salary - (PST + (allowance_multiplier * allowances))) * -self.NC_INC_TAX)
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('NC'),
nc_nc4_sit_filing_status='head_household',
state_income_tax_additional_withholding=0.0,
nc_nc4_sit_allowances=1.0,
schedule_pay='semi-monthly')
self._log('2019 North Carolina tax first payslip:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.NC_UNEMP)
self.assertPayrollEqual(cats['EE_US_SIT'], wh)
process_payslip(payslip)
# Make a new payslip, this one will have maximums
remaining_NC_UNEMP_wages = self.NC_UNEMP_MAX_WAGE - salary if (self.NC_UNEMP_MAX_WAGE - 2 * salary < salary) \
else salary
self._log('2019 North Carolina tax second payslip:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_NC_UNEMP_wages * self.NC_UNEMP)
def test_2019_taxes_monthly(self):
salary = 4000.0
schedule_pay = 'monthly'
# allowance_multiplier and Portion of Standard Deduction for weekly
allowance_multiplier = 208.33
PST = 833.33
allowances = 1
# Algorithm derived from percentage method in https://files.nc.gov/ncdor/documents/files/nc-30_book_web.pdf
wh = -round((salary - (PST + (allowance_multiplier * allowances))) * -self.NC_INC_TAX)
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('NC'),
nc_nc4_sit_filing_status='single',
state_income_tax_additional_withholding=0.0,
nc_nc4_sit_allowances=1.0,
schedule_pay='monthly')
self._log('2019 North Carolina tax first payslip:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.NC_UNEMP)
self.assertPayrollEqual(cats['EE_US_SIT'], wh)
process_payslip(payslip)
# Make a new payslip, this one will have maximums
remaining_NC_UNEMP_wages = self.NC_UNEMP_MAX_WAGE - salary if (
self.NC_UNEMP_MAX_WAGE - 2 * salary < salary) \
else salary
self._log('2019 North Carolina tax second payslip:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_NC_UNEMP_wages * self.NC_UNEMP)
def test_additional_withholding(self):
salary = 4000.0
# allowance_multiplier and Portion of Standard Deduction for weekly
allowance_multiplier = 48.08
PST = 192.31
additional_wh = 40.0
#4000 - (168.27 + (48.08 * 1)
allowances = 1
# Algorithm derived from percentage method in https://files.nc.gov/ncdor/documents/files/nc-30_book_web.pdf
wh = -round(((salary - (PST + (allowance_multiplier * allowances))) * -self.NC_INC_TAX) + additional_wh)
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('NC'),
nc_nc4_sit_filing_status='married',
state_income_tax_additional_withholding=40.0,
nc_nc4_sit_allowances=1.0,
schedule_pay='weekly')
self._log('2019 North Carolina tax first payslip weekly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['EE_US_SIT'], wh)
process_payslip(payslip)
# Make a new payslip, this one will have maximums
remaining_NC_UNEMP_wages = self.NC_UNEMP_MAX_WAGE - salary if (self.NC_UNEMP_MAX_WAGE - 2 * salary < salary) \
else salary
self._log('2019 North Carolina tax second payslip weekly:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_NC_UNEMP_wages * self.NC_UNEMP)

View File

@@ -0,0 +1,36 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from datetime import date, timedelta
from .common import TestUsPayslip
class TestUsNCPayslip(TestUsPayslip):
###
# 2020 Taxes and Rates
###
NC_UNEMP_MAX_WAGE = 25200.0
NC_UNEMP = 1.0
NC_INC_TAX = 0.0535
def _test_sit(self, wage, filing_status, allowances, additional_withholding, schedule_pay, date_start, expected_withholding):
employee = self._createEmployee()
contract = self._createContract(employee,
wage=wage,
state_id=self.get_us_state('NC'),
nc_nc4_sit_filing_status=filing_status,
nc_nc4_sit_allowances=allowances,
state_income_tax_additional_withholding=additional_withholding,
schedule_pay=schedule_pay)
payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
payslip.compute_sheet()
cats = self._getCategories(payslip)
self._log('Computed period tax: ' + str(expected_withholding))
self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding if filing_status else 0.0)
def test_2020_taxes_example(self):
self._test_er_suta('NC', self.NC_UNEMP, date(2020, 1, 1), wage_base=self.NC_UNEMP_MAX_WAGE)
self._test_sit(20000.0, 'single', 1, 100.0, 'weekly', date(2020, 1, 1), 1156.0)
self._test_sit(5000.0, 'married', 1, 0.0, 'weekly', date(2020, 1, 1), 254.0)
self._test_sit(4000.0, 'head_household', 1, 5.0, 'semi-monthly', date(2020, 1, 1), 177.0)

View File

@@ -0,0 +1,128 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .common import TestUsPayslip, process_payslip
class TestUsNJPayslip(TestUsPayslip):
###
# 2019 Taxes and Rates
###
NJ_UNEMP_MAX_WAGE = 34400.0 # Note that this is used for SDI and FLI as well
ER_NJ_UNEMP = -2.6825 / 100.0
EE_NJ_UNEMP = -0.3825 / 100.0
ER_NJ_SDI = -0.5 / 100.0
EE_NJ_SDI = -0.17 / 100.0
ER_NJ_WF = -0.1175 / 100.0
EE_NJ_WF = -0.0425 / 100.0
ER_NJ_FLI = 0.0
EE_NJ_FLI = -0.08 / 100.0
# Examples found on page 24 of http://www.state.nj.us/treasury/taxation/pdf/current/njwt.pdf
def test_2019_taxes_example1(self):
salary = 300
# Tax Percentage Method for Single, taxable under $385
wh = -4.21
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('NJ'),
nj_njw4_sit_filing_status='single',
nj_njw4_sit_allowances=1,
state_income_tax_additional_withholding=0.0,
nj_njw4_sit_rate_table='A',
schedule_pay='weekly')
self._log('2019 New Jersey tax first payslip:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['EE_US_SUTA'], salary * (self.EE_NJ_UNEMP + self.EE_NJ_SDI + self.EE_NJ_WF + self.EE_NJ_FLI))
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * (self.ER_NJ_UNEMP + self.ER_NJ_SDI + self.ER_NJ_WF + self.ER_NJ_FLI))
self.assertTrue(all((cats['EE_US_SUTA'], cats['ER_US_SUTA'])))
# self.assertPayrollEqual(cats['EE_US_NJ_SDI_SIT'], cats['EE_US_NJ_SDI_SIT'] * self.EE_NJ_SDI)
# self.assertPayrollEqual(cats['ER_US_NJ_SDI_SUTA'], cats['ER_US_NJ_SDI_SUTA'] * self.ER_NJ_SDI)
# self.assertPayrollEqual(cats['EE_US_NJ_FLI_SIT'], cats['EE_US_NJ_FLI_SIT'] * self.EE_NJ_FLI)
# self.assertPayrollEqual(cats['EE_US_NJ_WF_SIT'], cats['EE_US_NJ_WF_SIT'] * self.EE_NJ_WF)
self.assertPayrollEqual(cats['EE_US_SIT'], wh)
process_payslip(payslip)
# # Make a new payslip, this one will have maximums
#
remaining_nj_unemp_wages = self.NJ_UNEMP_MAX_WAGE - salary if (self.NJ_UNEMP_MAX_WAGE - 2 * salary < salary) \
else salary
self._log('2019 New Jersey tax second payslip:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
# self.assertPayrollEqual(cats['WAGE_US_NJ_UNEMP'], remaining_nj_unemp_wages)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_nj_unemp_wages * (self.ER_NJ_UNEMP + self.ER_NJ_SDI + self.ER_NJ_WF + self.ER_NJ_FLI))
self.assertPayrollEqual(cats['EE_US_SUTA'], remaining_nj_unemp_wages * (self.EE_NJ_UNEMP + self.EE_NJ_SDI + self.EE_NJ_WF + self.EE_NJ_FLI))
def test_2019_taxes_example2(self):
salary = 1400.00
# Tax Percentage Method for Single, taxable pay over $962, under $1346
wh = -27.58
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('NJ'),
nj_njw4_sit_filing_status='married_separate',
nj_njw4_sit_allowances=3,
state_income_tax_additional_withholding=0.0,
#nj_njw4_sit_rate_table='B',
schedule_pay='weekly')
self.assertEqual(contract.schedule_pay, 'weekly')
self._log('2019 New Jersey tax first payslip:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['EE_US_SIT'], wh)
def test_2019_taxes_to_the_limits(self):
salary = 30000.00
# Tax Percentage Method for Single, taxable pay over $18750, under 125000
wh = -1467.51
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('NJ'),
nj_njw4_sit_filing_status='married_joint',
nj_njw4_sit_allowances=3,
state_income_tax_additional_withholding=0.0,
# nj_njw4_sit_rate_table='B',
schedule_pay='quarterly')
self.assertEqual(contract.schedule_pay, 'quarterly')
self._log('2019 New Jersey tax first payslip:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-03-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['EE_US_SIT'], wh)

View File

@@ -0,0 +1,48 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from datetime import date, timedelta
from .common import TestUsPayslip
class TestUsNJPayslip(TestUsPayslip):
###
# 2020 Taxes and Rates
###
NJ_UNEMP_MAX_WAGE = 35300.0 # Note that this is used for SDI and FLI as well
ER_NJ_UNEMP = 2.6825
EE_NJ_UNEMP = 0.3825
ER_NJ_SDI = 0.5
EE_NJ_SDI = 0.26
ER_NJ_WF = 0.1175
EE_NJ_WF = 0.0425
ER_NJ_FLI = 0.0
EE_NJ_FLI = 0.16
def _test_sit(self, wage, filing_status, allowances, schedule_pay, date_start, expected_withholding, rate_table=False):
employee = self._createEmployee()
contract = self._createContract(employee,
wage=wage,
state_id=self.get_us_state('NJ'),
nj_njw4_sit_filing_status=filing_status,
nj_njw4_sit_allowances=allowances,
state_income_tax_additional_withholding=0.0,
nj_njw4_sit_rate_table=rate_table,
schedule_pay=schedule_pay)
payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding if filing_status else 0.0)
def test_2020_taxes_example1(self):
combined_er_rate = self.ER_NJ_UNEMP + self.ER_NJ_FLI + self.ER_NJ_SDI + self.ER_NJ_WF
self._test_er_suta('NJ', combined_er_rate, date(2020, 1, 1), wage_base=self.NJ_UNEMP_MAX_WAGE)
combined_ee_rate = self.EE_NJ_UNEMP + self.EE_NJ_FLI + self.EE_NJ_SDI + self.EE_NJ_WF
self._test_ee_suta('NJ', combined_ee_rate, date(2020, 1, 1), wage_base=self.NJ_UNEMP_MAX_WAGE, relaxed=True)
# these expected values come from https://www.state.nj.us/treasury/taxation/pdf/current/njwt.pdf
self._test_sit(300.0, 'single', 1, 'weekly', date(2020, 1, 1), 4.21)
self._test_sit(375.0, 'married_separate', 3, 'weekly', date(2020, 1, 1), 4.76)
self._test_sit(1400.0, 'head_household', 3, 'weekly', date(2020, 1, 1), 27.60)

View File

@@ -44,6 +44,17 @@
<field name="workers_comp_er_code"/>
</group>
<group name="state_ar_arkansas" string="AR Arkansas" attrs="{'invisible':[('state_id', '!=', %(base.state_us_4)s)]}">
<p colspan="2"><h3>Form AR4EC - State Income Tax</h3></p>
<field name="ar_ar4ec_sit_allowances" string="Allowances 3."/>
<field name="state_income_tax_additional_withholding" string="Additional Withholding 4."/>
<field name="state_income_tax_exempt" string="Exempt 1. 2."/>
</group>
<group name="state_az_arizona" string="AZ Arizona" attrs="{'invisible':[('state_id', '!=', %(base.state_us_3)s)]}">
<p colspan="2"><h3>Form A-4 - State Income Tax</h3></p>
<field name="az_a4_sit_withholding_percentage" string="Withholding Percentage 1."/>
<field name="state_income_tax_additional_withholding" string="Additional Withholding 2."/>
</group>
<group name="state_fl_florida" string="FL Florida" attrs="{'invisible':[('state_id', '!=', %(base.state_us_10)s)]}">
<p colspan="2"><h3>No additional fields.</h3></p>
</group>
@@ -55,6 +66,30 @@
<field name="state_income_tax_additional_withholding" string="Additional Withholding 6."/>
<field name="state_income_tax_exempt" string="Exempt 8."/>
</group>
<group name="state_il_illinois" string="IL Illinois" attrs="{'invisible':[('state_id', '!=', %(base.state_us_14)s)]}">
<p colspan="2"><h3>Form IL-W-4 - State Income Tax</h3></p>
<field name="il_w4_sit_basic_allowances" string="Basic Allowances Step 1."/>
<field name="il_w4_sit_additional_allowances" string="Additional Allowances Step 2."/>
<field name="state_income_tax_additional_withholding" string="Additional Withholding"/>
</group>
<group name="state_mi_michigan" string="MI Michigan" attrs="{'invisible':[('state_id', '!=', %(base.state_us_35)s)]}">
<p colspan="2"><h3>Form MI-W4 - State Income Tax</h3></p>
<field name="mi_w4_sit_exemptions" string="Exemptions 6."/>
<field name="state_income_tax_additional_withholding" string="Additional Withholding 7."/>
<field name="state_income_tax_exempt" string="Exempt 8."/>
</group>
<group name="state_mn_minnesota" string="MN Minnesota" attrs="{'invisible':[('state_id', '!=', %(base.state_us_36)s)]}">
<p colspan="2"><h3>Form W-4MN - State Income Tax</h3></p>
<field name="mn_w4mn_sit_filing_status" string="Marital Status"/>
<field name="mn_w4mn_sit_allowances" string="Allowances 1."/>
<field name="state_income_tax_additional_withholding" string="Additional Withholding 2."/>
</group>
<group name="state_mo_missouri" string="MO Missouri" attrs="{'invisible':[('state_id', '!=', %(base.state_us_38)s)]}">
<p colspan="2"><h3>Form MO W-4 - State Income Tax</h3></p>
<field name="mo_mow4_sit_filing_status" string="Filing Status 1."/>
<field name="mo_mow4_sit_withholding" string="Reduce Withholding 3."/>
<field name="state_income_tax_additional_withholding" string="Additional Withholding 2."/>
</group>
<group name="state_ms_mississippi" string="MS Mississippi" attrs="{'invisible':[('state_id', '!=', %(base.state_us_37)s)]}">
<p colspan="2"><h3>Form 89-350 - State Income Tax</h3></p>
<field name="ms_89_350_sit_filing_status" string="Marital Status 1. 2. 3. 8."/>
@@ -67,6 +102,19 @@
<field name="mt_mw4_sit_exemptions" string="Exemptions"/>
<field name="state_income_tax_additional_withholding" string="Additional Withholding (Box H)"/>
</group>
<group name="state_nc_northcarolina" string="NC North Carolina" attrs="{'invisible':[('state_id', '!=', %(base.state_us_28)s)]}">
<p colspan="2"><h3>Form NC-4 - State Income Tax</h3></p>
<field name="nc_nc4_sit_filing_status" string="Filing Status"/>
<field name="nc_nc4_sit_allowances" string="Allowances 1."/>
<field name="state_income_tax_additional_withholding" string="Additional Withholding 2."/>
</group>
<group name="state_nj_newjersey" string="NJ New Jersey" attrs="{'invisible':[('state_id', '!=', %(base.state_us_25)s)]}">
<p colspan="2"><h3>Form NJ-W4 - State Income Tax</h3></p>
<field name="nj_njw4_sit_filing_status" string="Filing Status 2."/>
<field name="nj_njw4_sit_rate_table" string="Rate Table 3."/>
<field name="nj_njw4_sit_allowances" string="Allowances 4."/>
<field name="state_income_tax_additional_withholding" string="Additional Withholding 5."/>
</group>
<group name="state_oh_ohio" string="OH Ohio" attrs="{'invisible':[('state_id', '!=', %(base.state_us_30)s)]}">
<p colspan="2"><h3>Form IT-4 - State Income Tax</h3></p>
<field name="state_income_tax_exempt"/>