HI Hawaii

This commit is contained in:
Jared Self
2021-01-08 14:34:07 -07:00
parent 982bf2740c
commit d4c331333d
3 changed files with 52 additions and 145 deletions

View File

@@ -7,16 +7,17 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_hi_suta_wage_base_2019" model="hr.rule.parameter.value">
<field name="parameter_value">46800.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_hi_suta_wage_base"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_hi_suta_wage_base_2020" model="hr.rule.parameter.value">
<field name="parameter_value">48100.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_hi_suta_wage_base"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<!-- https://labor.hawaii.gov/ui/tax-rate-schedule-and-weekly-benefit-amount/ -->
<record id="rule_parameter_us_hi_suta_wage_base_2021" model="hr.rule.parameter.value">
<field name="parameter_value">47400.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_hi_suta_wage_base"/>
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
</record>
</data>
<!-- Rate -->
@@ -26,16 +27,17 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_hi_suta_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">2.40</field>
<field name="rule_parameter_id" ref="rule_parameter_us_hi_suta_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_hi_suta_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">2.40</field>
<field name="rule_parameter_id" ref="rule_parameter_us_hi_suta_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<!-- https://labor.hawaii.gov/ui/tax-rate-schedule-and-weekly-benefit-amount/ -->
<record id="rule_parameter_us_hi_suta_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">5.2</field>
<field name="rule_parameter_id" ref="rule_parameter_us_hi_suta_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<record id="rule_parameter_us_hi_sit_tax_rate" model="hr.rule.parameter">
@@ -44,44 +46,9 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_hi_sit_tax_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">{
'single': (
( 2400, 0.00, 1.40),
( 4800, 34.00, 3.20),
( 9600, 110.00, 5.50),
(14400, 374.00, 6.40),
(19200, 682.00, 6.80),
(24000, 1008.00, 7.20),
(36000, 1354.00, 7.60),
('inf', 2266.00, 7.90),
),
'married': (
( 4800, 0.00, 1.40),
( 9600, 67.00, 3.20),
(19200, 221.00, 5.50),
(28800, 749.00, 6.40),
(38400, 1363.00, 6.80),
(48000, 2016.00, 7.20),
(72000, 2707.00, 7.60),
('inf', 4531.00, 7.90),
),
'head_of_household': (
( 2400, 0.00, 1.40),
( 4800, 34.00, 3.20),
( 9600, 110.00, 5.50),
(14400, 374.00, 6.40),
(19200, 682.00, 6.80),
(24000, 1008.00, 7.20),
(36000, 1354.00, 7.60),
('inf', 2266.00, 7.90),
),
}</field>
<field name="rule_parameter_id" ref="rule_parameter_us_hi_sit_tax_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- https://files.hawaii.gov/tax/forms/2019/19table.pdf -->
<!-- https://files.hawaii.gov/tax/forms/2018/18table-on.pdf -->
<!-- Table from Schedule I, II and III -->
<!-- unchanged in 2021 -->
<record id="rule_parameter_us_hi_sit_tax_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">{
'single': (
@@ -126,11 +93,7 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_hi_sit_personal_exemption_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">1144</field>
<field name="rule_parameter_id" ref="rule_parameter_us_hi_sit_personal_exemption_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- unchanged in 2021 -->
<record id="rule_parameter_us_hi_sit_personal_exemption_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">1144</field>
<field name="rule_parameter_id" ref="rule_parameter_us_hi_sit_personal_exemption_rate"/>

View File

@@ -1,93 +0,0 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .common import TestUsPayslip, process_payslip
class TestUsHIPayslip(TestUsPayslip):
# TAXES AND RATES
HI_UNEMP_MAX_WAGE = 46800.00
HI_UNEMP = -(2.40 / 100.0)
def test_taxes_single_weekly(self):
salary = 375.00
schedule_pay = 'weekly'
filing_status = 'single'
allowances = 3
wh_to_check = -15.3
# Taxable income = (wage * payperiod ) - (allownaces * personal_exemption)
# taxable_income = (375 * 52) - (3 * 1144) = 16068
# Last = row[0] = 692
# withholding = row[1] + ((row[2] / 100.0) * (taxable_income - last))
# withholding = 682 + ((6.80 / 100.0 ) * (16068 - 14400)) = 795.42
# wh_to_check = 795.42/52 = 15.3
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('HI'),
hi_hw4_sit_filing_status=filing_status,
state_income_tax_additional_withholding=0.0,
hi_hw4_sit_allowances=allowances,
schedule_pay=schedule_pay)
self._log('2019 Hawaii tax first payslip single:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.HI_UNEMP)
self.assertPayrollEqual(cats['EE_US_SIT'], wh_to_check)
process_payslip(payslip)
remaining_id_unemp_wages = self.HI_UNEMP_MAX_WAGE - salary if (self.HI_UNEMP_MAX_WAGE - 2*salary < salary) \
else salary
self._log('2019 Hawaii tax second payslip single:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_id_unemp_wages * self.HI_UNEMP)
def test_taxes_married_monthly(self):
salary = 5000.00
schedule_pay = 'monthly'
filing_status = 'married'
allowances = 2
wh_to_check = -287.1
# Taxable income = (wage * payperiod ) - (allownaces * personal_exemption)
# taxable_income = (5000 * 12) - (2 * 1144) = 57712
# Last = row[0] = 48000
# withholding = row[1] + ((row[2] / 100.0) * (taxable_income - last))
# withholding = 2707 + ((7.70 / 100.0 ) * (57712 - 48000)) = 3445.112
# wh_to_check = 3445.112/52 = 287.092
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('HI'),
hi_hw4_sit_filing_status=filing_status,
state_income_tax_additional_withholding=0.0,
hi_hw4_sit_allowances=allowances,
schedule_pay=schedule_pay)
self._log('2019 Hawaii tax first payslip monthly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.HI_UNEMP)
self.assertPayrollEqual(cats['EE_US_SIT'], wh_to_check)
process_payslip(payslip)
remaining_id_unemp_wages = self.HI_UNEMP_MAX_WAGE - salary if (self.HI_UNEMP_MAX_WAGE - 2*salary < salary) \
else salary
self._log('2019 Hawaii tax second payslip monthly:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_id_unemp_wages * self.HI_UNEMP)

View File

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