From a94479fcdbfd67716be550e518658e7405bd1950 Mon Sep 17 00:00:00 2001 From: Bhoomi Vaishnani Date: Wed, 19 Aug 2020 15:35:23 -0400 Subject: [PATCH] [IMP] l10n_us_hr_payroll: Reformat Tax table, changed SUTA rate and improved test case for UT Utah 2020. --- l10n_us_hr_payroll/data/state/ut_utah.xml | 15 ++++++++++++--- .../tests/test_us_us_utah_payslip_2020.py | 9 ++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/l10n_us_hr_payroll/data/state/ut_utah.xml b/l10n_us_hr_payroll/data/state/ut_utah.xml index f3622248..cb57813c 100644 --- a/l10n_us_hr_payroll/data/state/ut_utah.xml +++ b/l10n_us_hr_payroll/data/state/ut_utah.xml @@ -22,7 +22,7 @@ - 1.5 + 0.1 @@ -40,7 +40,7 @@ - + US UT Utah Allowances Rate us_ut_sit_allowances_rate @@ -67,12 +67,21 @@ 'semi-annual': 360, 'annually': 720, }, + 'head_household': { + 'weekly' : 7, + 'bi-weekly' : 14, + 'semi-monthly': 15, + 'monthly' : 30, + 'quarterly' : 90, + 'semi-annual': 180, + 'annually': 360, + }, } - + US UT Utah SIT Tax Rate us_ut_sit_tax_rate 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 index 0518fb79..a6881acb 100755 --- 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 @@ -9,8 +9,8 @@ class TestUsUTPayslip(TestUsPayslip): # 2020 Taxes and Rates ### UT_UNEMP_MAX_WAGE = 36600.0 - UT_UNEMP = 1.5 - # Calculation based on example https://src.bna.com/MSO + 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() @@ -25,7 +25,7 @@ class TestUsUTPayslip(TestUsPayslip): cats = self._getCategories(payslip) self._log('Computed period tax: ' + str(expected_withholding)) - self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -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) @@ -33,5 +33,4 @@ class TestUsUTPayslip(TestUsPayslip): self._test_sit(1000, 'single', 0, 'bi-weekly', date(2020, 1, 1), 45.00) self._test_sit(855, 'married', 0, 'semi-monthly', date(2020, 1, 1), 16.00) self._test_sit(2500, 'married', 0, 'monthly', date(2020, 1, 1), 81.00) - self._test_sit(8000, 'single', 0, 'quarterly', date(2020, 1, 1), 387.00) - self._test_sit(8000, 'single', 10, 'quarterly', date(2020, 1, 1), 397.00) + self._test_sit(8000, 'head_household', 10, 'quarterly', date(2020, 1, 1), 397.00)