mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
IMP l10n_us_hr_payroll Port l10n_us_id_hr_payroll ID Idaho including migration
This commit is contained in:
@@ -36,6 +36,7 @@ USA Payroll Rules.
|
|||||||
'data/state/ct_connecticut.xml',
|
'data/state/ct_connecticut.xml',
|
||||||
'data/state/fl_florida.xml',
|
'data/state/fl_florida.xml',
|
||||||
'data/state/ga_georgia.xml',
|
'data/state/ga_georgia.xml',
|
||||||
|
'data/state/id_idaho.xml',
|
||||||
'data/state/il_illinois.xml',
|
'data/state/il_illinois.xml',
|
||||||
'data/state/mi_michigan.xml',
|
'data/state/mi_michigan.xml',
|
||||||
'data/state/mn_minnesota.xml',
|
'data/state/mn_minnesota.xml',
|
||||||
|
|||||||
@@ -41,6 +41,9 @@
|
|||||||
ref('hr_payroll_rule_er_us_ga_suta'),
|
ref('hr_payroll_rule_er_us_ga_suta'),
|
||||||
ref('hr_payroll_rule_ee_us_ga_sit'),
|
ref('hr_payroll_rule_ee_us_ga_sit'),
|
||||||
|
|
||||||
|
ref('hr_payroll_rule_er_us_id_suta'),
|
||||||
|
ref('hr_payroll_rule_ee_us_id_sit'),
|
||||||
|
|
||||||
ref('hr_payroll_rule_er_us_il_suta'),
|
ref('hr_payroll_rule_er_us_il_suta'),
|
||||||
ref('hr_payroll_rule_ee_us_il_sit'),
|
ref('hr_payroll_rule_ee_us_il_sit'),
|
||||||
|
|
||||||
|
|||||||
170
l10n_us_hr_payroll/data/state/id_idaho.xml
Normal file
170
l10n_us_hr_payroll/data/state/id_idaho.xml
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<odoo>
|
||||||
|
<!-- Wage Base -->
|
||||||
|
<data noupdate="1">
|
||||||
|
<record id="rule_parameter_us_id_suta_wage_base_2019" model="hr.payroll.rate">
|
||||||
|
<field name="name">US ID Idaho SUTA Wage Base</field>
|
||||||
|
<field name="code">us_id_suta_wage_base</field>
|
||||||
|
<field name="parameter_value">40000.0</field>
|
||||||
|
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||||
|
</record>
|
||||||
|
<record id="rule_parameter_us_id_suta_wage_base_2020" model="hr.payroll.rate">
|
||||||
|
<field name="name">US ID Idaho SUTA Wage Base</field>
|
||||||
|
<field name="code">us_id_suta_wage_base</field>
|
||||||
|
<field name="parameter_value">41600.0</field>
|
||||||
|
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<!-- Rate -->
|
||||||
|
<data noupdate="1">
|
||||||
|
<record id="rule_parameter_us_id_suta_rate_2019" model="hr.payroll.rate">
|
||||||
|
<field name="name">US ID Idaho SUTA Rate</field>
|
||||||
|
<field name="code">us_id_suta_rate</field>
|
||||||
|
<field name="parameter_value">1.0</field>
|
||||||
|
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||||
|
</record>
|
||||||
|
<record id="rule_parameter_us_id_suta_rate_2020" model="hr.payroll.rate">
|
||||||
|
<field name="name">US ID Idaho SUTA Rate</field>
|
||||||
|
<field name="code">us_id_suta_rate</field>
|
||||||
|
<field name="parameter_value">1.0</field>
|
||||||
|
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<data noupdate="1">
|
||||||
|
<record id="rule_parameter_us_id_sit_tax_rate_2019" model="hr.payroll.rate">
|
||||||
|
<field name="name">US ID Idaho SIT Tax Rate</field>
|
||||||
|
<field name="code">us_id_sit_tax_rate</field>
|
||||||
|
<field name="parameter_value">{
|
||||||
|
'single': {
|
||||||
|
'weekly': ((235, 0.00, 0.00), (264, 0.00, 1.125), (294, 0.00, 3.125), (324, 1.00, 3.625), (353, 2.00, 4.625), (383, 4.00, 5.625), (457, 5.00, 6.625), ('inf', 10.00, 6.925)),
|
||||||
|
'bi-weekly': ((469, 0.00, 0.00), (529, 0.00, 1.125), (588, 1.00, 3.125), (647, 3.00, 3.625), (706, 5.00, 4.625), (766, 7.00, 5.625), (914, 11.00, 6.625), ('inf', 21.00, 6.925)),
|
||||||
|
'semi-monthly': ((508, 0.00, 0.00), (573, 0.00, 1.125), (637, 1.00, 3.125), (701, 3.00, 3.625), (765, 5.00, 4.625), (829, 8.00, 5.625), (990, 12.00, 6.625), ('inf', 22.00, 6.925)),
|
||||||
|
'monthly': ((1017, 0.00, 0.00), (1145, 0.00, 1.125), (1273, 1.00, 3.125), (1402, 5.00, 3.625), (1530, 10.00, 4.625), (1659, 16.00, 5.625), (1980, 23.00, 6.625), ('inf', 45.00, 6.925)),
|
||||||
|
'annually': ((12200, 0.00, 0.00), (13741, 0.00, 1.125), (15281, 17.00, 3.125), (16822, 65.00, 3.625), (18362, 121.00, 4.625), (19903, 192.00, 5.625), (23754, 279.00, 6.625), ('inf', 534.00, 6.925)),
|
||||||
|
},
|
||||||
|
'married': {
|
||||||
|
'weekly': ((469, 0.00, 0.00), (529, 0.00, 1.125), (588, 0.00, 3.125), (647, 1.00, 3.625), (706, 2.00, 4.625), (766, 4.00, 5.625), (914, 5.00, 6.625), ('inf', 10.00, 6.925)),
|
||||||
|
'bi-weekly': ((938, 0.00, 0.00), (1057, 0.00, 1.125), (1175, 1.00, 3.125), (1294, 5.00, 3.625), (1412, 9.00, 4.625), (1531, 15.00, 5.625), (1827, 21.00, 6.625), ('inf', 41.00, 6.925)),
|
||||||
|
'semi-monthly': ((1017, 0.00, 0.00), (1145, 0.00, 1.125), (1273, 1.00, 3.125), (1402, 5.00, 3.625), (1530, 10.00, 4.625), (1659, 16.00, 5.625), (1980, 23.00, 6.625), ('inf', 45.00, 6.925)),
|
||||||
|
'monthly': ((2033, 0.00, 0.00), (2290, 0.00, 1.125), (2547, 3.00, 3.125), (2804, 11.00, 3.625), (3060, 20.00, 4.625), (3317, 32.00, 5.625), (3959, 47.00, 6.625), ('inf', 89.00, 6.925)),
|
||||||
|
'annually': ((24400, 0.00, 0.00), (27482, 0.00, 1.125), (30562, 35.00, 3.125), (33644, 131.00, 3.625), (36724, 243.00, 4.625), (39806, 385.00, 5.625), (47508, 558.00, 6.625), ('inf', 1068.00, 6.925)),
|
||||||
|
},
|
||||||
|
'head of household': {
|
||||||
|
'weekly': ((235, 0.00, 0.00), (264, 0.00, 1.125), (294, 0.00, 3.125), (324, 1.00, 3.625), (353, 2.00, 4.625), (383, 4.00, 5.625), (457, 5.00, 6.625), ('inf', 10.00, 6.925)),
|
||||||
|
'bi-weekly': ((469, 0.00, 0.00), (529, 0.00, 1.125), (588, 1.00, 3.125), (647, 3.00, 3.625), (706, 5.00, 4.625), (766, 7.00, 5.625), (914, 11.00, 6.625), ('inf', 21.00, 6.925)),
|
||||||
|
'semi-monthly': ((508, 0.00, 0.00), (573, 0.00, 1.125), (637, 1.00, 3.125), (701, 3.00, 3.625), (765, 5.00, 4.625), (829, 8.00, 5.625), (990, 12.00, 6.625), ('inf', 22.00, 6.925)),
|
||||||
|
'monthly': ((1017, 0.00, 0.00), (1145, 0.00, 1.125), (1273, 1.00, 3.125), (1402, 5.00, 3.625), (1530, 10.00, 4.625), (1659, 16.00, 5.625), (1980, 23.00, 6.625), ('inf', 45.00, 6.925)),
|
||||||
|
'annually': ((12200, 0.00, 0.00), (13741, 0.00, 1.125), (15281, 17.00, 3.125), (16822, 65.00, 3.625), (18362, 121.00, 4.625), (19903, 192.00, 5.625), (23754, 279.00, 6.625), ('inf', 534.00, 6.925)),
|
||||||
|
},
|
||||||
|
}</field>
|
||||||
|
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||||
|
</record>
|
||||||
|
<record id="rule_parameter_us_id_sit_tax_rate_2020" model="hr.payroll.rate">
|
||||||
|
<field name="name">US ID Idaho SIT Tax Rate</field>
|
||||||
|
<field name="code">us_id_sit_tax_rate</field>
|
||||||
|
<field name="parameter_value">{
|
||||||
|
'single': {
|
||||||
|
'weekly': ((235, 0.00, 0.00), (264, 0.00, 1.125), (294, 0.00, 3.125), (324, 1.00, 3.625), (353, 2.00, 4.625), (383, 4.00, 5.625), (457, 5.00, 6.625), ('inf', 10.00, 6.925)),
|
||||||
|
'bi-weekly': ((469, 0.00, 0.00), (529, 0.00, 1.125), (588, 1.00, 3.125), (647, 3.00, 3.625), (706, 5.00, 4.625), (766, 7.00, 5.625), (914, 11.00, 6.625), ('inf', 21.00, 6.925)),
|
||||||
|
'semi-monthly': ((508, 0.00, 0.00), (573, 0.00, 1.125), (637, 1.00, 3.125), (701, 3.00, 3.625), (765, 5.00, 4.625), (829, 8.00, 5.625), (990, 12.00, 6.625), ('inf', 22.00, 6.925)),
|
||||||
|
'monthly': ((1017, 0.00, 0.00), (1145, 0.00, 1.125), (1273, 1.00, 3.125), (1402, 5.00, 3.625), (1530, 10.00, 4.625), (1659, 16.00, 5.625), (1980, 23.00, 6.625), ('inf', 45.00, 6.925)),
|
||||||
|
'annually': ((12200, 0.00, 0.00), (13741, 0.00, 1.125), (15281, 17.00, 3.125), (16822, 65.00, 3.625), (18362, 121.00, 4.625), (19903, 192.00, 5.625), (23754, 279.00, 6.625), ('inf', 534.00, 6.925)),
|
||||||
|
},
|
||||||
|
'married': {
|
||||||
|
'weekly': ((469, 0.00, 0.00), (529, 0.00, 1.125), (588, 0.00, 3.125), (647, 1.00, 3.625), (706, 2.00, 4.625), (766, 4.00, 5.625), (914, 5.00, 6.625), ('inf', 10.00, 6.925)),
|
||||||
|
'bi-weekly': ((938, 0.00, 0.00), (1057, 0.00, 1.125), (1175, 1.00, 3.125), (1294, 5.00, 3.625), (1412, 9.00, 4.625), (1531, 15.00, 5.625), (1827, 21.00, 6.625), ('inf', 41.00, 6.925)),
|
||||||
|
'semi-monthly': ((1017, 0.00, 0.00), (1145, 0.00, 1.125), (1273, 1.00, 3.125), (1402, 5.00, 3.625), (1530, 10.00, 4.625), (1659, 16.00, 5.625), (1980, 23.00, 6.625), ('inf', 45.00, 6.925)),
|
||||||
|
'monthly': ((2033, 0.00, 0.00), (2290, 0.00, 1.125), (2547, 3.00, 3.125), (2804, 11.00, 3.625), (3060, 20.00, 4.625), (3317, 32.00, 5.625), (3959, 47.00, 6.625), ('inf', 89.00, 6.925)),
|
||||||
|
'annually': ((24400, 0.00, 0.00), (27482, 0.00, 1.125), (30562, 35.00, 3.125), (33644, 131.00, 3.625), (36724, 243.00, 4.625), (39806, 385.00, 5.625), (47508, 558.00, 6.625), ('inf', 1068.00, 6.925)),
|
||||||
|
},
|
||||||
|
'head of household': {
|
||||||
|
'weekly': ((235, 0.00, 0.00), (264, 0.00, 1.125), (294, 0.00, 3.125), (324, 1.00, 3.625), (353, 2.00, 4.625), (383, 4.00, 5.625), (457, 5.00, 6.625), ('inf', 10.00, 6.925)),
|
||||||
|
'bi-weekly': ((469, 0.00, 0.00), (529, 0.00, 1.125), (588, 1.00, 3.125), (647, 3.00, 3.625), (706, 5.00, 4.625), (766, 7.00, 5.625), (914, 11.00, 6.625), ('inf', 21.00, 6.925)),
|
||||||
|
'semi-monthly': ((508, 0.00, 0.00), (573, 0.00, 1.125), (637, 1.00, 3.125), (701, 3.00, 3.625), (765, 5.00, 4.625), (829, 8.00, 5.625), (990, 12.00, 6.625), ('inf', 22.00, 6.925)),
|
||||||
|
'monthly': ((1017, 0.00, 0.00), (1145, 0.00, 1.125), (1273, 1.00, 3.125), (1402, 5.00, 3.625), (1530, 10.00, 4.625), (1659, 16.00, 5.625), (1980, 23.00, 6.625), ('inf', 45.00, 6.925)),
|
||||||
|
'annually': ((12200, 0.00, 0.00), (13741, 0.00, 1.125), (15281, 17.00, 3.125), (16822, 65.00, 3.625), (18362, 121.00, 4.625), (19903, 192.00, 5.625), (23754, 279.00, 6.625), ('inf', 534.00, 6.925)),
|
||||||
|
},
|
||||||
|
}</field>
|
||||||
|
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<data noupdate="1">
|
||||||
|
<record id="rule_parameter_us_id_sit_ictcat_rate_2019" model="hr.payroll.rate">
|
||||||
|
<field name="name">US ID Idaho Child Tax Credit Allowance Rate</field>
|
||||||
|
<field name="code">us_id_sit_ictcat_rate</field>
|
||||||
|
<field name="parameter_value">{
|
||||||
|
'weekly': 56.92,
|
||||||
|
'bi-weekly': 113.85,
|
||||||
|
'semi-monthly': 123.33,
|
||||||
|
'monthly': 246.67,
|
||||||
|
'annually': 2960.00,
|
||||||
|
}</field>
|
||||||
|
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||||
|
</record>
|
||||||
|
<record id="rule_parameter_us_id_sit_ictcat_rate_2020" model="hr.payroll.rate">
|
||||||
|
<field name="name">US ID Idaho Child Tax Credit Allowance Rate</field>
|
||||||
|
<field name="code">us_id_sit_ictcat_rate</field>
|
||||||
|
<field name="parameter_value">{
|
||||||
|
'weekly': 56.92,
|
||||||
|
'bi-weekly': 113.85,
|
||||||
|
'semi-monthly': 123.33,
|
||||||
|
'monthly': 246.67,
|
||||||
|
'annually': 2960.00,
|
||||||
|
}</field>
|
||||||
|
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Partners and Contribution Registers -->
|
||||||
|
<record id="res_partner_us_id_dor" model="res.partner">
|
||||||
|
<field name="name">US Idaho - Department of Labor (IDOL) - Unemployment Tax</field>
|
||||||
|
<field name="supplier">1</field>
|
||||||
|
</record>
|
||||||
|
<record id="contrib_register_us_id_dor" model="hr.contribution.register">
|
||||||
|
<field name="name">US Idaho - Department of Labor (IDOL) - Unemployment Tax</field>
|
||||||
|
<field name="partner_id" ref="res_partner_us_id_dor"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="res_partner_us_id_dor_sit" model="res.partner">
|
||||||
|
<field name="name">US Idaho - State Tax Commission (ISTC) - Income Tax</field>
|
||||||
|
<field name="supplier">1</field>
|
||||||
|
</record>
|
||||||
|
<record id="contrib_register_us_id_dor_sit" model="hr.contribution.register">
|
||||||
|
<field name="name">US Idaho - State Tax Commission (ISTC) - Income Tax</field>
|
||||||
|
<field name="partner_id" ref="res_partner_us_id_dor_sit"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Categories -->
|
||||||
|
|
||||||
|
<!-- Rules -->
|
||||||
|
<record id="hr_payroll_rule_er_us_id_suta" model="hr.salary.rule">
|
||||||
|
<field name="sequence" eval="450"/>
|
||||||
|
<field name="category_id" ref="hr_payroll_category_er_us_suta"/>
|
||||||
|
<field name="name">ER: US ID Idaho State Unemployment</field>
|
||||||
|
<field name="code">ER_US_ID_SUTA</field>
|
||||||
|
<field name="condition_select">python</field>
|
||||||
|
<field name="condition_python">result, _ = general_state_unemployment(payslip, categories, worked_days, inputs, wage_base='us_id_suta_wage_base', rate='us_id_suta_rate', state_code='ID')</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_id_suta_wage_base', rate='us_id_suta_rate', state_code='ID')</field>
|
||||||
|
<field name="register_id" ref="contrib_register_us_id_dor"/>
|
||||||
|
<field name="appears_on_payslip" eval="False"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="hr_payroll_rule_ee_us_id_sit" model="hr.salary.rule">
|
||||||
|
<field name="sequence" eval="195"/>
|
||||||
|
<field name="category_id" ref="hr_payroll_category_ee_us_sit"/>
|
||||||
|
<field name="name">EE: US ID Idaho State Income Tax Withholding</field>
|
||||||
|
<field name="code">EE_US_ID_SIT</field>
|
||||||
|
<field name="condition_select">python</field>
|
||||||
|
<field name="condition_python">result, _ = id_idaho_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||||
|
<field name="amount_select">code</field>
|
||||||
|
<field name="amount_python_compute">result, result_rate = id_idaho_state_income_withholding(payslip, categories, worked_days, inputs)</field>
|
||||||
|
<field name="register_id" ref="contrib_register_us_id_dor_sit"/>
|
||||||
|
<field name="appears_on_payslip" eval="True"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
@@ -33,6 +33,9 @@ FIELDS_CONTRACT_TO_US_PAYROLL_FORMS_2020 = {
|
|||||||
'ga_g4_additional_allowances': 'ga_g4_sit_additional_allowances',
|
'ga_g4_additional_allowances': 'ga_g4_sit_additional_allowances',
|
||||||
'ga_g4_additional_wh': 'state_income_tax_additional_withholding',
|
'ga_g4_additional_wh': 'state_income_tax_additional_withholding',
|
||||||
|
|
||||||
|
'id_w4_filing_status': 'id_w4_sit_filing_status',
|
||||||
|
'id_w4_allowances': 'id_w4_sit_allowances',
|
||||||
|
|
||||||
'il_w4_basic_allowances': 'il_w4_sit_basic_allowances',
|
'il_w4_basic_allowances': 'il_w4_sit_basic_allowances',
|
||||||
'il_w4_additional_allowances': 'il_w4_sit_additional_allowances',
|
'il_w4_additional_allowances': 'il_w4_sit_additional_allowances',
|
||||||
'il_w4_additional_wh': 'state_income_tax_additional_withholding',
|
'il_w4_additional_wh': 'state_income_tax_additional_withholding',
|
||||||
@@ -138,6 +141,11 @@ XMLIDS_TO_REMOVE_2020 = [
|
|||||||
'l10n_us_ga_hr_payroll.hr_payroll_ga_income_withhold',
|
'l10n_us_ga_hr_payroll.hr_payroll_ga_income_withhold',
|
||||||
'l10n_us_ga_hr_payroll.hr_payroll_rules_ga_unemp_wages',
|
'l10n_us_ga_hr_payroll.hr_payroll_rules_ga_unemp_wages',
|
||||||
|
|
||||||
|
'l10n_us_id_hr_payroll.hr_payroll_id_unemp_wages',
|
||||||
|
'l10n_us_id_hr_payroll.hr_payroll_id_unemp',
|
||||||
|
'l10n_us_id_hr_payroll.hr_payroll_id_income_withhold',
|
||||||
|
'l10n_us_id_hr_payroll.hr_payroll_rules_id_unemp_wages',
|
||||||
|
|
||||||
'l10n_us_il_hr_payroll.hr_payroll_il_unemp_wages',
|
'l10n_us_il_hr_payroll.hr_payroll_il_unemp_wages',
|
||||||
'l10n_us_il_hr_payroll.hr_payroll_il_unemp',
|
'l10n_us_il_hr_payroll.hr_payroll_il_unemp',
|
||||||
'l10n_us_il_hr_payroll.hr_payroll_il_income_withhold',
|
'l10n_us_il_hr_payroll.hr_payroll_il_income_withhold',
|
||||||
@@ -301,6 +309,13 @@ XMLIDS_TO_RENAME_2020 = {
|
|||||||
'l10n_us_ga_hr_payroll.hr_payroll_rules_ga_unemp': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_ga_suta',
|
'l10n_us_ga_hr_payroll.hr_payroll_rules_ga_unemp': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_ga_suta',
|
||||||
'l10n_us_ga_hr_payroll.hr_payroll_rules_ga_inc_withhold': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_ga_sit',
|
'l10n_us_ga_hr_payroll.hr_payroll_rules_ga_inc_withhold': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_ga_sit',
|
||||||
|
|
||||||
|
'l10n_us_id_hr_payroll.res_partner_id_dol_unemp':'l10n_us_hr_payroll.res_partner_us_id_dor',
|
||||||
|
'l10n_us_id_hr_payroll.res_partner_id_stc_withhold': 'l10n_us_hr_payroll.res_partner_us_id_dor_sit',
|
||||||
|
'l10n_us_id_hr_payroll.contrib_register_id_dol_unemp': 'l10n_us_hr_payroll.contrib_register_us_id_dor',
|
||||||
|
'l10n_us_id_hr_payroll.contrib_register_id_stc_withhold': 'l10n_us_hr_payroll.contrib_register_us_id_dor_sit',
|
||||||
|
'l10n_us_id_hr_payroll.hr_payroll_rules_id_unemp': 'l10n_us_hr_payroll.hr_payroll_rule_er_us_id_suta',
|
||||||
|
'l10n_us_id_hr_payroll.hr_payroll_rules_id_inc_withhold': 'l10n_us_hr_payroll.hr_payroll_rule_ee_us_id_sit',
|
||||||
|
|
||||||
'l10n_us_il_hr_payroll.res_partner_il_des_unemp': 'l10n_us_hr_payroll.res_partner_us_il_dor',
|
'l10n_us_il_hr_payroll.res_partner_il_des_unemp': 'l10n_us_hr_payroll.res_partner_us_il_dor',
|
||||||
'l10n_us_il_hr_payroll.res_partner_il_dor_withhold': 'l10n_us_hr_payroll.res_partner_us_il_dor_sit',
|
'l10n_us_il_hr_payroll.res_partner_il_dor_withhold': 'l10n_us_hr_payroll.res_partner_us_il_dor_sit',
|
||||||
'l10n_us_il_hr_payroll.contrib_register_il_des_unemp': 'l10n_us_hr_payroll.contrib_register_us_il_dor',
|
'l10n_us_il_hr_payroll.contrib_register_il_des_unemp': 'l10n_us_hr_payroll.contrib_register_us_il_dor',
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ from .state.az_arizona import az_arizona_state_income_withholding
|
|||||||
from .state.ca_california import ca_california_state_income_withholding
|
from .state.ca_california import ca_california_state_income_withholding
|
||||||
from .state.ct_connecticut import ct_connecticut_state_income_withholding
|
from .state.ct_connecticut import ct_connecticut_state_income_withholding
|
||||||
from .state.ga_georgia import ga_georgia_state_income_withholding
|
from .state.ga_georgia import ga_georgia_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.il_illinois import il_illinois_state_income_withholding
|
||||||
from .state.mi_michigan import mi_michigan_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.mn_minnesota import mn_minnesota_state_income_withholding
|
||||||
@@ -70,6 +71,7 @@ class HRPayslip(models.Model):
|
|||||||
'ca_california_state_income_withholding': ca_california_state_income_withholding,
|
'ca_california_state_income_withholding': ca_california_state_income_withholding,
|
||||||
'ct_connecticut_state_income_withholding': ct_connecticut_state_income_withholding,
|
'ct_connecticut_state_income_withholding': ct_connecticut_state_income_withholding,
|
||||||
'ga_georgia_state_income_withholding': ga_georgia_state_income_withholding,
|
'ga_georgia_state_income_withholding': ga_georgia_state_income_withholding,
|
||||||
|
'id_idaho_state_income_withholding': id_idaho_state_income_withholding,
|
||||||
'il_illinois_state_income_withholding': il_illinois_state_income_withholding,
|
'il_illinois_state_income_withholding': il_illinois_state_income_withholding,
|
||||||
'mi_michigan_state_income_withholding': mi_michigan_state_income_withholding,
|
'mi_michigan_state_income_withholding': mi_michigan_state_income_withholding,
|
||||||
'mn_minnesota_state_income_withholding': mn_minnesota_state_income_withholding,
|
'mn_minnesota_state_income_withholding': mn_minnesota_state_income_withholding,
|
||||||
|
|||||||
41
l10n_us_hr_payroll/models/state/id_idaho.py
Normal file
41
l10n_us_hr_payroll/models/state/id_idaho.py
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from .general import _state_applies, sit_wage
|
||||||
|
|
||||||
|
|
||||||
|
def id_idaho_state_income_withholding(payslip, categories, worked_days, inputs):
|
||||||
|
"""
|
||||||
|
Returns SIT eligible wage and rate.
|
||||||
|
|
||||||
|
:return: result, result_rate (wage, percent)
|
||||||
|
"""
|
||||||
|
state_code = 'ID'
|
||||||
|
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.dict.contract_id.us_payroll_config_value('id_w4_sit_filing_status')
|
||||||
|
if not filing_status:
|
||||||
|
return 0.0, 0.0
|
||||||
|
|
||||||
|
schedule_pay = payslip.dict.contract_id.schedule_pay
|
||||||
|
allowances = payslip.dict.contract_id.us_payroll_config_value('id_w4_sit_allowances')
|
||||||
|
ictcat_table = payslip.dict.rule_parameter('us_id_sit_ictcat_rate')[schedule_pay]
|
||||||
|
tax_table = payslip.dict.rule_parameter('us_id_sit_tax_rate')[filing_status].get(schedule_pay)
|
||||||
|
|
||||||
|
taxable_income = wage - (ictcat_table * allowances)
|
||||||
|
withholding = 0.0
|
||||||
|
last = 0.0
|
||||||
|
for row in tax_table:
|
||||||
|
if taxable_income <= float(row[0]):
|
||||||
|
withholding = row[1] + ((row[2] / 100.0) * (taxable_income - last))
|
||||||
|
break
|
||||||
|
last = row[0]
|
||||||
|
|
||||||
|
withholding = max(withholding, 0.0)
|
||||||
|
withholding = round(withholding)
|
||||||
|
return wage, -((withholding / wage) * 100.0)
|
||||||
@@ -98,6 +98,13 @@ class HRContractUSPayrollConfig(models.Model):
|
|||||||
ga_g4_sit_additional_allowances = fields.Integer(string='Georgia G-4 Additional Allowances',
|
ga_g4_sit_additional_allowances = fields.Integer(string='Georgia G-4 Additional Allowances',
|
||||||
help='G-4 5.')
|
help='G-4 5.')
|
||||||
|
|
||||||
|
id_w4_sit_filing_status = fields.Selection([
|
||||||
|
('single', 'Single'),
|
||||||
|
('married', 'Married'),
|
||||||
|
('head of household', 'Head of Household'),
|
||||||
|
], string='Idaho ID W-4 Withholding Status', help='ID W-4 A.B.C.')
|
||||||
|
id_w4_sit_allowances = fields.Integer(string='Idaho ID W-4 Allowances', help='ID W-4 1.')
|
||||||
|
|
||||||
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_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.')
|
il_w4_sit_additional_allowances = fields.Integer(string='Illinois IL-W-4 Number of Additional Allowances', help='IL-W-4 Step 2.')
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ from . import test_us_fl_florida_payslip_2020
|
|||||||
from . import test_us_ga_georgia_payslip_2019
|
from . import test_us_ga_georgia_payslip_2019
|
||||||
from . import test_us_ga_georgia_payslip_2020
|
from . import test_us_ga_georgia_payslip_2020
|
||||||
|
|
||||||
|
from . import test_us_id_idaho_payslip_2019
|
||||||
|
from . import test_us_id_idaho_payslip_2020
|
||||||
|
|
||||||
from . import test_us_il_illinois_payslip_2019
|
from . import test_us_il_illinois_payslip_2019
|
||||||
from . import test_us_il_illinois_payslip_2020
|
from . import test_us_il_illinois_payslip_2020
|
||||||
|
|
||||||
|
|||||||
85
l10n_us_hr_payroll/tests/test_us_id_idaho_payslip_2019.py
Normal file
85
l10n_us_hr_payroll/tests/test_us_id_idaho_payslip_2019.py
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from .common import TestUsPayslip, process_payslip
|
||||||
|
|
||||||
|
|
||||||
|
class TestUsIDPayslip(TestUsPayslip):
|
||||||
|
|
||||||
|
# TAXES AND RATES
|
||||||
|
ID_UNEMP_MAX_WAGE = 40000.00
|
||||||
|
ID_UNEMP = -(1.00 / 100.0)
|
||||||
|
|
||||||
|
def test_taxes_single_biweekly(self):
|
||||||
|
salary = 1212.00
|
||||||
|
schedule_pay = 'bi-weekly'
|
||||||
|
filing_status = 'single'
|
||||||
|
allowances = 4
|
||||||
|
# SEE https://tax.idaho.gov/i-1026.cfm?seg=compute for example calculations
|
||||||
|
wh_to_check = -10.00
|
||||||
|
employee = self._createEmployee()
|
||||||
|
contract = self._createContract(employee,
|
||||||
|
wage=salary,
|
||||||
|
state_id=self.get_us_state('ID'),
|
||||||
|
id_w4_sit_filing_status=filing_status,
|
||||||
|
id_w4_sit_allowances=allowances,
|
||||||
|
schedule_pay=schedule_pay)
|
||||||
|
|
||||||
|
self._log('2019 Idaho tax first payslip single:')
|
||||||
|
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.ID_UNEMP)
|
||||||
|
self.assertPayrollEqual(cats['EE_US_SIT'], wh_to_check)
|
||||||
|
|
||||||
|
process_payslip(payslip)
|
||||||
|
|
||||||
|
remaining_id_unemp_wages = self.ID_UNEMP_MAX_WAGE - salary if (self.ID_UNEMP_MAX_WAGE - 2*salary < salary) \
|
||||||
|
else salary
|
||||||
|
|
||||||
|
self._log('2019 Idaho tax second payslip single:')
|
||||||
|
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
|
||||||
|
payslip.compute_sheet()
|
||||||
|
cats = self._getCategories(payslip)
|
||||||
|
|
||||||
|
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_id_unemp_wages * self.ID_UNEMP)
|
||||||
|
|
||||||
|
def test_taxes_married_monthly(self):
|
||||||
|
salary = 5000.00
|
||||||
|
schedule_pay = 'monthly'
|
||||||
|
filing_status = 'married'
|
||||||
|
allowances = 2
|
||||||
|
|
||||||
|
# ICTCAT says monthly allowances are 246.67
|
||||||
|
# we have 2 so 246.67 * 2 = 493.34
|
||||||
|
# 5000.00 - 493.34 = 4506.66
|
||||||
|
# Wh is 89$ plus 6.925% over 3959,00
|
||||||
|
# 126.92545499999999 - > 127.0
|
||||||
|
wh_to_check = -127.0
|
||||||
|
employee = self._createEmployee()
|
||||||
|
contract = self._createContract(employee,
|
||||||
|
wage=salary,
|
||||||
|
state_id=self.get_us_state('ID'),
|
||||||
|
id_w4_sit_filing_status=filing_status,
|
||||||
|
id_w4_sit_allowances=allowances,
|
||||||
|
schedule_pay=schedule_pay)
|
||||||
|
|
||||||
|
self._log('2019 Idaho tax first payslip monthly:')
|
||||||
|
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
|
||||||
|
payslip.compute_sheet()
|
||||||
|
cats = self._getCategories(payslip)
|
||||||
|
|
||||||
|
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.ID_UNEMP)
|
||||||
|
self.assertPayrollEqual(cats['EE_US_SIT'], wh_to_check)
|
||||||
|
|
||||||
|
process_payslip(payslip)
|
||||||
|
|
||||||
|
remaining_id_unemp_wages = self.ID_UNEMP_MAX_WAGE - salary if (self.ID_UNEMP_MAX_WAGE - 2*salary < salary) \
|
||||||
|
else salary
|
||||||
|
|
||||||
|
self._log('2019 Idaho tax second payslip monthly:')
|
||||||
|
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
|
||||||
|
payslip.compute_sheet()
|
||||||
|
cats = self._getCategories(payslip)
|
||||||
|
|
||||||
|
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_id_unemp_wages * self.ID_UNEMP)
|
||||||
35
l10n_us_hr_payroll/tests/test_us_id_idaho_payslip_2020.py
Executable file
35
l10n_us_hr_payroll/tests/test_us_id_idaho_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 TestUsIDPayslip(TestUsPayslip):
|
||||||
|
###
|
||||||
|
# 2020 Taxes and Rates
|
||||||
|
###
|
||||||
|
ID_UNEMP_MAX_WAGE = 41600.00
|
||||||
|
ID_UNEMP = 1.0
|
||||||
|
|
||||||
|
def _test_sit(self, wage, filing_status, allowances, schedule_pay, date_start, expected_withholding):
|
||||||
|
employee = self._createEmployee()
|
||||||
|
contract = self._createContract(employee,
|
||||||
|
wage=wage,
|
||||||
|
state_id=self.get_us_state('ID'),
|
||||||
|
id_w4_sit_filing_status=filing_status,
|
||||||
|
id_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('ID', self.ID_UNEMP, date(2020, 1, 1), wage_base=self.ID_UNEMP_MAX_WAGE)
|
||||||
|
self._test_sit(1212.0, 'single', 4.0, 'bi-weekly', date(2020, 1, 1), 10.0)
|
||||||
|
self._test_sit(10000.0, 'married', 1.0, 'annually', date(2020, 1, 1), 0.0)
|
||||||
|
self._test_sit(52000.0, 'married', 4.0, 'monthly', date(2020, 1, 1), 3348.02)
|
||||||
|
self._test_sit(5000.0, 'head of household', 0.0, 'semi-monthly', date(2020, 1, 1), 300.0)
|
||||||
|
self._test_sit(5900.0, 'single', 5.0, 'weekly', date(2020, 1, 1), 367.0)
|
||||||
@@ -85,6 +85,11 @@
|
|||||||
<field name="state_income_tax_additional_withholding" string="Additional Withholding 6."/>
|
<field name="state_income_tax_additional_withholding" string="Additional Withholding 6."/>
|
||||||
<field name="state_income_tax_exempt" string="Exempt 8."/>
|
<field name="state_income_tax_exempt" string="Exempt 8."/>
|
||||||
</group>
|
</group>
|
||||||
|
<group name="state_id_idaho" string="ID Idaho" attrs="{'invisible':[('state_id', '!=', %(base.state_us_13)s)]}">
|
||||||
|
<p colspan="2"><h3>Form ID W-4 - State Income Tax</h3></p>
|
||||||
|
<field name="id_w4_sit_filing_status" string="Withholding Status A.B.C."/>
|
||||||
|
<field name="id_w4_sit_allowances" string="Allowances 1."/>
|
||||||
|
</group>
|
||||||
<group name="state_il_illinois" string="IL Illinois" attrs="{'invisible':[('state_id', '!=', %(base.state_us_14)s)]}">
|
<group name="state_il_illinois" string="IL Illinois" attrs="{'invisible':[('state_id', '!=', %(base.state_us_14)s)]}">
|
||||||
<p colspan="2"><h3>Form IL-W-4 - State Income Tax</h3></p>
|
<p colspan="2"><h3>Form IL-W-4 - State Income Tax</h3></p>
|
||||||
<field name="il_w4_sit_basic_allowances" string="Basic Allowances Step 1."/>
|
<field name="il_w4_sit_basic_allowances" string="Basic Allowances Step 1."/>
|
||||||
|
|||||||
Reference in New Issue
Block a user