From 88073c7e83dc26dba161b7cbf2e9c61b04b1adeb Mon Sep 17 00:00:00 2001 From: Jared Self Date: Wed, 13 Jan 2021 21:06:16 -0700 Subject: [PATCH] WV West Virginia --- .../data/state/wv_west_virginia.xml | 5 +++ .../test_us_wv_west_virginia_payslip_2021.py | 36 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100755 l10n_us_hr_payroll/tests/test_us_wv_west_virginia_payslip_2021.py diff --git a/l10n_us_hr_payroll/data/state/wv_west_virginia.xml b/l10n_us_hr_payroll/data/state/wv_west_virginia.xml index ee542c4a..8ded67b7 100644 --- a/l10n_us_hr_payroll/data/state/wv_west_virginia.xml +++ b/l10n_us_hr_payroll/data/state/wv_west_virginia.xml @@ -7,6 +7,7 @@ + 12000.0 @@ -21,12 +22,14 @@ + 2.7 + US WV West Virginia Exemption Rate @@ -34,6 +37,7 @@ + { 'weekly' : 38.46, @@ -53,6 +57,7 @@ + { 'single': { 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 new file mode 100755 index 00000000..ec16d379 --- /dev/null +++ b/l10n_us_hr_payroll/tests/test_us_wv_west_virginia_payslip_2021.py @@ -0,0 +1,36 @@ +# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details. + +from datetime import date, timedelta +from .common import TestUsPayslip + + +class TestUsWVPayslip(TestUsPayslip): + ### + # 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)