diff --git a/l10n_us_hr_payroll/data/federal/fed_940_futa_parameters.xml b/l10n_us_hr_payroll/data/federal/fed_940_futa_parameters.xml
index 325f53b6..9c34afb6 100644
--- a/l10n_us_hr_payroll/data/federal/fed_940_futa_parameters.xml
+++ b/l10n_us_hr_payroll/data/federal/fed_940_futa_parameters.xml
@@ -6,7 +6,6 @@
fed_940_futa_wage_base
-
7000.00
@@ -19,7 +18,6 @@
fed_940_futa_rate_basic
-
6.0
@@ -31,7 +29,6 @@
fed_940_futa_rate_normal
-
0.6
diff --git a/l10n_us_hr_payroll/data/federal/fed_941_fica_parameters.xml b/l10n_us_hr_payroll/data/federal/fed_941_fica_parameters.xml
index 6a4b2804..2a1d6c71 100644
--- a/l10n_us_hr_payroll/data/federal/fed_941_fica_parameters.xml
+++ b/l10n_us_hr_payroll/data/federal/fed_941_fica_parameters.xml
@@ -12,22 +12,7 @@
-
- 132900.0
-
-
-
-
- 137700.0
-
-
-
-
-
- 142800.0
-
-
-
+
@@ -35,7 +20,6 @@
fed_941_fica_ss_rate
-
6.2
@@ -49,7 +33,6 @@
fed_941_fica_m_wage_base
-
"inf"
@@ -62,7 +45,6 @@
fed_941_fica_m_rate
-
1.45
@@ -76,7 +58,6 @@
fed_941_fica_m_add_wage_start
-
200000.0
@@ -89,7 +70,6 @@
fed_941_fica_m_add_rate
-
0.9
diff --git a/l10n_us_hr_payroll/data/federal/fed_941_fit_parameters.xml b/l10n_us_hr_payroll/data/federal/fed_941_fit_parameters.xml
index f83f9ebd..154987b6 100644
--- a/l10n_us_hr_payroll/data/federal/fed_941_fit_parameters.xml
+++ b/l10n_us_hr_payroll/data/federal/fed_941_fit_parameters.xml
@@ -22,7 +22,6 @@
-
4300.0
@@ -46,19 +45,6 @@
-
- {
- 'weekly': 241.30,
- 'bi-weekly': 482.70,
- 'semi-monthly': 522.90,
- 'monthly': 1045.80,
- 'quarterly': 3137.50,
- 'semi-annually': 6275.00,
- 'annually': 12550.00,
- }
-
-
-
@@ -66,7 +52,6 @@
fed_941_fit_table_single
-
@@ -95,33 +80,6 @@
-
-
- {
- 'standard': [
- ( 0.00, 0.00, 0.00),
- ( 3950.00, 0.00, 0.10),
- ( 13900.00, 995.00, 0.12),
- ( 44475.00, 4664.00, 0.22),
- ( 90325.00, 14751.00, 0.24),
- ( 168875.00, 33603.00, 0.32),
- ( 213375.00, 47843.00, 0.35),
- ( 527550.00, 157804.25, 0.37),
- ],
- 'higher': [
- ( 0.00, 0.00, 0.00),
- ( 6275.00, 0.00, 0.10),
- ( 11250.00, 497.50, 0.12),
- ( 26538.00, 2332.00, 0.22),
- ( 49463.00, 7375.50, 0.24),
- ( 88738.00, 16801.50, 0.32),
- ( 110988.00, 23921.50, 0.35),
- ( 268075.00, 78902.13, 0.37),
- ],
- }
-
-
-
@@ -157,33 +115,6 @@
-
-
- {
- 'standard': [
- ( 0.00, 0.00, 0.00),
- ( 12200.00, 0.00, 0.10),
- ( 32100.00, 1990.00, 0.12),
- ( 93250.00, 9328.00, 0.22),
- ( 184950.00, 29502.00, 0.24),
- ( 342050.00, 67206.00, 0.32),
- ( 431050.00, 95686.00, 0.35),
- ( 640500.00, 168993.50, 0.37),
- ],
- 'higher': [
- ( 0.00, 0.00, 0.00),
- ( 12550.00, 0.00, 0.10),
- ( 22500.00, 995.00, 0.12),
- ( 53075.00, 4664.00, 0.22),
- ( 98925.00, 14751.00, 0.24),
- ( 177475.00, 33603.00, 0.32),
- ( 221975.00, 47843.00, 0.35),
- ( 326700.00, 84496.75, 0.37),
- ],
- }
-
-
-
Federal 941 FIT Table Head of Household
@@ -218,33 +149,5 @@
-
-
-
- {
- 'standard': [
- ( 0.00, 0.00, 0.00),
- ( 10200.00, 0.00, 0.10),
- ( 24400.00, 1420.00, 0.12),
- ( 64400.00, 6220.00, 0.22),
- ( 96550.00, 13293.00, 0.24),
- ( 175100.00, 32145.00, 0.32),
- ( 219600.00, 46385.00, 0.35),
- ( 533800.00, 156355.50, 0.37),
- ],
- 'higher': [
- ( 0.00, 0.00, 0.00),
- ( 9400.00, 0.00, 0.10),
- ( 16500.00, 710.00, 0.12),
- ( 36500.00, 3110.00, 0.22),
- ( 52575.00, 6646.50, 0.24),
- ( 91950.00, 16072.50, 0.32),
- ( 114100.00, 23192.50, 0.35),
- ( 271200.00, 78177.50, 0.37),
- ],
- }
-
-
-
\ No newline at end of file
diff --git a/l10n_us_hr_payroll/data/state/ak_alaska.xml b/l10n_us_hr_payroll/data/state/ak_alaska.xml
index fec273d2..9500f2cf 100644
--- a/l10n_us_hr_payroll/data/state/ak_alaska.xml
+++ b/l10n_us_hr_payroll/data/state/ak_alaska.xml
@@ -1,24 +1,17 @@
-
US AK Alaska SUTA Wage Base
us_ak_suta_wage_base
-
-
- 41500.00
-
-
-
-
- 43600.00
-
-
-
-
+
+ 41500.00
+
+
+
+
@@ -32,11 +25,6 @@
-
- 2.570
-
-
-
@@ -50,11 +38,6 @@
-
- 0.500
-
-
-
diff --git a/l10n_us_hr_payroll/data/state/al_alabama.xml b/l10n_us_hr_payroll/data/state/al_alabama.xml
index f2b5ceeb..1a4cce85 100644
--- a/l10n_us_hr_payroll/data/state/al_alabama.xml
+++ b/l10n_us_hr_payroll/data/state/al_alabama.xml
@@ -6,15 +6,11 @@
us_al_suta_wage_base
-
-
-
-
- 8000.0
-
-
-
-
+
+ 8000.0
+
+
+
@@ -23,8 +19,6 @@
-
-
2.7
@@ -37,90 +31,71 @@
us_al_sit_tax_rate
-
-
-
-
- {
- '0' : [
- ( 500, 2),
- ( 2500, 4),
- ('inf', 5),
- ],
- 'M': [
- ( 1000, 2),
- ( 5000, 4),
- ('inf', 5),
- ],
- }
-
-
-
-
+
+ {
+ '0' : [
+ ( 500, 2),
+ ( 2500, 4),
+ ('inf', 5),
+ ],
+ 'M': [
+ ( 1000, 2),
+ ( 5000, 4),
+ ('inf', 5),
+ ],
+ }
+
+
+
US AL Alabama Dependent Rate
us_al_sit_dependent_rate
-
-
-
-
-
- [
- ( 1000, 20000),
- ( 500, 100000),
- ( 300, 'inf'),
- ]
-
-
-
-
+
+ [
+ ( 1000, 20000),
+ ( 500, 100000),
+ ( 300, 'inf'),
+ ]
+
+
+
US AL Alabama Standard Deduction Rate
us_al_sit_standard_deduction_rate
-
-
-
-
-
- {
- '0': ((23499.0, 2500.0), (33000.0, 2500.0, 25.0, 500.0), ('inf', 2000.0)),
- 'S': ((23499.0, 2500.0), (33000.0, 2500.0, 25.0, 500.0), ('inf', 2000.0)),
- 'MS': ((10749.0, 3750.0), (15500.0, 3750.0, 88.0, 250.0), ('inf', 2000.0)),
- 'M': ((23499.0, 7500.0), (33000.0, 7500.0, 175.0, 500.0), ('inf', 4000.0)),
- 'H': ((23499.0, 4700.0), (33000.0, 7500.0, 175.0, 500.0), ('inf', 4000.0)),
- }
-
-
-
-
+
+ {
+ '0': ((23499.0, 2500.0), (33000.0, 2500.0, 25.0, 500.0), ('inf', 2000.0)),
+ 'S': ((23499.0, 2500.0), (33000.0, 2500.0, 25.0, 500.0), ('inf', 2000.0)),
+ 'MS': ((10749.0, 3750.0), (15500.0, 3750.0, 88.0, 250.0), ('inf', 2000.0)),
+ 'M': ((23499.0, 7500.0), (33000.0, 7500.0, 175.0, 500.0), ('inf', 4000.0)),
+ 'H': ((23499.0, 4700.0), (33000.0, 7500.0, 175.0, 500.0), ('inf', 4000.0)),
+ }
+
+
+
US AL Alabama Personal Exemption Rate
us_al_sit_personal_exemption_rate
-
-
-
-
-
- {
- '0' : 0,
- 'S' : 1500,
- 'MS': 1500,
- 'M' : 3000,
- 'H' : 3000,
- }
-
-
-
-
+
+ {
+ '0' : 0,
+ 'S' : 1500,
+ 'MS': 1500,
+ 'M' : 3000,
+ 'H' : 3000,
+ }
+
+
+
diff --git a/l10n_us_hr_payroll/tests/__init__.py b/l10n_us_hr_payroll/tests/__init__.py
old mode 100755
new mode 100644
index 9fd41db3..c21ea951
--- a/l10n_us_hr_payroll/tests/__init__.py
+++ b/l10n_us_hr_payroll/tests/__init__.py
@@ -1,150 +1,6 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
+# ests moved to `l10n_us_hr_payroll_params`
+# common remains for site specific tests
+
from . import common
-
-from . import test_special
-
-from . import test_us_payslip_2020
-from . import test_us_payslip_2021
-
-
-from . import test_us_ak_alaska_payslip_2020
-from . import test_us_ak_alaska_payslip_2021
-
-from . import test_us_al_alabama_payslip_2020
-from . import test_us_al_alabama_payslip_2021
-
-from . import test_us_ar_arkansas_payslip_2020
-from . import test_us_ar_arkansas_payslip_2021
-
-from . import test_us_az_arizona_payslip_2020
-from . import test_us_az_arizona_payslip_2021
-
-from . import test_us_ca_california_payslip_2020
-from . import test_us_ca_california_payslip_2021
-
-from . import test_us_co_colorado_payslip_2020
-from . import test_us_co_colorado_payslip_2021
-
-from . import test_us_ct_connecticut_payslip_2020
-from . import test_us_ct_connecticut_payslip_2021
-
-from . import test_us_de_delaware_payslip_2020
-from . import test_us_de_delaware_payslip_2021
-
-from . import test_us_fl_florida_payslip_2020
-from . import test_us_fl_florida_payslip_2021
-
-from . import test_us_ga_georgia_payslip_2020
-from . import test_us_ga_georgia_payslip_2021
-
-from . import test_us_hi_hawaii_payslip_2020
-from . import test_us_hi_hawaii_payslip_2021
-
-from . import test_us_ia_iowa_payslip_2020
-from . import test_us_ia_iowa_payslip_2021
-
-from . import test_us_id_idaho_payslip_2020
-from . import test_us_id_idaho_payslip_2021
-
-from . import test_us_il_illinois_payslip_2020
-from . import test_us_il_illinois_payslip_2021
-
-from . import test_us_in_indiana_payslip_2020
-from . import test_us_in_indiana_payslip_2021
-
-from . import test_us_ky_kentucky_payslip_2020
-from . import test_us_ky_kentucky_payslip_2021
-
-from . import test_us_ks_kansas_payslip_2020
-from . import test_us_ks_kansas_payslip_2021
-
-from . import test_us_la_louisiana_payslip_2020
-from . import test_us_la_louisiana_payslip_2021
-
-from . import test_us_me_maine_payslip_2020
-from . import test_us_me_maine_payslip_2021
-
-from . import test_us_mi_michigan_payslip_2020
-from . import test_us_mi_michigan_payslip_2021
-
-from . import test_us_mn_minnesota_payslip_2020
-from . import test_us_mn_minnesota_payslip_2021
-
-from . import test_us_mo_missouri_payslip_2020
-from . import test_us_mo_missouri_payslip_2021
-
-from . import test_us_ms_mississippi_payslip_2020
-from . import test_us_ms_mississippi_payslip_2021
-
-from . import test_us_mt_montana_payslip_2020
-from . import test_us_mt_montana_payslip_2021
-
-from . import test_us_nc_northcarolina_payslip_2020
-from . import test_us_nc_northcarolina_payslip_2021
-
-from . import test_us_nd_north_dakota_payslip_2020
-from . import test_us_nd_north_dakota_payslip_2021
-
-from . import test_us_ne_nebraska_payslip_2020
-from . import test_us_ne_nebraska_payslip_2021
-
-from . import test_us_nh_new_hampshire_payslip_2020
-from . import test_us_nh_new_hampshire_payslip_2021
-
-from . import test_us_nj_newjersey_payslip_2020
-from . import test_us_nj_newjersey_payslip_2021
-
-from . import test_us_nm_new_mexico_payslip_2020
-from . import test_us_nm_new_mexico_payslip_2021
-
-from . import test_us_nv_nevada_payslip_2020
-from . import test_us_nv_nevada_payslip_2021
-
-from . import test_us_ny_new_york_payslip_2020
-from . import test_us_ny_new_york_payslip_2021
-
-from . import test_us_oh_ohio_payslip_2020
-from . import test_us_oh_ohio_payslip_2021
-
-from . import test_us_ok_oklahoma_payslip_2020
-from . import test_us_ok_oklahoma_payslip_2021
-
-from . import test_us_pa_pennsylvania_payslip_2020
-from . import test_us_pa_pennsylvania_payslip_2021
-
-from . import test_us_ri_rhode_island_payslip_2020
-from . import test_us_ri_rhode_island_payslip_2021
-
-from . import test_us_sc_south_carolina_payslip_2020
-from . import test_us_sc_south_carolina_payslip_2021
-
-from . import test_us_sd_south_dakota_payslip_2020
-from . import test_us_sd_south_dakota_payslip_2021
-
-from . import test_us_tn_tennessee_payslip_2020
-from . import test_us_tn_tennessee_payslip_2021
-
-from . import test_us_tx_texas_payslip_2020
-from . import test_us_tx_texas_payslip_2021
-
-from . import test_us_us_utah_payslip_2020
-from . import test_us_us_utah_payslip_2021
-
-from . import test_us_vt_vermont_payslip_2020
-from . import test_us_vt_vermont_payslip_2021
-
-from . import test_us_va_virginia_payslip_2020
-from . import test_us_va_virginia_payslip_2021
-
-from . import test_us_wa_washington_payslip_2020
-from . import test_us_wa_washington_payslip_2021
-
-from . import test_us_wv_west_virginia_payslip_2020
-from . import test_us_wv_west_virginia_payslip_2021
-
-from . import test_us_wi_wisconsin_payslip_2020
-from . import test_us_wi_wisconsin_payslip_2021
-
-from . import test_us_wy_wyoming_payslip_2020
-from . import test_us_wy_wyoming_payslip_2021
diff --git a/l10n_us_hr_payroll/tests/test_special.py b/l10n_us_hr_payroll/tests/test_special.py
deleted file mode 100644
index 9fd9bdea..00000000
--- a/l10n_us_hr_payroll/tests/test_special.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from .common import TestUsPayslip, process_payslip
-
-
-class TestSpecial(TestUsPayslip):
- pass
diff --git a/l10n_us_hr_payroll/tests/test_us_ak_alaska_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_ak_alaska_payslip_2020.py
deleted file mode 100644
index 868a8dff..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ak_alaska_payslip_2020.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date
-from .common import TestUsPayslip
-
-
-class TestUsAKPayslip(TestUsPayslip):
- # TAXES AND RATES
- AK_UNEMP_MAX_WAGE = 41500.00
- AK_UNEMP = 1.590
- AK_UNEMP_EE = 0.5
-
- def test_2020_taxes(self):
- self._test_er_suta('AK', self.AK_UNEMP, date(2020, 1, 1), wage_base=self.AK_UNEMP_MAX_WAGE)
- self._test_ee_suta('AK', self.AK_UNEMP_EE, date(2020, 1, 1), wage_base=self.AK_UNEMP_MAX_WAGE)
diff --git a/l10n_us_hr_payroll/tests/test_us_ak_alaska_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_ak_alaska_payslip_2021.py
deleted file mode 100644
index ebf84eda..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ak_alaska_payslip_2021.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date
-from .common import TestUsPayslip
-
-
-class TestUsAKPayslip(TestUsPayslip):
- # TAXES AND RATES
- AK_UNEMP_MAX_WAGE = 43600.00
- AK_UNEMP = 2.57
- AK_UNEMP_EE = 0.5
-
- def test_2021_taxes(self):
- self._test_er_suta('AK', self.AK_UNEMP, date(2021, 1, 1), wage_base=self.AK_UNEMP_MAX_WAGE)
- self._test_ee_suta('AK', self.AK_UNEMP_EE, date(2021, 1, 1), wage_base=self.AK_UNEMP_MAX_WAGE)
diff --git a/l10n_us_hr_payroll/tests/test_us_al_alabama_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_al_alabama_payslip_2020.py
deleted file mode 100644
index 23865fc7..00000000
--- a/l10n_us_hr_payroll/tests/test_us_al_alabama_payslip_2020.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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 TestUsALPayslip(TestUsPayslip):
- # Taxes and Rates
- AL_UNEMP_MAX_WAGE = 8000.00
- AL_UNEMP = 2.70
-
- def _test_sit(self, wage, exempt, exemptions, additional_withholding, dependent, schedule_pay, date_start, expected_withholding):
-
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('AL'),
- al_a4_sit_exemptions=exempt,
- state_income_tax_exempt=exemptions,
- state_income_tax_additional_withholding=additional_withholding,
- al_a4_sit_dependents=dependent,
- 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('AL', self.AL_UNEMP, date(2020, 1, 1), wage_base=self.AL_UNEMP_MAX_WAGE)
- self._test_sit(10000.0, 'S', False, 0.0, 1.0, 'weekly', date(2020, 1, 1), 349.08)
- self._test_sit(850.0, 'M', False, 0.0, 2.0, 'weekly', date(2020, 1, 1), 29.98)
- self._test_sit(5000.0, 'H', False, 0.0, 2.0, 'bi-weekly', date(2020, 1, 1), 191.15)
- self._test_sit(20000.0, 'MS', False, 2.0, 0, 'monthly', date(2020, 1, 1), 757.6)
- self._test_sit(5500.0, '', True, 2.0, 150, 'weekly', date(2020, 1, 1), 0.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_al_alabama_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_al_alabama_payslip_2021.py
deleted file mode 100644
index 56376094..00000000
--- a/l10n_us_hr_payroll/tests/test_us_al_alabama_payslip_2021.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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 TestUsALPayslip(TestUsPayslip):
- # Taxes and Rates
- AL_UNEMP_MAX_WAGE = 8000.00
- AL_UNEMP = 2.70
-
- def _test_sit(self, wage, exempt, exemptions, additional_withholding, dependent, schedule_pay, date_start, expected_withholding):
-
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('AL'),
- al_a4_sit_exemptions=exempt,
- state_income_tax_exempt=exemptions,
- state_income_tax_additional_withholding=additional_withholding,
- al_a4_sit_dependents=dependent,
- 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_2021_taxes_example(self):
- self._test_er_suta('AL', self.AL_UNEMP, date(2021, 1, 1), wage_base=self.AL_UNEMP_MAX_WAGE)
- self._test_sit(10000.0, 'S', False, 0.0, 1.0, 'weekly', date(2021, 1, 1), 349.37)
- self._test_sit(850.0, 'M', False, 0.0, 2.0, 'weekly', date(2021, 1, 1), 30.00)
- self._test_sit(5000.0, 'H', False, 0.0, 2.0, 'bi-weekly', date(2021, 1, 1), 191.33)
- self._test_sit(20000.0, 'MS', False, 2.0, 0, 'monthly', date(2021, 1, 1), 758.86)
- self._test_sit(5500.0, '', True, 2.0, 150, 'weekly', date(2021, 1, 1), 0.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_ar_arkansas_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_ar_arkansas_payslip_2020.py
deleted file mode 100644
index 6afe3d4d..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ar_arkansas_payslip_2020.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date, timedelta
-from .common import TestUsPayslip
-
-
-class TestUsARPayslip(TestUsPayslip):
- # Taxes and Rates
- AR_UNEMP_MAX_WAGE = 8000.0
- AR_UNEMP = 2.9
-
- def _test_sit(self, wage, exemptions, allowances, additional_withholding, schedule_pay, date_start, expected_withholding):
-
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('AR'),
- state_income_tax_exempt=exemptions,
- state_income_tax_additional_withholding=additional_withholding,
- ar_ar4ec_sit_allowances=allowances,
- schedule_pay=schedule_pay)
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
-
- self._log('Computed period tax: ' + str(expected_withholding))
- self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2020_taxes_example(self):
- self._test_er_suta('AR', self.AR_UNEMP, date(2020, 1, 1), wage_base=self.AR_UNEMP_MAX_WAGE)
- self._test_sit(5000.0, True, 0.0, 0, 'monthly', date(2020, 1, 1), 0.0)
- self._test_sit(5000.0, False, 0.0, 0, 'monthly', date(2020, 1, 1), 221.0)
- self._test_sit(700.0, False, 0.0, 150, 'weekly', date(2020, 1, 1), 175.0)
- self._test_sit(7000.0, False, 2.0, 0, 'semi-monthly', date(2020, 1, 1), 420.0)
- self._test_sit(3000.0, False, 1.0, 0, 'bi-weekly', date(2020, 1, 1), 142.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_ar_arkansas_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_ar_arkansas_payslip_2021.py
deleted file mode 100644
index f7a2928e..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ar_arkansas_payslip_2021.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date, timedelta
-from .common import TestUsPayslip
-
-
-class TestUsARPayslip(TestUsPayslip):
- # Taxes and Rates
- AR_UNEMP_MAX_WAGE = 10000.0
- AR_UNEMP = 3.2
-
- def _test_sit(self, wage, exemptions, allowances, additional_withholding, schedule_pay, date_start, expected_withholding):
-
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('AR'),
- state_income_tax_exempt=exemptions,
- state_income_tax_additional_withholding=additional_withholding,
- ar_ar4ec_sit_allowances=allowances,
- schedule_pay=schedule_pay)
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
-
- self._log('Computed period tax: ' + str(expected_withholding))
- self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('AR', self.AR_UNEMP, date(2021, 1, 1), wage_base=self.AR_UNEMP_MAX_WAGE)
- self._test_sit(5000.0, True, 0.0, 0, 'monthly', date(2021, 1, 1), 0.0)
- self._test_sit(5000.0, False, 0.0, 0, 'monthly', date(2021, 1, 1), 220.0)
- self._test_sit(700.0, False, 0.0, 150, 'weekly', date(2021, 1, 1), 175.0)
- self._test_sit(7000.0, False, 2.0, 0, 'semi-monthly', date(2021, 1, 1), 395.0)
- self._test_sit(3000.0, False, 1.0, 0, 'bi-weekly', date(2021, 1, 1), 141.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_az_arizona_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_az_arizona_payslip_2020.py
deleted file mode 100644
index 248648bc..00000000
--- a/l10n_us_hr_payroll/tests/test_us_az_arizona_payslip_2020.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date, timedelta
-from .common import TestUsPayslip
-
-
-class TestUsAZPayslip(TestUsPayslip):
- # Taxes and Rates
- AZ_UNEMP_MAX_WAGE = 7000.0
- AZ_UNEMP = 2.0
-
- def _test_sit(self, wage, additional_withholding, withholding_percent, schedule_pay, date_start, expected_withholding):
-
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('AZ'),
- state_income_tax_additional_withholding=additional_withholding,
- az_a4_sit_withholding_percentage=withholding_percent,
- schedule_pay=schedule_pay)
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
-
- self._log('Computed period tax: ' + str(expected_withholding))
- self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2020_taxes_example(self):
- self._test_er_suta('AZ', self.AZ_UNEMP, date(2020, 1, 1), wage_base=self.AZ_UNEMP_MAX_WAGE)
- self._test_sit(1000.0, 0.0, 2.70, 'monthly', date(2020, 1, 1), 27.0)
- self._test_sit(1000.0, 10.0, 2.70, 'monthly', date(2020, 1, 1), 37.0)
- self._test_sit(15000.0, 0.0, 3.60, 'weekly', date(2020, 1, 1), 540.0)
- self._test_sit(8000.0, 0.0, 4.20, 'semi-monthly', date(2020, 1, 1), 336.0)
- self._test_sit(8000.0, 0.0, 0.00, 'semi-monthly', date(2020, 1, 1), 0.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_az_arizona_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_az_arizona_payslip_2021.py
deleted file mode 100644
index 582fd58b..00000000
--- a/l10n_us_hr_payroll/tests/test_us_az_arizona_payslip_2021.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date, timedelta
-from .common import TestUsPayslip
-
-
-class TestUsAZPayslip(TestUsPayslip):
- # Taxes and Rates
- AZ_UNEMP_MAX_WAGE = 7000.0
- AZ_UNEMP = 2.0
-
- def _test_sit(self, wage, additional_withholding, withholding_percent, schedule_pay, date_start, expected_withholding):
-
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('AZ'),
- state_income_tax_additional_withholding=additional_withholding,
- az_a4_sit_withholding_percentage=withholding_percent,
- schedule_pay=schedule_pay)
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
-
- self._log('Computed period tax: ' + str(expected_withholding))
- self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('AZ', self.AZ_UNEMP, date(2021, 1, 1), wage_base=self.AZ_UNEMP_MAX_WAGE)
- self._test_sit(1000.0, 0.0, 2.70, 'monthly', date(2021, 1, 1), 27.0)
- self._test_sit(1000.0, 10.0, 2.70, 'monthly', date(2021, 1, 1), 37.0)
- self._test_sit(15000.0, 0.0, 3.60, 'weekly', date(2021, 1, 1), 540.0)
- self._test_sit(8000.0, 0.0, 4.20, 'semi-monthly', date(2021, 1, 1), 336.0)
- self._test_sit(8000.0, 0.0, 0.00, 'semi-monthly', date(2021, 1, 1), 0.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_ca_california_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_ca_california_payslip_2020.py
deleted file mode 100755
index 264b115e..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ca_california_payslip_2020.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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 TestUsCAPayslip(TestUsPayslip):
- ###
- # 2020 Taxes and Rates
- ###
- CA_UNEMP_MAX_WAGE = 7000.0 # Note that this is used for SDI and FLI as well
- CA_UIT = 3.4
- CA_ETT = 0.1
- CA_SDI = 1.0
-
- def _test_sit(self, wage, filing_status, allowances, additional_allowances, additional_withholding, schedule_pay, date_start, expected_withholding):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('CA'),
- ca_de4_sit_filing_status=filing_status,
- ca_de4_sit_allowances=allowances,
- ca_de4_sit_additional_allowances=additional_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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding if filing_status else 0.0)
-
- def test_2020_taxes_example1(self):
- combined_er_rate = self.CA_UIT + self.CA_ETT
- self._test_er_suta('CA', combined_er_rate, date(2020, 1, 1), wage_base=self.CA_UNEMP_MAX_WAGE)
- self._test_ee_suta('CA', self.CA_SDI, date(2020, 1, 1), wage_base=self.CA_UNEMP_MAX_WAGE, relaxed=True)
- # these expected values come from https://www.edd.ca.gov/pdf_pub_ctr/20methb.pdf
- self._test_sit(210.0, 'single', 1, 0, 0, 'weekly', date(2020, 1, 1), 0.00)
- self._test_sit(1250.0, 'married', 2, 1, 0, 'bi-weekly', date(2020, 1, 1), 1.23)
- self._test_sit(4100.0, 'married', 5, 0, 0, 'monthly', date(2020, 1, 1), 1.5)
- self._test_sit(800.0, 'head_household', 3, 0, 0, 'weekly', date(2020, 1, 1), 2.28)
- self._test_sit(1800.0, 'married', 4, 0, 0, 'semi-monthly', date(2020, 1, 1), 0.84)
- self._test_sit(45000.0, 'married', 4, 0, 0, 'annually', date(2020, 1, 1), 59.78)
- self._test_sit(45000.0, 'married', 4, 0, 20.0, 'annually', date(2020, 1, 1), 79.78)
- self._test_sit(6000.0, '', 4, 0, 20.0, 'annually', date(2020, 1, 1), 0.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_ca_california_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_ca_california_payslip_2021.py
deleted file mode 100755
index 5a0b8b7f..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ca_california_payslip_2021.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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 TestUsCAPayslip(TestUsPayslip):
- ###
- # 2021 Taxes and Rates
- ###
- CA_UNEMP_MAX_WAGE = 7000.0 # Note that this is used for SDI and FLI as well
- CA_UIT = 3.4
- CA_ETT = 0.1
- CA_SDI = 1.2
-
- def _test_sit(self, wage, filing_status, allowances, additional_allowances, additional_withholding, schedule_pay, date_start, expected_withholding):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('CA'),
- ca_de4_sit_filing_status=filing_status,
- ca_de4_sit_allowances=allowances,
- ca_de4_sit_additional_allowances=additional_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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding if filing_status else 0.0)
-
- def test_2021_taxes_example1(self):
- combined_er_rate = self.CA_UIT + self.CA_ETT
- self._test_er_suta('CA', combined_er_rate, date(2021, 1, 1), wage_base=self.CA_UNEMP_MAX_WAGE)
- self._test_ee_suta('CA', self.CA_SDI, date(2021, 1, 1), wage_base=self.CA_UNEMP_MAX_WAGE, relaxed=True)
- # these expected values come from examples in https://edd.ca.gov/pdf_pub_ctr/21methb.pdf
- self._test_sit(210.0, 'single', 1, 0, 0, 'weekly', date(2021, 1, 1), 0.00)
- self._test_sit(1250.0, 'married', 2, 1, 0, 'bi-weekly', date(2021, 1, 1), 0.82)
- self._test_sit(4100.0, 'married', 5, 0, 0, 'monthly', date(2021, 1, 1), 0.13)
- self._test_sit(800.0, 'head_household', 3, 0, 0, 'weekly', date(2021, 1, 1), 2.05)
- self._test_sit(1800.0, 'married', 4, 0, 0, 'semi-monthly', date(2021, 1, 1), 0.24)
- self._test_sit(45000.0, 'married', 4, 0, 0, 'annually', date(2021, 1, 1), 45.45)
- self._test_sit(45000.0, 'married', 4, 0, 20.0, 'annually', date(2021, 1, 1), 65.45)
- self._test_sit(6000.0, '', 4, 0, 20.0, 'annually', date(2021, 1, 1), 0.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_co_colorado_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_co_colorado_payslip_2020.py
deleted file mode 100755
index 0fa45d9c..00000000
--- a/l10n_us_hr_payroll/tests/test_us_co_colorado_payslip_2020.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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 TestUsCOPayslip(TestUsPayslip):
- ###
- # 2020 Taxes and Rates
- ###
- CO_UNEMP_MAX_WAGE = 13600.0
- CO_UNEMP = 1.7
-
- def _test_sit(self, wage, filing_status, additional_withholding, schedule_pay, date_start, expected_withholding, state_income_tax_exempt=False):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('CO'),
- fed_941_fit_w4_filing_status=filing_status,
- state_income_tax_additional_withholding=additional_withholding,
- state_income_tax_exempt=state_income_tax_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('CO', self.CO_UNEMP, date(2020, 1, 1), wage_base=self.CO_UNEMP_MAX_WAGE)
- self._test_sit(5000.0, 'married', 0.0, 'semi-monthly', date(2020, 1, 1), 216.07)
- self._test_sit(800.0, 'single', 0.0, 'weekly', date(2020, 1, 1), 33.48)
- self._test_sit(20000.0, 'married', 0.0, 'quarterly', date(2020, 1, 1), 833.4)
- self._test_sit(20000.0, 'married', 10.0, 'quarterly', date(2020, 1, 1), 843.4)
- self._test_sit(20000.0, 'married', 0.0, 'quarterly', date(2020, 1, 1), 0.0, True)
- self._test_sit(800.0, '', 0.0, 'weekly', date(2020, 1, 1), 0.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_co_colorado_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_co_colorado_payslip_2021.py
deleted file mode 100755
index 754e1623..00000000
--- a/l10n_us_hr_payroll/tests/test_us_co_colorado_payslip_2021.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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 TestUsCOPayslip(TestUsPayslip):
- ###
- # 2021 Taxes and Rates
- ###
- CO_UNEMP_MAX_WAGE = 13600.0
- CO_UNEMP = 1.7
-
- def _test_sit(self, wage, filing_status, additional_withholding, schedule_pay, date_start, expected_withholding, state_income_tax_exempt=False):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('CO'),
- fed_941_fit_w4_filing_status=filing_status,
- state_income_tax_additional_withholding=additional_withholding,
- state_income_tax_exempt=state_income_tax_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_2021_taxes_example(self):
- self._test_er_suta('CO', self.CO_UNEMP, date(2021, 1, 1), wage_base=self.CO_UNEMP_MAX_WAGE)
- self._test_sit(5000.0, 'married', 0.0, 'semi-monthly', date(2021, 1, 1), 216.07)
- self._test_sit(800.0, 'single', 0.0, 'weekly', date(2021, 1, 1), 33.48)
- self._test_sit(20000.0, 'married', 0.0, 'quarterly', date(2021, 1, 1), 833.4)
- self._test_sit(20000.0, 'married', 10.0, 'quarterly', date(2021, 1, 1), 843.4)
- self._test_sit(20000.0, 'married', 0.0, 'quarterly', date(2021, 1, 1), 0.0, True)
- self._test_sit(800.0, '', 0.0, 'weekly', date(2021, 1, 1), 0.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_ct_connecticut_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_ct_connecticut_payslip_2020.py
deleted file mode 100644
index 8ce41d06..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ct_connecticut_payslip_2020.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# 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 TestUsCTPayslip(TestUsPayslip):
- # Taxes and Rates
- CT_UNEMP_MAX_WAGE = 15000.0
- CT_UNEMP = 3.2
-
- def _test_sit(self, wage, withholding_code, additional_withholding, schedule_pay, date_start, expected_withholding):
-
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('CT'),
- ct_w4na_sit_code=withholding_code,
- 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('CT', self.CT_UNEMP, date(2020, 1, 1), wage_base=self.CT_UNEMP_MAX_WAGE)
- self._test_sit(10000.0, 'a', 0.0, 'weekly', date(2020, 1, 1), 693.23)
- self._test_sit(12000.0, 'b', 15.0, 'bi-weekly', date(2020, 1, 1), 688.85)
- self._test_sit(5000.0, 'f', 15.0, 'monthly', date(2020, 1, 1), 230.25)
- self._test_sit(15000.0, 'c', 0.0, 'monthly', date(2020, 1, 1), 783.33)
- self._test_sit(18000.0, 'b', 0.0, 'weekly', date(2020, 1, 1), 1254.35)
- self._test_sit(500.0, 'd', 0.0, 'weekly', date(2020, 1, 1), 21.15)
diff --git a/l10n_us_hr_payroll/tests/test_us_ct_connecticut_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_ct_connecticut_payslip_2021.py
deleted file mode 100644
index 661131ea..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ct_connecticut_payslip_2021.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# 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 TestUsCTPayslip(TestUsPayslip):
- # Taxes and Rates
- CT_UNEMP_MAX_WAGE = 15000.0
- CT_UNEMP = 3.2
-
- def _test_sit(self, wage, withholding_code, additional_withholding, schedule_pay, date_start, expected_withholding):
-
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('CT'),
- ct_w4na_sit_code=withholding_code,
- 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_2021_taxes_example(self):
- self._test_er_suta('CT', self.CT_UNEMP, date(2021, 1, 1), wage_base=self.CT_UNEMP_MAX_WAGE)
- self._test_sit(10000.0, 'a', 0.0, 'weekly', date(2021, 1, 1), 693.23)
- self._test_sit(12000.0, 'b', 15.0, 'bi-weekly', date(2021, 1, 1), 688.85)
- self._test_sit(5000.0, 'f', 15.0, 'monthly', date(2021, 1, 1), 230.25)
- self._test_sit(15000.0, 'c', 0.0, 'monthly', date(2021, 1, 1), 783.33)
- self._test_sit(18000.0, 'b', 0.0, 'weekly', date(2021, 1, 1), 1254.35)
- self._test_sit(500.0, 'd', 0.0, 'weekly', date(2021, 1, 1), 21.15)
diff --git a/l10n_us_hr_payroll/tests/test_us_de_delaware_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_de_delaware_payslip_2020.py
deleted file mode 100755
index 75c0e755..00000000
--- a/l10n_us_hr_payroll/tests/test_us_de_delaware_payslip_2020.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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 TestUsDEPayslip(TestUsPayslip):
- ###
- # 2020 Taxes and Rates
- ###
- DE_UNEMP_MAX_WAGE = 16500.0
- DE_UNEMP = 1.50
- # Calculation based on section 17. https://revenue.delaware.gov/employers-guide-withholding-regulations-employers-duties/
-
- def _test_sit(self, wage, filing_status, additional_withholding, dependents, schedule_pay, date_start, expected_withholding):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('DE'),
- de_w4_sit_filing_status=filing_status,
- state_income_tax_additional_withholding=additional_withholding,
- de_w4_sit_dependent=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('DE', self.DE_UNEMP, date(2020, 1, 1), wage_base=self.DE_UNEMP_MAX_WAGE)
- self._test_sit(480.77, 'single', 0.0, 1.0, 'weekly', date(2020, 1, 1), 13.84)
- self._test_sit(5000.0, 'single', 0.0, 2.0, 'monthly', date(2020, 1, 1), 211.93)
- self._test_sit(5000.0, 'single', 10.0, 1.0, 'monthly', date(2020, 1, 1), 231.1)
- self._test_sit(20000.0, 'married', 0.0, 3.0, 'quarterly', date(2020, 1, 1), 876.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_de_delaware_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_de_delaware_payslip_2021.py
deleted file mode 100755
index 55ae8983..00000000
--- a/l10n_us_hr_payroll/tests/test_us_de_delaware_payslip_2021.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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 TestUsDEPayslip(TestUsPayslip):
- ###
- # 2021 Taxes and Rates
- ###
- DE_UNEMP_MAX_WAGE = 16500.0
- DE_UNEMP = 1.50
- # Calculation based on section 17. https://revenue.delaware.gov/employers-guide-withholding-regulations-employers-duties/
-
- def _test_sit(self, wage, filing_status, additional_withholding, dependents, schedule_pay, date_start, expected_withholding):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('DE'),
- de_w4_sit_filing_status=filing_status,
- state_income_tax_additional_withholding=additional_withholding,
- de_w4_sit_dependent=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_2021_taxes_example(self):
- self._test_er_suta('DE', self.DE_UNEMP, date(2021, 1, 1), wage_base=self.DE_UNEMP_MAX_WAGE)
- self._test_sit(480.77, 'single', 0.0, 1.0, 'weekly', date(2021, 1, 1), 13.84)
- self._test_sit(5000.0, 'single', 0.0, 2.0, 'monthly', date(2021, 1, 1), 211.93)
- self._test_sit(5000.0, 'single', 10.0, 1.0, 'monthly', date(2021, 1, 1), 231.1)
- self._test_sit(20000.0, 'married', 0.0, 3.0, 'quarterly', date(2021, 1, 1), 876.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_fl_florida_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_fl_florida_payslip_2020.py
deleted file mode 100755
index 5952eb1f..00000000
--- a/l10n_us_hr_payroll/tests/test_us_fl_florida_payslip_2020.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date
-from .common import TestUsPayslip
-
-
-class TestUsFlPayslip(TestUsPayslip):
- ###
- # 2020 Taxes and Rates
- ###
- FL_UNEMP_MAX_WAGE = 7000.0
- FL_UNEMP = 2.7
-
- def test_2020_taxes(self):
- # Only has state unemployment
- self._test_er_suta('FL', self.FL_UNEMP, date(2020, 1, 1), wage_base=self.FL_UNEMP_MAX_WAGE)
diff --git a/l10n_us_hr_payroll/tests/test_us_fl_florida_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_fl_florida_payslip_2021.py
deleted file mode 100755
index f146bf4e..00000000
--- a/l10n_us_hr_payroll/tests/test_us_fl_florida_payslip_2021.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date
-from .common import TestUsPayslip
-
-
-class TestUsFlPayslip(TestUsPayslip):
- ###
- # 2021 Taxes and Rates
- ###
- FL_UNEMP_MAX_WAGE = 7000.0
- FL_UNEMP = 2.9
-
- def test_2021_taxes(self):
- # Only has state unemployment
- self._test_er_suta('FL', self.FL_UNEMP, date(2021, 1, 1), wage_base=self.FL_UNEMP_MAX_WAGE)
diff --git a/l10n_us_hr_payroll/tests/test_us_ga_georgia_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_ga_georgia_payslip_2020.py
deleted file mode 100755
index 21a0a810..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ga_georgia_payslip_2020.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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 TestUsGAPayslip(TestUsPayslip):
-
- # TAXES AND RATES
- GA_UNEMP_MAX_WAGE = 9500.00
- GA_UNEMP = 2.70
-
- # Example calculated based on https://dor.georgia.gov/employers-tax-guide 2020_employer tax gauide
-
- def _test_sit(self, wage, filing_status, additional_withholding, dependent_allowances, additional_allowances,
- schedule_pay, date_start, expected_withholding):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('GA'),
- ga_g4_sit_filing_status=filing_status,
- state_income_tax_additional_withholding=additional_withholding,
- ga_g4_sit_dependent_allowances=dependent_allowances,
- ga_g4_sit_additional_allowances=additional_allowances,
- schedule_pay=schedule_pay)
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
-
- self._log('Computed period tax: ' + str(expected_withholding))
- self.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2020_taxes_example(self):
- self._test_er_suta('GA', self.GA_UNEMP, date(2020, 1, 1), wage_base=self.GA_UNEMP_MAX_WAGE)
- self._test_sit(15000.0, 'single', 12.50, 1, 0, 'weekly', date(2020, 1, 1), 860.28)
- self._test_sit(25000.0, 'head of household', 15.00, 2, 0, 'monthly', date(2020, 1, 1), 1369.19)
- self._test_sit(425.0, 'married filing separate', 0.0, 1, 0, 'weekly', date(2020, 1, 1), 11.45)
- self._test_sit(3000.0, 'single', 0.00, 1, 1, 'quarterly', date(2020, 1, 1), 0.0)
- self._test_sit(2500.0, '', 0.00, 1, 1, 'quarterly', date(2020, 1, 1), 0.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_ga_georgia_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_ga_georgia_payslip_2021.py
deleted file mode 100755
index 56cb9abc..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ga_georgia_payslip_2021.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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 TestUsGAPayslip(TestUsPayslip):
-
- # TAXES AND RATES
- GA_UNEMP_MAX_WAGE = 9500.00
- GA_UNEMP = 2.70
-
- # Example calculated based on https://dor.georgia.gov/employers-tax-guide 2021_employer tax gauide
-
- def _test_sit(self, wage, filing_status, additional_withholding, dependent_allowances, additional_allowances,
- schedule_pay, date_start, expected_withholding):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('GA'),
- ga_g4_sit_filing_status=filing_status,
- state_income_tax_additional_withholding=additional_withholding,
- ga_g4_sit_dependent_allowances=dependent_allowances,
- ga_g4_sit_additional_allowances=additional_allowances,
- schedule_pay=schedule_pay)
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
-
- self._log('Computed period tax: ' + str(expected_withholding))
- self.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('GA', self.GA_UNEMP, date(2021, 1, 1), wage_base=self.GA_UNEMP_MAX_WAGE)
- self._test_sit(15000.0, 'single', 12.50, 1, 0, 'weekly', date(2021, 1, 1), 860.28)
- self._test_sit(25000.0, 'head of household', 15.00, 2, 0, 'monthly', date(2021, 1, 1), 1369.19)
- self._test_sit(425.0, 'married filing separate', 0.0, 1, 0, 'weekly', date(2021, 1, 1), 11.45)
- self._test_sit(3000.0, 'single', 0.00, 1, 1, 'quarterly', date(2021, 1, 1), 0.0)
- self._test_sit(2500.0, '', 0.00, 1, 1, 'quarterly', date(2021, 1, 1), 0.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_hi_hawaii_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_hi_hawaii_payslip_2020.py
deleted file mode 100755
index 9a746057..00000000
--- a/l10n_us_hr_payroll/tests/test_us_hi_hawaii_payslip_2020.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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 TestUsHIPayslip(TestUsPayslip):
- ###
- # 2020 Taxes and Rates
- ###
- HI_UNEMP_MAX_WAGE = 48100.00
- HI_UNEMP = 2.4
-
- 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('HI'),
- hi_hw4_sit_filing_status=filing_status,
- state_income_tax_additional_withholding=additional_withholding,
- hi_hw4_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('HI', self.HI_UNEMP, date(2020, 1, 1), wage_base=self.HI_UNEMP_MAX_WAGE)
- self._test_sit(375.0, 'single', 0.0, 3.0, 'weekly', date(2020, 1, 1), 15.3)
- self._test_sit(5000.0, 'married', 0.0, 2.0, 'monthly', date(2020, 1, 1), 287.1)
- self._test_sit(5000.0, 'married', 10.0, 2.0, 'monthly', date(2020, 1, 1), 297.1)
- self._test_sit(50000.0, 'head_of_household', 0.0, 3.0, 'weekly', date(2020, 1, 1), 3933.65)
- self._test_sit(750.0, 'single', 10.0, 3.0, 'bi-weekly', date(2020, 1, 1), 40.59)
- self._test_sit(3000.0, '', 0.0, 3.0, 'weekly', date(2020, 1, 1), 0.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_hi_hawaii_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_hi_hawaii_payslip_2021.py
deleted file mode 100755
index 0463b227..00000000
--- a/l10n_us_hr_payroll/tests/test_us_hi_hawaii_payslip_2021.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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 TestUsHIPayslip(TestUsPayslip):
- ###
- # 2021 Taxes and Rates
- ###
- HI_UNEMP_MAX_WAGE = 47400.00
- HI_UNEMP = 5.2
-
- 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('HI'),
- hi_hw4_sit_filing_status=filing_status,
- state_income_tax_additional_withholding=additional_withholding,
- hi_hw4_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_2021_taxes_example(self):
- self._test_er_suta('HI', self.HI_UNEMP, date(2021, 1, 1), wage_base=self.HI_UNEMP_MAX_WAGE)
- self._test_sit(375.0, 'single', 0.0, 3.0, 'weekly', date(2021, 1, 1), 15.3)
- self._test_sit(5000.0, 'married', 0.0, 2.0, 'monthly', date(2021, 1, 1), 287.1)
- self._test_sit(5000.0, 'married', 10.0, 2.0, 'monthly', date(2021, 1, 1), 297.1)
- self._test_sit(50000.0, 'head_of_household', 0.0, 3.0, 'weekly', date(2021, 1, 1), 3933.65)
- self._test_sit(750.0, 'single', 10.0, 3.0, 'bi-weekly', date(2021, 1, 1), 40.59)
- self._test_sit(3000.0, '', 0.0, 3.0, 'weekly', date(2021, 1, 1), 0.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_ia_iowa_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_ia_iowa_payslip_2020.py
deleted file mode 100755
index eaca0e71..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ia_iowa_payslip_2020.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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 TestUsIAPayslip(TestUsPayslip):
- ###
- # 2020 Taxes and Rates
- ###
- IA_UNEMP_MAX_WAGE = 31600.00
- IA_UNEMP = 1.0
-
- def _test_sit(self, wage, 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('IA'),
- state_income_tax_exempt=exempt,
- state_income_tax_additional_withholding=additional_withholding,
- ia_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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2020_taxes_example(self):
- self._test_er_suta('IA', self.IA_UNEMP, date(2020, 1, 1), wage_base=self.IA_UNEMP_MAX_WAGE)
- self._test_sit(2100.0, False, 0.0, 3.0, 'bi-weekly', date(2020, 1, 1), 83.5)
- self._test_sit(3000.0, True, 10.0, 1.0, 'bi-weekly', date(2020, 1, 1), 0.00)
- self._test_sit(300.0, False, 0.0, 1.0, 'weekly', date(2020, 1, 1), 6.77)
- self._test_sit(5000.0, False, 0.0, 1.0, 'monthly', date(2020, 1, 1), 230.76)
- self._test_sit(7500.0, False, 10.0, 2.0, 'semi-monthly', date(2020, 1, 1), 432.84)
diff --git a/l10n_us_hr_payroll/tests/test_us_ia_iowa_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_ia_iowa_payslip_2021.py
deleted file mode 100755
index 396acfe4..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ia_iowa_payslip_2021.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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 TestUsIAPayslip(TestUsPayslip):
- ###
- # 2021 Taxes and Rates
- ###
- IA_UNEMP_MAX_WAGE = 32400.0
- IA_UNEMP = 1.0
-
- def _test_sit(self, wage, 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('IA'),
- state_income_tax_exempt=exempt,
- state_income_tax_additional_withholding=additional_withholding,
- ia_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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('IA', self.IA_UNEMP, date(2021, 1, 1), wage_base=self.IA_UNEMP_MAX_WAGE)
- self._test_sit(2100.0, False, 0.0, 3.0, 'bi-weekly', date(2021, 1, 1), 79.31)
- self._test_sit(3000.0, True, 10.0, 1.0, 'bi-weekly', date(2021, 1, 1), 0.00)
- self._test_sit(300.0, False, 0.0, 1.0, 'weekly', date(2021, 1, 1), 6.14)
- self._test_sit(5000.0, False, 0.0, 1.0, 'monthly', date(2021, 1, 1), 218.06)
- self._test_sit(7500.0, False, 10.0, 2.0, 'semi-monthly', date(2021, 1, 1), 421.71)
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
deleted file mode 100755
index eb0da9a7..00000000
--- a/l10n_us_hr_payroll/tests/test_us_id_idaho_payslip_2020.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# 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), 3345.0)
- 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/tests/test_us_id_idaho_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_id_idaho_payslip_2021.py
deleted file mode 100755
index c6149719..00000000
--- a/l10n_us_hr_payroll/tests/test_us_id_idaho_payslip_2021.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# 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):
- ###
- # 2021 Taxes and Rates
- ###
- ID_UNEMP_MAX_WAGE = 43000.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_2021_taxes_example(self):
- self._test_er_suta('ID', self.ID_UNEMP, date(2021, 1, 1), wage_base=self.ID_UNEMP_MAX_WAGE)
- self._test_sit(1212.0, 'single', 4.0, 'bi-weekly', date(2021, 1, 1), 10.0)
- self._test_sit(10000.0, 'married', 1.0, 'annually', date(2021, 1, 1), 0.0)
- self._test_sit(52000.0, 'married', 4.0, 'monthly', date(2021, 1, 1), 3345.0)
- self._test_sit(5000.0, 'head of household', 0.0, 'semi-monthly', date(2021, 1, 1), 300.0)
- self._test_sit(5900.0, 'single', 5.0, 'weekly', date(2021, 1, 1), 367.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_il_illinois_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_il_illinois_payslip_2020.py
deleted file mode 100644
index ead932e4..00000000
--- a/l10n_us_hr_payroll/tests/test_us_il_illinois_payslip_2020.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date, timedelta
-from .common import TestUsPayslip
-
-
-class TestUsILPayslip(TestUsPayslip):
- # Taxes and Rates
- IL_UNEMP_MAX_WAGE = 12740.0
- IL_UNEMP = 3.125
-
- def _test_sit(self, wage, additional_withholding, basic_allowances, additional_allowances, schedule_pay, date_start, expected_withholding):
-
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('IL'),
- state_income_tax_additional_withholding=additional_withholding,
- il_w4_sit_basic_allowances=basic_allowances,
- il_w4_sit_additional_allowances=additional_allowances,
- schedule_pay=schedule_pay)
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
-
- self._log('Computed period tax: ' + str(expected_withholding))
- self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2020_taxes_example(self):
- self._test_er_suta('IL', self.IL_UNEMP, date(2020, 1, 1), wage_base=self.IL_UNEMP_MAX_WAGE)
- self._test_sit(800.0, 0.0, 2, 2, 'weekly', date(2020, 1, 1), 33.27)
- self._test_sit(800.0, 10.0, 2, 2, 'weekly', date(2020, 1, 1), 43.27)
- self._test_sit(2500.0, 0.0, 1, 1, 'monthly', date(2020, 1, 1), 110.04)
- self._test_sit(2500.0, 0.0, 0, 0, 'monthly', date(2020, 1, 1), 123.75)
- self._test_sit(3000.0, 15.0, 0, 0, 'quarterly', date(2020, 1, 1), 163.50)
-
diff --git a/l10n_us_hr_payroll/tests/test_us_il_illinois_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_il_illinois_payslip_2021.py
deleted file mode 100644
index 4f62cb5e..00000000
--- a/l10n_us_hr_payroll/tests/test_us_il_illinois_payslip_2021.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date, timedelta
-from .common import TestUsPayslip
-
-
-class TestUsILPayslip(TestUsPayslip):
- # Taxes and Rates
- IL_UNEMP_MAX_WAGE = 12960.0
- IL_UNEMP = 3.175
-
- def _test_sit(self, wage, additional_withholding, basic_allowances, additional_allowances, schedule_pay, date_start, expected_withholding):
-
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('IL'),
- state_income_tax_additional_withholding=additional_withholding,
- il_w4_sit_basic_allowances=basic_allowances,
- il_w4_sit_additional_allowances=additional_allowances,
- schedule_pay=schedule_pay)
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
-
- self._log('Computed period tax: ' + str(expected_withholding))
- self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('IL', self.IL_UNEMP, date(2021, 1, 1), wage_base=self.IL_UNEMP_MAX_WAGE, relaxed=True)
- self._test_sit(800.0, 0.0, 2, 2, 'weekly', date(2021, 1, 1), 33.17)
- self._test_sit(800.0, 10.0, 2, 2, 'weekly', date(2021, 1, 1), 43.17)
- self._test_sit(2500.0, 0.0, 1, 1, 'monthly', date(2021, 1, 1), 109.83)
- self._test_sit(2500.0, 0.0, 0, 0, 'monthly', date(2021, 1, 1), 123.75)
- self._test_sit(3000.0, 15.0, 0, 0, 'quarterly', date(2021, 1, 1), 163.50)
-
diff --git a/l10n_us_hr_payroll/tests/test_us_in_indiana_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_in_indiana_payslip_2020.py
deleted file mode 100755
index 53b7ddf3..00000000
--- a/l10n_us_hr_payroll/tests/test_us_in_indiana_payslip_2020.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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)
diff --git a/l10n_us_hr_payroll/tests/test_us_in_indiana_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_in_indiana_payslip_2021.py
deleted file mode 100755
index 53b7ddf3..00000000
--- a/l10n_us_hr_payroll/tests/test_us_in_indiana_payslip_2021.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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)
diff --git a/l10n_us_hr_payroll/tests/test_us_ks_kansas_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_ks_kansas_payslip_2020.py
deleted file mode 100755
index 3ed586f8..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ks_kansas_payslip_2020.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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.assertPayrollAlmostEqual(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(6250, 'married', 2, 0, 'semi-monthly', date(2020, 1, 1), 290.00)
- self._test_sit(5000, 'single', 1, 0, 'monthly', date(2020, 1, 1), 222.00)
- self._test_sit(1500, 'married', 0, 0, 'bi-weekly', date(2020, 1, 1), 39.00)
- self._test_sit(750, 'single', 2, 10, 'weekly', date(2020, 1, 1), 36.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_ks_kansas_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_ks_kansas_payslip_2021.py
deleted file mode 100755
index fba4c2f5..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ks_kansas_payslip_2021.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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):
- ###
- # 2021 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)%202120%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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('KS', self.KS_UNEMP, date(2021, 1, 1), wage_base=self.KS_UNEMP_MAX_WAGE)
- self._test_sit(6250, 'married', 2, 0, 'semi-monthly', date(2021, 1, 1), 290.00)
- self._test_sit(5000, 'single', 1, 0, 'monthly', date(2021, 1, 1), 222.00)
- self._test_sit(1500, 'married', 0, 0, 'bi-weekly', date(2021, 1, 1), 39.00)
- self._test_sit(750, 'single', 2, 10, 'weekly', date(2021, 1, 1), 36.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_ky_kentucky_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_ky_kentucky_payslip_2020.py
deleted file mode 100755
index aa067848..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ky_kentucky_payslip_2020.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# 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.7
- # 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)
- self._test_sit(750, 00.0, 'weekly', date(2020, 1, 1), 34.95)
- self._test_sit(7000, 0.0, 'semi-monthly', date(2020, 1, 1), 344.48)
diff --git a/l10n_us_hr_payroll/tests/test_us_ky_kentucky_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_ky_kentucky_payslip_2021.py
deleted file mode 100755
index d05add23..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ky_kentucky_payslip_2021.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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):
- ###
- # 2021 Taxes and Rates
- ###
- KY_UNEMP_MAX_WAGE = 11100.0
- KY_UNEMP = 2.7
- # Calculation based on example https://revenue.ky.gov/Forms/42A003(T)%20(12-2019)%202120%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_2021_taxes_example(self):
- self._test_er_suta('KY', self.KY_UNEMP, date(2021, 1, 1), wage_base=self.KY_UNEMP_MAX_WAGE)
- # page 8 of https://revenue.ky.gov/Software-Developer/Software%20Development%20Documents/2021%20Withholding%20Tax%20Tables%20-%20Computer%20Formual%2042A003(T)(12-20)(10-15-20%20DRAFT).pdf
- self._test_sit(3020, 0.0, 'monthly', date(2021, 1, 1), 139.79)
- self._test_sit(1500, 0.0, 'bi-weekly', date(2021, 1, 1), 69.83)
- self._test_sit(1500, 10.0, 'bi-weekly', date(2021, 1, 1), 79.83)
- self._test_sit(750, 00.0, 'weekly', date(2021, 1, 1), 34.91)
- self._test_sit(7000, 0.0, 'semi-monthly', date(2021, 1, 1), 344.39)
diff --git a/l10n_us_hr_payroll/tests/test_us_la_louisiana_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_la_louisiana_payslip_2020.py
deleted file mode 100755
index d23c3ab3..00000000
--- a/l10n_us_hr_payroll/tests/test_us_la_louisiana_payslip_2020.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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 = 1.14
- # Calculation based on http://revenue.louisiana.gov/TaxForms/1306(1_12)TF.pdf
-
- def _test_sit(self, wage, filing_status, additional_withholding, 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,
- state_income_tax_additional_withholding=additional_withholding,
- 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.assertPayrollAlmostEqual(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', 0.0, 1.0, 2.0, 'weekly', date(2020, 1, 1), 19.43)
- self._test_sit(4600.0, 'married', 0.0, 2.0, 3.0, 'bi-weekly', date(2020, 1, 1), 157.12)
- self._test_sit(6000.0, 'single', 10.0, 2.0, 3.0, 'monthly', date(2020, 1, 1), 219.08)
diff --git a/l10n_us_hr_payroll/tests/test_us_la_louisiana_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_la_louisiana_payslip_2021.py
deleted file mode 100755
index d23c3ab3..00000000
--- a/l10n_us_hr_payroll/tests/test_us_la_louisiana_payslip_2021.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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 = 1.14
- # Calculation based on http://revenue.louisiana.gov/TaxForms/1306(1_12)TF.pdf
-
- def _test_sit(self, wage, filing_status, additional_withholding, 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,
- state_income_tax_additional_withholding=additional_withholding,
- 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.assertPayrollAlmostEqual(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', 0.0, 1.0, 2.0, 'weekly', date(2020, 1, 1), 19.43)
- self._test_sit(4600.0, 'married', 0.0, 2.0, 3.0, 'bi-weekly', date(2020, 1, 1), 157.12)
- self._test_sit(6000.0, 'single', 10.0, 2.0, 3.0, 'monthly', date(2020, 1, 1), 219.08)
diff --git a/l10n_us_hr_payroll/tests/test_us_me_maine_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_me_maine_payslip_2020.py
deleted file mode 100644
index 165455ce..00000000
--- a/l10n_us_hr_payroll/tests/test_us_me_maine_payslip_2020.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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.assertPayrollAlmostEqual(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, 'bi-weekly', date(2020, 1, 1), 6.00)
- self._test_sit(4500.0, 'married', 0.0, True, 0, 'weekly', date(2020, 1, 1), 0.00)
- self._test_sit(4500.0, 'married', 0.0, False, 2, 'monthly', date(2020, 1, 1), 113.00)
- self._test_sit(4500.0, 'married', 10.0, False, 2, 'weekly', date(2020, 1, 1), 287.00)
- self._test_sit(7000.0, '', 10.0, False, 2, 'weekly', date(2020, 1, 1), 0.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_me_maine_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_me_maine_payslip_2021.py
deleted file mode 100644
index 2324b278..00000000
--- a/l10n_us_hr_payroll/tests/test_us_me_maine_payslip_2021.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# 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):
- ###
- # 2021 Taxes and Rates
- ###
- ME_UNEMP_MAX_WAGE = 12000.0
- ME_UNEMP = 2.31
- # Calculation based on this file page.6 and 7 https://www.maine.gov/revenue/forms/with/2021/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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- # todo: not calculating correctly according to https://www.maine.gov/revenue/sites/maine.gov.revenue/files/inline-files/21_wh_tab_instr_1.pdf
- # See examples on page 7
-
- self._test_er_suta('ME', self.ME_UNEMP, date(2021, 1, 1), wage_base=self.ME_UNEMP_MAX_WAGE)
- self._test_sit(300.0, 'single', 0.0, False, 2, 'weekly', date(2021, 1, 1), 0.0)
- self._test_sit(1800.0, 'single', 0.0, False, 2, 'bi-weekly', date(2021, 1, 1), 6.00)
- self._test_sit(4500.0, 'married', 0.0, True, 0, 'weekly', date(2021, 1, 1), 0.00)
- self._test_sit(4500.0, 'married', 0.0, False, 2, 'monthly', date(2021, 1, 1), 113.00)
- self._test_sit(4500.0, 'married', 10.0, False, 2, 'weekly', date(2021, 1, 1), 287.00)
- self._test_sit(7000.0, '', 10.0, False, 2, 'weekly', date(2021, 1, 1), 0.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_mi_michigan_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_mi_michigan_payslip_2020.py
deleted file mode 100755
index 6de7b664..00000000
--- a/l10n_us_hr_payroll/tests/test_us_mi_michigan_payslip_2020.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date, timedelta
-from .common import TestUsPayslip
-
-
-class TestUsMIPayslip(TestUsPayslip):
- # Taxes and Rates
- MI_UNEMP_MAX_WAGE = 9000.0
- MI_UNEMP = 2.7
-
- def _test_sit(self, wage, exemptions, additional_withholding, schedule_pay, date_start, expected_withholding):
-
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('MI'),
- mi_w4_sit_exemptions=exemptions,
- state_income_tax_additional_withholding=additional_withholding,
- schedule_pay=schedule_pay)
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
-
- self._log('Computed period tax: ' + str(expected_withholding))
- self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2020_taxes_example(self):
- self._test_er_suta('MI', self.MI_UNEMP, date(2020, 1, 1), wage_base=self.MI_UNEMP_MAX_WAGE)
- self._test_sit(750.0, 1, 100.0, 'weekly', date(2020, 1, 1), 127.99)
- self._test_sit(1750.0, 1, 0.0, 'bi-weekly', date(2020, 1, 1), 66.61)
- self._test_sit(5000.0, 1, 5.0, 'semi-monthly', date(2020, 1, 1), 209.09)
- self._test_sit(8000.0, 1, 5.0, 'monthly', date(2020, 1, 1), 328.18)
- self._test_sit(5000.0, 2, 0.0, 'monthly', date(2020, 1, 1), 178.86)
-
diff --git a/l10n_us_hr_payroll/tests/test_us_mi_michigan_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_mi_michigan_payslip_2021.py
deleted file mode 100755
index 690749f8..00000000
--- a/l10n_us_hr_payroll/tests/test_us_mi_michigan_payslip_2021.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date, timedelta
-from .common import TestUsPayslip
-
-
-class TestUsMIPayslip(TestUsPayslip):
- # Taxes and Rates
- MI_UNEMP_MAX_WAGE = 9500.0
- MI_UNEMP = 2.7
-
- def _test_sit(self, wage, exemptions, additional_withholding, schedule_pay, date_start, expected_withholding):
-
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('MI'),
- mi_w4_sit_exemptions=exemptions,
- state_income_tax_additional_withholding=additional_withholding,
- schedule_pay=schedule_pay)
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
-
- self._log('Computed period tax: ' + str(expected_withholding))
- self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('MI', self.MI_UNEMP, date(2021, 1, 1), wage_base=self.MI_UNEMP_MAX_WAGE)
- self._test_sit(750.0, 1, 100.0, 'weekly', date(2021, 1, 1), 127.87)
- self._test_sit(1750.0, 1, 0.0, 'bi-weekly', date(2021, 1, 1), 66.37)
- self._test_sit(5000.0, 1, 5.0, 'semi-monthly', date(2021, 1, 1), 208.83)
- self._test_sit(8000.0, 1, 5.0, 'monthly', date(2021, 1, 1), 327.65)
- self._test_sit(5000.0, 2, 0.0, 'monthly', date(2021, 1, 1), 177.79)
-
diff --git a/l10n_us_hr_payroll/tests/test_us_mn_minnesota_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_mn_minnesota_payslip_2020.py
deleted file mode 100755
index c91fa2a8..00000000
--- a/l10n_us_hr_payroll/tests/test_us_mn_minnesota_payslip_2020.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date, timedelta
-from .common import TestUsPayslip
-
-
-class TestUsMNPayslip(TestUsPayslip):
- # TAXES AND RATES
- MN_UNEMP_MAX_WAGE = 35000.0
- MN_UNEMP = 1.11
-
- def _test_sit(self, wage, filing_status, allowances, additional_withholding, schedule_pay, date_start, expected_withholding):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('MN'),
- mn_w4mn_sit_filing_status=filing_status,
- state_income_tax_additional_withholding=additional_withholding,
- mn_w4mn_sit_allowances=allowances,
- schedule_pay=schedule_pay)
-
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
-
- self._log('Computed period tax: ' + str(expected_withholding))
- self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2020_taxes_example(self):
- self._test_er_suta('MN', self.MN_UNEMP, date(2020, 1, 1), wage_base=self.MN_UNEMP_MAX_WAGE)
- self._test_sit(5000.0, 'single', 1.0, 0.0, 'weekly', date(2020, 1, 1), 389.0)
- self._test_sit(30000.0, 'single', 1.0, 0.0, 'weekly', date(2020, 1, 1), 2850.99)
- self._test_sit(5000.0, 'married', 1.0, 0.0, 'weekly', date(2020, 1, 1), 325.0)
- self._test_sit(6500.0, 'single', 1.0, 0.0, 'semi-monthly', date(2020, 1, 1), 429.0)
- self._test_sit(5500.0, '', 2.0, 0.0, 'weekly', date(2020, 1, 1), 0.0)
- self._test_sit(5500.0, 'single', 2.0, 40.0, 'weekly', date(2020, 1, 1), 470.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_mn_minnesota_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_mn_minnesota_payslip_2021.py
deleted file mode 100755
index dbae6ddd..00000000
--- a/l10n_us_hr_payroll/tests/test_us_mn_minnesota_payslip_2021.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date, timedelta
-from .common import TestUsPayslip
-
-
-class TestUsMNPayslip(TestUsPayslip):
- # TAXES AND RATES
- MN_UNEMP_MAX_WAGE = 35000.0
- MN_UNEMP = 1.11
-
- def _test_sit(self, wage, filing_status, allowances, additional_withholding, schedule_pay, date_start, expected_withholding):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('MN'),
- mn_w4mn_sit_filing_status=filing_status,
- state_income_tax_additional_withholding=additional_withholding,
- mn_w4mn_sit_allowances=allowances,
- schedule_pay=schedule_pay)
-
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
-
- self._log('Computed period tax: ' + str(expected_withholding))
- self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('MN', self.MN_UNEMP, date(2021, 1, 1), wage_base=self.MN_UNEMP_MAX_WAGE)
- self._test_sit(5000.0, 'single', 1.0, 0.0, 'weekly', date(2021, 1, 1), 388.0)
- self._test_sit(30000.0, 'single', 1.0, 0.0, 'weekly', date(2021, 1, 1), 2850.0)
- self._test_sit(5000.0, 'married', 1.0, 0.0, 'weekly', date(2021, 1, 1), 325.0)
- self._test_sit(6500.0, 'single', 1.0, 0.0, 'semi-monthly', date(2021, 1, 1), 428.0)
- self._test_sit(5500.0, '', 2.0, 0.0, 'weekly', date(2021, 1, 1), 0.0)
- self._test_sit(5500.0, 'single', 2.0, 40.0, 'weekly', date(2021, 1, 1), 469.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_mo_missouri_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_mo_missouri_payslip_2020.py
deleted file mode 100755
index ff6a0ca1..00000000
--- a/l10n_us_hr_payroll/tests/test_us_mo_missouri_payslip_2020.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# 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 TestUsMoPayslip(TestUsPayslip):
- # Calculations from http://dor.mo.gov/forms/4282_2020.pdf
- MO_UNEMP_MAX_WAGE = 11500.0
- MO_UNEMP = 2.376
-
- 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('MO'),
- mo_mow4_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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2020_taxes_example(self):
- self._test_er_suta('MO', self.MO_UNEMP, date(2020, 1, 1), wage_base=self.MO_UNEMP_MAX_WAGE)
- self._test_sit(750.0, 'single', 0.0, 'weekly', date(2020, 1, 1), 24.00)
- self._test_sit(2500.0, 'single', 5.0, 'bi-weekly', date(2020, 1, 1), 107.00)
- self._test_sit(7000.0, 'married', 0.0, 'monthly', date(2020, 1, 1), 251.00)
- self._test_sit(5000.0, 'married', 10.0, 'semi-monthly', date(2020, 1, 1), 217.00)
- self._test_sit(6000.0, '', 0.0, 'monthly', date(2020, 1, 1), 0.00)
-
diff --git a/l10n_us_hr_payroll/tests/test_us_mo_missouri_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_mo_missouri_payslip_2021.py
deleted file mode 100755
index 0824e2b9..00000000
--- a/l10n_us_hr_payroll/tests/test_us_mo_missouri_payslip_2021.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# 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 TestUsMoPayslip(TestUsPayslip):
- # Calculations from http://dor.mo.gov/forms/4282_2021.pdf
- MO_UNEMP_MAX_WAGE = 11000.0
- MO_UNEMP = 2.7
-
- 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('MO'),
- mo_mow4_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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('MO', self.MO_UNEMP, date(2021, 1, 1), wage_base=self.MO_UNEMP_MAX_WAGE)
- self._test_sit(750.0, 'single', 0.0, 'weekly', date(2021, 1, 1), 24.00)
- self._test_sit(2500.0, 'single', 5.0, 'bi-weekly', date(2021, 1, 1), 107.00)
- self._test_sit(7000.0, 'married', 0.0, 'monthly', date(2021, 1, 1), 249.00)
- self._test_sit(5000.0, 'married', 10.0, 'semi-monthly', date(2021, 1, 1), 216.00)
- self._test_sit(6000.0, '', 0.0, 'monthly', date(2021, 1, 1), 0.00)
-
diff --git a/l10n_us_hr_payroll/tests/test_us_ms_mississippi_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_ms_mississippi_payslip_2020.py
deleted file mode 100755
index ea0081ca..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ms_mississippi_payslip_2020.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# 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 TestUsMsPayslip(TestUsPayslip):
- # Calculations from https://www.dor.ms.gov/Documents/Computer%20Payroll%20Flowchart.pdf
- MS_UNEMP = 1.2
- MS_UNEMP_MAX_WAGE = 14000.0
-
- def _test_sit(self, wage, filing_status, additional_withholding, exemption, schedule_pay, date_start, expected_withholding):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('MS'),
- ms_89_350_sit_filing_status=filing_status,
- state_income_tax_additional_withholding=additional_withholding,
- ms_89_350_sit_exemption_value=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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2020_taxes_example(self):
- self._test_er_suta('MS', self.MS_UNEMP, date(2020, 1, 1), wage_base=self.MS_UNEMP_MAX_WAGE)
- self._test_sit(1250.0, 'head_of_household', 0.0, 11000, 'semi-monthly', date(2020, 1, 1), 22.00)
- self._test_sit(500.0, '', 5.0, 0, 'bi-weekly', date(2020, 1, 1), 0.00)
- self._test_sit(12000.0, 'single', 0.0, 11000, 'monthly', date(2020, 1, 1), 525.00)
- self._test_sit(2500.0, 'married', 5.0, 500, 'bi-weekly', date(2020, 1, 1), 111.00)
-
-
diff --git a/l10n_us_hr_payroll/tests/test_us_ms_mississippi_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_ms_mississippi_payslip_2021.py
deleted file mode 100755
index d59bded9..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ms_mississippi_payslip_2021.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# 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 TestUsMsPayslip(TestUsPayslip):
- # Calculations from https://www.dor.ms.gov/Documents/Computer%20Payroll%20Flowchart.pdf
- MS_UNEMP = 1.0
- MS_UNEMP_MAX_WAGE = 14000.0
-
- def _test_sit(self, wage, filing_status, additional_withholding, exemption, schedule_pay, date_start, expected_withholding):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('MS'),
- ms_89_350_sit_filing_status=filing_status,
- state_income_tax_additional_withholding=additional_withholding,
- ms_89_350_sit_exemption_value=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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('MS', self.MS_UNEMP, date(2021, 1, 1), wage_base=self.MS_UNEMP_MAX_WAGE)
- self._test_sit(1250.0, 'head_of_household', 0.0, 11000, 'semi-monthly', date(2021, 1, 1), 21.00)
- self._test_sit(500.0, '', 5.0, 0, 'bi-weekly', date(2021, 1, 1), 0.00)
- self._test_sit(12000.0, 'single', 0.0, 11000, 'monthly', date(2021, 1, 1), 522.00)
- self._test_sit(2500.0, 'married', 5.0, 500, 'bi-weekly', date(2021, 1, 1), 110.00)
-
-
diff --git a/l10n_us_hr_payroll/tests/test_us_mt_montana_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_mt_montana_payslip_2020.py
deleted file mode 100755
index 13a7e69f..00000000
--- a/l10n_us_hr_payroll/tests/test_us_mt_montana_payslip_2020.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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 TestUsMtPayslip(TestUsPayslip):
- ###
- # 2020 Taxes and Rates
- ###
- MT_UNEMP_WAGE_MAX = 34100.0
- MT_UNEMP = 1.18
- MT_UNEMP_AFT = 0.13
-
- # Calculations from https://app.mt.gov/myrevenue/Endpoint/DownloadPdf?yearId=705
- def _test_sit(self, wage, additional_withholding, exemptions, schedule_pay, date_start, expected_withholding):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('MT'),
- state_income_tax_additional_withholding=additional_withholding,
- mt_mw4_sit_exemptions=exemptions,
- 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_one(self):
- combined_rate = self.MT_UNEMP + self.MT_UNEMP_AFT # Combined for test as they both go to the same category and have the same cap
- self._test_er_suta('MT', combined_rate, date(2020, 1, 1), wage_base=self.MT_UNEMP_WAGE_MAX)
- self._test_sit(550.0, 0.0, 5.0, 'semi-monthly', date(2020, 1, 1), 3.0)
- self._test_sit(2950.0, 10.0, 2.0, 'bi-weekly', date(2020, 1, 1), 162.0)
- self._test_sit(5000.0, 0.0, 1.0, 'monthly', date(2020, 1, 1), 256.0)
- self._test_sit(750.0, 0.0, 1.0, 'weekly', date(2020, 1, 1), 34.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_mt_montana_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_mt_montana_payslip_2021.py
deleted file mode 100755
index 755f6208..00000000
--- a/l10n_us_hr_payroll/tests/test_us_mt_montana_payslip_2021.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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 TestUsMtPayslip(TestUsPayslip):
- ###
- # 2021 Taxes and Rates
- ###
- MT_UNEMP_WAGE_MAX = 35300.0
- MT_UNEMP = 1.18
- MT_UNEMP_AFT = 0.13
-
- # Calculations from https://app.mt.gov/myrevenue/Endpoint/DownloadPdf?yearId=705
- def _test_sit(self, wage, additional_withholding, exemptions, schedule_pay, date_start, expected_withholding):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('MT'),
- state_income_tax_additional_withholding=additional_withholding,
- mt_mw4_sit_exemptions=exemptions,
- 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_2021_taxes_one(self):
- combined_rate = self.MT_UNEMP + self.MT_UNEMP_AFT # Combined for test as they both go to the same category and have the same cap
- self._test_er_suta('MT', combined_rate + .0001, date(2021, 1, 1), wage_base=self.MT_UNEMP_WAGE_MAX, relaxed=True)
- self._test_sit(550.0, 0.0, 5.0, 'semi-monthly', date(2021, 1, 1), 3.0)
- self._test_sit(2950.0, 10.0, 2.0, 'bi-weekly', date(2021, 1, 1), 162.0)
- self._test_sit(5000.0, 0.0, 1.0, 'monthly', date(2021, 1, 1), 256.0)
- self._test_sit(750.0, 0.0, 1.0, 'weekly', date(2021, 1, 1), 34.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_nc_northcarolina_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_nc_northcarolina_payslip_2020.py
deleted file mode 100755
index 8e2d69c1..00000000
--- a/l10n_us_hr_payroll/tests/test_us_nc_northcarolina_payslip_2020.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date, timedelta
-from .common import TestUsPayslip
-
-
-class TestUsNCPayslip(TestUsPayslip):
- ###
- # 2020 Taxes and Rates
- ###
- NC_UNEMP_MAX_WAGE = 25200.0
- NC_UNEMP = 1.0
- NC_INC_TAX = 0.0535
- # Example based on https://files.nc.gov/ncdor/documents/files/NC-30_book_Web_1-16-19_v4_Final.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('NC'),
- nc_nc4_sit_filing_status=filing_status,
- nc_nc4_sit_allowances=allowances,
- state_income_tax_additional_withholding=additional_withholding,
- schedule_pay=schedule_pay)
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
-
- self._log('Computed period tax: ' + str(expected_withholding))
- self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding if filing_status else 0.0)
-
- def test_2020_taxes_example(self):
- self._test_er_suta('NC', self.NC_UNEMP, date(2020, 1, 1), wage_base=self.NC_UNEMP_MAX_WAGE)
- self._test_sit(20000.0, 'single', 1, 100.0, 'weekly', date(2020, 1, 1), 1156.0)
- self._test_sit(5000.0, 'married', 1, 0.0, 'weekly', date(2020, 1, 1), 254.0)
- self._test_sit(4000.0, 'head_household', 1, 5.0, 'semi-monthly', date(2020, 1, 1), 177.0)
- self._test_sit(7000.0, '', 1, 5.0, 'monthly', date(2020, 1, 1), 0.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_nc_northcarolina_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_nc_northcarolina_payslip_2021.py
deleted file mode 100755
index b8119f21..00000000
--- a/l10n_us_hr_payroll/tests/test_us_nc_northcarolina_payslip_2021.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date, timedelta
-from .common import TestUsPayslip
-
-
-class TestUsNCPayslip(TestUsPayslip):
- ###
- # 2021 Taxes and Rates
- ###
- # Example based on https://files.nc.gov/ncdor/documents/files/2021-NC-30-Final.pdf page 19
- NC_UNEMP_MAX_WAGE = 26000.0
- NC_UNEMP = 1.0
- # get NC_INC_TAX from 'Annualized Tax" line 8 in the example on page 19
- NC_INC_TAX = 0.0535
-
- def _test_sit(self, wage, filing_status, allowances, additional_withholding, schedule_pay, date_start, expected_withholding):
-
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('NC'),
- nc_nc4_sit_filing_status=filing_status,
- nc_nc4_sit_allowances=allowances,
- state_income_tax_additional_withholding=additional_withholding,
- schedule_pay=schedule_pay)
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
-
- self._log('Computed period tax: ' + str(expected_withholding))
- self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding if filing_status else 0.0)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('NC', self.NC_UNEMP, date(2021, 1, 1), wage_base=self.NC_UNEMP_MAX_WAGE)
- self._test_sit(20000.0, 'single', 1, 100.0, 'weekly', date(2021, 1, 1), 1156.0)
- self._test_sit(5000.0, 'married', 1, 0.0, 'weekly', date(2021, 1, 1), 254.0)
- self._test_sit(4000.0, 'head_household', 1, 5.0, 'semi-monthly', date(2021, 1, 1), 177.0)
- self._test_sit(7000.0, '', 1, 5.0, 'monthly', date(2021, 1, 1), 0.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_nd_north_dakota_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_nd_north_dakota_payslip_2020.py
deleted file mode 100644
index 903cf816..00000000
--- a/l10n_us_hr_payroll/tests/test_us_nd_north_dakota_payslip_2020.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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, allowances, 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,
- nd_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.assertPayrollAlmostEqual(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, 0.0, 'weekly', date(2020, 1, 1), 6.0)
- self._test_sit(5000.0, 'married', 0.0, 2.0, 'bi-weekly', date(2020, 1, 1), 76.0)
- self._test_sit(25000.0, 'head_household', 0.0, 0.0, 'monthly', date(2020, 1, 1), 534.0)
- self._test_sit(25000.0, 'head_household', 10.0, 2.0, 'monthly', date(2020, 1, 1), 525.0)
- self._test_sit(3000.0, '', 10.0, 2.0, 'monthly', date(2020, 1, 1), 0.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_nd_north_dakota_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_nd_north_dakota_payslip_2021.py
deleted file mode 100644
index c4dfaeb5..00000000
--- a/l10n_us_hr_payroll/tests/test_us_nd_north_dakota_payslip_2021.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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):
- ###
- # 2021 Taxes and Rates
- ###
- ND_UNEMP_MAX_WAGE = 38500.0
- ND_UNEMP = 1.02
- # Calculation based on this file page.47 https://www.nd.gov/tax/data/upfiles/media/rates-and-instructions.pdf?20210110115917
-
- 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('ND'),
- nd_w4_sit_filing_status=filing_status,
- state_income_tax_additional_withholding=additional_withholding,
- nd_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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('ND', self.ND_UNEMP, date(2021, 1, 1), wage_base=self.ND_UNEMP_MAX_WAGE)
- self._test_sit(700.0, 'single', 0.0, 0.0, 'weekly', date(2021, 1, 1), 6.0)
- self._test_sit(5000.0, 'married', 0.0, 2.0, 'bi-weekly', date(2021, 1, 1), 76.0)
- self._test_sit(25000.0, 'head_household', 0.0, 0.0, 'monthly', date(2021, 1, 1), 533.0)
- self._test_sit(25000.0, 'head_household', 10.0, 2.0, 'monthly', date(2021, 1, 1), 524.0)
- self._test_sit(3000.0, '', 10.0, 2.0, 'monthly', date(2021, 1, 1), 0.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_ne_nebraska_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_ne_nebraska_payslip_2020.py
deleted file mode 100644
index 785e4417..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ne_nebraska_payslip_2020.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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.assertPayrollAlmostEqual(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)
- self._test_sit(4000.0, 'single', False, 0.0, 1, 'monthly', date(2020, 1, 1), 179.44)
diff --git a/l10n_us_hr_payroll/tests/test_us_ne_nebraska_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_ne_nebraska_payslip_2021.py
deleted file mode 100644
index 294856a7..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ne_nebraska_payslip_2021.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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):
- ###
- # 2021 Taxes and Rates
- ###
- NE_UNEMP_MAX_WAGE = 9000.0
- NE_UNEMP = 2.5
-
- 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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('NE', self.NE_UNEMP, date(2021, 1, 1), wage_base=self.NE_UNEMP_MAX_WAGE)
- self._test_sit(750.0, 'single', False, 0.0, 2, 'weekly', date(2021, 1, 1), 27.53)
- self._test_sit(9500.0, 'single', False, 0.0, 1, 'bi-weekly', date(2021, 1, 1), 612.63)
- self._test_sit(10500.0, 'married', False, 0.0, 1, 'bi-weekly', date(2021, 1, 1), 659.85)
- self._test_sit(9500.0, 'single', True, 0.0, 1, 'bi-weekly', date(2021, 1, 1), 0.0)
- self._test_sit(10500.0, 'single', False, 10.0, 2, 'monthly', date(2021, 1, 1), 625.2)
- self._test_sit(4000.0, 'single', False, 0.0, 1, 'monthly', date(2021, 1, 1), 179.44)
diff --git a/l10n_us_hr_payroll/tests/test_us_nh_new_hampshire_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_nh_new_hampshire_payslip_2020.py
deleted file mode 100644
index 1d85e700..00000000
--- a/l10n_us_hr_payroll/tests/test_us_nh_new_hampshire_payslip_2020.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date
-from .common import TestUsPayslip
-
-
-class TestUsNHPayslip(TestUsPayslip):
- # TAXES AND RATES
- NH_UNEMP_MAX_WAGE = 14000.00
- NH_UNEMP = 1.2
-
- def test_2020_taxes(self):
- self._test_er_suta('NH', self.NH_UNEMP, date(2020, 1, 1), wage_base=self.NH_UNEMP_MAX_WAGE)
diff --git a/l10n_us_hr_payroll/tests/test_us_nh_new_hampshire_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_nh_new_hampshire_payslip_2021.py
deleted file mode 100644
index 5c1b4a1f..00000000
--- a/l10n_us_hr_payroll/tests/test_us_nh_new_hampshire_payslip_2021.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date
-from .common import TestUsPayslip
-
-
-class TestUsNHPayslip(TestUsPayslip):
- # TAXES AND RATES
- NH_UNEMP_MAX_WAGE = 14000.00
- NH_UNEMP = 2.7
-
- def test_2021_taxes(self):
- self._test_er_suta('NH', self.NH_UNEMP, date(2021, 1, 1), wage_base=self.NH_UNEMP_MAX_WAGE)
diff --git a/l10n_us_hr_payroll/tests/test_us_nj_newjersey_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_nj_newjersey_payslip_2020.py
deleted file mode 100755
index 1df4af6a..00000000
--- a/l10n_us_hr_payroll/tests/test_us_nj_newjersey_payslip_2020.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date, timedelta
-from .common import TestUsPayslip
-
-
-class TestUsNJPayslip(TestUsPayslip):
- ###
- # 2020 Taxes and Rates
- ###
- NJ_UNEMP_MAX_WAGE = 35300.0 # Note that this is used for SDI and FLI as well
-
- ER_NJ_UNEMP = 2.6825
- EE_NJ_UNEMP = 0.3825
-
- ER_NJ_SDI = 0.5
- EE_NJ_SDI = 0.26
-
- ER_NJ_WF = 0.1175
- EE_NJ_WF = 0.0425
-
- ER_NJ_FLI = 0.0
- EE_NJ_FLI = 0.16
-
- def _test_sit(self, wage, filing_status, allowances, schedule_pay, date_start, expected_withholding, rate_table=False):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('NJ'),
- nj_njw4_sit_filing_status=filing_status,
- nj_njw4_sit_allowances=allowances,
- state_income_tax_additional_withholding=0.0,
- nj_njw4_sit_rate_table=rate_table,
- schedule_pay=schedule_pay)
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- self.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding if filing_status else 0.0)
-
- def test_2020_taxes_example1(self):
- combined_er_rate = self.ER_NJ_UNEMP + self.ER_NJ_FLI + self.ER_NJ_SDI + self.ER_NJ_WF
- self._test_er_suta('NJ', combined_er_rate, date(2020, 1, 1), wage_base=self.NJ_UNEMP_MAX_WAGE)
- combined_ee_rate = self.EE_NJ_UNEMP + self.EE_NJ_FLI + self.EE_NJ_SDI + self.EE_NJ_WF
- self._test_ee_suta('NJ', combined_ee_rate, date(2020, 1, 1), wage_base=self.NJ_UNEMP_MAX_WAGE, relaxed=True)
- # these expected values come from https://www.state.nj.us/treasury/taxation/pdf/current/njwt.pdf
- self._test_sit(300.0, 'single', 1, 'weekly', date(2020, 1, 1), 4.21)
- self._test_sit(375.0, 'married_separate', 3, 'weekly', date(2020, 1, 1), 4.76)
- self._test_sit(1400.0, 'head_household', 3, 'weekly', date(2020, 1, 1), 27.60)
- self._test_sit(1400.0, '', 3, 'weekly', date(2020, 1, 1), 0.00)
- self._test_sit(2500.0, 'single', 3, 'bi-weekly', date(2020, 1, 1), 82.66)
- self._test_sit(15000.0, 'married_joint', 2, 'monthly', date(2020, 1, 1), 844.85)
diff --git a/l10n_us_hr_payroll/tests/test_us_nj_newjersey_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_nj_newjersey_payslip_2021.py
deleted file mode 100755
index 2b3fc627..00000000
--- a/l10n_us_hr_payroll/tests/test_us_nj_newjersey_payslip_2021.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date, timedelta
-from .common import TestUsPayslip
-
-
-class TestUsNJPayslip(TestUsPayslip):
- ###
- # 2021 Taxes and Rates
- ###
- NJ_UNEMP_MAX_WAGE = 36200.0 # Note that this is used for SDI and FLI as well
-
- ER_NJ_UNEMP = 2.6825
- EE_NJ_UNEMP = 0.3825
-
- ER_NJ_SDI = 0.5
- EE_NJ_SDI = 0.47
-
- ER_NJ_WF = 0.1175
- EE_NJ_WF = 0.0425
-
- ER_NJ_FLI = 0.0
- EE_NJ_FLI = 0.28
-
- def _test_sit(self, wage, filing_status, allowances, schedule_pay, date_start, expected_withholding, rate_table=False):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- state_id=self.get_us_state('NJ'),
- nj_njw4_sit_filing_status=filing_status,
- nj_njw4_sit_allowances=allowances,
- state_income_tax_additional_withholding=0.0,
- nj_njw4_sit_rate_table=rate_table,
- schedule_pay=schedule_pay)
- payslip = self._createPayslip(employee, date_start, date_start + timedelta(days=7))
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- self.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding if filing_status else 0.0)
-
- def test_2021_taxes_example1(self):
- combined_er_rate = self.ER_NJ_UNEMP + self.ER_NJ_FLI + self.ER_NJ_SDI + self.ER_NJ_WF
- self._test_er_suta('NJ', combined_er_rate, date(2021, 1, 1), wage_base=self.NJ_UNEMP_MAX_WAGE, relaxed=True)
- combined_ee_rate = self.EE_NJ_UNEMP + self.EE_NJ_FLI + self.EE_NJ_SDI + self.EE_NJ_WF
- self._test_ee_suta('NJ', combined_ee_rate, date(2021, 1, 1), wage_base=self.NJ_UNEMP_MAX_WAGE, relaxed=True)
- # these expected values come from https://www.state.nj.us/treasury/taxation/pdf/current/njwt.pdf
- self._test_sit(300.0, 'single', 1, 'weekly', date(2021, 1, 1), 4.21)
- self._test_sit(375.0, 'married_separate', 3, 'weekly', date(2021, 1, 1), 4.76)
- self._test_sit(1400.0, 'head_household', 3, 'weekly', date(2021, 1, 1), 27.60)
- self._test_sit(1400.0, '', 3, 'weekly', date(2021, 1, 1), 0.00)
- self._test_sit(2500.0, 'single', 3, 'bi-weekly', date(2021, 1, 1), 82.66)
- self._test_sit(15000.0, 'married_joint', 2, 'monthly', date(2021, 1, 1), 844.85)
diff --git a/l10n_us_hr_payroll/tests/test_us_nm_new_mexico_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_nm_new_mexico_payslip_2020.py
deleted file mode 100755
index 24f8c5a4..00000000
--- a/l10n_us_hr_payroll/tests/test_us_nm_new_mexico_payslip_2020.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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 TestUsNMPayslip(TestUsPayslip):
- ###
- # 2020 Taxes and Rates
- ###
- NM_UNEMP_MAX_WAGE = 25800.0
- NM_UNEMP = 1.0
- # Calculation based on section 17. https://s3.amazonaws.com/realFile34821a95-73ca-43e7-b06d-fad20f5183fd/a9bf1098-533b-4a3d-806a-4bf6336af6e4?response-content-disposition=filename%3D%22FYI-104+-+New+Mexico+Withholding+Tax+-+Effective+January+1%2C+2020.pdf%22&response-content-type=application%2Fpdf&AWSAccessKeyId=AKIAJBI25DHBYGD7I7TA&Signature=feu%2F1oJvU6BciRfKcoR0iNxoVZE%3D&Expires=1585159702
-
- 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('NM'),
- fed_941_fit_w4_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('NM', self.NM_UNEMP, date(2020, 1, 1), wage_base=self.NM_UNEMP_MAX_WAGE)
- self._test_sit(1000.0, 'married', 0.0, 'weekly', date(2020, 1, 1), 29.47)
- self._test_sit(1000.0, 'married', 10.0, 'weekly', date(2020, 1, 1), 39.47)
- self._test_sit(25000.0, 'single', 0.0, 'bi-weekly', date(2020, 1, 1), 1202.60)
- self._test_sit(25000.0, 'married_as_single', 0.0, 'monthly', date(2020, 1, 1), 1152.95)
- self._test_sit(4400.0, '', 0.0, 'monthly', date(2020, 1, 1), 0.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_nm_new_mexico_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_nm_new_mexico_payslip_2021.py
deleted file mode 100755
index 317977ba..00000000
--- a/l10n_us_hr_payroll/tests/test_us_nm_new_mexico_payslip_2021.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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 TestUsNMPayslip(TestUsPayslip):
- ###
- # 2021 Taxes and Rates
- ###
- NM_UNEMP_MAX_WAGE = 27000.0
- NM_UNEMP = 1.0
- # Calculation based on section 17. https://s3.amazonaws.com/realFile34821a95-73ca-43e7-b06d-fad20f5183fd/a9bf1098-533b-4a3d-806a-4bf6336af6e4?response-content-disposition=filename%3D%22FYI-104+-+New+Mexico+Withholding+Tax+-+Effective+January+1%2C+2021.pdf%22&response-content-type=application%2Fpdf&AWSAccessKeyId=AKIAJBI25DHBYGD7I7TA&Signature=feu%2F1oJvU6BciRfKcoR0iNxoVZE%3D&Expires=1585159702
-
- 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('NM'),
- fed_941_fit_w4_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_2021_taxes_example(self):
- self._test_er_suta('NM', self.NM_UNEMP, date(2021, 1, 1), wage_base=self.NM_UNEMP_MAX_WAGE)
- self._test_sit(1000.0, 'married', 0.0, 'weekly', date(2021, 1, 1), 29.32)
- self._test_sit(1000.0, 'married', 10.0, 'weekly', date(2021, 1, 1), 39.32)
- self._test_sit(25000.0, 'single', 0.0, 'bi-weekly', date(2021, 1, 1), 1369.25)
- self._test_sit(25000.0, 'married_as_single', 0.0, 'monthly', date(2021, 1, 1), 1152.63)
- self._test_sit(4400.0, '', 0.0, 'monthly', date(2021, 1, 1), 0.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_nv_nevada_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_nv_nevada_payslip_2020.py
deleted file mode 100755
index 52c2114b..00000000
--- a/l10n_us_hr_payroll/tests/test_us_nv_nevada_payslip_2020.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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)
diff --git a/l10n_us_hr_payroll/tests/test_us_nv_nevada_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_nv_nevada_payslip_2021.py
deleted file mode 100755
index 284990a0..00000000
--- a/l10n_us_hr_payroll/tests/test_us_nv_nevada_payslip_2021.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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):
- ###
- # 2021 Taxes and Rates
- ###
- NV_UNEMP_MAX_WAGE = 33400.0
- NV_UNEMP = 2.95
-
- def test_2021_taxes(self):
- # Only has state unemployment
- self._test_er_suta('NV', self.NV_UNEMP, date(2021, 1, 1), wage_base=self.NV_UNEMP_MAX_WAGE)
diff --git a/l10n_us_hr_payroll/tests/test_us_ny_new_york_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_ny_new_york_payslip_2020.py
deleted file mode 100644
index 05e50792..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ny_new_york_payslip_2020.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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 = 11600.0
- NY_UNEMP = 2.5
- 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.assertPayrollAlmostEqual(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(10000.0, 'single', 0.0, 3, 'monthly', date(2020, 1, 1), 554.09)
- self._test_sit(8000.0, 'married', 0.0, 5, 'monthly', date(2020, 1, 1), 400.32)
- self._test_sit(4500.0, 'married', 10.0, 3, 'semi-monthly', date(2020, 1, 1), 247.69)
- self._test_sit(50000.0, '', 0.0, 0, 'monthly', date(2020, 1, 1), 0.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_ny_new_york_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_ny_new_york_payslip_2021.py
deleted file mode 100644
index e8f0383d..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ny_new_york_payslip_2021.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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):
- ###
- # 2021 Taxes and Rates
- ###
- NY_UNEMP_MAX_WAGE = 11800.0
- NY_UNEMP = 2.5 #todo: update Feb 2021
- NY_RSF = 0.075 #todo: update Feb 2021
- NY_MCTMT = 0.0 #todo: update Feb 2021
-
- 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.assertPayrollAlmostEqual(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(2021, 1, 1), wage_base=self.NY_UNEMP_MAX_WAGE, relaxed=True)
- self._test_sit(400.0, 'single', 0.0, 3, 'weekly', date(2021, 1, 1), 8.20)
- self._test_sit(10000.0, 'single', 0.0, 3, 'monthly', date(2021, 1, 1), 546.30)
- self._test_sit(8000.0, 'married', 0.0, 5, 'monthly', date(2021, 1, 1), 394.24)
- self._test_sit(4500.0, 'married', 10.0, 3, 'semi-monthly', date(2021, 1, 1), 244.21)
- self._test_sit(50000.0, '', 0.0, 0, 'monthly', date(2021, 1, 1), 0.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_oh_ohio_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_oh_ohio_payslip_2020.py
deleted file mode 100755
index 9026da92..00000000
--- a/l10n_us_hr_payroll/tests/test_us_oh_ohio_payslip_2020.py
+++ /dev/null
@@ -1,108 +0,0 @@
-# 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 TestUsOhPayslip(TestUsPayslip):
- ###
- # Taxes and Rates
- ###
- OH_UNEMP_MAX_WAGE = 9000.0
- OH_UNEMP = 2.7
-
- def test_2020_taxes(self):
- self._test_er_suta('OH', self.OH_UNEMP, date(2020, 1, 1), wage_base=self.OH_UNEMP_MAX_WAGE)
-
- def _run_test_sit(self,
- wage=0.0,
- schedule_pay='monthly',
- filing_status='single',
- dependent_credit=0.0,
- other_income=0.0,
- deductions=0.0,
- additional_withholding=0.0,
- is_nonresident_alien=False,
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=0.0,
- oh_it4_sit_exemptions=0,
- expected=0.0,
- ):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- schedule_pay=schedule_pay,
- fed_941_fit_w4_is_nonresident_alien=is_nonresident_alien,
- fed_941_fit_w4_filing_status=filing_status,
- fed_941_fit_w4_multiple_jobs_higher=False,
- fed_941_fit_w4_dependent_credit=dependent_credit,
- fed_941_fit_w4_other_income=other_income,
- fed_941_fit_w4_deductions=deductions,
- fed_941_fit_w4_additional_withholding=additional_withholding,
- state_income_tax_exempt=state_income_tax_exempt,
- state_income_tax_additional_withholding=state_income_tax_additional_withholding,
- oh_it4_sit_exemptions=oh_it4_sit_exemptions,
- state_id=self.get_us_state('OH'),
- )
- payslip = self._createPayslip(employee, '2020-01-01', '2020-01-31')
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- # Instead of PayrollEqual after initial first round of testing.
- self.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected)
- return payslip
-
- def test_2020_sit_1(self):
- wage = 400.0
- exemptions = 1
- additional = 10.0
- pay_periods = 12.0
- annual_adjusted_wage = (wage * pay_periods) - (650.0 * exemptions)
- self.assertPayrollEqual(4150.0, annual_adjusted_wage)
- WD = ((annual_adjusted_wage * 0.005) / pay_periods) * 1.032
- self.assertPayrollEqual(WD, 1.7845)
- expected = WD + additional
- self._run_test_sit(wage=wage,
- schedule_pay='monthly',
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=additional,
- oh_it4_sit_exemptions=exemptions,
- expected=expected,
- )
-
- # the above agrees with online calculator to the penny 0.01
- # below expected coming from calculator to 0.10
- #
- # semi-monthly
- self._run_test_sit(wage=1200,
- schedule_pay='semi-monthly',
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=20.0,
- oh_it4_sit_exemptions=2,
- expected=42.58,
- )
-
- # bi-weekly
- self._run_test_sit(wage=3000,
- schedule_pay='bi-weekly',
- state_income_tax_exempt=False,
- #state_income_tax_additional_withholding=0.0,
- oh_it4_sit_exemptions=0,
- expected=88.51,
- )
- # weekly
- self._run_test_sit(wage=355,
- schedule_pay='weekly',
- state_income_tax_exempt=False,
- # state_income_tax_additional_withholding=0.0,
- oh_it4_sit_exemptions=1,
- expected=4.87,
- )
-
- # Exempt!
- self._run_test_sit(wage=355,
- schedule_pay='weekly',
- state_income_tax_exempt=True,
- # state_income_tax_additional_withholding=0.0,
- oh_it4_sit_exemptions=1,
- expected=0.0,
- )
diff --git a/l10n_us_hr_payroll/tests/test_us_oh_ohio_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_oh_ohio_payslip_2021.py
deleted file mode 100755
index a05ff6ca..00000000
--- a/l10n_us_hr_payroll/tests/test_us_oh_ohio_payslip_2021.py
+++ /dev/null
@@ -1,108 +0,0 @@
-# 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 TestUsOhPayslip(TestUsPayslip):
- ###
- # Taxes and Rates
- ###
- OH_UNEMP_MAX_WAGE = 9000.0
- OH_UNEMP = 2.7
-
- def test_2021_taxes(self):
- self._test_er_suta('OH', self.OH_UNEMP, date(2021, 1, 1), wage_base=self.OH_UNEMP_MAX_WAGE)
-
- def _run_test_sit(self,
- wage=0.0,
- schedule_pay='monthly',
- filing_status='single',
- dependent_credit=0.0,
- other_income=0.0,
- deductions=0.0,
- additional_withholding=0.0,
- is_nonresident_alien=False,
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=0.0,
- oh_it4_sit_exemptions=0,
- expected=0.0,
- ):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- schedule_pay=schedule_pay,
- fed_941_fit_w4_is_nonresident_alien=is_nonresident_alien,
- fed_941_fit_w4_filing_status=filing_status,
- fed_941_fit_w4_multiple_jobs_higher=False,
- fed_941_fit_w4_dependent_credit=dependent_credit,
- fed_941_fit_w4_other_income=other_income,
- fed_941_fit_w4_deductions=deductions,
- fed_941_fit_w4_additional_withholding=additional_withholding,
- state_income_tax_exempt=state_income_tax_exempt,
- state_income_tax_additional_withholding=state_income_tax_additional_withholding,
- oh_it4_sit_exemptions=oh_it4_sit_exemptions,
- state_id=self.get_us_state('OH'),
- )
- payslip = self._createPayslip(employee, '2021-01-01', '2021-01-31')
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- # Instead of PayrollEqual after initial first round of testing.
- self.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected)
- return payslip
-
- def test_2021_sit_1(self):
- wage = 400.0
- exemptions = 1
- additional = 10.0
- pay_periods = 12.0
- annual_adjusted_wage = (wage * pay_periods) - (650.0 * exemptions)
- self.assertPayrollEqual(4150.0, annual_adjusted_wage)
- WD = ((annual_adjusted_wage * 0.005) / pay_periods) * 1.032
- self.assertPayrollEqual(WD, 1.7845)
- expected = WD + additional
- self._run_test_sit(wage=wage,
- schedule_pay='monthly',
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=additional,
- oh_it4_sit_exemptions=exemptions,
- expected=expected,
- )
-
- # the above agrees with online calculator to the penny 0.01
- # below expected coming from calculator to 0.10
- #
- # semi-monthly
- self._run_test_sit(wage=1200,
- schedule_pay='semi-monthly',
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=20.0,
- oh_it4_sit_exemptions=2,
- expected=42.58,
- )
-
- # bi-weekly
- self._run_test_sit(wage=3000,
- schedule_pay='bi-weekly',
- state_income_tax_exempt=False,
- #state_income_tax_additional_withholding=0.0,
- oh_it4_sit_exemptions=0,
- expected=88.51,
- )
- # weekly
- self._run_test_sit(wage=355,
- schedule_pay='weekly',
- state_income_tax_exempt=False,
- # state_income_tax_additional_withholding=0.0,
- oh_it4_sit_exemptions=1,
- expected=4.87,
- )
-
- # Exempt!
- self._run_test_sit(wage=355,
- schedule_pay='weekly',
- state_income_tax_exempt=True,
- # state_income_tax_additional_withholding=0.0,
- oh_it4_sit_exemptions=1,
- expected=0.0,
- )
diff --git a/l10n_us_hr_payroll/tests/test_us_ok_oklahoma_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_ok_oklahoma_payslip_2020.py
deleted file mode 100755
index cacdcc16..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ok_oklahoma_payslip_2020.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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)
- self._test_sit(5000, 'head_household', 2, 10, False, 'monthly', date(2020, 1, 1), 210.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_ok_oklahoma_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_ok_oklahoma_payslip_2021.py
deleted file mode 100755
index 096f3dfd..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ok_oklahoma_payslip_2021.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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):
- ###
- # 2021 Taxes and Rates
- ###
- OK_UNEMP_MAX_WAGE = 24000.0
- OK_UNEMP = 1.0
- # Calculation based on example https://www.ok.gov/tax/documents/2021WHTables.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_2021_taxes_example(self):
- self._test_er_suta('OK', self.OK_UNEMP, date(2021, 1, 1), wage_base=self.OK_UNEMP_MAX_WAGE)
- self._test_sit(1825, 'married', 2, 0, False, 'semi-monthly', date(2021, 1, 1), 46.00)
- self._test_sit(1825, 'married', 2, 0, True, 'monthly', date(2021, 1, 1), 0.00)
- self._test_sit(1000, 'single', 1, 0, False, 'weekly', date(2021, 1, 1), 39.00)
- self._test_sit(1000, 'single', 1, 10, False, 'weekly', date(2021, 1, 1), 49.00)
- self._test_sit(5000, 'head_household', 2, 10, False, 'monthly', date(2021, 1, 1), 210.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_pa_pennsylvania_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_pa_pennsylvania_payslip_2020.py
deleted file mode 100755
index 3dd3fd27..00000000
--- a/l10n_us_hr_payroll/tests/test_us_pa_pennsylvania_payslip_2020.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date
-from .common import TestUsPayslip
-
-
-class TestUsPAPayslip(TestUsPayslip):
- ###
- # Taxes and Rates
- ###
- PA_UNEMP_MAX_WAGE = 10000.0
- ER_PA_UNEMP = 3.6890
- EE_PA_UNEMP = 0.06
- PA_INC_WITHHOLD = 3.07
-
- def test_2020_taxes(self):
- self._test_er_suta('PA', self.ER_PA_UNEMP, date(2020, 1, 1), wage_base=self.PA_UNEMP_MAX_WAGE)
- self._test_ee_suta('PA', self.EE_PA_UNEMP, date(2020, 1, 1))
-
- salary = 4166.67
- wh = -127.92
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=salary,
- state_id=self.get_us_state('PA'))
-
- self._log('2019 Pennsylvania tax first payslip:')
- payslip = self._createPayslip(employee, '2020-01-01', '2020-01-31')
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- self.assertPayrollEqual(cats['EE_US_SIT'], wh)
-
- # Test Additional
- contract.us_payroll_config_id.state_income_tax_additional_withholding = 100.0
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- self.assertPayrollEqual(cats['EE_US_SIT'], wh - 100.0)
-
- # Test Exempt
- contract.us_payroll_config_id.state_income_tax_exempt = True
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), 0.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_pa_pennsylvania_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_pa_pennsylvania_payslip_2021.py
deleted file mode 100755
index 800fe972..00000000
--- a/l10n_us_hr_payroll/tests/test_us_pa_pennsylvania_payslip_2021.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date
-from .common import TestUsPayslip
-
-
-class TestUsPAPayslip(TestUsPayslip):
- ###
- # Taxes and Rates
- ###
- PA_UNEMP_MAX_WAGE = 10000.0
- ER_PA_UNEMP = 3.6890
- EE_PA_UNEMP = 0.06
- PA_INC_WITHHOLD = 3.07
-
- def test_2021_taxes(self):
- self._test_er_suta('PA', self.ER_PA_UNEMP, date(2021, 1, 1), wage_base=self.PA_UNEMP_MAX_WAGE)
- self._test_ee_suta('PA', self.EE_PA_UNEMP, date(2021, 1, 1))
-
- salary = 4166.67
- wh = -127.90
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=salary,
- state_id=self.get_us_state('PA'))
-
- self._log('2019 Pennsylvania tax first payslip:')
- payslip = self._createPayslip(employee, '2021-01-01', '2021-01-31')
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- self.assertPayrollEqual(cats['EE_US_SIT'], wh)
-
- # Test Additional
- contract.us_payroll_config_id.state_income_tax_additional_withholding = 100.0
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- self.assertPayrollEqual(cats['EE_US_SIT'], wh - 100.0)
-
- # Test Exempt
- contract.us_payroll_config_id.state_income_tax_exempt = True
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), 0.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_payslip_2020.py
deleted file mode 100644
index fd6eafd7..00000000
--- a/l10n_us_hr_payroll/tests/test_us_payslip_2020.py
+++ /dev/null
@@ -1,284 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from .common import TestUsPayslip, process_payslip
-
-from odoo.addons.l10n_us_hr_payroll.models.hr_contract import USHRContract
-
-from sys import float_info
-
-
-class TestUsPayslip2020(TestUsPayslip):
- # FUTA Constants
- FUTA_RATE_NORMAL = 0.6
- FUTA_RATE_BASIC = 6.0
- FUTA_RATE_EXEMPT = 0.0
-
- # Wage caps
- FICA_SS_MAX_WAGE = 137700.0
- FICA_M_MAX_WAGE = float_info.max
- FICA_M_ADD_START_WAGE = 200000.0
- FUTA_MAX_WAGE = 7000.0
-
- # Rates
- FICA_SS = 6.2 / -100.0
- FICA_M = 1.45 / -100.0
- FUTA = FUTA_RATE_NORMAL / -100.0
- FICA_M_ADD = 0.9 / -100.0
-
- ###
- # 2020 Taxes and Rates
- ###
-
- def test_2020_taxes(self):
- # salary is high so that second payslip runs over max
- # social security salary
- salary = 80000.0
-
- employee = self._createEmployee()
-
- contract = self._createContract(employee, wage=salary)
- self._log(contract.read())
-
- self._log('2020 tax first payslip:')
- payslip = self._createPayslip(employee, '2020-01-01', '2020-01-31')
-
- cats = self._getCategories(payslip)
- rules = self._getRules(payslip)
- # Employee
- self.assertPayrollEqual(rules['EE_US_941_FICA_SS'], cats['BASIC'] * self.FICA_SS)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M'], cats['BASIC'] * self.FICA_M)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M_ADD'], 0.0)
- # Employer
- self.assertPayrollEqual(rules['ER_US_941_FICA_SS'], rules['EE_US_941_FICA_SS'])
- self.assertPayrollEqual(rules['ER_US_941_FICA_M'], rules['EE_US_941_FICA_M'])
- self.assertTrue(cats['ER_US_940_FUTA'], self.FUTA_MAX_WAGE * self.FUTA)
-
- process_payslip(payslip)
-
- # Make a new payslip, this one will have reached Medicare Additional (employee only)
- remaining_ss_wages = self.FICA_SS_MAX_WAGE - salary if (self.FICA_SS_MAX_WAGE - 2 * salary < salary) else salary
- remaining_m_wages = self.FICA_M_MAX_WAGE - salary if (self.FICA_M_MAX_WAGE - 2 * salary < salary) else salary
-
- self._log('2020 tax second payslip:')
- payslip = self._createPayslip(employee, '2020-02-01', '2020-02-28')
-
- cats = self._getCategories(payslip)
- rules = self._getRules(payslip)
-
- self.assertPayrollEqual(rules['EE_US_941_FICA_SS'], remaining_ss_wages * self.FICA_SS)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M'], remaining_m_wages * self.FICA_M)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M_ADD'], 0.0)
- self.assertPayrollEqual(cats['ER_US_940_FUTA'], 0.0)
-
- process_payslip(payslip)
-
- # Make a new payslip, this one will have reached Medicare Additional (employee only)
- self._log('2020 tax third payslip:')
- payslip = self._createPayslip(employee, '2020-03-01', '2020-03-31')
-
- cats = self._getCategories(payslip)
- rules = self._getRules(payslip)
-
- self.assertPayrollEqual(rules['EE_US_941_FICA_M_ADD'], (self.FICA_M_ADD_START_WAGE - (salary * 2)) * self.FICA_M_ADD) # aka 40k
-
- process_payslip(payslip)
-
- # Make a new payslip, this one will have all salary as Medicare Additional
-
- self._log('2020 tax fourth payslip:')
- payslip = self._createPayslip(employee, '2020-04-01', '2020-04-30')
-
- cats = self._getCategories(payslip)
- rules = self._getRules(payslip)
-
- self.assertPayrollEqual(rules['EE_US_941_FICA_M_ADD'], salary * self.FICA_M_ADD)
-
- process_payslip(payslip)
-
- def test_2020_taxes_with_external(self):
- # social security salary
- salary = self.FICA_M_ADD_START_WAGE
- external_wages = 6000.0
-
- employee = self._createEmployee()
-
- self._createContract(employee, wage=salary, external_wages=external_wages)
-
- self._log('2020 tax first payslip:')
- payslip = self._createPayslip(employee, '2020-01-01', '2020-01-31')
- payslip.compute_sheet()
-
- cats = self._getCategories(payslip)
- rules = self._getRules(payslip)
- self.assertPayrollEqual(rules['EE_US_941_FICA_SS'], (self.FICA_SS_MAX_WAGE - external_wages) * self.FICA_SS)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M'], salary * self.FICA_M)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M_ADD'], external_wages * self.FICA_M_ADD)
- self.assertPayrollEqual(rules['ER_US_941_FICA_SS'], rules['EE_US_941_FICA_SS'])
- self.assertPayrollEqual(rules['ER_US_941_FICA_M'], rules['EE_US_941_FICA_M'])
- self.assertPayrollEqual(cats['ER_US_940_FUTA'], (self.FUTA_MAX_WAGE - external_wages) * self.FUTA)
-
- def test_2020_taxes_with_full_futa(self):
- futa_rate = self.FUTA_RATE_BASIC / -100.0
- # social security salary
- salary = self.FICA_M_ADD_START_WAGE
-
- employee = self._createEmployee()
-
- self._createContract(employee, wage=salary, fed_940_type=USHRContract.FUTA_TYPE_BASIC)
-
- self._log('2020 tax first payslip:')
- payslip = self._createPayslip(employee, '2020-01-01', '2020-01-31')
-
- payslip.compute_sheet()
-
- cats = self._getCategories(payslip)
- rules = self._getRules(payslip)
- self.assertPayrollEqual(rules['EE_US_941_FICA_SS'], self.FICA_SS_MAX_WAGE * self.FICA_SS)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M'], salary * self.FICA_M)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M_ADD'], 0.0 * self.FICA_M_ADD)
- self.assertPayrollEqual(rules['ER_US_941_FICA_SS'], rules['EE_US_941_FICA_SS'])
- self.assertPayrollEqual(rules['ER_US_941_FICA_M'], rules['EE_US_941_FICA_M'])
- self.assertPayrollEqual(cats['ER_US_940_FUTA'], self.FUTA_MAX_WAGE * futa_rate)
-
- def test_2020_taxes_with_futa_exempt(self):
- futa_rate = self.FUTA_RATE_EXEMPT / -100.0 # because of exemption
-
- # social security salary
- salary = self.FICA_M_ADD_START_WAGE
- employee = self._createEmployee()
- self._createContract(employee, wage=salary, fed_940_type=USHRContract.FUTA_TYPE_EXEMPT)
- self._log('2020 tax first payslip:')
- payslip = self._createPayslip(employee, '2020-01-01', '2020-01-31')
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- self.assertPayrollEqual(cats['ER_US_940_FUTA'], 0.0)
-
- def test_2020_taxes_with_fica_exempt(self):
- salary = 6000.0
- schedule_pay = 'bi-weekly'
- employee = self._createEmployee()
- contract = self._createContract(employee, wage=salary, schedule_pay=schedule_pay)
- contract.us_payroll_config_id.fed_941_fica_exempt = True
-
- self._log('2020 tax w4 exempt payslip:')
- payslip = self._createPayslip(employee, '2020-01-01', '2020-01-31')
-
- payslip.compute_sheet()
-
- cats = self._getCategories(payslip)
- self.assertPayrollEqual(cats['EE_US_941_FICA'], 0.0)
- self.assertPayrollEqual(cats['ER_US_941_FICA'], 0.0)
-
- """
- For Federal Income Tax Withholding, we are utilizing the calculations from the new IRS Excel calculator.
- Given that you CAN round, we will round to compare even though we will calculate as close to the penny as possible
- with the wage * computed_percent method.
- """
-
- def _run_test_fit(self,
- wage=0.0,
- schedule_pay='monthly',
- filing_status='single',
- dependent_credit=0.0,
- other_income=0.0,
- deductions=0.0,
- additional_withholding=0.0,
- is_nonresident_alien=False,
- expected_standard=0.0,
- expected_higher=0.0,
- ):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- schedule_pay=schedule_pay,
- fed_941_fit_w4_is_nonresident_alien=is_nonresident_alien,
- fed_941_fit_w4_filing_status=filing_status,
- fed_941_fit_w4_multiple_jobs_higher=False,
- fed_941_fit_w4_dependent_credit=dependent_credit,
- fed_941_fit_w4_other_income=other_income,
- fed_941_fit_w4_deductions=deductions,
- fed_941_fit_w4_additional_withholding=additional_withholding,
- )
- payslip = self._createPayslip(employee, '2020-01-01', '2020-01-31')
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- self.assertPayrollEqual(round(cats.get('EE_US_941_FIT', 0.0)), -expected_standard)
-
- contract.us_payroll_config_id.fed_941_fit_w4_multiple_jobs_higher = True
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- self.assertPayrollEqual(round(cats.get('EE_US_941_FIT', 0.0)), -expected_higher)
- return payslip
-
- def test_2020_fed_income_withholding_single(self):
- _ = self._run_test_fit(
- wage=6000.0,
- schedule_pay='monthly',
- filing_status='single',
- dependent_credit=100.0,
- other_income=200.0,
- deductions=300.0,
- additional_withholding=400.0,
- is_nonresident_alien=False,
- expected_standard=1132.0,
- expected_higher=1459.0,
- )
-
- def test_2020_fed_income_withholding_married_as_single(self):
- # This is "Head of Household" though the field name is the same for historical reasons.
- _ = self._run_test_fit(
- wage=500.0,
- schedule_pay='weekly',
- filing_status='married_as_single',
- dependent_credit=20.0,
- other_income=30.0,
- deductions=40.0,
- additional_withholding=10.0,
- is_nonresident_alien=False,
- expected_standard=24.0,
- expected_higher=45.0,
- )
-
- def test_2020_fed_income_withholding_married(self):
- _ = self._run_test_fit(
- wage=14000.00,
- schedule_pay='bi-weekly',
- filing_status='married',
- dependent_credit=2500.0,
- other_income=1200.0,
- deductions=1000.0,
- additional_withholding=0.0,
- is_nonresident_alien=False,
- expected_standard=2621.0,
- expected_higher=3702.0,
- )
-
- def test_2020_fed_income_withholding_nonresident_alien(self):
- # Monthly NRA additional wage is 1033.30
- # Wage input on IRS Form entered as (3500+1033.30)=4533.30, not 3500.0
- _ = self._run_test_fit(
- wage=3500.00,
- schedule_pay='monthly',
- filing_status='married',
- dependent_credit=340.0,
- other_income=0.0,
- deductions=0.0,
- additional_withholding=0.0,
- is_nonresident_alien=True,
- expected_standard=235.0,
- expected_higher=391.0,
- )
-
- def test_2020_taxes_with_w4_exempt(self):
- _ = self._run_test_fit(
- wage=3500.00,
- schedule_pay='monthly',
- filing_status='', # Exempt
- dependent_credit=340.0,
- other_income=0.0,
- deductions=0.0,
- additional_withholding=0.0,
- is_nonresident_alien=True,
- expected_standard=0.0,
- expected_higher=0.0,
- )
diff --git a/l10n_us_hr_payroll/tests/test_us_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_payslip_2021.py
deleted file mode 100644
index 60822b05..00000000
--- a/l10n_us_hr_payroll/tests/test_us_payslip_2021.py
+++ /dev/null
@@ -1,294 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from .common import TestUsPayslip, process_payslip
-
-from odoo.addons.l10n_us_hr_payroll.models.hr_contract import USHRContract
-
-from sys import float_info
-
-
-class TestUsPayslip2021(TestUsPayslip):
- # FUTA Constants
- FUTA_RATE_NORMAL = 0.6
- FUTA_RATE_BASIC = 6.0
- FUTA_RATE_EXEMPT = 0.0
-
- # Wage caps
- FICA_SS_MAX_WAGE = 142800.0
- FICA_M_MAX_WAGE = float_info.max
- FICA_M_ADD_START_WAGE = 200000.0
- FUTA_MAX_WAGE = 7000.0
-
- # Rates
- FICA_SS = 6.2 / -100.0
- FICA_M = 1.45 / -100.0
- FUTA = FUTA_RATE_NORMAL / -100.0
- FICA_M_ADD = 0.9 / -100.0
-
- ###
- # 2021 Taxes and Rates
- ###
-
- def test_2021_taxes(self):
- # salary is high so that second payslip runs over max
- # social security salary
- salary = 80000.0
-
- employee = self._createEmployee()
-
- contract = self._createContract(employee, wage=salary)
- self._log(contract.read())
-
- self._log('2020 tax last slip')
- payslip = self._createPayslip(employee, '2020-12-01', '2020-12-31')
- self.assertEqual(payslip.contract_id, contract)
- self._log(payslip.read())
- process_payslip(payslip)
-
- # Ensure amounts are there, they shouldn't be added in the next year...
- cats = self._getCategories(payslip)
- self.assertTrue(cats['ER_US_940_FUTA'], ' Value should be well above whatever was available that year!')
-
- self._log('2021 tax first payslip:')
- payslip = self._createPayslip(employee, '2021-01-01', '2021-01-31')
-
- cats = self._getCategories(payslip)
- rules = self._getRules(payslip)
- # Employee
- self.assertPayrollEqual(rules['EE_US_941_FICA_SS'], cats['BASIC'] * self.FICA_SS)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M'], cats['BASIC'] * self.FICA_M)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M_ADD'], 0.0)
- # Employer
- self.assertPayrollEqual(rules['ER_US_941_FICA_SS'], rules['EE_US_941_FICA_SS'])
- self.assertPayrollEqual(rules['ER_US_941_FICA_M'], rules['EE_US_941_FICA_M'])
- self.assertTrue(cats['ER_US_940_FUTA'], self.FUTA_MAX_WAGE * self.FUTA)
-
- process_payslip(payslip)
-
- # Make a new payslip, this one will have reached Medicare Additional (employee only)
- remaining_ss_wages = self.FICA_SS_MAX_WAGE - salary if (self.FICA_SS_MAX_WAGE - 2 * salary < salary) else salary
- remaining_m_wages = self.FICA_M_MAX_WAGE - salary if (self.FICA_M_MAX_WAGE - 2 * salary < salary) else salary
-
- self._log('2021 tax second payslip:')
- payslip = self._createPayslip(employee, '2021-02-01', '2021-02-28')
-
- cats = self._getCategories(payslip)
- rules = self._getRules(payslip)
-
- self.assertPayrollEqual(rules['EE_US_941_FICA_SS'], remaining_ss_wages * self.FICA_SS)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M'], remaining_m_wages * self.FICA_M)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M_ADD'], 0.0)
- self.assertPayrollEqual(cats['ER_US_940_FUTA'], 0.0)
-
- process_payslip(payslip)
-
- # Make a new payslip, this one will have reached Medicare Additional (employee only)
- self._log('2021 tax third payslip:')
- payslip = self._createPayslip(employee, '2021-03-01', '2021-03-31')
-
- cats = self._getCategories(payslip)
- rules = self._getRules(payslip)
-
- self.assertPayrollEqual(rules['EE_US_941_FICA_M_ADD'], (self.FICA_M_ADD_START_WAGE - (salary * 2)) * self.FICA_M_ADD) # aka 40k
-
- process_payslip(payslip)
-
- # Make a new payslip, this one will have all salary as Medicare Additional
-
- self._log('2021 tax fourth payslip:')
- payslip = self._createPayslip(employee, '2021-04-01', '2021-04-30')
-
- cats = self._getCategories(payslip)
- rules = self._getRules(payslip)
-
- self.assertPayrollEqual(rules['EE_US_941_FICA_M_ADD'], salary * self.FICA_M_ADD)
-
- process_payslip(payslip)
-
- def test_2021_taxes_with_external(self):
- # social security salary
- salary = self.FICA_M_ADD_START_WAGE
- external_wages = 6000.0
-
- employee = self._createEmployee()
-
- self._createContract(employee, wage=salary, external_wages=external_wages)
-
- self._log('2021 tax first payslip:')
- payslip = self._createPayslip(employee, '2021-01-01', '2021-01-31')
- payslip.compute_sheet()
-
- cats = self._getCategories(payslip)
- rules = self._getRules(payslip)
- self.assertPayrollEqual(rules['EE_US_941_FICA_SS'], (self.FICA_SS_MAX_WAGE - external_wages) * self.FICA_SS)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M'], salary * self.FICA_M)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M_ADD'], external_wages * self.FICA_M_ADD)
- self.assertPayrollEqual(rules['ER_US_941_FICA_SS'], rules['EE_US_941_FICA_SS'])
- self.assertPayrollEqual(rules['ER_US_941_FICA_M'], rules['EE_US_941_FICA_M'])
- self.assertPayrollEqual(cats['ER_US_940_FUTA'], (self.FUTA_MAX_WAGE - external_wages) * self.FUTA)
-
- def test_2021_taxes_with_full_futa(self):
- futa_rate = self.FUTA_RATE_BASIC / -100.0
- # social security salary
- salary = self.FICA_M_ADD_START_WAGE
-
- employee = self._createEmployee()
-
- self._createContract(employee, wage=salary, fed_940_type=USHRContract.FUTA_TYPE_BASIC)
-
- self._log('2021 tax first payslip:')
- payslip = self._createPayslip(employee, '2021-01-01', '2021-01-31')
-
- payslip.compute_sheet()
-
- cats = self._getCategories(payslip)
- rules = self._getRules(payslip)
- self.assertPayrollEqual(rules['EE_US_941_FICA_SS'], self.FICA_SS_MAX_WAGE * self.FICA_SS)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M'], salary * self.FICA_M)
- self.assertPayrollEqual(rules['EE_US_941_FICA_M_ADD'], 0.0 * self.FICA_M_ADD)
- self.assertPayrollEqual(rules['ER_US_941_FICA_SS'], rules['EE_US_941_FICA_SS'])
- self.assertPayrollEqual(rules['ER_US_941_FICA_M'], rules['EE_US_941_FICA_M'])
- self.assertPayrollEqual(cats['ER_US_940_FUTA'], self.FUTA_MAX_WAGE * futa_rate)
-
- def test_2021_taxes_with_futa_exempt(self):
- futa_rate = self.FUTA_RATE_EXEMPT / -100.0 # because of exemption
-
- # social security salary
- salary = self.FICA_M_ADD_START_WAGE
- employee = self._createEmployee()
- self._createContract(employee, wage=salary, fed_940_type=USHRContract.FUTA_TYPE_EXEMPT)
- self._log('2021 tax first payslip:')
- payslip = self._createPayslip(employee, '2021-01-01', '2021-01-31')
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- self.assertPayrollEqual(cats['ER_US_940_FUTA'], 0.0)
-
- def test_2021_taxes_with_fica_exempt(self):
- salary = 6000.0
- schedule_pay = 'bi-weekly'
- employee = self._createEmployee()
- contract = self._createContract(employee, wage=salary, schedule_pay=schedule_pay)
- contract.us_payroll_config_id.fed_941_fica_exempt = True
-
- self._log('2021 tax w4 exempt payslip:')
- payslip = self._createPayslip(employee, '2021-01-01', '2021-01-31')
-
- payslip.compute_sheet()
-
- cats = self._getCategories(payslip)
- self.assertPayrollEqual(cats['EE_US_941_FICA'], 0.0)
- self.assertPayrollEqual(cats['ER_US_941_FICA'], 0.0)
-
- """
- For Federal Income Tax Withholding, we are utilizing the calculations from the new IRS Excel calculator.
- Given that you CAN round, we will round to compare even though we will calculate as close to the penny as possible
- with the wage * computed_percent method.
- """
-
- def _run_test_fit(self,
- wage=0.0,
- schedule_pay='monthly',
- filing_status='single',
- dependent_credit=0.0,
- other_income=0.0,
- deductions=0.0,
- additional_withholding=0.0,
- is_nonresident_alien=False,
- expected_standard=0.0,
- expected_higher=0.0,
- ):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- schedule_pay=schedule_pay,
- fed_941_fit_w4_is_nonresident_alien=is_nonresident_alien,
- fed_941_fit_w4_filing_status=filing_status,
- fed_941_fit_w4_multiple_jobs_higher=False,
- fed_941_fit_w4_dependent_credit=dependent_credit,
- fed_941_fit_w4_other_income=other_income,
- fed_941_fit_w4_deductions=deductions,
- fed_941_fit_w4_additional_withholding=additional_withholding,
- )
- payslip = self._createPayslip(employee, '2021-01-01', '2021-01-31')
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- self.assertPayrollEqual(round(cats.get('EE_US_941_FIT', 0.0)), -expected_standard)
-
- contract.us_payroll_config_id.fed_941_fit_w4_multiple_jobs_higher = True
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- self.assertPayrollEqual(round(cats.get('EE_US_941_FIT', 0.0)), -expected_higher)
- return payslip
-
- def test_2021_fed_income_withholding_single(self):
- _ = self._run_test_fit(
- wage=6000.0,
- schedule_pay='monthly',
- filing_status='single',
- dependent_credit=100.0,
- other_income=200.0,
- deductions=300.0,
- additional_withholding=400.0,
- is_nonresident_alien=False,
- expected_standard=1125.0,
- expected_higher=1455.0,
- )
-
- def test_2021_fed_income_withholding_married_as_single(self):
- # This is "Head of Household" though the field name is the same for historical reasons.
- _ = self._run_test_fit(
- wage=500.0,
- schedule_pay='weekly',
- filing_status='married_as_single',
- dependent_credit=20.0,
- other_income=30.0,
- deductions=40.0,
- additional_withholding=10.0,
- is_nonresident_alien=False,
- expected_standard=23.0,
- expected_higher=45.0,
- )
-
- def test_2021_fed_income_withholding_married(self):
- _ = self._run_test_fit(
- wage=14000.00,
- schedule_pay='bi-weekly',
- filing_status='married',
- dependent_credit=2500.0,
- other_income=1200.0,
- deductions=1000.0,
- additional_withholding=0.0,
- is_nonresident_alien=False,
- expected_standard=2603.0,
- expected_higher=3687.0,
- )
-
- def test_2021_fed_income_withholding_nonresident_alien(self):
- # Monthly NRA additional wage is 1033.30
- # Wage input on IRS Form entered as (3500+1033.30)=4533.30, not 3500.0
- _ = self._run_test_fit(
- wage=3500.00,
- schedule_pay='monthly',
- filing_status='married',
- dependent_credit=340.0,
- other_income=0.0,
- deductions=0.0,
- additional_withholding=0.0,
- is_nonresident_alien=True,
- expected_standard=233.0,
- expected_higher=387.0,
- )
-
- def test_2021_taxes_with_w4_exempt(self):
- _ = self._run_test_fit(
- wage=3500.00,
- schedule_pay='monthly',
- filing_status='', # Exempt
- dependent_credit=340.0,
- other_income=0.0,
- deductions=0.0,
- additional_withholding=0.0,
- is_nonresident_alien=True,
- expected_standard=0.0,
- expected_higher=0.0,
- )
diff --git a/l10n_us_hr_payroll/tests/test_us_ri_rhode_island_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_ri_rhode_island_payslip_2020.py
deleted file mode 100755
index 9d92fec1..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ri_rhode_island_payslip_2020.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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.06
- # 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)
diff --git a/l10n_us_hr_payroll/tests/test_us_ri_rhode_island_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_ri_rhode_island_payslip_2021.py
deleted file mode 100755
index 3fe9a189..00000000
--- a/l10n_us_hr_payroll/tests/test_us_ri_rhode_island_payslip_2021.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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):
- ###
- # 2021 Taxes and Rates
- ###
- RI_UNEMP_MAX_WAGE = 24000.0
- RI_UNEMP = 1.06
- # Calculation based on example http://www.tax.ri.gov/forms/2021/Withholding/2021%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_2021_taxes_example(self):
- self._test_er_suta('RI', self.RI_UNEMP, date(2021, 1, 1), wage_base=self.RI_UNEMP_MAX_WAGE)
- self._test_sit(2195, 1, 0, False, 'weekly', date(2021, 1, 1), 90.62)
- self._test_sit(1800, 2, 10, True, 'weekly', date(2021, 1, 1), 0.00)
- self._test_sit(10000, 1, 0, False, 'bi-weekly', date(2021, 1, 1), 501.75)
- self._test_sit(18000, 2, 0, False, 'monthly', date(2021, 1, 1), 857.48)
- self._test_sit(18000, 2, 10, False, 'monthly', date(2021, 1, 1), 867.47)
diff --git a/l10n_us_hr_payroll/tests/test_us_sc_south_carolina_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_sc_south_carolina_payslip_2020.py
deleted file mode 100644
index 170c3bf5..00000000
--- a/l10n_us_hr_payroll/tests/test_us_sc_south_carolina_payslip_2020.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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 = 0.55
- # Calculation based on https://dor.sc.gov/forms-site/Forms/WH1603F_2020.pdf
-
- def _test_sit(self, wage, 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('SC'),
- state_income_tax_additional_withholding=additional_withholding,
- 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.assertPayrollAlmostEqual(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, 0.0, False, 3.0, 'weekly', date(2020, 1, 1), 28.73)
- self._test_sit(800.0, 0.0, True, 0.0, 'weekly', date(2020, 1, 1), 0.00)
- self._test_sit(9000.0, 0.0, False, 0.0, 'monthly', date(2020, 1, 1), 594.61)
- self._test_sit(5000.0, 10.0, False, 2.0, 'semi-monthly', date(2020, 1, 1), 316.06)
diff --git a/l10n_us_hr_payroll/tests/test_us_sc_south_carolina_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_sc_south_carolina_payslip_2021.py
deleted file mode 100644
index 3fb11459..00000000
--- a/l10n_us_hr_payroll/tests/test_us_sc_south_carolina_payslip_2021.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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):
- ###
- # 2021 Taxes and Rates
- ###
- SC_UNEMP_MAX_WAGE = 14000.0
- SC_UNEMP = 0.55
- # Calculation based on https://dor.sc.gov/forms-site/Forms/WH1603F_2021.pdf
-
- def _test_sit(self, wage, 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('SC'),
- state_income_tax_additional_withholding=additional_withholding,
- 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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('SC', self.SC_UNEMP, date(2021, 1, 1), wage_base=self.SC_UNEMP_MAX_WAGE)
- self._test_sit(750.0, 0.0, False, 3.0, 'weekly', date(2021, 1, 1), 27.57)
- self._test_sit(800.0, 0.0, True, 0.0, 'weekly', date(2021, 1, 1), 0.00)
- self._test_sit(9000.0, 0.0, False, 0.0, 'monthly', date(2021, 1, 1), 591.44)
- self._test_sit(5000.0, 10.0, False, 2.0, 'semi-monthly', date(2021, 1, 1), 312.90)
diff --git a/l10n_us_hr_payroll/tests/test_us_sd_south_dakota_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_sd_south_dakota_payslip_2020.py
deleted file mode 100644
index bdbb7858..00000000
--- a/l10n_us_hr_payroll/tests/test_us_sd_south_dakota_payslip_2020.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# 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)
diff --git a/l10n_us_hr_payroll/tests/test_us_sd_south_dakota_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_sd_south_dakota_payslip_2021.py
deleted file mode 100644
index 577a82ec..00000000
--- a/l10n_us_hr_payroll/tests/test_us_sd_south_dakota_payslip_2021.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# 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_2021_taxes(self):
- self._test_er_suta('SD', self.SD_UNEMP, date(2021, 1, 1), wage_base=self.SD_UNEMP_MAX_WAGE)
diff --git a/l10n_us_hr_payroll/tests/test_us_tn_tennessee_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_tn_tennessee_payslip_2020.py
deleted file mode 100644
index 54acfa9a..00000000
--- a/l10n_us_hr_payroll/tests/test_us_tn_tennessee_payslip_2020.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# 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)
diff --git a/l10n_us_hr_payroll/tests/test_us_tn_tennessee_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_tn_tennessee_payslip_2021.py
deleted file mode 100644
index 3a3080e6..00000000
--- a/l10n_us_hr_payroll/tests/test_us_tn_tennessee_payslip_2021.py
+++ /dev/null
@@ -1,14 +0,0 @@
-# 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
- # todo: 2021 rates not published yet
- TN_UNEMP_MAX_WAGE = 7000.00
- TN_UNEMP = 2.7
-
- def test_2021_taxes(self):
- self._test_er_suta('TN', self.TN_UNEMP, date(2021, 1, 1), wage_base=self.TN_UNEMP_MAX_WAGE)
diff --git a/l10n_us_hr_payroll/tests/test_us_tx_texas_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_tx_texas_payslip_2020.py
deleted file mode 100755
index 8dba312c..00000000
--- a/l10n_us_hr_payroll/tests/test_us_tx_texas_payslip_2020.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date
-from .common import TestUsPayslip
-
-class TestUsTXPayslip(TestUsPayslip):
- ###
- # 2020 Taxes and Rates
- ###
- TX_UNEMP_MAX_WAGE = 9000.0
- TX_UNEMP = 2.7
- TX_OA = 0.0
- TX_ETIA = 0.1
-
- def test_2020_taxes(self):
- combined_rate = self.TX_UNEMP + self.TX_OA + self.TX_ETIA
- self._test_er_suta('TX', combined_rate, date(2020, 1, 1), wage_base=self.TX_UNEMP_MAX_WAGE)
diff --git a/l10n_us_hr_payroll/tests/test_us_tx_texas_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_tx_texas_payslip_2021.py
deleted file mode 100755
index 14d8066f..00000000
--- a/l10n_us_hr_payroll/tests/test_us_tx_texas_payslip_2021.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date
-from .common import TestUsPayslip
-
-class TestUsTXPayslip(TestUsPayslip):
- ###
- # 2021 Taxes and Rates
- ###
- TX_UNEMP_MAX_WAGE = 9000.0
- TX_UNEMP = 2.7
- TX_OA = 0.0
- TX_ETIA = 0.1
-
- def test_2021_taxes(self):
- combined_rate = self.TX_UNEMP + self.TX_OA + self.TX_ETIA
- self._test_er_suta('TX', combined_rate, date(2021, 1, 1), wage_base=self.TX_UNEMP_MAX_WAGE)
diff --git a/l10n_us_hr_payroll/tests/test_us_us_utah_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_us_utah_payslip_2020.py
deleted file mode 100755
index a6881acb..00000000
--- a/l10n_us_hr_payroll/tests/test_us_us_utah_payslip_2020.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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 = 0.1
- # Calculation based on example https://tax.utah.gov/forms/pubs/pub-14.pdf
-
- 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.assertPayrollAlmostEqual(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, 'head_household', 10, 'quarterly', date(2020, 1, 1), 397.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_us_utah_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_us_utah_payslip_2021.py
deleted file mode 100755
index 0b23b462..00000000
--- a/l10n_us_hr_payroll/tests/test_us_us_utah_payslip_2021.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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):
- ###
- # 2021 Taxes and Rates
- ###
- UT_UNEMP_MAX_WAGE = 38900.0
- UT_UNEMP = 0.1052
- # Calculation based on example https://tax.utah.gov/forms/pubs/pub-14.pdf
-
- 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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('UT', self.UT_UNEMP, date(2021, 1, 1), wage_base=self.UT_UNEMP_MAX_WAGE)
- self._test_sit(400, 'single', 0, 'weekly', date(2021, 1, 1), 16.00)
- self._test_sit(1000, 'single', 0, 'bi-weekly', date(2021, 1, 1), 45.00)
- self._test_sit(855, 'married', 0, 'semi-monthly', date(2021, 1, 1), 16.00)
- self._test_sit(2500, 'married', 0, 'monthly', date(2021, 1, 1), 81.00)
- self._test_sit(8000, 'head_household', 10, 'quarterly', date(2021, 1, 1), 397.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_va_virginia_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_va_virginia_payslip_2020.py
deleted file mode 100644
index 012e4845..00000000
--- a/l10n_us_hr_payroll/tests/test_us_va_virginia_payslip_2020.py
+++ /dev/null
@@ -1,116 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date
-from .common import TestUsPayslip
-
-
-class TestUsVaPayslip(TestUsPayslip):
- ###
- # Taxes and Rates
- ###
- VA_UNEMP_MAX_WAGE = 8000.0
- VA_UNEMP = 2.51
- VA_SIT_DEDUCTION = 4500.0
- VA_SIT_EXEMPTION = 930.0
- VA_SIT_OTHER_EXEMPTION = 800.0
-
- def _run_test_sit(self,
- wage=0.0,
- schedule_pay='monthly',
- filing_status='single',
- dependent_credit=0.0,
- other_income=0.0,
- deductions=0.0,
- additional_withholding=0.0,
- is_nonresident_alien=False,
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=0.0,
- va_va4_sit_exemptions=0,
- va_va4_sit_other_exemptions=0,
- expected=0.0,
- ):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- schedule_pay=schedule_pay,
- fed_941_fit_w4_is_nonresident_alien=is_nonresident_alien,
- fed_941_fit_w4_filing_status=filing_status,
- fed_941_fit_w4_multiple_jobs_higher=False,
- fed_941_fit_w4_dependent_credit=dependent_credit,
- fed_941_fit_w4_other_income=other_income,
- fed_941_fit_w4_deductions=deductions,
- fed_941_fit_w4_additional_withholding=additional_withholding,
- state_income_tax_exempt=state_income_tax_exempt,
- state_income_tax_additional_withholding=state_income_tax_additional_withholding,
- va_va4_sit_exemptions=va_va4_sit_exemptions,
- va_va4_sit_other_exemptions=va_va4_sit_other_exemptions,
- state_id=self.get_us_state('VA'),
- )
- payslip = self._createPayslip(employee, '2020-01-01', '2020-01-31')
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- # Instead of PayrollEqual after initial first round of testing.
- self.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected)
- return payslip
-
- def test_2020_taxes(self):
- self._test_er_suta('VA', self.VA_UNEMP, date(2020, 1, 1), wage_base=self.VA_UNEMP_MAX_WAGE)
-
- salary = 5000.0
-
- # For formula from https://www.tax.virginia.gov/withholding-calculator
- e1 = 2
- e2 = 0
- t = salary * 12 - (self.VA_SIT_DEDUCTION + (e1 * self.VA_SIT_EXEMPTION) + (e2 * self.VA_SIT_OTHER_EXEMPTION))
-
- if t <= 3000:
- w = 0.02 * t
- elif t <= 5000:
- w = 60 + (0.03 * (t - 3000))
- elif t <= 17000:
- w = 120 + (0.05 * (t - 5000))
- else:
- w = 720 + (0.0575 * (t - 17000))
-
- wh = w / 12
-
- self._run_test_sit(wage=salary,
- schedule_pay='monthly',
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=0.0,
- va_va4_sit_exemptions=e1,
- va_va4_sit_other_exemptions=e2,
- expected=wh,)
- self.assertPayrollEqual(wh, 235.57) # To test against calculator
-
- # Below expected comes from the calculator linked above
- self._run_test_sit(wage=450.0,
- schedule_pay='weekly',
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=0.0,
- va_va4_sit_exemptions=3,
- va_va4_sit_other_exemptions=1,
- expected=12.22,)
- self._run_test_sit(wage=2500.0,
- schedule_pay='bi-weekly',
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=0.0,
- va_va4_sit_exemptions=1,
- va_va4_sit_other_exemptions=0,
- expected=121.84,)
- self._run_test_sit(wage=10000.0,
- schedule_pay='semi-monthly',
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=100.0,
- va_va4_sit_exemptions=0,
- va_va4_sit_other_exemptions=1,
- expected=651.57,)
-
- # Test exempt
- self._run_test_sit(wage=2400.0,
- schedule_pay='monthly',
- state_income_tax_exempt=True,
- state_income_tax_additional_withholding=0.0,
- va_va4_sit_exemptions=1,
- va_va4_sit_other_exemptions=1,
- expected=0.0,)
diff --git a/l10n_us_hr_payroll/tests/test_us_va_virginia_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_va_virginia_payslip_2021.py
deleted file mode 100644
index 6a789c06..00000000
--- a/l10n_us_hr_payroll/tests/test_us_va_virginia_payslip_2021.py
+++ /dev/null
@@ -1,116 +0,0 @@
-# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
-
-from datetime import date
-from .common import TestUsPayslip
-
-
-class TestUsVaPayslip(TestUsPayslip):
- ###
- # Taxes and Rates
- ###
- VA_UNEMP_MAX_WAGE = 8000.0
- VA_UNEMP = 2.5
- VA_SIT_DEDUCTION = 4500.0
- VA_SIT_EXEMPTION = 930.0
- VA_SIT_OTHER_EXEMPTION = 800.0
-
- def _run_test_sit(self,
- wage=0.0,
- schedule_pay='monthly',
- filing_status='single',
- dependent_credit=0.0,
- other_income=0.0,
- deductions=0.0,
- additional_withholding=0.0,
- is_nonresident_alien=False,
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=0.0,
- va_va4_sit_exemptions=0,
- va_va4_sit_other_exemptions=0,
- expected=0.0,
- ):
- employee = self._createEmployee()
- contract = self._createContract(employee,
- wage=wage,
- schedule_pay=schedule_pay,
- fed_941_fit_w4_is_nonresident_alien=is_nonresident_alien,
- fed_941_fit_w4_filing_status=filing_status,
- fed_941_fit_w4_multiple_jobs_higher=False,
- fed_941_fit_w4_dependent_credit=dependent_credit,
- fed_941_fit_w4_other_income=other_income,
- fed_941_fit_w4_deductions=deductions,
- fed_941_fit_w4_additional_withholding=additional_withholding,
- state_income_tax_exempt=state_income_tax_exempt,
- state_income_tax_additional_withholding=state_income_tax_additional_withholding,
- va_va4_sit_exemptions=va_va4_sit_exemptions,
- va_va4_sit_other_exemptions=va_va4_sit_other_exemptions,
- state_id=self.get_us_state('VA'),
- )
- payslip = self._createPayslip(employee, '2021-01-01', '2021-01-31')
- payslip.compute_sheet()
- cats = self._getCategories(payslip)
- # Instead of PayrollEqual after initial first round of testing.
- self.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected)
- return payslip
-
- def test_2021_taxes(self):
- self._test_er_suta('VA', self.VA_UNEMP, date(2021, 1, 1), wage_base=self.VA_UNEMP_MAX_WAGE)
-
- salary = 5000.0
-
- # For formula from https://www.tax.virginia.gov/withholding-calculator
- e1 = 2
- e2 = 0
- t = salary * 12 - (self.VA_SIT_DEDUCTION + (e1 * self.VA_SIT_EXEMPTION) + (e2 * self.VA_SIT_OTHER_EXEMPTION))
-
- if t <= 3000:
- w = 0.02 * t
- elif t <= 5000:
- w = 60 + (0.03 * (t - 3000))
- elif t <= 17000:
- w = 120 + (0.05 * (t - 5000))
- else:
- w = 720 + (0.0575 * (t - 17000))
-
- wh = w / 12
-
- self._run_test_sit(wage=salary,
- schedule_pay='monthly',
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=0.0,
- va_va4_sit_exemptions=e1,
- va_va4_sit_other_exemptions=e2,
- expected=wh,)
- self.assertPayrollEqual(wh, 235.57) # To test against calculator
-
- # Below expected comes from the calculator linked above
- self._run_test_sit(wage=450.0,
- schedule_pay='weekly',
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=0.0,
- va_va4_sit_exemptions=3,
- va_va4_sit_other_exemptions=1,
- expected=12.22,)
- self._run_test_sit(wage=2500.0,
- schedule_pay='bi-weekly',
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=0.0,
- va_va4_sit_exemptions=1,
- va_va4_sit_other_exemptions=0,
- expected=121.84,)
- self._run_test_sit(wage=10000.0,
- schedule_pay='semi-monthly',
- state_income_tax_exempt=False,
- state_income_tax_additional_withholding=100.0,
- va_va4_sit_exemptions=0,
- va_va4_sit_other_exemptions=1,
- expected=651.57,)
-
- # Test exempt
- self._run_test_sit(wage=2400.0,
- schedule_pay='monthly',
- state_income_tax_exempt=True,
- state_income_tax_additional_withholding=0.0,
- va_va4_sit_exemptions=1,
- va_va4_sit_other_exemptions=1,
- expected=0.0,)
diff --git a/l10n_us_hr_payroll/tests/test_us_vt_vermont_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_vt_vermont_payslip_2020.py
deleted file mode 100755
index 7807bed7..00000000
--- a/l10n_us_hr_payroll/tests/test_us_vt_vermont_payslip_2020.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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 = 16100.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)
diff --git a/l10n_us_hr_payroll/tests/test_us_vt_vermont_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_vt_vermont_payslip_2021.py
deleted file mode 100755
index 67fb7a99..00000000
--- a/l10n_us_hr_payroll/tests/test_us_vt_vermont_payslip_2021.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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):
- ###
- # 2021 Taxes and Rates
- ###
- VT_UNEMP_MAX_WAGE = 14100.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_2021_taxes_example(self):
- self._test_er_suta('VT', self.VT_UNEMP, date(2021, 1, 1), wage_base=self.VT_UNEMP_MAX_WAGE)
- self._test_sit(1800, 'married', 2, 0, False, 'weekly', date(2021, 1, 1), 52.79)
- self._test_sit(1800, 'married', 2, 10, False, 'weekly', date(2021, 1, 1), 62.79)
- self._test_sit(1000, 'single', 1, 0, True, 'weekly', date(2021, 1, 1), 0.00)
- self._test_sit(8000, 'single', 1, 10, False, 'bi-weekly', date(2021, 1, 1), 506.52)
diff --git a/l10n_us_hr_payroll/tests/test_us_wa_washington_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_wa_washington_payslip_2020.py
deleted file mode 100755
index 261512c3..00000000
--- a/l10n_us_hr_payroll/tests/test_us_wa_washington_payslip_2020.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# 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 TestUsWAPayslip(TestUsPayslip):
- ###
- # Taxes and Rates
- ###
- WA_UNEMP_MAX_WAGE = 52700.00
- WA_UNEMP_RATE = 1.0
- WA_FML_MAX_WAGE = 137700.00
- WA_FML_RATE = 0.4
- WA_FML_RATE_EE = 66.33
- WA_FML_RATE_ER = 33.67
-
- def setUp(self):
- super(TestUsWAPayslip, self).setUp()
- # self.lni = self.env['hr.contract.lni.wa'].create({
- # 'name': '5302 Computer Consulting',
- # 'rate': 0.1261,
- # 'rate_emp_withhold': 0.05575,
- # })
- # todo: figure out how the two rates below corralate with ee and er rates above
- self.test_ee_lni = 0.05575 # per 100 hours
- self.test_er_lni = 0.1261 # per 100 hours
- self.parameter_lni_ee = self.env['hr.rule.parameter'].create({
- 'name': 'Test LNI EE',
- 'code': 'test_lni_ee',
- 'parameter_version_ids': [(0, 0, {
- 'date_from': date(2020, 1, 1),
- 'parameter_value': str(self.test_ee_lni * 100),
- })],
- })
- self.parameter_lni_er = self.env['hr.rule.parameter'].create({
- 'name': 'Test LNI ER',
- 'code': 'test_lni_er',
- 'parameter_version_ids': [(0, 0, {
- 'date_from': date(2020, 1, 1),
- 'parameter_value': str(self.test_er_lni * 100),
- })],
- })
-
- def test_2020_taxes(self):
- self._test_er_suta('WA', self.WA_UNEMP_RATE, date(2020, 1, 1), wage_base=self.WA_UNEMP_MAX_WAGE)
-
- salary = (self.WA_FML_MAX_WAGE / 2.0) + 1000.0
-
- employee = self._createEmployee()
-
- contract = self._createContract(employee,
- wage=salary,
- state_id=self.get_us_state('WA'),
- workers_comp_ee_code=self.parameter_lni_ee.code,
- workers_comp_er_code=self.parameter_lni_er.code,
- )
- self._log(str(contract.resource_calendar_id) + ' ' + contract.resource_calendar_id.name)
-
-
- # Non SUTA
- self._log('2020 Washington tax first payslip:')
- payslip = self._createPayslip(employee, '2020-01-01', '2020-01-31')
- hours_in_period = payslip.worked_days_line_ids.filtered(lambda l: l.code == 'WORK100').number_of_hours
- self.assertPayrollAlmostEqual(hours_in_period, 184) # only asserted to test algorithm
- payslip.compute_sheet()
-
- rules = self._getRules(payslip)
-
- self.assertPayrollEqual(rules['EE_US_WA_LNI'], -(self.test_ee_lni * hours_in_period))
- self.assertPayrollEqual(rules['ER_US_WA_LNI'], -(self.test_er_lni * hours_in_period))
- # Both of these are known to be within 1 penny
- self.assertPayrollAlmostEqual(rules['EE_US_WA_FML'], -(salary * (self.WA_FML_RATE / 100.0) * (self.WA_FML_RATE_EE / 100.0)))
- self.assertPayrollAlmostEqual(rules['ER_US_WA_FML'], -(salary * (self.WA_FML_RATE / 100.0) * (self.WA_FML_RATE_ER / 100.0)))
- process_payslip(payslip)
-
- # Second payslip
- remaining_wage = self.WA_FML_MAX_WAGE - salary
- payslip = self._createPayslip(employee, '2020-03-01', '2020-03-31')
- payslip.compute_sheet()
- rules = self._getRules(payslip)
- self.assertPayrollAlmostEqual(rules['EE_US_WA_FML'], -(remaining_wage * (self.WA_FML_RATE / 100.0) * (self.WA_FML_RATE_EE / 100.0)))
- self.assertPayrollAlmostEqual(rules['ER_US_WA_FML'], -(remaining_wage * (self.WA_FML_RATE / 100.0) * (self.WA_FML_RATE_ER / 100.0)))
- process_payslip(payslip)
-
- # Third payslip
- payslip = self._createPayslip(employee, '2020-04-01', '2020-04-30')
- payslip.compute_sheet()
- rules = self._getRules(payslip)
- self.assertPayrollAlmostEqual(rules['EE_US_WA_FML'], 0.0)
- self.assertPayrollAlmostEqual(rules['ER_US_WA_FML'], 0.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_wa_washington_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_wa_washington_payslip_2021.py
deleted file mode 100755
index 6102e3dc..00000000
--- a/l10n_us_hr_payroll/tests/test_us_wa_washington_payslip_2021.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# 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 TestUsWAPayslip(TestUsPayslip):
- ###
- # Taxes and Rates
- ###
- WA_UNEMP_MAX_WAGE = 56500.00
- WA_UNEMP_RATE = 2.16
- WA_FML_MAX_WAGE = 142800.00
- WA_FML_RATE = 0.4
- WA_FML_RATE_EE = 63.33
- WA_FML_RATE_ER = 36.67
-
- def setUp(self):
- super(TestUsWAPayslip, self).setUp()
- # self.lni = self.env['hr.contract.lni.wa'].create({
- # 'name': '5302 Computer Consulting',
- # 'rate': 0.1261,
- # 'rate_emp_withhold': 0.05575,
- # })
- self.test_ee_lni = 0.05575 # per 100 hours
- self.test_er_lni = 0.1261 # per 100 hours
- self.parameter_lni_ee = self.env['hr.rule.parameter'].create({
- 'name': 'Test LNI EE',
- 'code': 'test_lni_ee',
- 'parameter_version_ids': [(0, 0, {
- 'date_from': date(2021, 1, 1),
- 'parameter_value': str(self.test_ee_lni * 100),
- })],
- })
- self.parameter_lni_er = self.env['hr.rule.parameter'].create({
- 'name': 'Test LNI ER',
- 'code': 'test_lni_er',
- 'parameter_version_ids': [(0, 0, {
- 'date_from': date(2021, 1, 1),
- 'parameter_value': str(self.test_er_lni * 100),
- })],
- })
-
- def test_2021_taxes(self):
- self._test_er_suta('WA', self.WA_UNEMP_RATE, date(2021, 1, 1), wage_base=self.WA_UNEMP_MAX_WAGE)
-
- salary = (self.WA_FML_MAX_WAGE / 2.0) + 1000.0
-
- employee = self._createEmployee()
-
- contract = self._createContract(employee,
- wage=salary,
- state_id=self.get_us_state('WA'),
- workers_comp_ee_code=self.parameter_lni_ee.code,
- workers_comp_er_code=self.parameter_lni_er.code,
- )
- self._log(str(contract.resource_calendar_id) + ' ' + contract.resource_calendar_id.name)
-
-
- # Non SUTA
- self._log('2021 Washington tax first payslip:')
- payslip = self._createPayslip(employee, '2021-01-01', '2021-01-31')
- hours_in_period = payslip.worked_days_line_ids.filtered(lambda l: l.code == 'WORK100').number_of_hours
- self.assertPayrollAlmostEqual(hours_in_period, 169) # only asserted to test algorithm
- payslip.compute_sheet()
-
- rules = self._getRules(payslip)
-
- self.assertPayrollAlmostEqual(rules['EE_US_WA_LNI'], -(self.test_ee_lni * hours_in_period))
- self.assertPayrollEqual(rules['ER_US_WA_LNI'], -(self.test_er_lni * hours_in_period))
- # Both of these are known to be within 1 penny
- self.assertPayrollAlmostEqual(rules['EE_US_WA_FML'], -(salary * (self.WA_FML_RATE / 100.0) * (self.WA_FML_RATE_EE / 100.0)))
- self.assertPayrollAlmostEqual(rules['ER_US_WA_FML'], -(salary * (self.WA_FML_RATE / 100.0) * (self.WA_FML_RATE_ER / 100.0)))
- process_payslip(payslip)
-
- # Second payslip
- remaining_wage = self.WA_FML_MAX_WAGE - salary
- payslip = self._createPayslip(employee, '2021-03-01', '2021-03-31')
- payslip.compute_sheet()
- rules = self._getRules(payslip)
- self.assertPayrollAlmostEqual(rules['EE_US_WA_FML'], -(remaining_wage * (self.WA_FML_RATE / 100.0) * (self.WA_FML_RATE_EE / 100.0)))
- self.assertPayrollAlmostEqual(rules['ER_US_WA_FML'], -(remaining_wage * (self.WA_FML_RATE / 100.0) * (self.WA_FML_RATE_ER / 100.0)))
- process_payslip(payslip)
-
- # Third payslip
- payslip = self._createPayslip(employee, '2021-04-01', '2021-04-30')
- payslip.compute_sheet()
- rules = self._getRules(payslip)
- self.assertPayrollAlmostEqual(rules['EE_US_WA_FML'], 0.0)
- self.assertPayrollAlmostEqual(rules['ER_US_WA_FML'], 0.0)
diff --git a/l10n_us_hr_payroll/tests/test_us_wi_wisconsin_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_wi_wisconsin_payslip_2020.py
deleted file mode 100755
index 32bdfa30..00000000
--- a/l10n_us_hr_payroll/tests/test_us_wi_wisconsin_payslip_2020.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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.assertPayrollAlmostEqual(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(7000, 'single', 1, 10, True, 'bi-weekly', date(2020, 1, 1), 0.00)
- self._test_sit(10000, 'married', 3, 10, False, 'bi-weekly', date(2020, 1, 1), 633.65)
- # ((48000 - 26227) * (7.0224 /100) + 1073.55 - 44) / 12
- self._test_sit(4000, 'single', 2, 0, False, 'monthly', date(2020, 1, 1), 213.21)
diff --git a/l10n_us_hr_payroll/tests/test_us_wi_wisconsin_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_wi_wisconsin_payslip_2021.py
deleted file mode 100755
index 59a9e814..00000000
--- a/l10n_us_hr_payroll/tests/test_us_wi_wisconsin_payslip_2021.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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):
- ###
- # 2021 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.assertPayrollAlmostEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
-
- def test_2021_taxes_example(self):
- self._test_er_suta('WI', self.WI_UNEMP, date(2021, 1, 1), wage_base=self.WI_UNEMP_MAX_WAGE)
- self._test_sit(300, 'single', 1, 0, False, 'weekly', date(2021, 1, 1), 7.21)
- self._test_sit(700, 'married', 3, 0, False, 'bi-weekly', date(2021, 1, 1), 13.35)
- self._test_sit(7000, 'single', 1, 10, True, 'bi-weekly', date(2021, 1, 1), 0.00)
- self._test_sit(10000, 'married', 3, 10, False, 'bi-weekly', date(2021, 1, 1), 633.65)
- # ((48000 - 26227) * (7.0224 /100) + 1073.55 - 44) / 12
- self._test_sit(4000, 'single', 2, 0, False, 'monthly', date(2021, 1, 1), 213.21)
diff --git a/l10n_us_hr_payroll/tests/test_us_wv_west_virginia_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_wv_west_virginia_payslip_2020.py
deleted file mode 100755
index acef111e..00000000
--- a/l10n_us_hr_payroll/tests/test_us_wv_west_virginia_payslip_2020.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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)
diff --git a/l10n_us_hr_payroll/tests/test_us_wv_west_virginia_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_wv_west_virginia_payslip_2021.py
deleted file mode 100755
index ec16d379..00000000
--- a/l10n_us_hr_payroll/tests/test_us_wv_west_virginia_payslip_2021.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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):
- ###
- # 2021 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_2021_taxes_example(self):
- self._test_er_suta('WV', self.WV_UNEMP, date(2021, 1, 1), wage_base=self.WV_UNEMP_MAX_WAGE)
- self._test_sit(1250, 'married', 2, 0, 'semi-monthly', date(2021, 1, 1), 44.00)
- self._test_sit(1300, 'single', 1, 0, 'bi-weekly', date(2021, 1, 1), 46.00)
- self._test_sit(1300, 'single', 1, 10, 'bi-weekly', date(2021, 1, 1), 56.00)
- self._test_sit(15000, 'single', 2, 0, 'monthly', date(2021, 1, 1), 860.00)
diff --git a/l10n_us_hr_payroll/tests/test_us_wy_wyoming_payslip_2020.py b/l10n_us_hr_payroll/tests/test_us_wy_wyoming_payslip_2020.py
deleted file mode 100644
index b6ca4482..00000000
--- a/l10n_us_hr_payroll/tests/test_us_wy_wyoming_payslip_2020.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# 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 = 8.5
-
- def test_2020_taxes(self):
- self._test_er_suta('WY', self.WY_UNEMP, date(2020, 1, 1), wage_base=self.WY_UNEMP_MAX_WAGE)
diff --git a/l10n_us_hr_payroll/tests/test_us_wy_wyoming_payslip_2021.py b/l10n_us_hr_payroll/tests/test_us_wy_wyoming_payslip_2021.py
deleted file mode 100644
index 8d651a9a..00000000
--- a/l10n_us_hr_payroll/tests/test_us_wy_wyoming_payslip_2021.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# 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 = 27300.00
- WY_UNEMP = 8.5
-
- def test_2021_taxes(self):
- self._test_er_suta('WY', self.WY_UNEMP, date(2021, 1, 1), wage_base=self.WY_UNEMP_MAX_WAGE)