mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Merge branch 'wip/13.0/l10n_us_hr_payroll2' into new/13.0/l10n_us_hr_payroll
This commit is contained in:
@@ -39,20 +39,39 @@ United States of America - Payroll Rules.
|
||||
'data/state/ia_iowa.xml',
|
||||
'data/state/id_idaho.xml',
|
||||
'data/state/il_illinois.xml',
|
||||
'data/state/in_indiana.xml',
|
||||
'data/state/ks_kansas.xml',
|
||||
'data/state/ky_kentucky.xml',
|
||||
'data/state/la_louisiana.xml',
|
||||
'data/state/me_maine.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/nd_north_dakota.xml',
|
||||
'data/state/ne_nebraska.xml',
|
||||
'data/state/nh_new_hampshire.xml',
|
||||
'data/state/nj_newjersey.xml',
|
||||
'data/state/nm_new_mexico.xml',
|
||||
'data/state/nv_nevada.xml',
|
||||
'data/state/ny_new_york.xml',
|
||||
'data/state/oh_ohio.xml',
|
||||
'data/state/ok_oklahoma.xml',
|
||||
'data/state/pa_pennsylvania.xml',
|
||||
'data/state/ri_rhode_island.xml',
|
||||
'data/state/sc_south_carolina.xml',
|
||||
'data/state/sd_south_dakota.xml',
|
||||
'data/state/tn_tennessee.xml',
|
||||
'data/state/tx_texas.xml',
|
||||
'data/state/ut_utah.xml',
|
||||
'data/state/vt_vermont.xml',
|
||||
'data/state/va_virginia.xml',
|
||||
'data/state/wa_washington.xml',
|
||||
'data/state/wi_wisconsin.xml',
|
||||
'data/state/wv_west_virginia.xml',
|
||||
'data/state/wy_wyoming.xml',
|
||||
'views/hr_contract_views.xml',
|
||||
'views/res_config_settings_views.xml',
|
||||
'views/us_payroll_config_views.xml',
|
||||
|
||||
122
l10n_us_hr_payroll/data/state/in_indiana.xml
Normal file
122
l10n_us_hr_payroll/data/state/in_indiana.xml
Normal file
@@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_in_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US IN Indiana SUTA Wage Base</field>
|
||||
<field name="code">us_in_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_in_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">9500.00</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_in_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_in_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US IN Indiana SUTA Rate</field>
|
||||
<field name="code">us_in_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_in_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2.5</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_in_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
<!-- state income rate -->
|
||||
<record id="rule_parameter_us_in_suta_income_rate" model="hr.rule.parameter">
|
||||
<field name="name">US IN Indiana SUTA Income Rate</field>
|
||||
<field name="code">us_in_suta_income_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_in_suta_income_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">3.23</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_in_suta_income_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_in_sit_personal_exemption_rate" model="hr.rule.parameter">
|
||||
<field name="name">US IN Indiana SIT Personal Exemption Rate</field>
|
||||
<field name="code">us_in_sit_personal_exemption_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_in_sit_personal_exemption_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'daily': ( 2.74, 5.48, 8.22, 10.96, 13.70, 16.44),
|
||||
'weekly': ( 19.23, 38.46, 57.69, 76.92, 96.15, 115.38),
|
||||
'bi-weekly': ( 38.46, 76.92, 115.38, 153.85, 192.31, 230.77),
|
||||
'semi-monthly': ( 41.67, 83.33, 125.00, 166.67, 208.33, 250.00),
|
||||
'monthly': ( 83.33, 166.67, 250.00, 333.33, 416.67, 500.00),
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_in_sit_personal_exemption_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_in_sit_dependent_exemption_rate" model="hr.rule.parameter">
|
||||
<field name="name">US IN Indiana SIT Dependent Exemption Rate</field>
|
||||
<field name="code">us_in_sit_dependent_exemption_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_in_sit_dependent_exemption_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'daily': ( 4.11, 8.22, 12.33, 16.44, 20.55),
|
||||
'weekly': ( 28.85, 57.69, 86.54, 115.38, 144.23),
|
||||
'bi-weekly': ( 57.69, 115.38, 173.08, 230.77, 288.46),
|
||||
'semi-monthly': ( 62.50, 125.00, 187.50, 250.00, 312.50),
|
||||
'monthly': (125.00, 250.00, 375.00, 500.00, 625.00),
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_in_sit_dependent_exemption_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_in_dor" model="res.partner">
|
||||
<field name="name">US Indiana - Department of Workforce Development - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_in_dor_sit" model="res.partner">
|
||||
<field name="name">US Indiana - Department of Revenue - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_in_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US IN Indiana State Unemployment</field>
|
||||
<field name="code">ER_US_IN_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_in_suta_wage_base', rate='us_in_suta_rate', state_code='IN')</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_in_suta_wage_base', rate='us_in_suta_rate', state_code='IN')</field>
|
||||
<field name="partner_id" ref="res_partner_us_in_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_in_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US IN Indiana State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_IN_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = in_indiana_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = in_indiana_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_in_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
133
l10n_us_hr_payroll/data/state/ks_kansas.xml
Normal file
133
l10n_us_hr_payroll/data/state/ks_kansas.xml
Normal file
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_ks_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US KS Kansas SUTA Wage Base</field>
|
||||
<field name="code">us_ks_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ks_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">14000.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ks_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_ks_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US KS Kansas SUTA Rate</field>
|
||||
<field name="code">us_ks_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ks_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2.7</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ks_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ks_sit_allowances_rate" model="hr.rule.parameter">
|
||||
<field name="name">US KS Kansas Allowances Rate</field>
|
||||
<field name="code">us_ks_sit_allowances_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ks_sit_allowances_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'weekly' : 43.27,
|
||||
'bi-weekly' : 86.54,
|
||||
'semi-monthly': 93.75,
|
||||
'monthly' : 187.50,
|
||||
'quarterly' : 562.50,
|
||||
'semi-annual': 1125.00,
|
||||
'annually': 2250.00,
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ks_sit_allowances_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ks_sit_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US KS Kansas SIT Tax Rate</field>
|
||||
<field name="code">us_ks_sit_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ks_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': {
|
||||
'weekly': ((58, 0.00, 0.00), (346, 3.10, 0.00), (635, 5.25, 8.94), ('inf', 5.70, 24.09)),
|
||||
'bi-weekly': ((115, 0.00, 0.00), (692, 3.10, 0.00), (1269, 5.25, 17.88), ('inf', 5.70, 48.17)),
|
||||
'semi-monthly': ((125, 0.00, 0.00), (750, 3.10, 0.00), (1375, 5.25, 19.38), ('inf', 5.70, 52.19)),
|
||||
'monthly': ((250, 0.00, 0.00), (1500, 3.10, 0.00), (2750, 5.25, 38.75), ('inf', 5.70, 104.38)),
|
||||
'quarterly': ((750, 0.00, 0.00), (4500, 3.10, 0.00), (8250, 5.25, 116.25), ('inf', 5.70, 313.13)),
|
||||
'semi-annual': ((1500, 0.00, 0.00), (9000, 3.10, 0.00), (16500, 5.25, 232.50), ('inf', 5.70, 626.25)),
|
||||
'annually': ((3000, 0.00, 0.00), (18000, 3.10, 0.00), (33000, 5.25, 465.00), ('inf', 5.70, 1252.50)),
|
||||
},
|
||||
'married': {
|
||||
'weekly': ((144, 0.00, 0.00), (721, 3.10, 0.00), (1298, 5.25, 17.88), ('inf', 5.70, 48.17)),
|
||||
'bi-weekly': ((288, 0.00, 0.00), (1442, 3.10, 0.00), (2596, 5.25, 35.77), ('inf', 5.70, 96.35)),
|
||||
'semi-monthly': ((313, 0.00, 0.00), (1563, 3.10, 0.00), (2813, 5.25, 38.75), ('inf', 5.70, 104.38)),
|
||||
'monthly': ((625, 0.00, 0.00), (3125, 3.10, 0.00), (5625, 5.25, 77.50), ('inf', 5.70, 208.75)),
|
||||
'quarterly': ((1875, 0.00, 0.00), (9375, 3.10, 0.00), (16875, 5.25, 232.50), ('inf', 5.70, 626.25)),
|
||||
'semi-annual': ((3750, 0.00, 0.00), (18750, 3.10, 0.00), (33750, 5.25, 465.00), ('inf', 5.70, 1252.50)),
|
||||
'annually': ((7500, 0.00, 0.00), (37500, 3.10, 0.00), (67500, 5.25, 930.00), ('inf', 5.70, 2505.00)),
|
||||
},
|
||||
'head_household': {
|
||||
'weekly': ((58, 0.00, 0.00), (346, 3.10, 0.00), (635, 5.25, 8.94), ('inf', 5.70, 24.09)),
|
||||
'bi-weekly': ((115, 0.00, 0.00), (692, 3.10, 0.00), (1269, 5.25, 17.88), ('inf', 5.70, 48.17)),
|
||||
'semi-monthly': ((125, 0.00, 0.00), (750, 3.10, 0.00), (1375, 5.25, 19.38), ('inf', 5.70, 52.19)),
|
||||
'monthly': ((250, 0.00, 0.00), (1500, 3.10, 0.00), (2750, 5.25, 38.75), ('inf', 5.70, 104.38)),
|
||||
'quarterly': ((750, 0.00, 0.00), (4500, 3.10, 0.00), (8250, 5.25, 116.25), ('inf', 5.70, 313.13)),
|
||||
'semi-annual': ((1500, 0.00, 0.00), (9000, 3.10, 0.00), (16500, 5.25, 232.50), ('inf', 5.70, 626.25)),
|
||||
'annually': ((3000, 0.00, 0.00), (18000, 3.10, 0.00), (33000, 5.25, 465.00), ('inf', 5.70, 1252.50)),
|
||||
},
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ks_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_ks_dor" model="res.partner">
|
||||
<field name="name">US Kansas - Department of Labor - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_ks_dor_sit" model="res.partner">
|
||||
<field name="name">US Kansas - Department of Revenue - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_ks_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US KS Kansas State Unemployment</field>
|
||||
<field name="code">ER_US_KS_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_ks_suta_wage_base', rate='us_ks_suta_rate', state_code='KS')</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_ks_suta_wage_base', rate='us_ks_suta_rate', state_code='KS')</field>
|
||||
<field name="partner_id" ref="res_partner_us_ks_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_ks_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US KS Kansas State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_KS_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = ks_kansas_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = ks_kansas_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_ks_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
97
l10n_us_hr_payroll/data/state/ky_kentucky.xml
Normal file
97
l10n_us_hr_payroll/data/state/ky_kentucky.xml
Normal file
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_ky_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US KY Kentucky SUTA Wage Base</field>
|
||||
<field name="code">us_ky_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ky_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">10800.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ky_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_ky_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US KY Kentucky SUTA Rate</field>
|
||||
<field name="code">us_ky_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ky_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2.4</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ky_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ky_sit_standard_deduction_rate" model="hr.rule.parameter">
|
||||
<field name="name">US KY Kentucky Standard Deduction Rate</field>
|
||||
<field name="code">us_ky_sit_standard_deduction_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ky_sit_standard_deduction_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2650</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ky_sit_standard_deduction_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ky_sit_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US KY Kentucky SIT Tax Rate</field>
|
||||
<field name="code">us_ky_sit_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ky_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">5.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ky_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_ky_dor" model="res.partner">
|
||||
<field name="name">US Kentucky - Office of Unemployment Insurance - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_ky_dor_sit" model="res.partner">
|
||||
<field name="name">US Kentucky - Department of Revenue - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_ky_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US KY Kentucky State Unemployment</field>
|
||||
<field name="code">ER_US_KY_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_ky_suta_wage_base', rate='us_ky_suta_rate', state_code='KY')</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_ky_suta_wage_base', rate='us_ky_suta_rate', state_code='KY')</field>
|
||||
<field name="partner_id" ref="res_partner_us_ky_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_ky_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US KY Kentucky State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_KY_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = ky_kentucky_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = ky_kentucky_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_ky_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
141
l10n_us_hr_payroll/data/state/la_louisiana.xml
Normal file
141
l10n_us_hr_payroll/data/state/la_louisiana.xml
Normal file
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_la_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US LA Louisiana SUTA Wage Base</field>
|
||||
<field name="code">us_la_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_la_suta_wage_base_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">7700.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_la_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_la_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">7700.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_la_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_la_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US LA Louisiana SUTA Rate</field>
|
||||
<field name="code">us_la_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_la_suta_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">6.20</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_la_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_la_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">6.20</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_la_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_la_sit_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US LA Louisiana SIT Tax Rate</field>
|
||||
<field name="code">us_la_sit_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_la_sit_tax_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': ((12500.00, 2.10), (50000.00, 1.60), ('inf', 1.35)),
|
||||
'married': ((25000.00, 2.10), (100000.00, 1.65), ('inf', 1.35)),
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_la_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_la_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': ((12500.00, 2.10), (50000.00, 1.60), ('inf', 1.35)),
|
||||
'married': ((25000.00, 2.10), (100000.00, 1.65), ('inf', 1.35)),
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_la_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_la_sit_personal_exemption_rate" model="hr.rule.parameter">
|
||||
<field name="name">US LA Louisiana Personal Exemption Rate</field>
|
||||
<field name="code">us_la_sit_personal_exemption_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_la_sit_personal_exemption_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">4500</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_la_sit_personal_exemption_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_la_sit_personal_exemption_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">4500</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_la_sit_personal_exemption_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_la_sit_dependent_rate" model="hr.rule.parameter">
|
||||
<field name="name">US LA Louisiana Dependent Rate</field>
|
||||
<field name="code">us_la_sit_dependent_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_la_sit_dependent_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">1000.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_la_sit_dependent_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_la_sit_dependent_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">1000.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_la_sit_dependent_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_la_dor" model="res.partner">
|
||||
<field name="name">US Louisiana - Workforce Commission (LWC) - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_la_dor_sit" model="res.partner">
|
||||
<field name="name">US Louisiana - Department of Revenue (LDOR) - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_la_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US LA Louisiana State Unemployment</field>
|
||||
<field name="code">ER_US_LA_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_la_suta_wage_base', rate='us_la_suta_rate', state_code='LA')</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_la_suta_wage_base', rate='us_la_suta_rate', state_code='LA')</field>
|
||||
<field name="partner_id" ref="res_partner_us_la_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_la_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US LA Louisiana State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_LA_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = la_louisiana_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = la_louisiana_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_la_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
125
l10n_us_hr_payroll/data/state/me_maine.xml
Normal file
125
l10n_us_hr_payroll/data/state/me_maine.xml
Normal file
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_me_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US ME Maine SUTA Wage Base</field>
|
||||
<field name="code">us_me_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_me_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">12000.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_me_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_me_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US ME Maine SUTA Rate</field>
|
||||
<field name="code">us_me_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_me_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">1.92</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_me_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_me_sit_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US ME Maine SIT Tax Rate</field>
|
||||
<field name="code">us_me_sit_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_me_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': (
|
||||
( 22200, 0, 5.80),
|
||||
( 52600, 1288, 6.75),
|
||||
( 'inf', 3340, 7.15),
|
||||
),
|
||||
'married': (
|
||||
( 44450, 0, 0.00),
|
||||
( 105200, 2578, 6.75),
|
||||
( 'inf', 6679, 7.15),
|
||||
),
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_me_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_me_sit_standard_deduction_rate" model="hr.rule.parameter">
|
||||
<field name="name">US ME Maine Standard Deduction Rate</field>
|
||||
<field name="code">us_me_sit_standard_deduction_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_me_sit_standard_deduction_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': (( 82900, 9550), (157900, 75000)),
|
||||
'married': ((165800, 21950), (315800, 150000)),
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_me_sit_standard_deduction_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_me_sit_personal_exemption_rate" model="hr.rule.parameter">
|
||||
<field name="name">US ME Maine Personal Exemption Rate</field>
|
||||
<field name="code">us_me_sit_personal_exemption_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_me_sit_personal_exemption_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">4300</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_me_sit_personal_exemption_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_me_dor" model="res.partner">
|
||||
<field name="name">US Maine - Department Of Labor | ReEmploy - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_me_dor_sit" model="res.partner">
|
||||
<field name="name">US Maine - Department Of Revenue Services - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_me_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US ME Maine State Unemployment</field>
|
||||
<field name="code">ER_US_ME_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_me_suta_wage_base', rate='us_me_suta_rate', state_code='ME')</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_me_suta_wage_base', rate='us_me_suta_rate', state_code='ME')</field>
|
||||
<field name="partner_id" ref="res_partner_us_me_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_me_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US ME Maine State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_ME_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = me_maine_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = me_maine_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_me_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
110
l10n_us_hr_payroll/data/state/nd_north_dakota.xml
Normal file
110
l10n_us_hr_payroll/data/state/nd_north_dakota.xml
Normal file
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_nd_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US ND North Dakota SUTA Wage Base</field>
|
||||
<field name="code">us_nd_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_nd_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">37900.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_nd_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_nd_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US ND North Dakota SUTA Rate</field>
|
||||
<field name="code">us_nd_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_nd_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">1.02</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_nd_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_nd_sit_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US ND North Dakota SIT Tax Rate</field>
|
||||
<field name="code">us_nd_sit_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_nd_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': (
|
||||
( 6200, 0.00, 0.00),
|
||||
( 46325, 0.00, 1.10),
|
||||
( 103350, 441.38, 2.04),
|
||||
( 208850, 1604.69, 2.27),
|
||||
( 446800, 3999.54, 2.64),
|
||||
( 'inf',10281.42, 2.90),
|
||||
),
|
||||
'married': (
|
||||
( 12400, 0.00, 0.00),
|
||||
( 45925, 0.00, 1.10),
|
||||
( 93375, 368.78, 2.04),
|
||||
( 135750, 1336.76, 2.27),
|
||||
( 232700, 2298.67, 2.64),
|
||||
( 'inf', 4858.15, 2.90),
|
||||
),
|
||||
'head_household': (
|
||||
( 9325, 0.00, 0.00),
|
||||
( 63075, 0.00, 1.10),
|
||||
( 148125, 591.25, 2.04),
|
||||
( 234025, 2326.27, 2.27),
|
||||
( 449925, 4276.20, 2.64),
|
||||
( 'inf', 9975.96, 2.90),
|
||||
),
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_nd_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_nd_dor" model="res.partner">
|
||||
<field name="name">US North Dakota - Office of State Tax Commissioner - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_nd_dor_sit" model="res.partner">
|
||||
<field name="name">US North Dakota - Taxpayer Access Point - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_nd_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US ND North Dakota State Unemployment</field>
|
||||
<field name="code">ER_US_ND_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nd_suta_wage_base', rate='us_nd_suta_rate', state_code='ND')</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_nd_suta_wage_base', rate='us_nd_suta_rate', state_code='ND')</field>
|
||||
<field name="partner_id" ref="res_partner_us_nd_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_nd_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US ND North Dakota State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_ND_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = nd_north_dakota_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = nd_north_dakota_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_nd_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
125
l10n_us_hr_payroll/data/state/ne_nebraska.xml
Normal file
125
l10n_us_hr_payroll/data/state/ne_nebraska.xml
Normal file
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_ne_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US NE Nebraska SUTA Wage Base</field>
|
||||
<field name="code">us_ne_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ne_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">9000.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ne_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_ne_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US NE Nebraska SUTA Rate</field>
|
||||
<field name="code">us_ne_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ne_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">1.25</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ne_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ne_sit_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US NE Nebraska SIT Tax Rate</field>
|
||||
<field name="code">us_ne_sit_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ne_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': {
|
||||
'weekly': ((57, 0.00, 0.0), (105, 0.00, 2.26), (342, 1.08, 3.22), (496, 8.71, 4.91), (629, 16.27, 6.20), (1182, 24.52, 6.59), ('inf', 60.96, 6.95)),
|
||||
'bi-weekly': ((114, 0.00, 0.0), (211, 0.00, 2.26), (684, 2.19, 3.22), (992, 17.42, 4.91), (1259, 32.54, 6.20), (2364, 49.09, 6.59), ('inf', 121.91, 6.95)),
|
||||
'semi-monthly': ((124, 0.00, 0.0), (228, 0.00, 2.26), (741, 2.35, 3.22), (1074, 18.87, 4.91), (1364, 35.22, 6.20), (2561, 53.20, 6.59), ('inf', 132.08, 6.95)),
|
||||
'monthly': ((248, 0.00, 0.0), (457, 0.00, 2.26), (1483, 4.72, 3.22), (2148, 37.76, 4.91), (2728, 70.41, 6.20), (5123, 106.37, 6.59), ('inf', 264.20, 6.95)),
|
||||
'quarterly': ((744, 0.00, 0.0), (1370, 0.00, 2.26), (4448, 14.15, 3.22), (6445, 113.26, 4.91), (8183, 211.31, 6.20), (15368, 319.07, 6.59), ('inf', 792.56, 6.95)),
|
||||
'semi-annual': ((1488, 0.00, 0.0), (2740, 0.00, 2.26), (8895, 28.30, 3.22), (12890, 226.49, 4.91), (16365, 422.64, 6.20), (30735, 638.09, 6.59), ('inf', 1585.07, 6.95)),
|
||||
'annually': ((2975, 0.00, 0.0), (5480, 0.00, 2.26), (17790, 56.61, 3.22), (25780, 452.99, 4.91), (32730, 845.30, 6.20), (61470, 1276.20, 6.59), ('inf', 3170.17, 6.95)),
|
||||
},
|
||||
'married': {
|
||||
'weekly': ((137, 0.00, 0.0), (204, 0.00, 2.26), (508, 1.51, 3.22), (790, 11.30, 4.91), (981, 25.15, 6.20), (1300, 36.99, 6.59), ('inf', 58.01, 6.95)),
|
||||
'bi-weekly': ((273, 0.00, 0.0), (408, 0.00, 2.26), (1016, 3.05, 3.22), (1581, 22.63, 4.91), (1961, 50.37, 6.20), (2601, 73.93, 6.59), ('inf', 116.11, 6.95)),
|
||||
'semi-monthly': ((296, 0.00, 0.0), (442, 0.00, 2.26), (1101, 3.30, 3.22), (1713, 24.52, 4.91), (2125, 54.57, 6.20), (2818, 80.11, 6.59), ('inf', 125.78, 6.95)),
|
||||
'monthly': ((592, 0.00, 0.0), (884, 0.00, 2.26), (2202, 6.60, 3.22), (3425, 49.04, 4.91), (4249, 109.09, 6.20), (5635, 160.18, 6.59), ('inf', 251.52, 6.95)),
|
||||
'quarterly': ((1775, 0.00, 0.0), (2653, 0.00, 2.26), (6605, 19.84, 3.22), (10275, 147.09, 4.91), (12748, 327.29, 6.20), (16905, 480.62, 6.59), ('inf', 754.57, 6.95)),
|
||||
'semi-annual': ((3550, 0.00, 0.0), (5305, 0.00, 2.26), (13210, 39.66, 3.22), (20550, 294.20, 4.91), (25495, 654.59, 6.20), (33810, 961.18, 6.59), ('inf', 1509.14, 6.95)),
|
||||
'annually': ((7100, 0.00, 0.0), (10610, 0.00, 2.26), (26420, 79.33, 3.22), (41100, 588.41, 4.91), (50990, 1309.20, 6.20), (67620, 1992.38, 6.59), ('inf', 3018.30, 6.95)),
|
||||
},
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ne_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ne_sit_allowances_rate" model="hr.rule.parameter">
|
||||
<field name="name">US NE Nebraska Allowances Rate</field>
|
||||
<field name="code">us_ne_sit_allowances_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ne_sit_allowances_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'weekly' : 37.69,
|
||||
'bi-weekly' : 75.38,
|
||||
'semi-monthly': 81.67,
|
||||
'monthly' : 163.33,
|
||||
'quarterly' : 490.00,
|
||||
'semi-annual': 980.00,
|
||||
'annually': 1960.00,
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ne_sit_allowances_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_ne_dor" model="res.partner">
|
||||
<field name="name">US Nebraska - Nebraska Department of Labor - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_ne_dor_sit" model="res.partner">
|
||||
<field name="name">US Nebraska - Nebraska Department of Revenue - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_ne_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US NE Nebraska State Unemployment</field>
|
||||
<field name="code">ER_US_NE_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_ne_suta_wage_base', rate='us_ne_suta_rate', state_code='NE')</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_ne_suta_wage_base', rate='us_ne_suta_rate', state_code='NE')</field>
|
||||
<field name="partner_id" ref="res_partner_us_ne_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_ne_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US NE Nebraska State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_NE_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = ne_nebraska_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = ne_nebraska_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_ne_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
53
l10n_us_hr_payroll/data/state/nv_nevada.xml
Normal file
53
l10n_us_hr_payroll/data/state/nv_nevada.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_nv_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US NV Nevada SUTA Wage Base</field>
|
||||
<field name="code">us_nv_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_nv_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">32500.00</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_nv_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_nv_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US NV Nevada SUTA Rate</field>
|
||||
<field name="code">us_nv_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_nv_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2.95</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_nv_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_nv_dor" model="res.partner">
|
||||
<field name="name">US Nevada - Department of Employment, Training, and Rehabilitation, Employment Security Division - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_nv_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US NV Nevada State Unemployment (RT-6)</field>
|
||||
<field name="code">ER_US_NV_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_nv_suta_wage_base', rate='us_nv_suta_rate', state_code='NV')</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_nv_suta_wage_base', rate='us_nv_suta_rate', state_code='NV')</field>
|
||||
<field name="partner_id" ref="res_partner_us_nv_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
279
l10n_us_hr_payroll/data/state/ny_new_york.xml
Normal file
279
l10n_us_hr_payroll/data/state/ny_new_york.xml
Normal file
@@ -0,0 +1,279 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_ny_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US NY New York SUTA Wage Base</field>
|
||||
<field name="code">us_ny_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ny_suta_wage_base_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">14000.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ny_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_ny_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">14000.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ny_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_ny_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US NY New York SUTA Rate</field>
|
||||
<field name="code">us_ny_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ny_suta_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">1.09</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ny_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_ny_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">3.295</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ny_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ny_suta_rsf_rate" model="hr.rule.parameter">
|
||||
<field name="name">US NY New York SUTA RSF Rate</field>
|
||||
<field name="code">us_ny_suta_rsf_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ny_suta_rsf_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">0.075</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ny_suta_rsf_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_ny_suta_rsf_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">0.075</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ny_suta_rsf_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ny_suta_mctmt_rate" model="hr.rule.parameter">
|
||||
<field name="name">US NY New York SUTA MCTMT Rate</field>
|
||||
<field name="code">us_ny_suta_mctmt_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ny_suta_mctmt_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">0.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ny_suta_mctmt_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_ny_suta_mctmt_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">0.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ny_suta_mctmt_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ny_sit_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US NY New York SIT Tax Rate</field>
|
||||
<field name="code">us_ny_sit_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ny_sit_tax_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': {
|
||||
'weekly': ((163, 0.0400, 0.0), (225, 0.0450, 6.54), (267, 0.0525, 9.31), (412, 0.0590, 11.54), (1551, 0.0633, 20.04), (1862, 0.0657, 92.17), (2070, 0.0758, 112.58), (3032, 0.0808, 128.38), (4142, 0.0707, 206.08), (5104, 0.0856, 284.60), (20722, 0.0735, 366.90), (21684, 0.5208, 1514.85), ('inf', 0.0962, 2015.62)),
|
||||
'bi-weekly': ((327, 0.0400, 0.0), (450, 0.0450, 13.08), (535, 0.0525, 18.62), (823, 0.0590, 23.08), (3102, 0.0633, 40.08), (3723, 0.0657, 184.35), (4140, 0.0758, 225.15), (6063, 0.0808, 256.77), (8285, 0.0707, 412.15), (10208, 0.0856, 569.19), (41444, 0.0735, 733.81), (43367, 0.5208, 3029.69), ('inf', 0.0962, 4021.23)),
|
||||
'semi-monthly': ((354, 0.0400, 0.0), (488, 0.0450, 14.17), (579, 0.0525, 20.17), (892, 0.0590, 25.00), (3360, 0.0633, 43.42), (4033, 0.0657, 199.71), (4485, 0.0758, 243.92), (6569, 0.0808, 278.17), (8975, 0.0707, 446.50), (11058, 0.0856, 616.63), (44898, 0.0735, 794.96), (46981, 0.5208, 3282.17), ('inf', 0.0962, 4367.17)),
|
||||
'monthly': ((708, 0.0400, 0.0), (975, 0.0450, 28.33), (1158, 0.0525, 40.33), (1783, 0.0590, 50.00), (6721, 0.0633, 86.83), (8067, 0.0657, 399.42), (8971, 0.0758, 487.83), (13138, 0.0808, 556.33), (17950, 0.0707, 893.00), (22117, 0.0856, 1233.25), (89796, 0.0735, 1589.92), (93963, 0.5208, 6564.33), ('inf', 0.0962, 8734.33)),
|
||||
'annually': ((8500, 0.0400, 0.0), (11700, 0.0450, 340.00), (13900, 0.0525, 484.00), (21400, 0.0590, 600.00), (80650, 0.0633, 1042.00), (96800, 0.0657, 4793.00), (107650, 0.0758, 5854.00), (157650, 0.0808, 6676.00), (215400, 0.0707, 10716.00), (265400, 0.0856, 14799.00), (1077550, 0.0735, 19079.00), (1127550, 0.5208, 78772.00), ('inf', 0.0962, 104812.00)),
|
||||
},
|
||||
'married': {
|
||||
'weekly': ((163, 0.0400, 0.0), (225, 0.0450, 6.54), (267, 0.0525, 9.31), (412, 0.0590, 11.54), (1551, 0.0633, 20.04), (1862, 0.0657, 92.17), (2070, 0.0783, 112.58), (3032, 0.0833, 128.90), (4068, 0.0785, 209.00), (6215, 0.0707, 290.37), (7177, 0.0916, 442.17), (20722, 0.0735, 530.25), (41449, 0.0765, 1525.83), (42411, 0.9454, 3111.42), ('inf', 0.0962, 4020.46)),
|
||||
'bi-weekly': ((327, 0.0400, 0.0), (450, 0.0450, 13.08), (535, 0.0525, 18.62), (823, 0.0590, 23.08), (3102, 0.0633, 40.08), (3723, 0.0657, 184.35), (4140, 0.0783, 225.15), (6063, 0.0833, 257.81), (8137, 0.0785, 418.00), (12431, 0.0707, 580.73), (14354, 0.0916, 884.35), (41444, 0.0735, 1060.50), (82898, 0.0765, 3051.65), (84821, 0.9454, 6222.85), ('inf', 0.0962, 8040.92)),
|
||||
'semi-monthly': ((354, 0.0400, 0.0), (488, 0.0450, 14.17), (579, 0.0525, 20.17), (892, 0.0590, 25.00), (3360, 0.0633, 43.42), (4033, 0.0657, 199.71), (4485, 0.0783, 243.92), (6569, 0.0833, 279.29), (8815, 0.0785, 452.83), (13476, 0.0707, 629.13), (15550, 0.0916, 958.04), (44898, 0.0735, 1148.88), (89806, 0.0765, 3305.96), (91890, 0.9454, 6741.42), ('inf', 0.0962, 8711.00)),
|
||||
'monthly': ((708, 0.0400, 0.0), (975, 0.0450, 28.33), (1158, 0.0525, 40.33), (1783, 0.0590, 50.00), (6721, 0.0633, 86.83), (8067, 0.0657, 399.42), (8971, 0.0783, 487.83), (13138, 0.0833, 558.58), (17629, 0.0785, 905.67), (26933, 0.0707, 1258.25), (31100, 0.0916, 1916.08), (89796, 0.0735, 2297.75), (179613, 0.0765, 6611.92), (183779, 0.9454, 13482.83), ('inf', 0.0962, 17422.00)),
|
||||
'annually': ((8500, 0.0400, 0.0), (11700, 0.0450, 340.00), (13900, 0.0525, 484.00), (21400, 0.0590, 600.00), (80650, 0.0633, 1042.00), (96800, 0.0657, 4793.00), (107650, 0.0783, 5854.00), (157650, 0.0833, 6703.00), (211550, 0.0785, 10868.00), (323200, 0.0707, 15099.00), (373200, 0.0916, 22993.00), (1077550, 0.0735, 27573.00), (2155350, 0.0765, 79343.00), (2205350, 0.9454, 161794.00), ('inf', 0.0962, 209064.00)),
|
||||
}
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ny_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_ny_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': {
|
||||
'weekly': ((163, 0.0400, 0.0), (225, 0.0450, 6.54), (267, 0.0525, 9.31), (412, 0.0590, 11.54), (1551, 0.0633, 20.04), (1862, 0.0657, 92.17), (2070, 0.0758, 112.58), (3032, 0.0808, 128.38), (4142, 0.0707, 206.08), (5104, 0.0856, 284.60), (20722, 0.0735, 366.90), (21684, 0.5208, 1514.85), ('inf', 0.0962, 2015.62)),
|
||||
'bi-weekly': ((327, 0.0400, 0.0), (450, 0.0450, 13.08), (535, 0.0525, 18.62), (823, 0.0590, 23.08), (3102, 0.0633, 40.08), (3723, 0.0657, 184.35), (4140, 0.0758, 225.15), (6063, 0.0808, 256.77), (8285, 0.0707, 412.15), (10208, 0.0856, 569.19), (41444, 0.0735, 733.81), (43367, 0.5208, 3029.69), ('inf', 0.0962, 4021.23)),
|
||||
'semi-monthly': ((354, 0.0400, 0.0), (488, 0.0450, 14.17), (579, 0.0525, 20.17), (892, 0.0590, 25.00), (3360, 0.0633, 43.42), (4033, 0.0657, 199.71), (4485, 0.0758, 243.92), (6569, 0.0808, 278.17), (8975, 0.0707, 446.50), (11058, 0.0856, 616.63), (44898, 0.0735, 794.96), (46981, 0.5208, 3282.17), ('inf', 0.0962, 4367.17)),
|
||||
'monthly': ((708, 0.0400, 0.0), (975, 0.0450, 28.33), (1158, 0.0525, 40.33), (1783, 0.0590, 50.00), (6721, 0.0633, 86.83), (8067, 0.0657, 399.42), (8971, 0.0758, 487.83), (13138, 0.0808, 556.33), (17950, 0.0707, 893.00), (22117, 0.0856, 1233.25), (89796, 0.0735, 1589.92), (93963, 0.5208, 6564.33), ('inf', 0.0962, 8734.33)),
|
||||
'annually': ((8500, 0.0400, 0.0), (11700, 0.0450, 340.00), (13900, 0.0525, 484.00), (21400, 0.0590, 600.00), (80650, 0.0633, 1042.00), (96800, 0.0657, 4793.00), (107650, 0.0758, 5854.00), (157650, 0.0808, 6676.00), (215400, 0.0707, 10716.00), (265400, 0.0856, 14799.00), (1077550, 0.0735, 19079.00), (1127550, 0.5208, 78772.00), ('inf', 0.0962, 104812.00)),
|
||||
},
|
||||
'married': {
|
||||
'weekly': ((163, 0.0400, 0.0), (225, 0.0450, 6.54), (267, 0.0525, 9.31), (412, 0.0590, 11.54), (1551, 0.0633, 20.04), (1862, 0.0657, 92.17), (2070, 0.0783, 112.58), (3032, 0.0833, 128.90), (4068, 0.0785, 209.00), (6215, 0.0707, 290.37), (7177, 0.0916, 442.17), (20722, 0.0735, 530.25), (41449, 0.0765, 1525.83), (42411, 0.9454, 3111.42), ('inf', 0.0962, 4020.46)),
|
||||
'bi-weekly': ((327, 0.0400, 0.0), (450, 0.0450, 13.08), (535, 0.0525, 18.62), (823, 0.0590, 23.08), (3102, 0.0633, 40.08), (3723, 0.0657, 184.35), (4140, 0.0783, 225.15), (6063, 0.0833, 257.81), (8137, 0.0785, 418.00), (12431, 0.0707, 580.73), (14354, 0.0916, 884.35), (41444, 0.0735, 1060.50), (82898, 0.0765, 3051.65), (84821, 0.9454, 6222.85), ('inf', 0.0962, 8040.92)),
|
||||
'semi-monthly': ((354, 0.0400, 0.0), (488, 0.0450, 14.17), (579, 0.0525, 20.17), (892, 0.0590, 25.00), (3360, 0.0633, 43.42), (4033, 0.0657, 199.71), (4485, 0.0783, 243.92), (6569, 0.0833, 279.29), (8815, 0.0785, 452.83), (13476, 0.0707, 629.13), (15550, 0.0916, 958.04), (44898, 0.0735, 1148.88), (89806, 0.0765, 3305.96), (91890, 0.9454, 6741.42), ('inf', 0.0962, 8711.00)),
|
||||
'monthly': ((708, 0.0400, 0.0), (975, 0.0450, 28.33), (1158, 0.0525, 40.33), (1783, 0.0590, 50.00), (6721, 0.0633, 86.83), (8067, 0.0657, 399.42), (8971, 0.0783, 487.83), (13138, 0.0833, 558.58), (17629, 0.0785, 905.67), (26933, 0.0707, 1258.25), (31100, 0.0916, 1916.08), (89796, 0.0735, 2297.75), (179613, 0.0765, 6611.92), (183779, 0.9454, 13482.83), ('inf', 0.0962, 17422.00)),
|
||||
'annually': ((8500, 0.0400, 0.0), (11700, 0.0450, 340.00), (13900, 0.0525, 484.00), (21400, 0.0590, 600.00), (80650, 0.0633, 1042.00), (96800, 0.0657, 4793.00), (107650, 0.0783, 5854.00), (157650, 0.0833, 6703.00), (211550, 0.0785, 10868.00), (323200, 0.0707, 15099.00), (373200, 0.0916, 22993.00), (1077550, 0.0735, 27573.00), (2155350, 0.0765, 79343.00), (2205350, 0.9454, 161794.00), ('inf', 0.0962, 209064.00)),
|
||||
}
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ny_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ny_sit_over_10_exemption_rate" model="hr.rule.parameter">
|
||||
<field name="name">US NY New York Over 10 Exemption Rate</field>
|
||||
<field name="code">us_ny_sit_over_10_exemption_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ny_sit_over_10_exemption_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'weekly': (142.30, 152.90, 19.25),
|
||||
'bi-weekly': (284.60, 305.80, 38.50),
|
||||
'semi-monthly': (308.35, 331.25, 41.65),
|
||||
'monthly': (616.70, 662.50, 83.30),
|
||||
'annual': (7400, 7950, 1000),
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ny_sit_over_10_exemption_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_ny_sit_over_10_exemption_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'weekly': (142.30, 152.90, 19.25),
|
||||
'bi-weekly': (284.60, 305.80, 38.50),
|
||||
'semi-monthly': (308.35, 331.25, 41.65),
|
||||
'monthly': (616.70, 662.50, 83.30),
|
||||
'annual': (7400, 7950, 1000),
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ny_sit_over_10_exemption_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
<!-- Table A - Combined deduction and exemption allowance (Step 1) -->
|
||||
<record id="rule_parameter_us_ny_sit_deduction_exemption_rate" model="hr.rule.parameter">
|
||||
<field name="name">US NY New York Deduction Exemption Rate</field>
|
||||
<field name="code">us_ny_sit_deduction_exemption_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ny_sit_deduction_exemption_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': {
|
||||
'weekly': (142.30, 161.55, 180.80, 200.05, 219.30, 238.55, 257.80, 277.05, 296.30, 315.55, 334.80),
|
||||
'bi-weekly': (284.60, 323.10, 361.60, 400.10, 438.60, 477.10, 515.60, 544.10, 592.60, 631.10, 669.60),
|
||||
'semi-monthly': (308.35, 350.0, 391.65, 433.30, 474.95, 516.60, 558.25, 599.90, 641.55, 683.20, 724.85),
|
||||
'monthly': (616.70, 700, 783.30, 866.60, 949.90, 1033.20, 1116.50, 1199.80, 1283.10, 1366.40, 1449.70),
|
||||
'annually': (7400, 8400, 9400, 10400, 11400, 12400, 13400, 14400, 15400, 16400, 17400),
|
||||
},
|
||||
'married': {
|
||||
'weekly': (152.90, 172.15, 191.40, 210.65, 229.90, 249.15, 268.40, 287.65, 306.90, 326.15, 345.40),
|
||||
'bi-weekly': (305.80, 344.30, 382.80, 421.30, 459.80, 498.30, 536.80, 575.30, 613.80, 652.30, 690.80),
|
||||
'semi-monthly': (331.25, 372.90, 414.55, 456.20, 497.85, 539.50, 581.15, 622.80, 664.45, 706.10, 747.75),
|
||||
'monthly': (662.50, 745.80, 829.10, 912.40, 995.70, 1079.00, 1162.30, 1245.60, 1328.90, 1412.20, 1495.50),
|
||||
'annually': (7950, 8950, 9950, 10950, 11950, 12950, 13950, 14950, 15950, 16950, 17950),
|
||||
},
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ny_sit_deduction_exemption_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_ny_sit_deduction_exemption_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': {
|
||||
'weekly': (142.30, 161.55, 180.80, 200.05, 219.30, 238.55, 257.80, 277.05, 296.30, 315.55, 334.80),
|
||||
'bi-weekly': (284.60, 323.10, 361.60, 400.10, 438.60, 477.10, 515.60, 544.10, 592.60, 631.10, 669.60),
|
||||
'semi-monthly': (308.35, 350.0, 391.65, 433.30, 474.95, 516.60, 558.25, 599.90, 641.55, 683.20, 724.85),
|
||||
'monthly': (616.70, 700, 783.30, 866.60, 949.90, 1033.20, 1116.50, 1199.80, 1283.10, 1366.40, 1449.70),
|
||||
'annually': (7400, 8400, 9400, 10400, 11400, 12400, 13400, 14400, 15400, 16400, 17400),
|
||||
},
|
||||
'married': {
|
||||
'weekly': (152.90, 172.15, 191.40, 210.65, 229.90, 249.15, 268.40, 287.65, 306.90, 326.15, 345.40),
|
||||
'bi-weekly': (305.80, 344.30, 382.80, 421.30, 459.80, 498.30, 536.80, 575.30, 613.80, 652.30, 690.80),
|
||||
'semi-monthly': (331.25, 372.90, 414.55, 456.20, 497.85, 539.50, 581.15, 622.80, 664.45, 706.10, 747.75),
|
||||
'monthly': (662.50, 745.80, 829.10, 912.40, 995.70, 1079.00, 1162.30, 1245.60, 1328.90, 1412.20, 1495.50),
|
||||
'annually': (7950, 8950, 9950, 10950, 11950, 12950, 13950, 14950, 15950, 16950, 17950),
|
||||
},
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ny_sit_deduction_exemption_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_ny_dor" model="res.partner">
|
||||
<field name="name">US New York - Department of Taxation and Finance - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_ny_dor_rsf" model="res.partner">
|
||||
<field name="name">US New York - Department of Taxation and Finance - Re-employment Service Fund</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_ny_dor_mcmt" model="res.partner">
|
||||
<field name="name">US New York - Department of Taxation and Finance - Metropolitan Commuter Transportation Mobility Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_ny_dor_sit" model="res.partner">
|
||||
<field name="name">US New York - Department of Taxation and Finance - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_ny_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US NY New York State Unemployment</field>
|
||||
<field name="code">ER_US_NY_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_ny_suta_wage_base', rate='us_ny_suta_rate', state_code='NY')</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_ny_suta_wage_base', rate='us_ny_suta_rate', state_code='NY')</field>
|
||||
<field name="partner_id" ref="res_partner_us_ny_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_er_us_ny_suta_rsf" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US NY New York State Re-employment Service Fund</field>
|
||||
<field name="code">ER_US_NY_SUTA_RSF</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_ny_suta_wage_base', rate='us_ny_suta_rsf_rate', state_code='NY')</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_ny_suta_wage_base', rate='us_ny_suta_rsf_rate', state_code='NY')</field>
|
||||
<field name="partner_id" ref="res_partner_us_ny_dor_rsf"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_er_us_ny_suta_mctmt" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US NY New York State Metropolitan Commuter Transportation Mobility Tax</field>
|
||||
<field name="code">ER_US_NY_SUTA_MCTMT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_ny_suta_wage_base', rate='us_ny_suta_mctmt_rate', state_code='NY')</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_ny_suta_wage_base', rate='us_ny_suta_mctmt_rate', state_code='NY')</field>
|
||||
<field name="partner_id" ref="res_partner_us_ny_dor_mcmt"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_ny_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US NY New York State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_NY_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = ny_new_york_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = ny_new_york_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_ny_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
133
l10n_us_hr_payroll/data/state/ok_oklahoma.xml
Normal file
133
l10n_us_hr_payroll/data/state/ok_oklahoma.xml
Normal file
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_ok_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US OK Oklahoma SUTA Wage Base</field>
|
||||
<field name="code">us_ok_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ok_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">18700.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ok_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_ok_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US OK Oklahoma SUTA Rate</field>
|
||||
<field name="code">us_ok_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ok_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">1.5</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ok_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ok_sit_allowances_rate" model="hr.rule.parameter">
|
||||
<field name="name">US OK Oklahoma Allowances Rate</field>
|
||||
<field name="code">us_ok_sit_allowances_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ok_sit_allowances_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'weekly' : 19.23,
|
||||
'bi-weekly' : 38.46,
|
||||
'semi-monthly': 41.67,
|
||||
'monthly' : 83.33,
|
||||
'quarterly' : 250.00,
|
||||
'semi-annual': 500.00,
|
||||
'annually': 1000.00,
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ok_sit_allowances_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ok_sit_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US OK Oklahoma SIT Tax Rate</field>
|
||||
<field name="code">us_ok_sit_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ok_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': {
|
||||
'weekly': ((122, 0.00, 0.00), (141, 0.50, 0.00), (170, 1.00, 0.10), (194, 2.00, 0.38), (216, 3.00, 0.87), (261, 4.00, 1.53), ('inf', 5.00, 3.30)),
|
||||
'bi-weekly': ((244, 0.00, 0.00), (283, 0.50, 0.00), (340, 1.00, 0.19), (388, 2.00, 0.77), (433, 3.00, 1.73), (521, 4.00, 3.06), ('inf', 5.00, 6.60)),
|
||||
'semi-monthly': ((265, 0.00, 0.00), (306, 0.50, 0.00), (369, 1.00, 0.21), (421, 2.00, 0.83), (469, 3.00, 1.88), (565, 4.00, 3.31), ('inf', 5.00, 7.15)),
|
||||
'monthly': ((529, 0.00, 0.00), (613, 0.50, 0.00), (738, 1.00, 0.42), (842, 2.00, 1.67), (938, 3.00, 3.75), (1129, 4.00, 6.63), ('inf', 5.00, 14.29)),
|
||||
'quarterly': ((1588, 0.00, 0.00), (1838, 0.50, 0.00), (2213, 1.00, 1.25), (2525, 2.00, 5.00), (2813, 3.00, 11.25), (3388, 4.00, 19.88), ('inf', 5.00, 42.88)),
|
||||
'semi-annual': ((3175, 0.00, 0.00), (3675, 0.50, 0.00), (4425, 1.00, 2.50), (5050, 2.00, 10.00), (5625, 3.00, 22.50), (6775, 4.00, 39.75), ('inf', 5.00, 85.75)),
|
||||
'annually': ((6350, 0.00, 0.00), (7350, 0.50, 0.00), (8850, 1.00, 5.00), (10100, 2.00, 20.00), (11250, 3.00, 45.00), (13550, 4.00, 79.50), ('inf', 5.00, 171.50)),
|
||||
},
|
||||
'married': {
|
||||
'weekly': ((244, 0.00, 0.00), (283, 0.50, 0.00), (340, 1.00, 0.19), (388, 2.00, 0.77), (433, 3.00, 1.73), (479, 4.00, 3.06), ('inf', 5.00, 4.90)),
|
||||
'bi-weekly': ((488, 0.00, 0.00), (565, 0.50, 0.00), (681, 1.00, 0.38), (777, 2.00, 1.54), (865, 3.00, 3.46), (958, 4.00, 6.12), ('inf', 5.00, 9.81)),
|
||||
'semi-monthly': ((529, 0.00, 0.00), (613, 0.50, 0.00), (738, 1.00, 0.42), (842, 2.00, 1.67), (938, 3.00, 3.75), (1038, 4.00, 6.63), ('inf', 5.00, 10.63)),
|
||||
'monthly': ((1058, 0.00, 0.00), (1225, 0.50, 0.00), (1475, 1.00, 0.83), (1683, 2.00, 3.33), (1875, 3.00, 7.50), (2075, 4.00, 13.25), ('inf', 5.00, 21.25)),
|
||||
'quarterly': ((3175, 0.00, 0.00), (3675, 0.50, 0.00), (4425, 1.00, 2.50), (5050, 2.00, 10.00), (5625, 3.00, 22.50), (6225, 4.00, 39.75), ('inf', 5.00, 63.75)),
|
||||
'semi-annual': ((6350, 0.00, 0.00), (7350, 0.50, 0.00), (8850, 1.00, 5.00), (10100, 2.00, 20.00), (11250, 3.00, 45.00), (12450, 4.00, 79.50), ('inf', 5.00, 127.50)),
|
||||
'annually': ((12700, 0.00, 0.00), (14700, 0.50, 0.00), (17700, 1.00, 10.00), (20200, 2.00, 40.00), (22500, 3.00, 90.00), (24900, 4.00, 159.00), ('inf', 5.00, 255.00)),
|
||||
},
|
||||
'head_household': {
|
||||
'weekly': ((122, 0.00, 0.00), (141, 0.50, 0.00), (170, 1.00, 0.10), (194, 2.00, 0.38), (216, 3.00, 0.87), (261, 4.00, 1.53), ('inf', 5.00, 3.30)),
|
||||
'bi-weekly': ((244, 0.00, 0.00), (283, 0.50, 0.00), (340, 1.00, 0.19), (388, 2.00, 0.77), (433, 3.00, 1.73), (521, 4.00, 3.06), ('inf', 5.00, 6.60)),
|
||||
'semi-monthly': ((265, 0.00, 0.00), (306, 0.50, 0.00), (369, 1.00, 0.21), (421, 2.00, 0.83), (469, 3.00, 1.88), (565, 4.00, 3.31), ('inf', 5.00, 7.15)),
|
||||
'monthly': ((529, 0.00, 0.00), (613, 0.50, 0.00), (738, 1.00, 0.42), (842, 2.00, 1.67), (938, 3.00, 3.75), (1129, 4.00, 6.63), ('inf', 5.00, 14.29)),
|
||||
'quarterly': ((1588, 0.00, 0.00), (1838, 0.50, 0.00), (2213, 1.00, 1.25), (2525, 2.00, 5.00), (2813, 3.00, 11.25), (3388, 4.00, 19.88), ('inf', 5.00, 42.88)),
|
||||
'semi-annual': ((3175, 0.00, 0.00), (3675, 0.50, 0.00), (4425, 1.00, 2.50), (5050, 2.00, 10.00), (5625, 3.00, 22.50), (6775, 4.00, 39.75), ('inf', 5.00, 85.75)),
|
||||
'annually': ((6350, 0.00, 0.00), (7350, 0.50, 0.00), (8850, 1.00, 5.00), (10100, 2.00, 20.00), (11250, 3.00, 45.00), (13550, 4.00, 79.50), ('inf', 5.00, 171.50)),
|
||||
},
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ok_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_ok_dor" model="res.partner">
|
||||
<field name="name">US Oklahoma - Employment Security Commission - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_ok_dor_sit" model="res.partner">
|
||||
<field name="name">US Oklahoma - Tax Commission - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_ok_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US OK Oklahoma State Unemployment</field>
|
||||
<field name="code">ER_US_OK_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_ok_suta_wage_base', rate='us_ok_suta_rate', state_code='OK')</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_ok_suta_wage_base', rate='us_ok_suta_rate', state_code='OK')</field>
|
||||
<field name="partner_id" ref="res_partner_us_ok_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_ok_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US OK Oklahoma State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_OK_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = ok_oklahoma_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = ok_oklahoma_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_ok_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
113
l10n_us_hr_payroll/data/state/ri_rhode_island.xml
Normal file
113
l10n_us_hr_payroll/data/state/ri_rhode_island.xml
Normal file
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_ri_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US RI Rhode Island SUTA Wage Base</field>
|
||||
<field name="code">us_ri_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ri_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">24000.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ri_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_ri_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US RI Rhode Island SUTA Rate</field>
|
||||
<field name="code">us_ri_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ri_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">1.3</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ri_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ri_sit_exemption_rate" model="hr.rule.parameter">
|
||||
<field name="name">US RI Rhode Island Exemption Rate</field>
|
||||
<field name="code">us_ri_sit_exemption_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ri_sit_exemption_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'weekly' : (( 0.00, 19.23), ( 4451.92, 0.00)),
|
||||
'bi-weekly' : (( 0.00, 38.46), ( 8903.85, 0.00)),
|
||||
'semi-monthly': (( 0.00, 41.67), ( 9645.83, 0.00)),
|
||||
'monthly' : (( 0.00, 83.33), ( 19291.67, 0.00)),
|
||||
'quarterly' : (( 0.00, 250.00), ( 57875.00, 0.00)),
|
||||
'semi-annually': (( 0.00, 500.00), ( 115750.00, 0.00)),
|
||||
'annually': (( 0.00, 1000.0), ( 231500.00, 0000)),
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ri_sit_exemption_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ri_sit_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US RI Rhode Island SIT Tax Rate</field>
|
||||
<field name="code">us_ri_sit_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ri_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'weekly': ((1255, 0.00, 3.75), (2853, 47.06, 4.75), ('inf', 122.97, 5.99)),
|
||||
'bi-weekly': ((2510, 0.00, 3.75), (5706, 94.13, 4.75), ('inf', 245.94, 5.99)),
|
||||
'semi-monthly': ((2719, 0.00, 3.75), (6181, 101.96, 4.75), ('inf', 266.41, 5.99)),
|
||||
'monthly': ((5438, 0.00, 3.75), (12363, 203.93, 4.75), ('inf', 532.87, 5.99)),
|
||||
'quarterly': ((16313, 0.00, 3.75), (37088, 611.74, 4.75), ('inf', 1598.55, 5.99)),
|
||||
'semi-annually': ((32625, 0.00, 3.75), (74175, 1223.44, 4.75), ('inf', 3197.07, 5.99)),
|
||||
'annually': ((65250, 0.00, 3.75), (148350, 2446.88, 4.75), ('inf', 6394.13, 5.99)),
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ri_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_ri_dor" model="res.partner">
|
||||
<field name="name">US Rhode Island - Department of Labor and Training - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_ri_dor_sit" model="res.partner">
|
||||
<field name="name">US Rhode Island - Division of Taxations - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_ri_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US RI Rhode Island State Unemployment</field>
|
||||
<field name="code">ER_US_RI_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_ri_suta_wage_base', rate='us_ri_suta_rate', state_code='RI')</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_ri_suta_wage_base', rate='us_ri_suta_rate', state_code='RI')</field>
|
||||
<field name="partner_id" ref="res_partner_us_ri_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_ri_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US RI Rhode Island State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_RI_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = ri_rhode_island_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = ri_rhode_island_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_ri_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
149
l10n_us_hr_payroll/data/state/sc_south_carolina.xml
Normal file
149
l10n_us_hr_payroll/data/state/sc_south_carolina.xml
Normal file
@@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_sc_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US SC South Carolina SUTA Wage Base</field>
|
||||
<field name="code">us_sc_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_sc_suta_wage_base_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">14000.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_sc_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_sc_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">14000.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_sc_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_sc_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US SC South Carolina SUTA Rate</field>
|
||||
<field name="code">us_sc_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_sc_suta_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">1.09</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_sc_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_sc_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">1.09</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_sc_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_sc_sit_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US SC South Carolina SIT Tax Rate</field>
|
||||
<field name="code">us_sc_sit_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_sc_sit_tax_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">[
|
||||
( 2450, 1.1, 0.0),
|
||||
( 4900, 3.0, 26.95),
|
||||
( 7350, 4.0, 100.45),
|
||||
( 9800, 5.0, 198.45),
|
||||
(12250, 6.0, 320.95),
|
||||
('inf', 7.0, 467.95),
|
||||
]</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_sc_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_sc_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">[
|
||||
( 2620, 0.8, 0.0),
|
||||
( 5240, 3.0, 57.64),
|
||||
( 7860, 4.0, 110.04),
|
||||
(10490, 5.0, 188.64),
|
||||
(13110, 6.0, 293.54),
|
||||
('inf', 7.0, 424.64),
|
||||
]</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_sc_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_sc_sit_personal_exemption_rate" model="hr.rule.parameter">
|
||||
<field name="name">US SC South Carolina Personal Exemption Rate</field>
|
||||
<field name="code">us_sc_sit_personal_exemption_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_sc_sit_personal_exemption_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2510</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_sc_sit_personal_exemption_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_sc_sit_personal_exemption_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2590</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_sc_sit_personal_exemption_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_sc_sit_standard_deduction_rate" model="hr.rule.parameter">
|
||||
<field name="name">US SC South Carolina Standard Deduction Rate</field>
|
||||
<field name="code">us_sc_sit_standard_deduction_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_sc_sit_standard_deduction_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">3470.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_sc_sit_standard_deduction_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_sc_sit_standard_deduction_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">3820.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_sc_sit_standard_deduction_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_sc_dor" model="res.partner">
|
||||
<field name="name">US South Carolina - Department of Labor and Industrial Relations - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_sc_dor_sit" model="res.partner">
|
||||
<field name="name">US South Carolina - Department of Taxation - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_sc_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US SC South Carolina State Unemployment</field>
|
||||
<field name="code">ER_US_SC_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_sc_suta_wage_base', rate='us_sc_suta_rate', state_code='SC')</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_sc_suta_wage_base', rate='us_sc_suta_rate', state_code='SC')</field>
|
||||
<field name="partner_id" ref="res_partner_us_sc_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_sc_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US SC South Carolina State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_SC_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = sc_south_carolina_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = sc_south_carolina_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_sc_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
51
l10n_us_hr_payroll/data/state/sd_south_dakota.xml
Normal file
51
l10n_us_hr_payroll/data/state/sd_south_dakota.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_sd_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US SD South Dakota SUTA Wage Base</field>
|
||||
<field name="code">us_sd_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_sd_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">15000.00</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_sd_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_sd_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US SD South Dakota SUTA Rate</field>
|
||||
<field name="code">us_sd_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_sd_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">1.75</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_sd_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_sd_dor" model="res.partner">
|
||||
<field name="name">US South Dakota - Department of Labor - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_sd_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US SD South Dakota State Unemployment</field>
|
||||
<field name="code">ER_US_SD_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_sd_suta_wage_base', rate='us_sd_suta_rate', state_code='SD')</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_sd_suta_wage_base', rate='us_sd_suta_rate', state_code='SD')</field>
|
||||
<field name="partner_id" ref="res_partner_us_sd_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
51
l10n_us_hr_payroll/data/state/tn_tennessee.xml
Normal file
51
l10n_us_hr_payroll/data/state/tn_tennessee.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_tn_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US TN Tennessee SUTA Wage Base</field>
|
||||
<field name="code">us_tn_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_tn_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">7000.00</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_tn_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_tn_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US TN Tennessee SUTA Rate</field>
|
||||
<field name="code">us_tn_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_tn_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2.7</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_tn_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_tn_dor" model="res.partner">
|
||||
<field name="name">US Tennessee - Department of Revenue - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_tn_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US TN Tennessee State Unemployment</field>
|
||||
<field name="code">ER_US_TN_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_tn_suta_wage_base', rate='us_tn_suta_rate', state_code='TN')</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_tn_suta_wage_base', rate='us_tn_suta_rate', state_code='TN')</field>
|
||||
<field name="partner_id" ref="res_partner_us_tn_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
157
l10n_us_hr_payroll/data/state/ut_utah.xml
Normal file
157
l10n_us_hr_payroll/data/state/ut_utah.xml
Normal file
@@ -0,0 +1,157 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_ut_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US UT Utah SUTA Wage Base</field>
|
||||
<field name="code">us_ut_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ut_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">36600.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ut_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_ut_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US UT Utah SUTA Rate</field>
|
||||
<field name="code">us_ut_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ut_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">1.5</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ut_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ut_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US UT Utah TAX Rate</field>
|
||||
<field name="code">us_ut_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ut_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">0.0495</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ut_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ut_sit_allowances_rate" model="hr.rule.parameter">
|
||||
<field name="name">US UT Utah Allowances Rate</field>
|
||||
<field name="code">us_ut_sit_allowances_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ut_sit_allowances_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': {
|
||||
'weekly' : 7,
|
||||
'bi-weekly' : 14,
|
||||
'semi-monthly': 15,
|
||||
'monthly' : 30,
|
||||
'quarterly' : 90,
|
||||
'semi-annual': 180,
|
||||
'annually': 360,
|
||||
},
|
||||
'married': {
|
||||
'weekly' : 14,
|
||||
'bi-weekly' : 28,
|
||||
'semi-monthly': 30,
|
||||
'monthly' : 60,
|
||||
'quarterly' : 180,
|
||||
'semi-annual': 360,
|
||||
'annually': 720,
|
||||
},
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ut_sit_allowances_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_ut_sit_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US UT Utah SIT Tax Rate</field>
|
||||
<field name="code">us_ut_sit_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_ut_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': {
|
||||
'weekly': ((137, 1.3)),
|
||||
'bi-weekly': ((274, 1.3)),
|
||||
'semi-monthly': ((297, 1.3)),
|
||||
'monthly': ((594, 1.3)),
|
||||
'quarterly': ((1782, 1.3)),
|
||||
'semi-annual': ((3564, 1.3)),
|
||||
'annually': ((7128, 1.3)),
|
||||
},
|
||||
'married': {
|
||||
'weekly': ((274, 1.3)),
|
||||
'bi-weekly': (548, 1.3),
|
||||
'semi-monthly': ((594, 1.3)),
|
||||
'monthly': ((1188, 1.3)),
|
||||
'quarterly': ((3564, 1.3)),
|
||||
'semi-annual': ((7128, 1.3)),
|
||||
'annually': ((14256, 1.3)),
|
||||
},
|
||||
'head_household': {
|
||||
'weekly': ((137, 1.3)),
|
||||
'bi-weekly': ((274, 1.3)),
|
||||
'semi-monthly': ((297, 1.3)),
|
||||
'monthly': ((594, 1.3)),
|
||||
'quarterly': ((1782, 1.3)),
|
||||
'semi-annual': ((3564, 1.3)),
|
||||
'annually': ((7128, 1.3)),
|
||||
},
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_ut_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_ut_dor" model="res.partner">
|
||||
<field name="name">US Utah - Employment Security Commission - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_ut_dor_sit" model="res.partner">
|
||||
<field name="name">US Utah - Tax Commission - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_ut_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US UT Utah State Unemployment</field>
|
||||
<field name="code">ER_US_UT_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_ut_suta_wage_base', rate='us_ut_suta_rate', state_code='UT')</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_ut_suta_wage_base', rate='us_ut_suta_rate', state_code='UT')</field>
|
||||
<field name="partner_id" ref="res_partner_us_ut_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_ut_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US UT Utah State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_UT_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = ut_utah_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = ut_utah_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_ut_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
121
l10n_us_hr_payroll/data/state/vt_vermont.xml
Normal file
121
l10n_us_hr_payroll/data/state/vt_vermont.xml
Normal file
@@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_vt_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US VT Vermont SUTA Wage Base</field>
|
||||
<field name="code">us_vt_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_vt_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">16000.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_vt_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_vt_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US VT Vermont SUTA Rate</field>
|
||||
<field name="code">us_vt_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_vt_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">1.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_vt_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_vt_sit_allowances_rate" model="hr.rule.parameter">
|
||||
<field name="name">US VT Vermont Allowances Rate</field>
|
||||
<field name="code">us_vt_sit_allowances_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_vt_sit_allowances_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'weekly' : 83.65,
|
||||
'bi-weekly' : 167.31,
|
||||
'semi-monthly': 181.25,
|
||||
'monthly' : 362.50,
|
||||
'quarterly' : 1087.50,
|
||||
'annually': 4350.00,
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_vt_sit_allowances_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_vt_sit_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US VT Vermont SIT Tax Rate</field>
|
||||
<field name="code">us_vt_sit_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_vt_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': {
|
||||
'weekly': ((60, 0.00, 0.00), (836, 0.00, 3.35), (1941, 26.00, 6.60), (3983, 98.93, 7.60), ('inf', 254.12, 8.75)),
|
||||
'bi-weekly': ((120, 0.00, 0.00), (1672, 0.00, 3.35), (3882, 51.99, 6.60), (7966, 197.85, 7.60), ('inf', 508.24, 8.75)),
|
||||
'semi-monthly': ((130, 0.00, 0.00), (1811, 0.00, 3.35), (4205, 56.31, 6.60), (8630, 214.32, 7.60), ('inf', 550.62, 8.75)),
|
||||
'monthly': ((260, 0.00, 0.00), (3623, 0.00, 3.35), (8410, 112.66, 6.60), (17260, 428.60, 7.60), ('inf', 1101.20, 8.75)),
|
||||
'quarterly': ((781, 0.00, 0.00), (10869, 0.00, 3.35), (25231, 337.95, 6.60), (51781, 1285.84, 7.60), ('inf', 3303.64, 8.75)),
|
||||
'annually': ((3125, 0.00, 0.00), (43475, 0.00, 3.35), (100925, 1351.73, 6.60), (207125, 5143.43, 7.60), ('inf', 13214.63, 8.75)),
|
||||
},
|
||||
'married': {
|
||||
'weekly': ((180, 0.00, 0.00), (1477, 0.00, 3.35), (3315, 43.45, 6.60), (4956, 164.76, 7.60), ('inf', 289.47, 8.75)),
|
||||
'bi-weekly': ((361, 0.00, 0.00), (2955, 0.00, 3.35), (6630, 86.90, 6.60), (9913, 329.45, 7.60), ('inf', 578.96, 8.75)),
|
||||
'semi-monthly': ((391, 0.00, 0.00), (3201, 0.00, 3.35), (7182, 94.14, 6.60), (10739, 356.88, 7.60), ('inf', 627.21, 8.75)),
|
||||
'monthly': ((781, 0.00, 0.00), (6402, 0.00, 3.35), (14365, 188.30, 6.60), (21477, 713.86, 7.60), ('inf', 1254.37, 8.75)),
|
||||
'quarterly': ((2344, 0.00, 0.00), (19206, 0.00, 3.35), (43094, 564.88, 6.60), (64431, 2141.49, 7.60), ('inf', 3763.10, 8.75)),
|
||||
'annually': ((9375, 0.00, 0.00), (76825, 0.00, 3.35), (172375, 2259.58, 6.60), (257725, 8565.88, 7.60), ('inf', 15052.48, 8.75)),
|
||||
},
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_vt_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_vt_dor" model="res.partner">
|
||||
<field name="name">US Vermont - Employment Security Commission - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_vt_dor_sit" model="res.partner">
|
||||
<field name="name">US Vermont - Tax Commission - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_vt_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US VT Vermont State Unemployment</field>
|
||||
<field name="code">ER_US_VT_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_vt_suta_wage_base', rate='us_vt_suta_rate', state_code='VT')</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_vt_suta_wage_base', rate='us_vt_suta_rate', state_code='VT')</field>
|
||||
<field name="partner_id" ref="res_partner_us_vt_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_vt_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US VT Vermont State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_VT_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = vt_vermont_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = vt_vermont_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_vt_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
100
l10n_us_hr_payroll/data/state/wi_wisconsin.xml
Normal file
100
l10n_us_hr_payroll/data/state/wi_wisconsin.xml
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_wi_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US WI Wisconsin SUTA Wage Base</field>
|
||||
<field name="code">us_wi_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_wi_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">14000.00</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_wi_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_wi_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US WI Wisconsin SUTA Rate</field>
|
||||
<field name="code">us_wi_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_wi_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">3.05</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_wi_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_wi_sit_exemption_rate" model="hr.rule.parameter">
|
||||
<field name="name">US WI Wisconsin Exemption Rate</field>
|
||||
<field name="code">us_wi_sit_exemption_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_wi_sit_exemption_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">22</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_wi_sit_exemption_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_wi_sit_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US WI Wisconsin SIT Tax Rate</field>
|
||||
<field name="code">us_wi_sit_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_wi_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': ((5730, 0.0000, 0.0), (15200, 4.0000, 0.0), (16486, 4.4800, 378.80), (26227, 6.5408, 436.41), (62950, 7.0224, 1073.55), (240190, 6.2700, 3652.39), ('inf', 7.6500, 14765.34)),
|
||||
'married': ((7870, 0.0000, 0.0), (18780, 4.0000, 0.0), (21400, 5.8400, 436.40), (28308, 7.0080, 589.41), (60750, 7.5240, 1073.52), (240190, 6.2700, 3514.46), ('inf', 7.6500, 14765.35)),
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_wi_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_wi_dor" model="res.partner">
|
||||
<field name="name">US Wisconsin - Department of Workforce Development - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_wi_dor_sit" model="res.partner">
|
||||
<field name="name">US Wisconsin - Department of Revenue - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_wi_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US WI Wisconsin State Unemployment</field>
|
||||
<field name="code">ER_US_WI_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_wi_suta_wage_base', rate='us_wi_suta_rate', state_code='WI')</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_wi_suta_wage_base', rate='us_wi_suta_rate', state_code='WI')</field>
|
||||
<field name="partner_id" ref="res_partner_us_wi_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_wi_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US WI Wisconsin State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_WI_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = wi_wisconsin_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = wi_wisconsin_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_wi_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
125
l10n_us_hr_payroll/data/state/wv_west_virginia.xml
Normal file
125
l10n_us_hr_payroll/data/state/wv_west_virginia.xml
Normal file
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_wv_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US WV West Virginia SUTA Wage Base</field>
|
||||
<field name="code">us_wv_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_wv_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">12000.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_wv_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_wv_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US WV West Virginia SUTA Rate</field>
|
||||
<field name="code">us_wv_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_wv_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2.7</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_wv_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_wv_sit_exemption_rate" model="hr.rule.parameter">
|
||||
<field name="name">US WV West Virginia Exemption Rate</field>
|
||||
<field name="code">us_wv_sit_exemption_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_wv_sit_exemption_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'weekly' : 38.46,
|
||||
'bi-weekly' : 76.92,
|
||||
'semi-monthly': 83.33,
|
||||
'monthly' : 166.67,
|
||||
'annually': 2000.00,
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_wv_sit_exemption_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_wv_sit_tax_rate" model="hr.rule.parameter">
|
||||
<field name="name">US WV West Virginia SIT Tax Rate</field>
|
||||
<field name="code">us_wv_sit_tax_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_wv_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': {
|
||||
'weekly':((192, 0.00, 3.0), (481, 5.76, 4.0), (769, 17.32, 4.5), (1154, 30.28, 6.0), ('inf', 53.38, 6.5)),
|
||||
'bi-weekly':((385, 0.00, 3.0), (962, 11.55, 4.0), (1538, 34.63, 4.5), (2308, 60.55, 6.0), ('inf', 106.75, 6.5)),
|
||||
'semi-monthly':((417, 0.00, 3.0), (1042, 12.51, 4.0), (1667, 37.51, 4.5), (2500, 65.64, 6.0), ('inf', 115.62, 6.5)),
|
||||
'monthly':((833, 0.00, 3.0), (2083, 24.99, 4.0), (3333, 74.99, 4.5), (5000, 131.24, 6.0), ('inf', 231.26, 6.5)),
|
||||
'annually':((10000, 0.00, 3.0), (25000, 300.00, 4.0), (40000, 900.00, 4.5), (60000, 1575.00, 6.0), ('inf', 2775.00, 6.5)),
|
||||
},
|
||||
'married': {
|
||||
'weekly':((115, 0.00, 3.0), (288, 3.45, 4.0), (462, 10.37, 4.5), (692, 18.20, 6.0), ('inf', 32.00, 6.5)),
|
||||
'bi-weekly':((231, 0.00, 3.0), (577, 6.93, 4.0), (923, 20.77, 4.5), (1385, 36.34, 6.0), ('inf', 64.06, 6.5)),
|
||||
'semi-monthly':((250, 0.00, 3.0), (625, 7.50, 4.0), (1000, 22.50, 4.5), (1500, 39.38, 6.0), ('inf', 69.38, 6.5)),
|
||||
'monthly':((500, 0.00, 3.0), (1250, 15.00, 4.0), (2000, 45.00, 4.5), (3000, 78.75, 6.0), ('inf', 138.75, 6.5)),
|
||||
'annually':((6000, 0.00, 3.0), (15000, 180.00, 4.0), (24000, 540.00, 4.5), (36000, 945.00, 6.0), ('inf', 1665.00, 6.5)),
|
||||
},
|
||||
'head_household': {
|
||||
'weekly':((192, 0.00, 3.0), (481, 5.76, 4.0), (769, 17.32, 4.5), (1154, 30.28, 6.0), ('inf', 53.38, 6.5)),
|
||||
'bi-weekly':((385, 0.00, 3.0), (962, 11.55, 4.0), (1538, 34.63, 4.5), (2308, 60.55, 6.0), ('inf', 106.75, 6.5)),
|
||||
'semi-monthly':((417, 0.00, 3.0), (1042, 12.51, 4.0), (1667, 37.51, 4.5), (2500, 65.64, 6.0), ('inf', 115.62, 6.5)),
|
||||
'monthly':((833, 0.00, 3.0), (2083, 24.99, 4.0), (3333, 74.99, 4.5), (5000, 131.24, 6.0), ('inf', 231.26, 6.5)),
|
||||
'annually':((10000, 0.00, 3.0), (25000, 300.00, 4.0), (40000, 900.00, 4.5), (60000, 1575.00, 6.0), ('inf', 2775.00, 6.5)),
|
||||
},
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_wv_sit_tax_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_wv_dor" model="res.partner">
|
||||
<field name="name">US West Virginia - WorkForce - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<record id="res_partner_us_wv_dor_sit" model="res.partner">
|
||||
<field name="name">US West Virginia - Department of Revenue - Income Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Categories -->
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_wv_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US WV West Virginia State Unemployment</field>
|
||||
<field name="code">ER_US_WV_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_wv_suta_wage_base', rate='us_wv_suta_rate', state_code='WV')</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_wv_suta_wage_base', rate='us_wv_suta_rate', state_code='WV')</field>
|
||||
<field name="partner_id" ref="res_partner_us_wv_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="hr_payroll_rule_ee_us_wv_sit" model="hr.salary.rule">
|
||||
<field name="sequence" eval="195"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||
<field name="name">EE: US WV West Virginia State Income Tax Withholding</field>
|
||||
<field name="code">EE_US_WV_SIT</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = wv_west_virginia_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = wv_west_virginia_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||
<field name="partner_id" ref="res_partner_us_wv_dor_sit"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
61
l10n_us_hr_payroll/data/state/wy_wyoming.xml
Normal file
61
l10n_us_hr_payroll/data/state/wy_wyoming.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Wage Base -->
|
||||
<record id="rule_parameter_us_wy_suta_wage_base" model="hr.rule.parameter">
|
||||
<field name="name">US WY Wyoming SUTA Wage Base</field>
|
||||
<field name="code">us_wy_suta_wage_base</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_wy_suta_wage_base_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">25400.00</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_wy_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_wy_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">26400.00</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_wy_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
<record id="rule_parameter_us_wy_suta_rate" model="hr.rule.parameter">
|
||||
<field name="name">US WY Wyoming SUTA Rate</field>
|
||||
<field name="code">us_wy_suta_rate</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_wy_suta_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2.10</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_wy_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_wy_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2.10</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_wy_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_wy_dor" model="res.partner">
|
||||
<field name="name">US Wyoming - Department of Workforce Services (WDWS) - Unemployment Tax</field>
|
||||
</record>
|
||||
|
||||
<!-- Rules -->
|
||||
<record id="hr_payroll_rule_er_us_wy_suta" model="hr.salary.rule">
|
||||
<field name="sequence" eval="450"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||
<field name="name">ER: US WY Wyoming State Unemployment</field>
|
||||
<field name="code">ER_US_WY_SUTA</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_wy_suta_wage_base', rate='us_wy_suta_rate', state_code='WY')</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_wy_suta_wage_base', rate='us_wy_suta_rate', state_code='WY')</field>
|
||||
<field name="partner_id" ref="res_partner_us_wy_dor"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -24,18 +24,33 @@ from .state.hi_hawaii import hi_hawaii_state_income_withholding
|
||||
from .state.ia_iowa import ia_iowa_state_income_withholding
|
||||
from .state.id_idaho import id_idaho_state_income_withholding
|
||||
from .state.il_illinois import il_illinois_state_income_withholding
|
||||
from .state.in_indiana import in_indiana_state_income_withholding
|
||||
from .state.ks_kansas import ks_kansas_state_income_withholding
|
||||
from .state.ky_kentucky import ky_kentucky_state_income_withholding
|
||||
from .state.la_louisiana import la_louisiana_state_income_withholding
|
||||
from .state.me_maine import me_maine_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.nd_north_dakota import nd_north_dakota_state_income_withholding
|
||||
from .state.ne_nebraska import ne_nebraska_state_income_withholding
|
||||
from .state.nj_newjersey import nj_newjersey_state_income_withholding
|
||||
from .state.nm_new_mexico import nm_new_mexico_state_income_withholding
|
||||
from .state.ny_new_york import ny_new_york_state_income_withholding
|
||||
from .state.oh_ohio import oh_ohio_state_income_withholding
|
||||
from .state.ok_oklahoma import ok_oklahoma_state_income_withholding
|
||||
from .state.ri_rhode_island import ri_rhode_island_state_income_withholding
|
||||
from .state.sc_south_carolina import sc_south_carolina_state_income_withholding
|
||||
from .state.ut_utah import ut_utah_state_income_withholding
|
||||
from .state.vt_vermont import vt_vermont_state_income_withholding
|
||||
from .state.va_virginia import va_virginia_state_income_withholding
|
||||
from .state.wa_washington import wa_washington_fml_er, \
|
||||
wa_washington_fml_ee
|
||||
from .state.wi_wisconsin import wi_wisconsin_state_income_withholding
|
||||
from .state.wv_west_virginia import wv_west_virginia_state_income_withholding
|
||||
|
||||
|
||||
class HRPayslip(models.Model):
|
||||
@@ -79,18 +94,33 @@ class HRPayslip(models.Model):
|
||||
'ia_iowa_state_income_withholding': ia_iowa_state_income_withholding,
|
||||
'id_idaho_state_income_withholding': id_idaho_state_income_withholding,
|
||||
'il_illinois_state_income_withholding': il_illinois_state_income_withholding,
|
||||
'in_indiana_state_income_withholding': in_indiana_state_income_withholding,
|
||||
'ks_kansas_state_income_withholding': ks_kansas_state_income_withholding,
|
||||
'ky_kentucky_state_income_withholding':ky_kentucky_state_income_withholding,
|
||||
'la_louisiana_state_income_withholding': la_louisiana_state_income_withholding,
|
||||
'me_maine_state_income_withholding': me_maine_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,
|
||||
'nd_north_dakota_state_income_withholding': nd_north_dakota_state_income_withholding,
|
||||
'ne_nebraska_state_income_withholding': ne_nebraska_state_income_withholding,
|
||||
'nj_newjersey_state_income_withholding': nj_newjersey_state_income_withholding,
|
||||
'nm_new_mexico_state_income_withholding': nm_new_mexico_state_income_withholding,
|
||||
'ny_new_york_state_income_withholding': ny_new_york_state_income_withholding,
|
||||
'oh_ohio_state_income_withholding': oh_ohio_state_income_withholding,
|
||||
'ok_oklahoma_state_income_withholding': ok_oklahoma_state_income_withholding,
|
||||
'ri_rhode_island_state_income_withholding': ri_rhode_island_state_income_withholding,
|
||||
'sc_south_carolina_state_income_withholding': sc_south_carolina_state_income_withholding,
|
||||
'ut_utah_state_income_withholding': ut_utah_state_income_withholding,
|
||||
'vt_vermont_state_income_withholding': vt_vermont_state_income_withholding,
|
||||
'va_virginia_state_income_withholding': va_virginia_state_income_withholding,
|
||||
'wa_washington_fml_er': wa_washington_fml_er,
|
||||
'wa_washington_fml_ee': wa_washington_fml_ee,
|
||||
'wi_wisconsin_state_income_withholding': wi_wisconsin_state_income_withholding,
|
||||
'wv_west_virginia_state_income_withholding': wv_west_virginia_state_income_withholding,
|
||||
})
|
||||
return res
|
||||
|
||||
|
||||
34
l10n_us_hr_payroll/models/state/in_indiana.py
Normal file
34
l10n_us_hr_payroll/models/state/in_indiana.py
Normal file
@@ -0,0 +1,34 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .general import _state_applies, sit_wage
|
||||
|
||||
|
||||
def in_indiana_state_income_withholding(payslip, categories, worked_days, inputs):
|
||||
"""
|
||||
Returns SIT eligible wage and rate.
|
||||
|
||||
:return: result, result_rate (wage, percent)
|
||||
"""
|
||||
state_code = 'IN'
|
||||
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.contract_id.schedule_pay
|
||||
additional = payslip.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
|
||||
personal_exemption = payslip.contract_id.us_payroll_config_value('in_w4_sit_personal_exemption')
|
||||
personal_exemption_rate = payslip.rule_parameter('us_in_sit_personal_exemption_rate')[schedule_pay][personal_exemption - 1]
|
||||
dependent_exemption = payslip.contract_id.us_payroll_config_value('in_w4_sit_dependent_exemption')
|
||||
dependent_exemption_rate = payslip.rule_parameter('us_in_sit_dependent_exemption_rate')[schedule_pay][dependent_exemption - 1]
|
||||
income_tax_rate = payslip.rule_parameter('us_in_suta_income_rate')
|
||||
|
||||
taxable_income = wage - (personal_exemption_rate + dependent_exemption_rate)
|
||||
withholding = taxable_income * (income_tax_rate / 100.0)
|
||||
|
||||
withholding = max(withholding, 0.0)
|
||||
withholding += additional
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
44
l10n_us_hr_payroll/models/state/ks_kansas.py
Normal file
44
l10n_us_hr_payroll/models/state/ks_kansas.py
Normal 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 ks_kansas_state_income_withholding(payslip, categories, worked_days, inputs):
|
||||
"""
|
||||
Returns SIT eligible wage and rate.
|
||||
|
||||
:return: result, result_rate (wage, percent)
|
||||
"""
|
||||
state_code = 'KS'
|
||||
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
|
||||
|
||||
filing_status = payslip.contract_id.us_payroll_config_value('ks_k4_sit_filing_status')
|
||||
if not filing_status:
|
||||
return 0.0, 0.0
|
||||
|
||||
schedule_pay = payslip.contract_id.schedule_pay
|
||||
additional = payslip.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
|
||||
allowances = payslip.contract_id.us_payroll_config_value('ks_k4_sit_allowances')
|
||||
allowances_amt = payslip.rule_parameter('us_ks_sit_allowances_rate')[schedule_pay]
|
||||
tax_table = payslip.rule_parameter('us_ks_sit_tax_rate')[filing_status].get(schedule_pay)
|
||||
|
||||
taxable_income = wage - (allowances * allowances_amt)
|
||||
withholding = 0.0
|
||||
last = 0.0
|
||||
for row in tax_table:
|
||||
amt, rate, flat_fee = row
|
||||
if wage <= float(amt):
|
||||
withholding = ((taxable_income - last) * (rate / 100)) + flat_fee
|
||||
break
|
||||
last = amt
|
||||
|
||||
withholding = max(withholding, 0.0)
|
||||
withholding += additional
|
||||
withholding = round(withholding)
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
32
l10n_us_hr_payroll/models/state/ky_kentucky.py
Normal file
32
l10n_us_hr_payroll/models/state/ky_kentucky.py
Normal file
@@ -0,0 +1,32 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .general import _state_applies, sit_wage
|
||||
|
||||
|
||||
def ky_kentucky_state_income_withholding(payslip, categories, worked_days, inputs):
|
||||
"""
|
||||
Returns SIT eligible wage and rate.
|
||||
|
||||
:return: result, result_rate (wage, percent)
|
||||
"""
|
||||
state_code = 'KY'
|
||||
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.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
|
||||
tax_rate = payslip.rule_parameter('us_ky_sit_tax_rate')
|
||||
standard_deduction = payslip.rule_parameter('us_ky_sit_standard_deduction_rate')
|
||||
|
||||
taxable_income = (wage * pay_periods) - standard_deduction
|
||||
withholding = taxable_income * (tax_rate / 100)
|
||||
|
||||
withholding = max(withholding, 0.0)
|
||||
withholding /= pay_periods
|
||||
withholding += additional
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
60
l10n_us_hr_payroll/models/state/la_louisiana.py
Normal file
60
l10n_us_hr_payroll/models/state/la_louisiana.py
Normal file
@@ -0,0 +1,60 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .general import _state_applies, sit_wage
|
||||
|
||||
|
||||
def la_louisiana_state_income_withholding(payslip, categories, worked_days, inputs):
|
||||
"""
|
||||
Returns SIT eligible wage and rate.
|
||||
|
||||
:return: result, result_rate (wage, percent)
|
||||
"""
|
||||
state_code = 'LA'
|
||||
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
|
||||
|
||||
filing_status = payslip.contract_id.us_payroll_config_value('la_l4_sit_filing_status')
|
||||
if not filing_status:
|
||||
return 0.0, 0.0
|
||||
|
||||
pay_periods = payslip.dict.get_pay_periods_in_year()
|
||||
personal_exemptions = payslip.contract_id.us_payroll_config_value('la_l4_sit_exemptions')
|
||||
dependent_exemptions = payslip.contract_id.us_payroll_config_value('la_l4_sit_dependents')
|
||||
tax_table = payslip.rule_parameter('us_la_sit_tax_rate')[filing_status]
|
||||
exemption_rate = payslip.rule_parameter('us_la_sit_personal_exemption_rate')
|
||||
dependent_rate = payslip.rule_parameter('us_la_sit_dependent_rate')
|
||||
|
||||
annual_wage = wage * pay_periods
|
||||
|
||||
effect_cap = 0.0
|
||||
multiplier = 0.0
|
||||
if filing_status == 'single':
|
||||
effect_cap = 12500.00
|
||||
multiplier = 1.60
|
||||
elif filing_status == 'married':
|
||||
effect_cap = 25000.00
|
||||
multiplier = 1.65
|
||||
|
||||
after_credits_under = (2.100 / 100) * (((personal_exemptions * exemption_rate) +
|
||||
(dependent_exemptions * dependent_rate)) / pay_periods)
|
||||
after_credits_over = 0.00
|
||||
if after_credits_under > effect_cap:
|
||||
after_credits_under = effect_cap
|
||||
after_credits_over_check = ((personal_exemptions * exemption_rate) + (dependent_exemptions * dependent_rate)) - effect_cap
|
||||
after_credits_over = (multiplier / 100.00) * (after_credits_over_check / pay_periods) if after_credits_over_check > 0 else 0.00
|
||||
withholding = 0.0
|
||||
last = 0.0
|
||||
for amt, rate in tax_table:
|
||||
withholding = withholding + ((rate / 100.0) * (wage - (last / pay_periods)))
|
||||
if annual_wage <= float(amt):
|
||||
break
|
||||
last = amt
|
||||
|
||||
withholding = withholding - (after_credits_under + after_credits_over)
|
||||
withholding = round(withholding, 2)
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
64
l10n_us_hr_payroll/models/state/me_maine.py
Normal file
64
l10n_us_hr_payroll/models/state/me_maine.py
Normal file
@@ -0,0 +1,64 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .general import _state_applies, sit_wage
|
||||
|
||||
|
||||
def me_maine_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 = 'ME'
|
||||
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
|
||||
|
||||
filing_status = payslip.contract_id.us_payroll_config_value('me_w4me_sit_filing_status')
|
||||
if not filing_status:
|
||||
return 0.0, 0.0
|
||||
|
||||
exempt = payslip.contract_id.us_payroll_config_value('state_income_tax_exempt')
|
||||
if exempt:
|
||||
return 0.0, 0.0
|
||||
|
||||
pay_periods = payslip.dict.get_pay_periods_in_year()
|
||||
additional = payslip.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
|
||||
allowances = payslip.contract_id.us_payroll_config_value('me_w4me_sit_allowances')
|
||||
tax_rate = payslip.rule_parameter('us_me_sit_tax_rate')[filing_status]
|
||||
personal_exemption = payslip.rule_parameter('us_me_sit_personal_exemption_rate')
|
||||
standard_deduction = payslip.rule_parameter('us_me_sit_standard_deduction_rate')[filing_status]
|
||||
|
||||
taxable_income = wage * pay_periods
|
||||
exemption_amt = allowances * personal_exemption
|
||||
last = 0.0
|
||||
standard_deduction_amt = 0.0
|
||||
for row in standard_deduction:
|
||||
amt, flat_amt = row
|
||||
if taxable_income < 82900:
|
||||
standard_deduction_amt = flat_amt
|
||||
break
|
||||
elif taxable_income < amt:
|
||||
standard_deduction_amt = last * (amt - taxable_income) / flat_amt
|
||||
break
|
||||
last = flat_amt
|
||||
|
||||
annual_income = taxable_income - (exemption_amt + standard_deduction_amt)
|
||||
withholding = 0.0
|
||||
for row in tax_rate:
|
||||
amt, flat_fee, rate = row
|
||||
if annual_income < float(amt):
|
||||
withholding = ((annual_income - last) * (rate / 100)) + flat_fee
|
||||
break
|
||||
last = amt
|
||||
|
||||
if withholding < 0.0:
|
||||
withholding = 0.0
|
||||
withholding = round(withholding / pay_periods)
|
||||
withholding += additional
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
43
l10n_us_hr_payroll/models/state/nd_north_dakota.py
Normal file
43
l10n_us_hr_payroll/models/state/nd_north_dakota.py
Normal file
@@ -0,0 +1,43 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .general import _state_applies, sit_wage
|
||||
|
||||
|
||||
def nd_north_dakota_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 = 'ND'
|
||||
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
|
||||
|
||||
filing_status = payslip.contract_id.us_payroll_config_value('nd_w4_sit_filing_status')
|
||||
if not filing_status:
|
||||
return 0.0, 0.0
|
||||
|
||||
pay_periods = payslip.dict.get_pay_periods_in_year()
|
||||
additional = payslip.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
|
||||
tax_rate = payslip.rule_parameter('us_nd_sit_tax_rate')[filing_status]
|
||||
|
||||
taxable_income = wage * pay_periods
|
||||
withholding = 0.0
|
||||
last = 0.0
|
||||
for row in tax_rate:
|
||||
amt, flat_fee, rate = row
|
||||
if taxable_income < float(amt):
|
||||
withholding = ((taxable_income - last) * (rate / 100)) + flat_fee
|
||||
break
|
||||
last = amt
|
||||
|
||||
withholding = round(withholding / pay_periods)
|
||||
withholding = max(withholding, 0.0)
|
||||
withholding += additional
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
49
l10n_us_hr_payroll/models/state/ne_nebraska.py
Normal file
49
l10n_us_hr_payroll/models/state/ne_nebraska.py
Normal file
@@ -0,0 +1,49 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .general import _state_applies, sit_wage
|
||||
|
||||
|
||||
def ne_nebraska_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 = 'NE'
|
||||
if not _state_applies(payslip, state_code):
|
||||
return 0.0, 0.0
|
||||
|
||||
personal_exempt = payslip.contract_id.us_payroll_config_value('state_income_tax_exempt')
|
||||
if personal_exempt:
|
||||
return 0.0, 0.0
|
||||
|
||||
# Determine Wage
|
||||
wage = sit_wage(payslip, categories)
|
||||
if not wage:
|
||||
return 0.0, 0.0
|
||||
|
||||
filing_status = payslip.contract_id.us_payroll_config_value('ne_w4n_sit_filing_status')
|
||||
if not filing_status:
|
||||
return 0.0, 0.0
|
||||
|
||||
schedule_pay = payslip.contract_id.schedule_pay
|
||||
additional = payslip.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
|
||||
allowances = payslip.contract_id.us_payroll_config_value('ne_w4n_sit_allowances')
|
||||
tax_rate = payslip.rule_parameter('us_ne_sit_tax_rate')[filing_status].get(schedule_pay)
|
||||
sit_allowance = payslip.rule_parameter('us_ne_sit_allowances_rate')[schedule_pay]
|
||||
|
||||
allowance_amt = allowances * sit_allowance
|
||||
taxable_income = wage - allowance_amt
|
||||
withholding = 0.0
|
||||
last = 0.0
|
||||
for row in tax_rate:
|
||||
amt, flat_fee, rate = row
|
||||
if taxable_income < float(amt):
|
||||
withholding = ((taxable_income - last) * (rate / 100)) + flat_fee
|
||||
break
|
||||
last = amt
|
||||
|
||||
withholding = max(withholding, 0.0)
|
||||
withholding += additional
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
54
l10n_us_hr_payroll/models/state/ny_new_york.py
Normal file
54
l10n_us_hr_payroll/models/state/ny_new_york.py
Normal file
@@ -0,0 +1,54 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .general import _state_applies, sit_wage
|
||||
|
||||
|
||||
def ny_new_york_state_income_withholding(payslip, categories, worked_days, inputs):
|
||||
"""
|
||||
Returns SIT eligible wage and rate.
|
||||
|
||||
:return: result, result_rate (wage, percent)
|
||||
"""
|
||||
state_code = 'NY'
|
||||
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
|
||||
|
||||
filing_status = payslip.contract_id.us_payroll_config_value('ny_it2104_sit_filing_status')
|
||||
if not filing_status:
|
||||
return 0.0, 0.0
|
||||
|
||||
schedule_pay = payslip.contract_id.schedule_pay
|
||||
additional = payslip.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
|
||||
tax_table = payslip.rule_parameter('us_ny_sit_tax_rate')[filing_status].get(schedule_pay)
|
||||
allowances = payslip.contract_id.us_payroll_config_value('ny_it2104_sit_allowances')
|
||||
over_10_deduction = payslip.rule_parameter('us_ny_sit_over_10_exemption_rate')[schedule_pay]
|
||||
deduction_exemption = payslip.rule_parameter('us_ny_sit_deduction_exemption_rate')[filing_status].get(schedule_pay)
|
||||
|
||||
if allowances > 10:
|
||||
if filing_status == 'single':
|
||||
wage -= over_10_deduction[0] + over_10_deduction[2] * allowances
|
||||
elif filing_status == 'married':
|
||||
wage -= over_10_deduction[1] + over_10_deduction[2] * allowances
|
||||
|
||||
else:
|
||||
if filing_status == 'single':
|
||||
wage -= deduction_exemption[allowances]
|
||||
elif filing_status == 'married':
|
||||
wage -= deduction_exemption[allowances]
|
||||
last = 0.0
|
||||
withholding = 0.0
|
||||
for row in tax_table:
|
||||
amt, rate, flat_fee = row
|
||||
if wage <= float(amt):
|
||||
withholding = ((wage - last) * rate) + flat_fee
|
||||
break
|
||||
last = amt
|
||||
|
||||
withholding = max(withholding, 0.0)
|
||||
withholding += additional
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
47
l10n_us_hr_payroll/models/state/ok_oklahoma.py
Normal file
47
l10n_us_hr_payroll/models/state/ok_oklahoma.py
Normal 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 ok_oklahoma_state_income_withholding(payslip, categories, worked_days, inputs):
|
||||
"""
|
||||
Returns SIT eligible wage and rate.
|
||||
|
||||
:return: result, result_rate (wage, percent)
|
||||
"""
|
||||
state_code = 'OK'
|
||||
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
|
||||
|
||||
if payslip.contract_id.us_payroll_config_value('state_income_tax_exempt'):
|
||||
return 0.0, 0.0
|
||||
|
||||
filing_status = payslip.contract_id.us_payroll_config_value('ok_w4_sit_filing_status')
|
||||
if not filing_status:
|
||||
return 0.0, 0.0
|
||||
|
||||
schedule_pay = payslip.contract_id.schedule_pay
|
||||
additional = payslip.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
|
||||
allowances = payslip.contract_id.us_payroll_config_value('ok_w4_sit_allowances')
|
||||
allowances_amt = payslip.rule_parameter('us_ok_sit_allowances_rate')[schedule_pay]
|
||||
tax_table = payslip.rule_parameter('us_ok_sit_tax_rate')[filing_status].get(schedule_pay)
|
||||
|
||||
taxable_income = wage - (allowances * allowances_amt)
|
||||
withholding = 0.0
|
||||
last = 0.0
|
||||
for row in tax_table:
|
||||
amt, rate, flat_fee = row
|
||||
if wage <= float(amt):
|
||||
withholding = ((taxable_income - last) * (rate / 100)) + flat_fee
|
||||
break
|
||||
last = amt
|
||||
|
||||
withholding = max(withholding, 0.0)
|
||||
withholding += additional
|
||||
withholding = round(withholding)
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
48
l10n_us_hr_payroll/models/state/ri_rhode_island.py
Normal file
48
l10n_us_hr_payroll/models/state/ri_rhode_island.py
Normal file
@@ -0,0 +1,48 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .general import _state_applies, sit_wage
|
||||
|
||||
|
||||
def ri_rhode_island_state_income_withholding(payslip, categories, worked_days, inputs):
|
||||
"""
|
||||
Returns SIT eligible wage and rate.
|
||||
|
||||
:return: result, result_rate (wage, percent)
|
||||
"""
|
||||
state_code = 'RI'
|
||||
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
|
||||
|
||||
if payslip.contract_id.us_payroll_config_value('state_income_tax_exempt'):
|
||||
return 0.0, 0.0
|
||||
|
||||
schedule_pay = payslip.contract_id.schedule_pay
|
||||
additional = payslip.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
|
||||
allowances = payslip.contract_id.us_payroll_config_value('ri_w4_sit_allowances')
|
||||
exemption_rate = payslip.rule_parameter('us_ri_sit_exemption_rate')[schedule_pay]
|
||||
tax_table = payslip.rule_parameter('us_ri_sit_tax_rate')[schedule_pay]
|
||||
|
||||
exemption_amt = 0.0
|
||||
for row in exemption_rate:
|
||||
amt, flat_fee = row
|
||||
if wage > amt:
|
||||
exemption_amt = flat_fee
|
||||
|
||||
taxable_income = wage - (allowances * exemption_amt)
|
||||
withholding = 0.0
|
||||
last = 0.0
|
||||
for row in tax_table:
|
||||
amt, flat_fee, rate = row
|
||||
if wage <= float(amt):
|
||||
withholding = ((taxable_income - last) * (rate / 100)) + flat_fee
|
||||
break
|
||||
last = amt
|
||||
|
||||
withholding = max(withholding, 0.0)
|
||||
withholding += additional
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
48
l10n_us_hr_payroll/models/state/sc_south_carolina.py
Normal file
48
l10n_us_hr_payroll/models/state/sc_south_carolina.py
Normal file
@@ -0,0 +1,48 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .general import _state_applies, sit_wage
|
||||
|
||||
|
||||
def sc_south_carolina_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 = 'SC'
|
||||
if not _state_applies(payslip, state_code):
|
||||
return 0.0, 0.0
|
||||
|
||||
personal_exempt = payslip.contract_id.us_payroll_config_value('state_income_tax_exempt')
|
||||
if personal_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()
|
||||
allowances = payslip.contract_id.us_payroll_config_value('sc_w4_sit_allowances')
|
||||
tax_rate = payslip.rule_parameter('us_sc_sit_tax_rate')
|
||||
personal_exemption = payslip.rule_parameter('us_sc_sit_personal_exemption_rate')
|
||||
deduction = payslip.rule_parameter('us_sc_sit_standard_deduction_rate')
|
||||
|
||||
annual_wage = wage * pay_periods
|
||||
personal_exemption_amt = allowances * personal_exemption
|
||||
standard_deduction = 0.0
|
||||
if allowances > 0:
|
||||
if (annual_wage * 0.1) > deduction:
|
||||
standard_deduction = deduction
|
||||
else:
|
||||
standard_deduction = annual_wage * (10 / 100)
|
||||
taxable_income = annual_wage - personal_exemption_amt - standard_deduction
|
||||
withholding = 0.0
|
||||
last = 0.0
|
||||
for cap, rate, flat_amt in tax_rate:
|
||||
if float(cap) > taxable_income:
|
||||
withholding = (taxable_income * (rate / 100.0) - flat_amt)
|
||||
break
|
||||
withholding /= pay_periods
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
39
l10n_us_hr_payroll/models/state/ut_utah.py
Normal file
39
l10n_us_hr_payroll/models/state/ut_utah.py
Normal file
@@ -0,0 +1,39 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .general import _state_applies, sit_wage
|
||||
|
||||
|
||||
def ut_utah_state_income_withholding(payslip, categories, worked_days, inputs):
|
||||
"""
|
||||
Returns SIT eligible wage and rate.
|
||||
|
||||
:return: result, result_rate (wage, percent)
|
||||
"""
|
||||
state_code = 'UT'
|
||||
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
|
||||
|
||||
filing_status = payslip.contract_id.us_payroll_config_value('ut_w4_sit_filing_status')
|
||||
if not filing_status:
|
||||
return 0.0, 0.0
|
||||
|
||||
schedule_pay = payslip.contract_id.schedule_pay
|
||||
additional = payslip.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
|
||||
tax_rate = payslip.rule_parameter('us_ut_tax_rate')
|
||||
allowances = payslip.rule_parameter('us_ut_sit_allowances_rate')[filing_status].get(schedule_pay)
|
||||
tax_table = payslip.rule_parameter('us_ut_sit_tax_rate')[filing_status].get(schedule_pay)
|
||||
|
||||
taxable_income = wage * tax_rate
|
||||
withholding = 0.0
|
||||
amt, rate = tax_table
|
||||
withholding = taxable_income - (allowances - ((wage - amt) * (rate / 100)))
|
||||
|
||||
withholding = max(withholding, 0.0)
|
||||
withholding += additional
|
||||
withholding = round(withholding)
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
46
l10n_us_hr_payroll/models/state/vt_vermont.py
Normal file
46
l10n_us_hr_payroll/models/state/vt_vermont.py
Normal file
@@ -0,0 +1,46 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .general import _state_applies, sit_wage
|
||||
|
||||
|
||||
def vt_vermont_state_income_withholding(payslip, categories, worked_days, inputs):
|
||||
"""
|
||||
Returns SIT eligible wage and rate.
|
||||
|
||||
:return: result, result_rate (wage, percent)
|
||||
"""
|
||||
state_code = 'VT'
|
||||
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
|
||||
|
||||
if payslip.contract_id.us_payroll_config_value('state_income_tax_exempt'):
|
||||
return 0.0, 0.0
|
||||
|
||||
filing_status = payslip.contract_id.us_payroll_config_value('vt_w4vt_sit_filing_status')
|
||||
if not filing_status:
|
||||
return 0.0, 0.0
|
||||
|
||||
schedule_pay = payslip.contract_id.schedule_pay
|
||||
additional = payslip.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
|
||||
allowances = payslip.contract_id.us_payroll_config_value('vt_w4vt_sit_allowances')
|
||||
allowance_amt = payslip.rule_parameter('us_vt_sit_allowances_rate')[schedule_pay]
|
||||
tax_table = payslip.rule_parameter('us_vt_sit_tax_rate')[filing_status].get(schedule_pay)
|
||||
|
||||
taxable_income = wage - (allowances * allowance_amt)
|
||||
withholding = 0.0
|
||||
last = 0.0
|
||||
for row in tax_table:
|
||||
amt, flat_fee, rate = row
|
||||
if wage <= float(amt):
|
||||
withholding = ((taxable_income - last) * (rate / 100)) + flat_fee
|
||||
break
|
||||
last = amt
|
||||
|
||||
withholding = max(withholding, 0.0)
|
||||
withholding += additional
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
47
l10n_us_hr_payroll/models/state/wi_wisconsin.py
Normal file
47
l10n_us_hr_payroll/models/state/wi_wisconsin.py
Normal 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 wi_wisconsin_state_income_withholding(payslip, categories, worked_days, inputs):
|
||||
"""
|
||||
Returns SIT eligible wage and rate.
|
||||
|
||||
:return: result, result_rate (wage, percent)
|
||||
"""
|
||||
state_code = 'WI'
|
||||
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
|
||||
|
||||
if payslip.contract_id.us_payroll_config_value('state_income_tax_exempt'):
|
||||
return 0.0, 0.0
|
||||
|
||||
filing_status = payslip.contract_id.us_payroll_config_value('wi_wt4_sit_filing_status')
|
||||
if not filing_status:
|
||||
return 0.0, 0.0
|
||||
|
||||
pay_periods = payslip.dict.get_pay_periods_in_year()
|
||||
additional = payslip.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
|
||||
exemptions = payslip.contract_id.us_payroll_config_value('wi_wt4_sit_exemptions')
|
||||
exemption_amt = payslip.rule_parameter('us_wi_sit_exemption_rate')
|
||||
tax_table = payslip.rule_parameter('us_wi_sit_tax_rate')[filing_status]
|
||||
|
||||
taxable_income = wage * pay_periods
|
||||
withholding = 0.0
|
||||
last = 0.0
|
||||
for row in tax_table:
|
||||
amt, rate, flat_fee = row
|
||||
if taxable_income <= float(amt):
|
||||
withholding = (((taxable_income - last) * (rate / 100)) + flat_fee) - (exemptions * exemption_amt)
|
||||
break
|
||||
last = amt
|
||||
|
||||
withholding = max(withholding, 0.0)
|
||||
withholding /= pay_periods
|
||||
withholding += additional
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
44
l10n_us_hr_payroll/models/state/wv_west_virginia.py
Normal file
44
l10n_us_hr_payroll/models/state/wv_west_virginia.py
Normal 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 wv_west_virginia_state_income_withholding(payslip, categories, worked_days, inputs):
|
||||
"""
|
||||
Returns SIT eligible wage and rate.
|
||||
|
||||
:return: result, result_rate (wage, percent)
|
||||
"""
|
||||
state_code = 'WV'
|
||||
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
|
||||
|
||||
filing_status = payslip.contract_id.us_payroll_config_value('wv_it104_sit_filing_status')
|
||||
if not filing_status:
|
||||
return 0.0, 0.0
|
||||
|
||||
schedule_pay = payslip.contract_id.schedule_pay
|
||||
additional = payslip.contract_id.us_payroll_config_value('state_income_tax_additional_withholding')
|
||||
exemptions = payslip.contract_id.us_payroll_config_value('wv_it104_sit_exemptions')
|
||||
exemption_amt = payslip.rule_parameter('us_wv_sit_exemption_rate')[schedule_pay]
|
||||
tax_table = payslip.rule_parameter('us_wv_sit_tax_rate')[filing_status].get(schedule_pay)
|
||||
|
||||
taxable_income = wage - (exemptions * exemption_amt)
|
||||
withholding = 0.0
|
||||
last = 0.0
|
||||
for row in tax_table:
|
||||
amt, flat_fee, rate = row
|
||||
if taxable_income <= float(amt):
|
||||
withholding = ((taxable_income - last) * (rate / 100)) + flat_fee
|
||||
break
|
||||
last = amt
|
||||
|
||||
withholding = max(withholding, 0.0)
|
||||
withholding += additional
|
||||
withholding = round(withholding)
|
||||
return wage, -((withholding / wage) * 100.0)
|
||||
@@ -124,6 +124,30 @@ class HRContractUSPayrollConfig(models.Model):
|
||||
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.')
|
||||
|
||||
in_w4_sit_personal_exemption = fields.Integer(string='Indiana In-W-4 Number of Personal Exemption', help='IN-W-4 5.')
|
||||
in_w4_sit_dependent_exemption = fields.Integer(string='Indiana In-W-4 Number of Dependent Exemption', help='IN-W-4 6.')
|
||||
|
||||
ks_k4_sit_filing_status = fields.Selection([
|
||||
('single', 'Single'),
|
||||
('married', 'Married'),
|
||||
('head of household', 'Head of Household'),
|
||||
], string='Kansas K-4 Filing Status', help='KS K-4 3.')
|
||||
ks_k4_sit_allowances = fields.Integer(string='Kansas KS K-4 Number of Allowances', help='KS K-4 Step 4.')
|
||||
|
||||
la_l4_sit_filing_status = fields.Selection([
|
||||
('single', 'Single'),
|
||||
('married', 'Married'),
|
||||
], string='Louisiana LA L-4 Filing Status', help='LA L-4 3.')
|
||||
la_l4_sit_exemptions = fields.Integer(string='Louisiana LA L-4 Number of Exemptions', help='LA L-4 6.')
|
||||
la_l4_sit_dependents = fields.Integer(string='Louisiana LA L-4 Number of Dependents', help='LA L-4 7.')
|
||||
|
||||
me_w4me_sit_filing_status = fields.Selection([
|
||||
('', 'Exempt'),
|
||||
('single', 'Single'),
|
||||
('married', 'Married'),
|
||||
], string='Maine W-4ME Filing Status', help='ME W-4ME 3.')
|
||||
me_w4me_sit_allowances = fields.Integer(string='Maine Allowances', help='W-4ME 4.')
|
||||
|
||||
mi_w4_sit_exemptions = fields.Integer(string='Michigan MI W-4 Exemptions', help='MI-W4 6.')
|
||||
|
||||
mn_w4mn_sit_filing_status = fields.Selection([
|
||||
@@ -172,6 +196,18 @@ class HRContractUSPayrollConfig(models.Model):
|
||||
], 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.')
|
||||
|
||||
nd_w4_sit_filing_status = fields.Selection([
|
||||
('single', 'Single'),
|
||||
('married', 'Married'),
|
||||
('head_household', 'Head of Household')
|
||||
], string='North Dakota ND W-4 Filing Status', help='ND W-4')
|
||||
|
||||
ne_w4n_sit_filing_status = fields.Selection([
|
||||
('single', 'Single'),
|
||||
('married', 'Married'),
|
||||
], string='Nebraska NE W-4N Filing Status', help='NE W-4N')
|
||||
ne_w4n_sit_allowances = fields.Integer(string='Nebraska NE W-4N Allowances', help='NE W-4N 1.')
|
||||
|
||||
nj_njw4_sit_filing_status = fields.Selection([
|
||||
('', 'Exempt'),
|
||||
('single', 'Single'),
|
||||
@@ -189,11 +225,55 @@ class HRContractUSPayrollConfig(models.Model):
|
||||
('E', 'E')
|
||||
], string='New Jersey Wage Chart Letter', help='NJ-W4. 3.')
|
||||
|
||||
ny_it2104_sit_filing_status = fields.Selection([
|
||||
('', 'Exempt'),
|
||||
('single', 'Single'),
|
||||
('married', 'Married'),
|
||||
], string='New York NY IT-2104 Filing Status', help='NY IT-2104')
|
||||
ny_it2104_sit_allowances = fields.Integer(string="New York IT-2104 Allowances", help="NY IT-2104 1. 2.")
|
||||
|
||||
# Ohio will use generic SIT exempt and additional fields
|
||||
oh_it4_sit_exemptions = fields.Integer(string='Ohio IT-4 Exemptions',
|
||||
help='Line 4')
|
||||
|
||||
ok_w4_sit_filing_status = fields.Selection([
|
||||
('single', 'Single'),
|
||||
('married', 'Married'),
|
||||
('head_household', 'Head of Household')
|
||||
], string='Oklahoma OK-W-4 Filing Status', help='OK-W-4')
|
||||
ok_w4_sit_allowances = fields.Integer(string='Oklahoma OK-W-4 Allowances', help='OK-W-4 1.2.3.')
|
||||
|
||||
ri_w4_sit_allowances = fields.Integer(string='Rhode Island RI W-4 Allowances', help='RI W-4 1.')
|
||||
|
||||
sc_w4_sit_allowances = fields.Integer(string='South Carolina SC W-4 Allowances', help='SC W-4 5.')
|
||||
|
||||
ut_w4_sit_filing_status = fields.Selection([
|
||||
('single', 'Single'),
|
||||
('married', 'Married'),
|
||||
('head_household', 'Head of Household')
|
||||
], string='Utah UT W-4 Filing Status', help='UT W-4 C.')
|
||||
|
||||
vt_w4vt_sit_filing_status = fields.Selection([
|
||||
('single', 'Single'),
|
||||
('married', 'Married'),
|
||||
('head_household', 'Head of Household')
|
||||
], string='Vermont VT W-4VT Filing Status', help='VT W-4VT')
|
||||
vt_w4vt_sit_allowances = fields.Integer(string='Vermont VT W-4VT Allowances', help='VT W-4VT 1.')
|
||||
|
||||
va_va4_sit_exemptions = fields.Integer(string='Virginia VA-4(P) Personal Exemptions',
|
||||
help='VA-4(P) 1(a)')
|
||||
va_va4_sit_other_exemptions = fields.Integer(string='Virginia VA-4(P) Age & Blindness Exemptions',
|
||||
help='VA-4(P) 1(b)')
|
||||
|
||||
wi_wt4_sit_filing_status = fields.Selection([
|
||||
('single', 'Single'),
|
||||
('married', 'Married'),
|
||||
], string='Wisconsin WT-4 Filing Status', help='WI WT-4')
|
||||
wi_wt4_sit_exemptions = fields.Integer(string='Wisconsin Exemptions', help='WI WT-4 1.(d)')
|
||||
|
||||
wv_it104_sit_filing_status = fields.Selection([
|
||||
('single', 'Single'),
|
||||
('married', 'Married'),
|
||||
('head_household', 'Head of Household')
|
||||
], string='West Virginia WV/IT-104 Filing Status', help='WV WV/IT-104')
|
||||
wv_it104_sit_exemptions = fields.Integer(string='West Virginia Exemptions', help='WV WV/IT-104 4.')
|
||||
|
||||
@@ -47,6 +47,17 @@ from . import test_us_id_idaho_payslip_2020
|
||||
from . import test_us_il_illinois_payslip_2019
|
||||
from . import test_us_il_illinois_payslip_2020
|
||||
|
||||
from . import test_us_in_indiana_payslip_2020
|
||||
|
||||
from . import test_us_ky_kentucky_payslip_2020
|
||||
|
||||
from . import test_us_ks_kansas_payslip_2020
|
||||
|
||||
from . import test_us_la_louisiana_payslip_2019
|
||||
from . import test_us_la_louisiana_payslip_2020
|
||||
|
||||
from . import test_us_me_maine_payslip_2020
|
||||
|
||||
from . import test_us_mi_michigan_payslip_2019
|
||||
from . import test_us_mi_michigan_payslip_2020
|
||||
|
||||
@@ -65,6 +76,10 @@ 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_nd_north_dakota_payslip_2020
|
||||
|
||||
from . import test_us_ne_nebraska_payslip_2020
|
||||
|
||||
from . import test_us_nh_new_hampshire_payslip_2020
|
||||
|
||||
from . import test_us_nj_newjersey_payslip_2019
|
||||
@@ -72,17 +87,44 @@ from . import test_us_nj_newjersey_payslip_2020
|
||||
|
||||
from . import test_us_nm_new_mexico_payslip_2020
|
||||
|
||||
from . import test_us_nv_nevada_payslip_2020
|
||||
|
||||
from . import test_us_ny_new_york_payslip_2019
|
||||
from . import test_us_ny_new_york_payslip_2020
|
||||
|
||||
from . import test_us_oh_ohio_payslip_2019
|
||||
from . import test_us_oh_ohio_payslip_2020
|
||||
|
||||
from . import test_us_ok_oklahoma_payslip_2020
|
||||
|
||||
from . import test_us_pa_pennsylvania_payslip_2019
|
||||
from . import test_us_pa_pennsylvania_payslip_2020
|
||||
|
||||
from . import test_us_ri_rhode_island_payslip_2020
|
||||
|
||||
from . import test_us_sc_south_carolina_payslip_2019
|
||||
from . import test_us_sc_south_carolina_payslip_2020
|
||||
|
||||
from . import test_us_sd_south_dakota_payslip_2020
|
||||
|
||||
from . import test_us_tn_tennessee_payslip_2020
|
||||
|
||||
from . import test_us_tx_texas_payslip_2019
|
||||
from . import test_us_tx_texas_payslip_2020
|
||||
|
||||
from . import test_us_us_utah_payslip_2020
|
||||
|
||||
from . import test_us_vt_vermont_payslip_2020
|
||||
|
||||
from . import test_us_va_virginia_payslip_2019
|
||||
from . import test_us_va_virginia_payslip_2020
|
||||
|
||||
from . import test_us_wa_washington_payslip_2019
|
||||
from . import test_us_wa_washington_payslip_2020
|
||||
|
||||
from . import test_us_wv_west_virginia_payslip_2020
|
||||
|
||||
from . import test_us_wi_wisconsin_payslip_2020
|
||||
|
||||
from . import test_us_wy_wyoming_payslip_2019
|
||||
from . import test_us_wy_wyoming_payslip_2020
|
||||
|
||||
36
l10n_us_hr_payroll/tests/test_us_in_indiana_payslip_2020.py
Executable file
36
l10n_us_hr_payroll/tests/test_us_in_indiana_payslip_2020.py
Executable 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 TestUsINPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
IN_UNEMP_MAX_WAGE = 9500.0
|
||||
IN_UNEMP = 2.5
|
||||
# Calculation based on https://www.in.gov/dor/files/dn01.pdf
|
||||
|
||||
def _test_sit(self, wage, additional_withholding, personal_exemption, dependent_exemption, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('IN'),
|
||||
state_income_tax_additional_withholding=additional_withholding,
|
||||
in_w4_sit_personal_exemption=personal_exemption,
|
||||
in_w4_sit_dependent_exemption=dependent_exemption,
|
||||
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('IN', self.IN_UNEMP, date(2020, 1, 1), wage_base=self.IN_UNEMP_MAX_WAGE)
|
||||
self._test_sit(800.0, 0.0, 5.0, 3.0, 'weekly', date(2020, 1, 1), 19.94)
|
||||
self._test_sit(800.0, 10.0, 5.0, 3.0, 'weekly', date(2020, 1, 1), 29.94)
|
||||
self._test_sit(9000.0, 0.0, 4.0, 3.0, 'monthly', date(2020, 1, 1), 267.82)
|
||||
self._test_sit(10000.0, 0.0, 2.0, 2.0, 'bi-weekly', date(2020, 1, 1), 316.79)
|
||||
35
l10n_us_hr_payroll/tests/test_us_ks_kansas_payslip_2020.py
Executable file
35
l10n_us_hr_payroll/tests/test_us_ks_kansas_payslip_2020.py
Executable 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 TestUsKSPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
KS_UNEMP_MAX_WAGE = 14000.0
|
||||
KS_UNEMP = 2.7
|
||||
# Calculation based on example https://revenue.ky.gov/Forms/42A003(T)%20(12-2019)%202020%20Tax%20Tables.pdf
|
||||
|
||||
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('KS'),
|
||||
ks_k4_sit_filing_status=filing_status,
|
||||
ks_k4_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)
|
||||
|
||||
def test_2020_taxes_example(self):
|
||||
self._test_er_suta('KS', self.KS_UNEMP, date(2020, 1, 1), wage_base=self.KS_UNEMP_MAX_WAGE)
|
||||
self._test_sit(625, 'married', 2, 0, 'semi-monthly', date(2020, 1, 1), 4.00)
|
||||
# self._test_sit(1500, 'single', 0, 0, 'bi-weekly', date(2020, 1, 1), 69.90)
|
||||
# self._test_sit(1500, 'single', 0, 0, 'bi-weekly', date(2020, 1, 1), 79.90)
|
||||
33
l10n_us_hr_payroll/tests/test_us_ky_kentucky_payslip_2020.py
Executable file
33
l10n_us_hr_payroll/tests/test_us_ky_kentucky_payslip_2020.py
Executable 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 TestUsKYPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
KY_UNEMP_MAX_WAGE = 10800.0
|
||||
KY_UNEMP = 2.4
|
||||
# Calculation based on example https://revenue.ky.gov/Forms/42A003(T)%20(12-2019)%202020%20Tax%20Tables.pdf
|
||||
|
||||
def _test_sit(self, wage, additional_withholding, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('KY'),
|
||||
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('KY', self.KY_UNEMP, date(2020, 1, 1), wage_base=self.KY_UNEMP_MAX_WAGE)
|
||||
self._test_sit(3020, 0.0, 'monthly', date(2020, 1, 1), 139.96)
|
||||
self._test_sit(1500, 0.0, 'bi-weekly', date(2020, 1, 1), 69.90)
|
||||
self._test_sit(1500, 10.0, 'bi-weekly', date(2020, 1, 1), 79.90)
|
||||
@@ -0,0 +1,87 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .common import TestUsPayslip, process_payslip
|
||||
|
||||
|
||||
class TestUsLAPayslip(TestUsPayslip):
|
||||
|
||||
# TAXES AND RATES
|
||||
LA_UNEMP_MAX_WAGE = 7700.00
|
||||
LA_UNEMP = -(6.20 / 100.0)
|
||||
|
||||
def test_taxes_single_weekly(self):
|
||||
salary = 700.00
|
||||
schedule_pay = 'weekly'
|
||||
filing_status = 'single'
|
||||
exemptions = 1
|
||||
dependents = 2
|
||||
# SEE http://revenue.louisiana.gov/TaxForms/1306(1_12)TF.pdf for example calculations
|
||||
# wh_to test is 19.42
|
||||
# Our algorithm correctly rounds whereas theirs does it prematurely.
|
||||
wh_to_check = -19.43
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
state_id=self.get_us_state('LA'),
|
||||
la_l4_sit_filing_status=filing_status,
|
||||
la_l4_sit_exemptions=exemptions,
|
||||
la_l4_sit_dependents=dependents,
|
||||
schedule_pay=schedule_pay)
|
||||
|
||||
self._log('2019 Louisiana 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.LA_UNEMP)
|
||||
self.assertPayrollEqual(cats['EE_US_SIT'], wh_to_check)
|
||||
|
||||
process_payslip(payslip)
|
||||
|
||||
remaining_la_unemp_wages = self.LA_UNEMP_MAX_WAGE - salary if (self.LA_UNEMP_MAX_WAGE - 2*salary < salary) \
|
||||
else salary
|
||||
|
||||
self._log('2019 Louisiana 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_la_unemp_wages * self.LA_UNEMP)
|
||||
|
||||
def test_taxes_married_biweekly(self):
|
||||
salary = 4600.00
|
||||
schedule_pay = 'bi-weekly'
|
||||
filing_status = 'married'
|
||||
exemptions = 2
|
||||
dependents = 3
|
||||
# SEE http://revenue.louisiana.gov/TaxForms/1306(1_12)TF.pdf for example calculations
|
||||
# wh_to test is 157.12
|
||||
wh_to_check = -157.12
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
state_id=self.get_us_state('LA'),
|
||||
la_l4_sit_filing_status=filing_status,
|
||||
la_l4_sit_exemptions=exemptions,
|
||||
la_l4_sit_dependents=dependents,
|
||||
schedule_pay=schedule_pay)
|
||||
|
||||
self._log('2019 Louisiana 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.LA_UNEMP)
|
||||
self.assertPayrollEqual(cats['EE_US_SIT'], wh_to_check)
|
||||
|
||||
process_payslip(payslip)
|
||||
|
||||
remaining_la_unemp_wages = self.LA_UNEMP_MAX_WAGE - salary if (self.LA_UNEMP_MAX_WAGE - 2*salary < salary) \
|
||||
else salary
|
||||
|
||||
self._log('2019 Louisiana 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_la_unemp_wages * self.LA_UNEMP)
|
||||
34
l10n_us_hr_payroll/tests/test_us_la_louisiana_payslip_2020.py
Executable file
34
l10n_us_hr_payroll/tests/test_us_la_louisiana_payslip_2020.py
Executable file
@@ -0,0 +1,34 @@
|
||||
# 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 TestUsLAPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
LA_UNEMP_MAX_WAGE = 7700.0
|
||||
LA_UNEMP = 6.20
|
||||
# Calculation based on http://revenue.louisiana.gov/TaxForms/1306(1_12)TF.pdf
|
||||
|
||||
def _test_sit(self, wage, filing_status, exemptions, dependents, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('LA'),
|
||||
la_l4_sit_filing_status=filing_status,
|
||||
la_l4_sit_exemptions=exemptions,
|
||||
la_l4_sit_dependents=dependents,
|
||||
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('LA', self.LA_UNEMP, date(2020, 1, 1), wage_base=self.LA_UNEMP_MAX_WAGE)
|
||||
self._test_sit(700.0, 'single', 1.0, 2.0, 'weekly', date(2020, 1, 1), 19.43)
|
||||
self._test_sit(4600.0, 'married', 2.0, 3.0, 'bi-weekly', date(2020, 1, 1), 157.12)
|
||||
38
l10n_us_hr_payroll/tests/test_us_me_maine_payslip_2020.py
Normal file
38
l10n_us_hr_payroll/tests/test_us_me_maine_payslip_2020.py
Normal file
@@ -0,0 +1,38 @@
|
||||
# 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 TestUsMEPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
ME_UNEMP_MAX_WAGE = 12000.0
|
||||
ME_UNEMP = 1.92
|
||||
# Calculation based on this file page.6 and 7 https://www.maine.gov/revenue/forms/with/2020/20_WH_Tab&Instructions.pdf
|
||||
|
||||
def _test_sit(self, wage, filing_status, additional_withholding, exempt, allowances, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('ME'),
|
||||
me_w4me_sit_filing_status=filing_status,
|
||||
state_income_tax_additional_withholding=additional_withholding,
|
||||
state_income_tax_exempt=exempt,
|
||||
me_w4me_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('ME', self.ME_UNEMP, date(2020, 1, 1), wage_base=self.ME_UNEMP_MAX_WAGE)
|
||||
self._test_sit(300.0, 'single', 0.0, False, 2, 'weekly', date(2020, 1, 1), 0.0)
|
||||
self._test_sit(800.0, 'single', 0.0, False, 2, 'weekly', date(2020, 1, 1), 26.00)
|
||||
self._test_sit(4500.0, 'married', 0.0, False, 2, 'weekly', date(2020, 1, 1), 277.00)
|
||||
self._test_sit(4500.0, 'married', 0.0, True, 2, 'weekly', date(2020, 1, 1), 0.00)
|
||||
self._test_sit(4500.0, 'married', 10.0, False, 2, 'weekly', date(2020, 1, 1), 287.00)
|
||||
@@ -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 TestUsNDPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
ND_UNEMP_MAX_WAGE = 37900.0
|
||||
ND_UNEMP = 1.02
|
||||
# Calculation based on this file page.47 https://www.nd.gov/tax/data/upfiles/media/rates-and-instructions.pdf?20200110115917
|
||||
|
||||
def _test_sit(self, wage, filing_status, additional_withholding, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('ND'),
|
||||
nd_w4_sit_filing_status=filing_status,
|
||||
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('ND', self.ND_UNEMP, date(2020, 1, 1), wage_base=self.ND_UNEMP_MAX_WAGE)
|
||||
self._test_sit(700.0, 'single', 0.0, 'weekly', date(2020, 1, 1), 6.0)
|
||||
self._test_sit(2500.0, 'married', 0.0, 'bi-weekly', date(2020, 1, 1), 29.0)
|
||||
self._test_sit(25000.0, 'head_household', 0.0, 'monthly', date(2020, 1, 1), 501.0)
|
||||
self._test_sit(25000.0, 'head_household', 10.0, 'monthly', date(2020, 1, 1), 511.0)
|
||||
37
l10n_us_hr_payroll/tests/test_us_ne_nebraska_payslip_2020.py
Normal file
37
l10n_us_hr_payroll/tests/test_us_ne_nebraska_payslip_2020.py
Normal file
@@ -0,0 +1,37 @@
|
||||
# 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 TestUsNEPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
NE_UNEMP_MAX_WAGE = 9000.0
|
||||
NE_UNEMP = 1.25
|
||||
|
||||
def _test_sit(self, wage, filing_status, exempt, additional_withholding, allowances, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('NE'),
|
||||
ne_w4n_sit_filing_status=filing_status,
|
||||
state_income_tax_exempt=exempt,
|
||||
state_income_tax_additional_withholding=additional_withholding,
|
||||
ne_w4n_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('NE', self.NE_UNEMP, date(2020, 1, 1), wage_base=self.NE_UNEMP_MAX_WAGE)
|
||||
self._test_sit(750.0, 'single', False, 0.0, 2, 'weekly', date(2020, 1, 1), 27.53)
|
||||
self._test_sit(9500.0, 'single', False, 0.0, 1, 'bi-weekly', date(2020, 1, 1), 612.63)
|
||||
self._test_sit(10500.0, 'married', False, 0.0, 1, 'bi-weekly', date(2020, 1, 1), 659.85)
|
||||
self._test_sit(9500.0, 'single', True, 0.0, 1, 'bi-weekly', date(2020, 1, 1), 0.0)
|
||||
self._test_sit(10500.0, 'single', False, 10.0, 2, 'monthly', date(2020, 1, 1), 625.2)
|
||||
16
l10n_us_hr_payroll/tests/test_us_nv_nevada_payslip_2020.py
Executable file
16
l10n_us_hr_payroll/tests/test_us_nv_nevada_payslip_2020.py
Executable file
@@ -0,0 +1,16 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from datetime import date
|
||||
from .common import TestUsPayslip
|
||||
|
||||
|
||||
class TestUsNVPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
NV_UNEMP_MAX_WAGE = 32500.0
|
||||
NV_UNEMP = 2.95
|
||||
|
||||
def test_2020_taxes(self):
|
||||
# Only has state unemployment
|
||||
self._test_er_suta('NV', self.NV_UNEMP, date(2020, 1, 1), wage_base=self.NV_UNEMP_MAX_WAGE)
|
||||
106
l10n_us_hr_payroll/tests/test_us_ny_new_york_payslip_2019.py
Normal file
106
l10n_us_hr_payroll/tests/test_us_ny_new_york_payslip_2019.py
Normal file
@@ -0,0 +1,106 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .common import TestUsPayslip, process_payslip
|
||||
|
||||
|
||||
class TestUsNYPayslip(TestUsPayslip):
|
||||
###
|
||||
# Taxes and Rates
|
||||
###
|
||||
NY_UNEMP_MAX_WAGE = 14000
|
||||
NY_UNEMP = 3.295
|
||||
NY_RSF = 0.075
|
||||
NY_MCTMT = 0.0
|
||||
|
||||
def test_single_example1(self):
|
||||
salary = 400
|
||||
schedule_pay = 'weekly'
|
||||
allowances = 3
|
||||
additional_withholding = 0
|
||||
filing_status = 'single'
|
||||
additional = 0.0
|
||||
wh = -8.20
|
||||
|
||||
employee = self._createEmployee()
|
||||
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
state_id=self.get_us_state('NY'),
|
||||
ny_it2104_sit_filing_status=filing_status,
|
||||
state_income_tax_additional_withholding=additional,
|
||||
ny_it2104_sit_allowances=allowances,
|
||||
schedule_pay=schedule_pay)
|
||||
|
||||
self.assertEqual(contract.schedule_pay, 'weekly')
|
||||
self._log('2018 New York tax first payslip:')
|
||||
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
|
||||
|
||||
payslip.compute_sheet()
|
||||
|
||||
cats = self._getCategories(payslip)
|
||||
|
||||
self.assertPayrollEqual(cats['NY_UNEMP'], cats['NY_UNEMP_WAGES'] * self.NY_UNEMP)
|
||||
self.assertPayrollEqual(cats['NY_RSF'], cats['NY_UNEMP_WAGES'] * self.NY_RSF)
|
||||
self.assertPayrollEqual(cats['NY_MCTMT'], cats['NY_UNEMP_WAGES'] * self.NY_MCTMT)
|
||||
self.assertPayrollEqual(cats['EE_US_SIT'], wh)
|
||||
|
||||
process_payslip(payslip)
|
||||
|
||||
def test_married_example2(self):
|
||||
salary = 5000
|
||||
schedule_pay = 'semi-monthly'
|
||||
allowances = 3
|
||||
additional = 0
|
||||
filing_status = 'married'
|
||||
wh = -284.19
|
||||
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
state_id=self.get_us_state('NY'),
|
||||
ny_it2104_sit_filing_status=filing_status,
|
||||
state_income_tax_additional_withholding=additional,
|
||||
ny_it2104_sit_allowances=allowances,
|
||||
schedule_pay=schedule_pay)
|
||||
|
||||
self._log('2019 New York tax first payslip:')
|
||||
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
|
||||
|
||||
payslip.compute_sheet()
|
||||
|
||||
cats = self._getCategories(payslip)
|
||||
|
||||
self.assertPayrollEqual(cats['NY_UNEMP'], cats['NY_UNEMP_WAGES'] * self.NY_UNEMP)
|
||||
self.assertPayrollEqual(cats['NY_RSF'], cats['NY_UNEMP_WAGES'] * self.NY_RSF)
|
||||
self.assertPayrollEqual(cats['NY_MCTMT'], cats['NY_UNEMP_WAGES'] * self.NY_MCTMT)
|
||||
self.assertPayrollEqual(cats['EE_US_SIT'], wh)
|
||||
|
||||
process_payslip(payslip)
|
||||
|
||||
def test_single_example3(self):
|
||||
salary = 50000
|
||||
schedule_pay = 'monthly'
|
||||
allowances = 3
|
||||
additional = 0
|
||||
filing_status = 'single'
|
||||
wh = -3575.63
|
||||
|
||||
employee = self._createEmployee()
|
||||
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
state_id=self.get_us_state('NY'),
|
||||
ny_it2104_sit_filing_status=filing_status,
|
||||
state_income_tax_additional_withholding=additional,
|
||||
ny_it2104_sit_allowances=allowances,
|
||||
schedule_pay=schedule_pay)
|
||||
|
||||
self._log('2019 New York 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)
|
||||
|
||||
38
l10n_us_hr_payroll/tests/test_us_ny_new_york_payslip_2020.py
Normal file
38
l10n_us_hr_payroll/tests/test_us_ny_new_york_payslip_2020.py
Normal file
@@ -0,0 +1,38 @@
|
||||
# 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 TestUsNYPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
NY_UNEMP_MAX_WAGE = 14000.0
|
||||
NY_UNEMP = 3.295
|
||||
NY_RSF = 0.075
|
||||
NY_MCTMT = 0.0
|
||||
|
||||
def _test_sit(self, wage, filing_status, additional_withholding, allowances, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('NY'),
|
||||
ny_it2104_sit_filing_status=filing_status,
|
||||
state_income_tax_additional_withholding=additional_withholding,
|
||||
ny_it2104_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):
|
||||
combined_er_rate = self.NY_UNEMP + self.NY_RSF + self.NY_MCTMT
|
||||
self._test_er_suta('NY', combined_er_rate, date(2020, 1, 1), wage_base=self.NY_UNEMP_MAX_WAGE, relaxed=True)
|
||||
self._test_sit(400.0, 'single', 0.0, 3, 'weekly', date(2020, 1, 1), 8.20)
|
||||
self._test_sit(50000.0, 'single', 0.0, 3, 'monthly', date(2020, 1, 1), 3575.63)
|
||||
self._test_sit(50000.0, 'married', 0.0, 3, 'monthly', date(2020, 1, 1), 3619.82)
|
||||
self._test_sit(50000.0, 'married', 10.0, 3, 'monthly', date(2020, 1, 1), 3629.83)
|
||||
37
l10n_us_hr_payroll/tests/test_us_ok_oklahoma_payslip_2020.py
Executable file
37
l10n_us_hr_payroll/tests/test_us_ok_oklahoma_payslip_2020.py
Executable file
@@ -0,0 +1,37 @@
|
||||
# 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 TestUsOKPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
OK_UNEMP_MAX_WAGE = 18700.0
|
||||
OK_UNEMP = 1.5
|
||||
# Calculation based on example https://www.ok.gov/tax/documents/2020WHTables.pdf
|
||||
|
||||
def _test_sit(self, wage, filing_status, allowances, additional_withholding, exempt, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('OK'),
|
||||
ok_w4_sit_filing_status=filing_status,
|
||||
ok_w4_sit_allowances=allowances,
|
||||
state_income_tax_additional_withholding=additional_withholding,
|
||||
state_income_tax_exempt=exempt,
|
||||
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('OK', self.OK_UNEMP, date(2020, 1, 1), wage_base=self.OK_UNEMP_MAX_WAGE)
|
||||
self._test_sit(1825, 'married', 2, 0, False, 'semi-monthly', date(2020, 1, 1), 46.00)
|
||||
self._test_sit(1825, 'married', 2, 0, True, 'monthly', date(2020, 1, 1), 0.00)
|
||||
self._test_sit(1000, 'single', 1, 0, False, 'weekly', date(2020, 1, 1), 39.00)
|
||||
self._test_sit(1000, 'single', 1, 10, False, 'weekly', date(2020, 1, 1), 49.00)
|
||||
37
l10n_us_hr_payroll/tests/test_us_ri_rhode_island_payslip_2020.py
Executable file
37
l10n_us_hr_payroll/tests/test_us_ri_rhode_island_payslip_2020.py
Executable file
@@ -0,0 +1,37 @@
|
||||
# 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 TestUsRIPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
RI_UNEMP_MAX_WAGE = 24000.0
|
||||
RI_UNEMP = 1.3
|
||||
# Calculation based on example http://www.tax.ri.gov/forms/2020/Withholding/2020%20Withhholding%20Tax%20Booklet.pdf
|
||||
|
||||
def _test_sit(self, wage, allowances, additional_withholding, exempt, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('RI'),
|
||||
ri_w4_sit_allowances=allowances,
|
||||
state_income_tax_additional_withholding=additional_withholding,
|
||||
state_income_tax_exempt=exempt,
|
||||
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('RI', self.RI_UNEMP, date(2020, 1, 1), wage_base=self.RI_UNEMP_MAX_WAGE)
|
||||
self._test_sit(2195, 1, 0, False, 'weekly', date(2020, 1, 1), 90.80)
|
||||
self._test_sit(1800, 2, 10, True, 'weekly', date(2020, 1, 1), 0.00)
|
||||
self._test_sit(10000, 1, 0, False, 'bi-weekly', date(2020, 1, 1), 503.15)
|
||||
self._test_sit(18000, 2, 0, False, 'monthly', date(2020, 1, 1), 860.54)
|
||||
self._test_sit(18000, 2, 10, False, 'monthly', date(2020, 1, 1), 870.55)
|
||||
@@ -0,0 +1,97 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .common import TestUsPayslip, process_payslip
|
||||
|
||||
|
||||
class TestUsSCPayslip(TestUsPayslip):
|
||||
|
||||
# Taxes and Rates
|
||||
SC_UNEMP_MAX_WAGE = 14000.0
|
||||
US_SC_UNEMP = -1.09 / 100
|
||||
US_SC_exemption_amount = 2510.00
|
||||
|
||||
def test_2019_taxes_weekly(self):
|
||||
# We will hand calculate the amount to test for state withholding.
|
||||
schedule_pay = 'weekly'
|
||||
salary = 50000.00 # Employee is paid 50000 per week to be in top tax bracket
|
||||
allowances = 2
|
||||
# Calculate annual wages
|
||||
annual = 50000 * 52.0
|
||||
# From our annual we deduct personal exemption amounts.
|
||||
# We deduct 2510.00 per exemption. Since we have two exemptions:
|
||||
personal_exemption = self.US_SC_exemption_amount * allowances # 5020.0
|
||||
# From annual, we will also deduct a standard_deduction of 3470.00 or .1 of salary, which ever
|
||||
# is small -> if 1 or more exemptions, else 0
|
||||
standard_deduction = 3470.00
|
||||
taxable_income = annual - personal_exemption - standard_deduction # 2591510.0
|
||||
# We then calculate the amounts off the SC tax pdf tables.
|
||||
# 2591478.0 is in the highest bracket
|
||||
test_amt = (taxable_income * (7.0 / 100.0)) - 467.95
|
||||
test_amt = 180935.51
|
||||
# Make it per period then negative
|
||||
test_amt = (test_amt / 52.0) # Divided by 52 since it is weekly.
|
||||
# test_amt = 3479.52
|
||||
test_amt = -test_amt
|
||||
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
state_id=self.get_us_state('SC'),
|
||||
state_income_tax_exempt=False,
|
||||
sc_w4_sit_allowances=allowances,
|
||||
schedule_pay=schedule_pay)
|
||||
|
||||
self._log('2019 South Carolina tax first payslip:')
|
||||
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
|
||||
payslip.compute_sheet()
|
||||
cats = self._getCategories(payslip)
|
||||
|
||||
self.assertPayrollAlmostEqual(cats['ER_US_SUTA'], self.SC_UNEMP_MAX_WAGE * self.US_SC_UNEMP)
|
||||
self.assertPayrollAlmostEqual(cats['EE_US_SIT'], test_amt)
|
||||
|
||||
process_payslip(payslip)
|
||||
|
||||
remaining_SC_UNEMP_wages = self.SC_UNEMP_MAX_WAGE - annual if (annual < self.SC_UNEMP_MAX_WAGE) \
|
||||
else 0.00
|
||||
|
||||
self._log('2019 South Carolina tax second payslip:')
|
||||
|
||||
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
|
||||
payslip.compute_sheet()
|
||||
cats = self._getCategories(payslip)
|
||||
|
||||
self.assertEqual(0.0, remaining_SC_UNEMP_wages)
|
||||
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_SC_UNEMP_wages * self.US_SC_UNEMP)
|
||||
|
||||
def test_2019_taxes_filing_status(self):
|
||||
salary = 20000.00 # Wages per pay period
|
||||
schedule_pay = 'monthly'
|
||||
annual = salary * 12
|
||||
allowances = 1
|
||||
# Hand Calculations
|
||||
personal_exemption = 2510.00
|
||||
standard_deduction = min(3470.00, .1 * annual) # 3470.0 but min is shown for the process
|
||||
taxable = annual - personal_exemption - standard_deduction
|
||||
# taxable = 234020
|
||||
test_amt = ((taxable) * (7.0 / 100.0)) - 467.95 # 15991.850000000002
|
||||
test_amt = test_amt / 12.0 # Put it into monthly -> 1332.654166666667
|
||||
# Make it negative
|
||||
test_amt = -test_amt
|
||||
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
state_id=self.get_us_state('SC'),
|
||||
state_income_tax_exempt=False,
|
||||
sc_w4_sit_allowances=allowances,
|
||||
schedule_pay=schedule_pay)
|
||||
|
||||
self._log('2019 South 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'], self.SC_UNEMP_MAX_WAGE * self.US_SC_UNEMP)
|
||||
self.assertPayrollAlmostEqual(cats['EE_US_SIT'], test_amt)
|
||||
|
||||
process_payslip(payslip)
|
||||
@@ -0,0 +1,34 @@
|
||||
# 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 TestUsSCPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
SC_UNEMP_MAX_WAGE = 14000.0
|
||||
SC_UNEMP = 1.09
|
||||
# Calculation based on https://dor.sc.gov/forms-site/Forms/WH1603F_2020.pdf
|
||||
|
||||
def _test_sit(self, wage, exempt, allowances, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('SC'),
|
||||
state_income_tax_exempt=exempt,
|
||||
sc_w4_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('SC', self.SC_UNEMP, date(2020, 1, 1), wage_base=self.SC_UNEMP_MAX_WAGE)
|
||||
self._test_sit(750.0, False, 3.0, 'weekly', date(2020, 1, 1), 28.73)
|
||||
self._test_sit(800.0, True, 0.0, 'weekly', date(2020, 1, 1), 0.00)
|
||||
self._test_sit(9000.0, False, 0.0, 'monthly', date(2020, 1, 1), 594.61)
|
||||
@@ -0,0 +1,13 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from datetime import date
|
||||
from .common import TestUsPayslip
|
||||
|
||||
|
||||
class TestUsSDPayslip(TestUsPayslip):
|
||||
# TAXES AND RATES
|
||||
SD_UNEMP_MAX_WAGE = 15000.00
|
||||
SD_UNEMP = 1.75
|
||||
|
||||
def test_2020_taxes(self):
|
||||
self._test_er_suta('SD', self.SD_UNEMP, date(2020, 1, 1), wage_base=self.SD_UNEMP_MAX_WAGE)
|
||||
@@ -0,0 +1,13 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from datetime import date
|
||||
from .common import TestUsPayslip
|
||||
|
||||
|
||||
class TestUsTNPayslip(TestUsPayslip):
|
||||
# TAXES AND RATES
|
||||
TN_UNEMP_MAX_WAGE = 7000.00
|
||||
TN_UNEMP = 2.7
|
||||
|
||||
def test_2020_taxes(self):
|
||||
self._test_er_suta('TN', self.TN_UNEMP, date(2020, 1, 1), wage_base=self.TN_UNEMP_MAX_WAGE)
|
||||
37
l10n_us_hr_payroll/tests/test_us_us_utah_payslip_2020.py
Executable file
37
l10n_us_hr_payroll/tests/test_us_us_utah_payslip_2020.py
Executable file
@@ -0,0 +1,37 @@
|
||||
# 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 TestUsUTPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
UT_UNEMP_MAX_WAGE = 36600.0
|
||||
UT_UNEMP = 1.5
|
||||
# Calculation based on example https://src.bna.com/MSO
|
||||
|
||||
def _test_sit(self, wage, filing_status, additional_withholding, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('UT'),
|
||||
ut_w4_sit_filing_status=filing_status,
|
||||
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('UT', self.UT_UNEMP, date(2020, 1, 1), wage_base=self.UT_UNEMP_MAX_WAGE)
|
||||
self._test_sit(400, 'single', 0, 'weekly', date(2020, 1, 1), 16.00)
|
||||
self._test_sit(1000, 'single', 0, 'bi-weekly', date(2020, 1, 1), 45.00)
|
||||
self._test_sit(855, 'married', 0, 'semi-monthly', date(2020, 1, 1), 16.00)
|
||||
self._test_sit(2500, 'married', 0, 'monthly', date(2020, 1, 1), 81.00)
|
||||
self._test_sit(8000, 'single', 0, 'quarterly', date(2020, 1, 1), 387.00)
|
||||
self._test_sit(8000, 'single', 10, 'quarterly', date(2020, 1, 1), 397.00)
|
||||
37
l10n_us_hr_payroll/tests/test_us_vt_vermont_payslip_2020.py
Executable file
37
l10n_us_hr_payroll/tests/test_us_vt_vermont_payslip_2020.py
Executable file
@@ -0,0 +1,37 @@
|
||||
# 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 TestUsVTPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
VT_UNEMP_MAX_WAGE = 16000.0
|
||||
VT_UNEMP = 1.0
|
||||
# Calculation based on example https://tax.vermont.gov/sites/tax/files/documents/WithholdingInstructions.pdf
|
||||
|
||||
def _test_sit(self, wage, filing_status, allowances, additional_withholding, exempt, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('VT'),
|
||||
vt_w4vt_sit_filing_status=filing_status,
|
||||
vt_w4vt_sit_allowances=allowances,
|
||||
state_income_tax_additional_withholding=additional_withholding,
|
||||
state_income_tax_exempt=exempt,
|
||||
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('VT', self.VT_UNEMP, date(2020, 1, 1), wage_base=self.VT_UNEMP_MAX_WAGE)
|
||||
self._test_sit(1800, 'married', 2, 0, False, 'weekly', date(2020, 1, 1), 53.73)
|
||||
self._test_sit(1800, 'married', 2, 10, False, 'weekly', date(2020, 1, 1), 63.73)
|
||||
self._test_sit(1000, 'single', 1, 0, True, 'weekly', date(2020, 1, 1), 0.00)
|
||||
self._test_sit(8000, 'single', 1, 10, False, 'bi-weekly', date(2020, 1, 1), 506.58)
|
||||
37
l10n_us_hr_payroll/tests/test_us_wi_wisconsin_payslip_2020.py
Executable file
37
l10n_us_hr_payroll/tests/test_us_wi_wisconsin_payslip_2020.py
Executable file
@@ -0,0 +1,37 @@
|
||||
# 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 TestUsWIPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
WI_UNEMP_MAX_WAGE = 14000.0
|
||||
WI_UNEMP = 3.05
|
||||
# Calculation based on example https://www.revenue.wi.gov/DOR%20Publications/pb166.pdf
|
||||
|
||||
def _test_sit(self, wage, filing_status, exemption, additional_withholding, exempt, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('WI'),
|
||||
wi_wt4_sit_filing_status=filing_status,
|
||||
wi_wt4_sit_exemptions=exemption,
|
||||
state_income_tax_additional_withholding=additional_withholding,
|
||||
state_income_tax_exempt=exempt,
|
||||
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('WI', self.WI_UNEMP, date(2020, 1, 1), wage_base=self.WI_UNEMP_MAX_WAGE)
|
||||
self._test_sit(300, 'single', 1, 0, False,'weekly', date(2020, 1, 1), 7.21)
|
||||
self._test_sit(700, 'married', 3, 0, False, 'bi-weekly', date(2020, 1, 1), 13.35)
|
||||
self._test_sit(1300, 'single', 1, 10, True, 'bi-weekly', date(2020, 1, 1), 0.00)
|
||||
self._test_sit(700, 'married', 3, 10, False, 'bi-weekly', date(2020, 1, 1), 23.35)
|
||||
36
l10n_us_hr_payroll/tests/test_us_wv_west_virginia_payslip_2020.py
Executable file
36
l10n_us_hr_payroll/tests/test_us_wv_west_virginia_payslip_2020.py
Executable 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 TestUsWVPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2020 Taxes and Rates
|
||||
###
|
||||
WV_UNEMP_MAX_WAGE = 12000.0
|
||||
WV_UNEMP = 2.7
|
||||
# Calculation based on example https://tax.wv.gov/Documents/TaxForms/it100.1a.pdf
|
||||
|
||||
def _test_sit(self, wage, filing_status, exemption, additional_withholding, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('WV'),
|
||||
wv_it104_sit_filing_status=filing_status,
|
||||
wv_it104_sit_exemptions=exemption,
|
||||
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('WV', self.WV_UNEMP, date(2020, 1, 1), wage_base=self.WV_UNEMP_MAX_WAGE)
|
||||
self._test_sit(1250, 'married', 2, 0, 'semi-monthly', date(2020, 1, 1), 44.00)
|
||||
self._test_sit(1300, 'single', 1, 0, 'bi-weekly', date(2020, 1, 1), 46.00)
|
||||
self._test_sit(1300, 'single', 1, 10, 'bi-weekly', date(2020, 1, 1), 56.00)
|
||||
self._test_sit(15000, 'single', 2, 0, 'monthly', date(2020, 1, 1), 860.00)
|
||||
58
l10n_us_hr_payroll/tests/test_us_wy_wyoming_payslip_2019.py
Normal file
58
l10n_us_hr_payroll/tests/test_us_wy_wyoming_payslip_2019.py
Normal file
@@ -0,0 +1,58 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from datetime import date
|
||||
from .common import TestUsPayslip, process_payslip
|
||||
|
||||
|
||||
class TestUsWYPayslip(TestUsPayslip):
|
||||
|
||||
# TAXES AND RATES
|
||||
WY_UNEMP_MAX_WAGE = 25400
|
||||
WY_UNEMP = -2.10 / 100.0
|
||||
|
||||
def test_2019_taxes(self):
|
||||
salary = 15000.00
|
||||
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
state_id=self.get_us_state('WY'))
|
||||
|
||||
self._log('2019 Wyoming 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.WY_UNEMP)
|
||||
|
||||
process_payslip(payslip)
|
||||
|
||||
# Make a new payslip, this one will have maximums
|
||||
|
||||
remaining_wy_unemp_wages = self.WY_UNEMP_MAX_WAGE - salary if (self.WY_UNEMP_MAX_WAGE - 2*salary < salary) \
|
||||
else salary
|
||||
|
||||
self._log('2019 Wyoming 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_wy_unemp_wages * self.WY_UNEMP)
|
||||
|
||||
def test_2019_taxes_with_external(self):
|
||||
# Wage is the cap itself, 25400
|
||||
# so salary is equal to self.WY_UNEMP
|
||||
salary = 25400
|
||||
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
state_id=self.get_us_state('WY'))
|
||||
|
||||
self._log('2019 Wyoming External 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.WY_UNEMP)
|
||||
13
l10n_us_hr_payroll/tests/test_us_wy_wyoming_payslip_2020.py
Normal file
13
l10n_us_hr_payroll/tests/test_us_wy_wyoming_payslip_2020.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from datetime import date
|
||||
from .common import TestUsPayslip
|
||||
|
||||
|
||||
class TestUsWYPayslip(TestUsPayslip):
|
||||
# TAXES AND RATES
|
||||
WY_UNEMP_MAX_WAGE = 26400.00
|
||||
WY_UNEMP = 2.10
|
||||
|
||||
def test_2020_taxes(self):
|
||||
self._test_er_suta('WY', self.WY_UNEMP, date(2020, 1, 1), wage_base=self.WY_UNEMP_MAX_WAGE)
|
||||
@@ -119,6 +119,36 @@
|
||||
<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_in_indiana" string="IN Indiana" attrs="{'invisible':[('state_id', '!=', %(base.state_us_15)s)]}">
|
||||
<p colspan="2"><h3>Form IN W-4 - State Income Tax</h3></p>
|
||||
<field name="in_w4_sit_personal_exemption" string="Personal Exemption 5."/>
|
||||
<field name="in_w4_sit_dependent_exemption" string="Dependent Exemption 6."/>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 7."/>
|
||||
</group>
|
||||
<group name="state_ks_kansas" string="KS Kansas" attrs="{'invisible':[('state_id', '!=', %(base.state_us_17)s)]}">
|
||||
<p colspan="2"><h3>Form KS K-4 - State Income Tax</h3></p>
|
||||
<field name="ks_k4_sit_filing_status" string="Filing Status 3."/>
|
||||
<field name="ks_k4_sit_allowances" string="Allowances 4."/>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 5."/>
|
||||
<field name="state_income_tax_exempt" string="Exempt 6."/>
|
||||
</group>
|
||||
<group name="state_ky_kentucky" string="KY Kentucky" attrs="{'invisible':[('state_id', '!=', %(base.state_us_18)s)]}">
|
||||
<p colspan="2"><h3>No additional fields.</h3></p>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 4."/>
|
||||
</group>
|
||||
<group name="state_la_louisiana" string="LA Louisiana" attrs="{'invisible':[('state_id', '!=', %(base.state_us_19)s)]}">
|
||||
<p colspan="2"><h3>Form LA L-4 - State Income Tax</h3></p>
|
||||
<field name="la_l4_sit_filing_status" string="Filing Status 3."/>
|
||||
<field name="la_l4_sit_exemptions" string="Personal Exemption 6."/>
|
||||
<field name="la_l4_sit_dependents" string="Dependent Exemption 7."/>
|
||||
</group>
|
||||
<group name="state_me_maine" string="ME Maine" attrs="{'invisible':[('state_id', '!=', %(base.state_us_20)s)]}">
|
||||
<p colspan="2"><h3>Form W-4ME - State Income Tax</h3></p>
|
||||
<field name="me_w4me_sit_filing_status" string="Filing Status 3."/>
|
||||
<field name="me_w4me_sit_allowances" string="Allowances 4."/>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 5."/>
|
||||
<field name="state_income_tax_exempt" string="Exempt 6."/>
|
||||
</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."/>
|
||||
@@ -155,6 +185,18 @@
|
||||
<field name="nc_nc4_sit_allowances" string="Allowances 1."/>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 2."/>
|
||||
</group>
|
||||
<group name="state_nd_north_dakota" string="ND North Dakota" attrs="{'invisible':[('state_id', '!=', %(base.state_us_29)s)]}">
|
||||
<p colspan="2"><h3>Form ND W-4 - State Income Tax</h3></p>
|
||||
<field name="nd_w4_sit_filing_status" string="Filing Status"/>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 2."/>
|
||||
</group>
|
||||
<group name="state_ne_nebraska" string="NE Nebraska" attrs="{'invisible':[('state_id', '!=', %(base.state_us_22)s)]}">
|
||||
<p colspan="2"><h3>Form NC-4 - State Income Tax</h3></p>
|
||||
<field name="ne_w4n_sit_filing_status" string="Filing Status"/>
|
||||
<field name="ne_w4n_sit_allowances" string="Allowances 1."/>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 2."/>
|
||||
<field name="state_income_tax_exempt" string="Exempt 3."/>
|
||||
</group>
|
||||
<group name="state_nh_new_hampshire" string="NH New Hampshire" attrs="{'invisible':[('state_id', '!=', %(base.state_us_24)s)]}">
|
||||
<p colspan="2"><h3>No additional fields.</h3></p>
|
||||
</group>
|
||||
@@ -169,19 +211,64 @@
|
||||
<p colspan="2"><h3>Form NM W-4 - State Income Tax</h3></p>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 7."/>
|
||||
</group>
|
||||
<group name="state_nv_nevada" string="NV Nevada" attrs="{'invisible':[('state_id', '!=', %(base.state_us_23)s)]}">
|
||||
<p colspan="2"><h3>No additional fields.</h3></p>
|
||||
</group>
|
||||
<group name="state_ny_new_york" string="NY New York" attrs="{'invisible':[('state_id', '!=', %(base.state_us_27)s)]}">
|
||||
<p colspan="2"><h3>Form NY IT-2104 - State Income Tax</h3></p>
|
||||
<field name="ny_it2104_sit_filing_status" string="Filing Status"/>
|
||||
<field name="ny_it2104_sit_allowances" string="Allowances 1.2."/>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 7."/>
|
||||
</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"/>
|
||||
<field name="oh_it4_sit_exemptions" string="Exemptions"/>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding (Line 5)"/>
|
||||
</group>
|
||||
<group name="state_ok_oklahoma" string="OK Oklahoma" attrs="{'invisible':[('state_id', '!=', %(base.state_us_31)s)]}">
|
||||
<p colspan="2"><h3>Form OK-W-4 - State Income Tax</h3></p>
|
||||
<field name="ok_w4_sit_filing_status" string="Filing Status"/>
|
||||
<field name="ok_w4_sit_allowances" string="Allowances 1.2.3."/>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 6."/>
|
||||
<field name="state_income_tax_exempt" string="Exempt 7."/>
|
||||
</group>
|
||||
<group name="state_pa_pennsylvania" string="PA Pennsylvania" attrs="{'invisible':[('state_id', '!=', %(base.state_us_39)s)]}">
|
||||
<field name="state_income_tax_exempt"/>
|
||||
<field name="state_income_tax_additional_withholding"/>
|
||||
</group>
|
||||
<group name="state_rhode_island" string="RI Rhode Island" attrs="{'invisible':[('state_id', '!=', %(base.state_us_40)s)]}">
|
||||
<p colspan="2"><h3>Form RI W-4 - State Income Tax</h3></p>
|
||||
<field name="ri_w4_sit_allowances" string="Allowances 1."/>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 2."/>
|
||||
<field name="state_income_tax_exempt" string="Exempt 3."/>
|
||||
</group>
|
||||
<group name="state_sc_south_carolina" string="SC South Carolina" attrs="{'invisible':[('state_id', '!=', %(base.state_us_41)s)]}">
|
||||
<p colspan="2"><h3>Form SC W-4 - State Income Tax</h3></p>
|
||||
<field name="sc_w4_sit_allowances" string="Allowances 5."/>
|
||||
<field name="state_income_tax_exempt" string="Exempt 7."/>
|
||||
</group>
|
||||
<group name="state_sd_south_dakota" string="SD South Dakota" attrs="{'invisible':[('state_id', '!=', %(base.state_us_42)s)]}">
|
||||
<p colspan="2"><h3>No additional fields.</h3></p>
|
||||
</group>
|
||||
<group name="state_tn_tennessee" string="TN Tennessee" attrs="{'invisible':[('state_id', '!=', %(base.state_us_43)s)]}">
|
||||
<p colspan="2"><h3>No additional fields.</h3></p>
|
||||
</group>
|
||||
<group name="state_tx_texas" string="TX Texas" attrs="{'invisible':[('state_id', '!=', %(base.state_us_44)s)]}">
|
||||
<p colspan="2"><h3>No additional fields.</h3></p>
|
||||
</group>
|
||||
<group name="state_ut_utah" string="UT Utah" attrs="{'invisible':[('state_id', '!=', %(base.state_us_45)s)]}">
|
||||
<p colspan="2"><h3>Form UT W-4 - State Income Tax</h3></p>
|
||||
<field name="ut_w4_sit_filing_status" string="Filing Status 1(C)."/>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 4(C)."/>
|
||||
</group>
|
||||
<group name="state_vt_vermont" string="VT Vermont" attrs="{'invisible':[('state_id', '!=', %(base.state_us_46)s)]}">
|
||||
<p colspan="2"><h3>Form VT W-4VT - State Income Tax</h3></p>
|
||||
<field name="vt_w4vt_sit_filing_status" string="Filing Status"/>
|
||||
<field name="vt_w4vt_sit_allowances" string="Allowances 1."/>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 6."/>
|
||||
<field name="state_income_tax_exempt" string="Exempt"/>
|
||||
</group>
|
||||
<group name="state_va_virginia" string="VA Virginia" attrs="{'invisible':[('state_id', '!=', %(base.state_us_47)s)]}">
|
||||
<p colspan="2"><h3>Form VA-4/VA-4P - State Income Tax</h3></p>
|
||||
<field name="va_va4_sit_exemptions" string="Personal Exemptions (Line 1(a))"/>
|
||||
@@ -193,6 +280,22 @@
|
||||
<p colspan="2"><h3>No additional fields.</h3></p>
|
||||
<p colspan="2">Ensure that your Employee and Employer workers' comp code fields are filled in for WA LNI withholding.</p>
|
||||
</group>
|
||||
<group name="state_wv_west_virginia" string="WV West Virginia" attrs="{'invisible':[('state_id', '!=', %(base.state_us_49)s)]}">
|
||||
<p colspan="2"><h3>Form WV/IT-104 - State Income Tax</h3></p>
|
||||
<field name="wv_it104_sit_filing_status" string="Filing Status"/>
|
||||
<field name="wv_it104_sit_exemptions" string="Exemptions 4."/>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 6."/>
|
||||
</group>
|
||||
<group name="state_wi_wisconsin" string="WI Wisconsin" attrs="{'invisible':[('state_id', '!=', %(base.state_us_50)s)]}">
|
||||
<p colspan="2"><h3>Form WT-4 - State Income Tax</h3></p>
|
||||
<field name="wi_wt4_sit_filing_status" string="Filing Status"/>
|
||||
<field name="wi_wt4_sit_exemptions" string="Exemptions 1.(d)"/>
|
||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 2."/>
|
||||
<field name="state_income_tax_exempt" string="Exempt 3."/>
|
||||
</group>
|
||||
<group name="state_wy_wyoming" string="WY Wyoming" attrs="{'invisible':[('state_id', '!=', %(base.state_us_51)s)]}">
|
||||
<p colspan="2"><h3>No additional fields.</h3></p>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user