AR Arkansas

This commit is contained in:
Jared Self
2021-01-07 11:42:57 -07:00
parent 33482ad3bd
commit e754b3aa2e
3 changed files with 69 additions and 105 deletions

View File

@@ -7,16 +7,17 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_ar_suta_wage_base_2019" model="hr.rule.parameter.value">
<field name="parameter_value">10000.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ar_suta_wage_base"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- https://www.dws.arkansas.gov/employers/employer-ui-contributions/ -->
<record id="rule_parameter_us_ar_suta_wage_base_2020" model="hr.rule.parameter.value">
<field name="parameter_value">8000.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ar_suta_wage_base"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_ar_suta_wage_base_2021" model="hr.rule.parameter.value">
<field name="parameter_value">10000.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ar_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_ar_suta_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">3.2</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ar_suta_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- https://www.dws.arkansas.gov/employers/employer-ui-contributions/ -->
<record id="rule_parameter_us_ar_suta_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">2.9</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ar_suta_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_ar_suta_rate_2021" model="hr.rule.parameter.value">
<field name="parameter_value">3.2</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ar_suta_rate"/>
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
</record>
</data>
<record id="rule_parameter_us_ar_sit_tax_rate" model="hr.rule.parameter">
@@ -44,24 +46,6 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_ar_sit_tax_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">[
( 4599, 0.0, 0.00),
( 9099, 2.0, 91.98),
( 13699, 3.0, 182.97),
( 22599, 3.4, 237.77),
( 37899, 5.0, 421.46),
( 80800, 5.9, 762.55),
( 81800, 6.6, 1243.40),
( 82800, 6.6, 1143.40),
( 84100, 6.6, 1043.40),
( 85200, 6.6, 943.40),
( 86200, 6.6, 843.40),
( 'inf', 6.6, 803.40),
]</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ar_sit_tax_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- https://www.dfa.arkansas.gov/images/uploads/incomeTaxOffice/whformula.pdf-->
<!-- Notover, percentage , minus adjustment page 1. 3.-->
<record id="rule_parameter_us_ar_sit_tax_rate_2020" model="hr.rule.parameter.value">
@@ -82,6 +66,26 @@
<field name="rule_parameter_id" ref="rule_parameter_us_ar_sit_tax_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<!-- https://www.dfa.arkansas.gov/images/uploads/incomeTaxOffice/whformula.pdf -->
<!-- Notover, percentage , minus adjustment page 1. 3.-->
<record id="rule_parameter_us_ar_sit_tax_rate_2021" model="hr.rule.parameter.value">
<field name="parameter_value">[
( 4699, 0.0, 0.00),
( 9199, 2.0, 93.98),
( 13899, 3.0, 185.97),
( 22899, 3.4, 241.57),
( 38499, 5.0, 427.71),
( 82000, 5.9, 774.20),
( 83000, 5.9, 681.70),
( 84000, 5.9, 581.70),
( 85300, 5.9, 481.70),
( 86400, 5.9, 381.70),
( 87500, 5.9, 281.70),
( 'inf', 5.9, 241.70),
]</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ar_sit_tax_rate"/>
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
</record>
</data>
<record id="rule_parameter_us_ar_sit_standard_deduction_rate" model="hr.rule.parameter">
@@ -90,11 +94,8 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_ar_sit_standard_deduction_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">2200.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ar_sit_standard_deduction_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- #2 https://www.dfa.arkansas.gov/images/uploads/incomeTaxOffice/whformula.pdf -->
<!-- deduction unchanged in 2021 -->
<record id="rule_parameter_us_ar_sit_standard_deduction_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">2200.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ar_sit_standard_deduction_rate"/>

View File

@@ -1,72 +0,0 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .common import TestUsPayslip, process_payslip
class TestUsARPayslip(TestUsPayslip):
# https://www.dfa.arkansas.gov/images/uploads/incomeTaxOffice/whformula.pdf Calculation based on this file.
AR_UNEMP_MAX_WAGE = 10000.00
AR_UNEMP = -3.2 / 100.0
AR_INC_TAX = -0.0535
def test_taxes_monthly(self):
salary = 2127.0
schedule_pay = 'monthly'
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('AR'),
state_income_tax_additional_withholding=0.0,
ar_ar4ec_sit_allowances=2.0,
state_income_tax_exempt=False,
schedule_pay='monthly')
self._log('2019 Arkansas tax first payslip weekly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
# Not exempt from rule 1 or rule 2 - unemployment wages., and actual unemployment.
self.assertPayrollEqual(cats['ER_US_SUTA'], salary * self.AR_UNEMP)
process_payslip(payslip)
# Make a new payslip, this one will have maximums
remaining_AR_UNEMP_wages = self.AR_UNEMP_MAX_WAGE - salary if (self.AR_UNEMP_MAX_WAGE - 2*salary < salary) else salary
# We reached the cap of 10000.0 in the first payslip.
self._log('2019 Arkansas tax second payslip weekly:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_AR_UNEMP_wages * self.AR_UNEMP)
def test_additional_withholding(self):
salary = 5000.0
schedule_pay = 'monthly'
pay_periods = 12
allowances = 2
# TODO: comment on how it was calculated
test_ar_amt = 2598.60
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('AR'),
state_income_tax_additional_withholding=100.0,
ar_ar4ec_sit_allowances=2.0,
state_income_tax_exempt=False,
schedule_pay='monthly')
self._log('2019 Arkansas tax first payslip weekly:')
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.AR_UNEMP)
# TODO: change to hand the test_ar_amt already be divided by pay periods
self.assertPayrollAlmostEqual(cats['EE_US_SIT'], -round(test_ar_amt / pay_periods) - 100)
process_payslip(payslip)

View File

@@ -0,0 +1,35 @@
# 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 TestUsARPayslip(TestUsPayslip):
# Taxes and Rates
AR_UNEMP_MAX_WAGE = 10000.0
AR_UNEMP = 3.2
def _test_sit(self, wage, exemptions, allowances, additional_withholding, schedule_pay, date_start, expected_withholding):
employee = self._createEmployee()
contract = self._createContract(employee,
wage=wage,
state_id=self.get_us_state('AR'),
state_income_tax_exempt=exemptions,
state_income_tax_additional_withholding=additional_withholding,
ar_ar4ec_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('AR', self.AR_UNEMP, date(2021, 1, 1), wage_base=self.AR_UNEMP_MAX_WAGE)
self._test_sit(5000.0, True, 0.0, 0, 'monthly', date(2021, 1, 1), 0.0)
self._test_sit(5000.0, False, 0.0, 0, 'monthly', date(2021, 1, 1), 220.0)
self._test_sit(700.0, False, 0.0, 150, 'weekly', date(2021, 1, 1), 175.0)
self._test_sit(7000.0, False, 2.0, 0, 'semi-monthly', date(2021, 1, 1), 395.0)
self._test_sit(3000.0, False, 1.0, 0, 'bi-weekly', date(2021, 1, 1), 141.0)