WI Wisconsin

This commit is contained in:
Jared Self
2021-01-13 21:17:02 -07:00
parent 88073c7e83
commit 8f72bfdd1e
2 changed files with 44 additions and 2 deletions

View File

@@ -7,6 +7,7 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<!-- Unchanged in 2021 https://dwd.wisconsin.gov/ui/employers/taxrates.htm -->
<record id="rule_parameter_us_wi_suta_wage_base_2020" model="hr.rule.parameter.value">
<field name="parameter_value">14000.00</field>
<field name="rule_parameter_id" ref="rule_parameter_us_wi_suta_wage_base"/>
@@ -15,13 +16,14 @@
</data>
<!-- Rate -->
<!-- Rate based on this file https://dwd.wisconsin.gov/ui/employers/taxrates.htm -->
<record id="rule_parameter_us_wi_suta_rate" model="hr.rule.parameter">
<field name="name">US WI Wisconsin SUTA Rate</field>
<field name="code">us_wi_suta_rate</field>
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<!-- Rate based on this file https://dwd.wisconsin.gov/ui/employers/taxrates.htm -->
<!-- Unchanged in 2021 -->
<record id="rule_parameter_us_wi_suta_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">3.05</field>
<field name="rule_parameter_id" ref="rule_parameter_us_wi_suta_rate"/>
@@ -42,13 +44,14 @@
</record>
</data>
<!-- Table based on https://www.revenue.wi.gov/DOR%20Publications/pb166.pdf page 25. -->
<record id="rule_parameter_us_wi_sit_tax_rate" model="hr.rule.parameter">
<field name="name">US WI Wisconsin SIT Tax Rate</field>
<field name="code">us_wi_sit_tax_rate</field>
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<!-- Table based on https://www.revenue.wi.gov/DOR%20Publications/pb166.pdf page 25. -->
<!-- Unchanged in 2021 -->
<record id="rule_parameter_us_wi_sit_tax_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">{
'single': (

View File

@@ -0,0 +1,39 @@
# 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)