RI Rhode Island

This commit is contained in:
Jared Self
2021-01-13 15:02:07 -07:00
parent 677e6f784d
commit 21ebee5089
2 changed files with 96 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<!-- Unchanged in 2021 http://www.uitax.ri.gov/ -->
<record id="rule_parameter_us_ri_suta_wage_base_2020" model="hr.rule.parameter.value">
<field name="parameter_value">24000.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ri_suta_wage_base"/>
@@ -21,12 +22,14 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<!-- Unchanged in 2021 http://www.uitax.ri.gov/ -->
<record id="rule_parameter_us_ri_suta_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">1.06</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ri_suta_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
</data>
<!-- Withhooding tax exemption based on two table on page 7. from http://www.tax.ri.gov/forms/2020/Withholding/2020%20Withhholding%20Tax%20Booklet.pdf -->
<record id="rule_parameter_us_ri_sit_exemption_rate" model="hr.rule.parameter">
<field name="name">US RI Rhode Island Exemption Rate</field>
@@ -47,6 +50,20 @@
<field name="rule_parameter_id" ref="rule_parameter_us_ri_sit_exemption_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<!-- Page 7 http://www.tax.ri.gov/forms/2021/Withholding/2021%20Withholding%20Tax%20Booklet.pdf -->
<record id="rule_parameter_us_ri_sit_exemption_rate_2021" model="hr.rule.parameter.value">
<field name="parameter_value">{
'weekly' : (( 0.00, 19.23), ( 4514.42, 0.00)),
'bi-weekly' : (( 0.00, 38.46), ( 9028.85, 0.00)),
'semi-monthly': (( 0.00, 41.67), ( 9781.25, 0.00)),
'monthly' : (( 0.00, 83.33), ( 19562.50, 0.00)),
'quarterly' : (( 0.00, 250.00), ( 58687.50, 0.00)),
'semi-annually': (( 0.00, 500.00), ( 117375.00, 0.00)),
'annually': (( 0.00, 1000.0), ( 234750.00, 0.00)),
}</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ri_sit_exemption_rate"/>
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
</record>
</data>
<record id="rule_parameter_us_ri_sit_tax_rate" model="hr.rule.parameter">
@@ -96,6 +113,48 @@
<field name="rule_parameter_id" ref="rule_parameter_us_ri_sit_tax_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<!-- Page 8 http://www.tax.ri.gov/forms/2021/Withholding/2021%20Withholding%20Tax%20Booklet.pdf -->
<record id="rule_parameter_us_ri_sit_tax_rate_2021" model="hr.rule.parameter.value">
<field name="parameter_value">{
'weekly': (
( 1273, 0.00, 3.75),
( 2895, 47.74, 4.75),
('inf', 124.79, 5.99),
),
'bi-weekly': (
( 2546, 0.00, 3.75),
( 5790, 95.48, 4.75),
('inf', 249.57, 5.99),
),
'semi-monthly': (
( 2758, 0.00, 3.75),
( 6273, 103.43, 4.75),
('inf', 270.39, 5.99),
),
'monthly': (
( 5517, 0.00, 3.75),
(12546, 206.89, 4.75),
('inf', 540.77, 5.99),
),
'quarterly': (
(16550, 0.00, 3.75),
(37638, 620.63, 4.75),
('inf', 1622.31, 5.99),
),
'semi-annually': (
(33100, 0.00, 3.75),
(75275, 1241.25, 4.75),
('inf', 3244.56, 5.99),
),
'annually': (
( 66200, 0.00, 3.75),
(150550, 2482.50, 4.75),
( 'inf', 6489.13, 5.99),
),
}</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ri_sit_tax_rate"/>
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
</record>
</data>
<!-- Partners and Contribution Registers -->

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 TestUsRIPayslip(TestUsPayslip):
###
# 2021 Taxes and Rates
###
RI_UNEMP_MAX_WAGE = 24000.0
RI_UNEMP = 1.06
# Calculation based on example http://www.tax.ri.gov/forms/2021/Withholding/2021%20Withhholding%20Tax%20Booklet.pdf
def _test_sit(self, wage, allowances, additional_withholding, exempt, schedule_pay, date_start, expected_withholding):
employee = self._createEmployee()
contract = self._createContract(employee,
wage=wage,
state_id=self.get_us_state('RI'),
ri_w4_sit_allowances=allowances,
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.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), -expected_withholding)
def test_2021_taxes_example(self):
self._test_er_suta('RI', self.RI_UNEMP, date(2021, 1, 1), wage_base=self.RI_UNEMP_MAX_WAGE)
self._test_sit(2195, 1, 0, False, 'weekly', date(2021, 1, 1), 90.62)
self._test_sit(1800, 2, 10, True, 'weekly', date(2021, 1, 1), 0.00)
self._test_sit(10000, 1, 0, False, 'bi-weekly', date(2021, 1, 1), 501.75)
self._test_sit(18000, 2, 0, False, 'monthly', date(2021, 1, 1), 857.48)
self._test_sit(18000, 2, 10, False, 'monthly', date(2021, 1, 1), 867.47)