This commit is contained in:
Jared Self
2021-01-07 10:42:06 -07:00
parent 25595393a7
commit 33482ad3bd
2 changed files with 55 additions and 0 deletions

View File

@@ -12,6 +12,12 @@
<field name="rule_parameter_id" ref="rule_parameter_us_ut_suta_wage_base"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<!-- https://jobs.utah.gov/UI/Employer/Public/Questions/TaxRates.aspx#:~:text=For%202021%2C%20the%20minimum%20overall,to%20the%20overall%20tax%20rate.-->
<record id="rule_parameter_us_ut_suta_wage_base_2021" model="hr.rule.parameter.value">
<field name="parameter_value">38900.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ut_suta_wage_base"/>
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
</record>
</data>
<!-- Rate -->
@@ -26,6 +32,13 @@
<field name="rule_parameter_id" ref="rule_parameter_us_ut_suta_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<!-- https://jobs.utah.gov/UI/Employer/Public/Questions/TaxRates.aspx#:~:text=For%202021%2C%20the%20minimum%20overall,to%20the%20overall%20tax%20rate.-->
<!-- Benefit Ratio(unique to client) X Reserve Factor(1.05% for 2021) + Social Cost(.002)-->
<record id="rule_parameter_us_ut_suta_rate_2021" model="hr.rule.parameter.value">
<field name="parameter_value">0.1052</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ut_suta_rate"/>
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
</record>
</data>
<record id="rule_parameter_us_ut_tax_rate" model="hr.rule.parameter">
@@ -34,6 +47,7 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<!-- rates unchanged in 2021-->
<record id="rule_parameter_us_ut_tax_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">0.0495</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ut_tax_rate"/>
@@ -47,6 +61,9 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<!-- Table based on https://tax.utah.gov/forms/pubs/pub-14.pdf -->
<!-- Note at top of page 12:-->
<!-- "Note: Use the Single column for taxpayers who file as head-of-household on their federal return." -->
<record id="rule_parameter_us_ut_sit_allowances_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">{
'single': {
@@ -88,6 +105,8 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<!-- unchanged in 2021-->
<!-- see page 9 line 4 and line 5 in schedules https://tax.utah.gov/forms/pubs/pub-14.pdf-->
<record id="rule_parameter_us_ut_sit_tax_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">{
'single': {

View File

@@ -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 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)