diff --git a/l10n_us_hr_payroll/__manifest__.py b/l10n_us_hr_payroll/__manifest__.py
index 9b6f177c..eaf96498 100755
--- a/l10n_us_hr_payroll/__manifest__.py
+++ b/l10n_us_hr_payroll/__manifest__.py
@@ -36,6 +36,7 @@ USA Payroll Rules.
'data/state/ct_connecticut.xml',
'data/state/fl_florida.xml',
'data/state/ga_georgia.xml',
+ 'data/state/id_idaho.xml',
'data/state/il_illinois.xml',
'data/state/mi_michigan.xml',
'data/state/mn_minnesota.xml',
diff --git a/l10n_us_hr_payroll/data/final.xml b/l10n_us_hr_payroll/data/final.xml
index 5dd52d01..0f678e22 100644
--- a/l10n_us_hr_payroll/data/final.xml
+++ b/l10n_us_hr_payroll/data/final.xml
@@ -41,6 +41,9 @@
ref('hr_payroll_rule_er_us_ga_suta'),
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_ee_us_il_sit'),
diff --git a/l10n_us_hr_payroll/data/state/id_idaho.xml b/l10n_us_hr_payroll/data/state/id_idaho.xml
new file mode 100644
index 00000000..be1c71f8
--- /dev/null
+++ b/l10n_us_hr_payroll/data/state/id_idaho.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+ US ID Idaho SUTA Wage Base
+ us_id_suta_wage_base
+ 40000.0
+
+
+
+ US ID Idaho SUTA Wage Base
+ us_id_suta_wage_base
+ 41600.0
+
+
+
+
+
+
+
+ US ID Idaho SUTA Rate
+ us_id_suta_rate
+ 1.0
+
+
+
+ US ID Idaho SUTA Rate
+ us_id_suta_rate
+ 1.0
+
+
+
+
+
+
+ US ID Idaho SIT Tax Rate
+ us_id_sit_tax_rate
+ {
+ '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)),
+ },
+ }
+
+
+
+ US ID Idaho SIT Tax Rate
+ us_id_sit_tax_rate
+ {
+ '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)),
+ },
+ }
+
+
+
+
+
+
+ US ID Idaho Child Tax Credit Allowance Rate
+ us_id_sit_ictcat_rate
+ {
+ 'weekly': 56.92,
+ 'bi-weekly': 113.85,
+ 'semi-monthly': 123.33,
+ 'monthly': 246.67,
+ 'annually': 2960.00,
+ }
+
+
+
+ US ID Idaho Child Tax Credit Allowance Rate
+ us_id_sit_ictcat_rate
+ {
+ 'weekly': 56.92,
+ 'bi-weekly': 113.85,
+ 'semi-monthly': 123.33,
+ 'monthly': 246.67,
+ 'annually': 2960.00,
+ }
+
+
+
+
+
+
+
+ US Idaho - Department of Labor (IDOL) - Unemployment Tax
+ 1
+
+
+ US Idaho - Department of Labor (IDOL) - Unemployment Tax
+
+
+
+
+ US Idaho - State Tax Commission (ISTC) - Income Tax
+ 1
+
+
+ US Idaho - State Tax Commission (ISTC) - Income Tax
+
+
+
+
+
+
+
+
+
+ ER: US ID Idaho State Unemployment
+ ER_US_ID_SUTA
+ 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')
+ code
+ 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')
+
+
+
+
+
+
+
+ EE: US ID Idaho State Income Tax Withholding
+ EE_US_ID_SIT
+ python
+ result, _ = id_idaho_state_income_withholding(payslip, categories, worked_days, inputs)
+ code
+ result, result_rate = id_idaho_state_income_withholding(payslip, categories, worked_days, inputs)
+
+
+
+
+
\ No newline at end of file
diff --git a/l10n_us_hr_payroll/migrations/data.py b/l10n_us_hr_payroll/migrations/data.py
index c971a89d..00113bd9 100644
--- a/l10n_us_hr_payroll/migrations/data.py
+++ b/l10n_us_hr_payroll/migrations/data.py
@@ -33,6 +33,9 @@ FIELDS_CONTRACT_TO_US_PAYROLL_FORMS_2020 = {
'ga_g4_additional_allowances': 'ga_g4_sit_additional_allowances',
'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_additional_allowances': 'il_w4_sit_additional_allowances',
'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_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',
'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_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_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',
diff --git a/l10n_us_hr_payroll/models/hr_payslip.py b/l10n_us_hr_payroll/models/hr_payslip.py
index 088bb83b..3ee8522d 100644
--- a/l10n_us_hr_payroll/models/hr_payslip.py
+++ b/l10n_us_hr_payroll/models/hr_payslip.py
@@ -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.ct_connecticut import ct_connecticut_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.mi_michigan import mi_michigan_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,
'ct_connecticut_state_income_withholding': ct_connecticut_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,
'mi_michigan_state_income_withholding': mi_michigan_state_income_withholding,
'mn_minnesota_state_income_withholding': mn_minnesota_state_income_withholding,
diff --git a/l10n_us_hr_payroll/models/state/id_idaho.py b/l10n_us_hr_payroll/models/state/id_idaho.py
new file mode 100644
index 00000000..5eee7665
--- /dev/null
+++ b/l10n_us_hr_payroll/models/state/id_idaho.py
@@ -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)
diff --git a/l10n_us_hr_payroll/models/us_payroll_config.py b/l10n_us_hr_payroll/models/us_payroll_config.py
index 4d1be994..344c5428 100644
--- a/l10n_us_hr_payroll/models/us_payroll_config.py
+++ b/l10n_us_hr_payroll/models/us_payroll_config.py
@@ -98,6 +98,13 @@ class HRContractUSPayrollConfig(models.Model):
ga_g4_sit_additional_allowances = fields.Integer(string='Georgia G-4 Additional Allowances',
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_additional_allowances = fields.Integer(string='Illinois IL-W-4 Number of Additional Allowances', help='IL-W-4 Step 2.')
diff --git a/l10n_us_hr_payroll/tests/__init__.py b/l10n_us_hr_payroll/tests/__init__.py
index 128988b3..6bdb478d 100755
--- a/l10n_us_hr_payroll/tests/__init__.py
+++ b/l10n_us_hr_payroll/tests/__init__.py
@@ -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_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_2020
diff --git a/l10n_us_hr_payroll/tests/test_us_id_idaho_payslip_2019.py b/l10n_us_hr_payroll/tests/test_us_id_idaho_payslip_2019.py
new file mode 100644
index 00000000..8e3576d6
--- /dev/null
+++ b/l10n_us_hr_payroll/tests/test_us_id_idaho_payslip_2019.py
@@ -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)
diff --git a/l10n_us_hr_payroll/tests/test_us_id_idaho_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_id_idaho_payslip_2020.py
new file mode 100755
index 00000000..bf687080
--- /dev/null
+++ b/l10n_us_hr_payroll/tests/test_us_id_idaho_payslip_2020.py
@@ -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)
diff --git a/l10n_us_hr_payroll/views/us_payroll_config_views.xml b/l10n_us_hr_payroll/views/us_payroll_config_views.xml
index d89bccd4..2d8a627e 100644
--- a/l10n_us_hr_payroll/views/us_payroll_config_views.xml
+++ b/l10n_us_hr_payroll/views/us_payroll_config_views.xml
@@ -85,6 +85,11 @@
+
+ Form ID W-4 - State Income Tax
+
+
+
Form IL-W-4 - State Income Tax