MS Mississippi

This commit is contained in:
Jared Self
2021-01-12 14:46:49 -07:00
parent bb8734ad6f
commit 1ecd2521d3
3 changed files with 55 additions and 123 deletions

View File

@@ -7,11 +7,7 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_ms_suta_wage_base_2019" model="hr.rule.parameter.value">
<field name="parameter_value">14000.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ms_suta_wage_base"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- not changed for 2021 https://mdes.ms.gov/employer-faqs/ -->
<record id="rule_parameter_us_ms_suta_wage_base_2020" model="hr.rule.parameter.value">
<field name="parameter_value">14000.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ms_suta_wage_base"/>
@@ -26,16 +22,18 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_ms_suta_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">1.2</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ms_suta_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_ms_suta_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">1.2</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ms_suta_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<!-- 1% for first year of new employers -->
<!-- https://mdes.ms.gov/employers/unemployment-tax/reporting-and-filing/unemployment-tax-rates/ -->
<record id="rule_parameter_us_ms_suta_rate_2021" model="hr.rule.parameter.value">
<field name="parameter_value">1.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ms_suta_rate"/>
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
</record>
</data>
<record id="rule_parameter_us_ms_sit_rate" model="hr.rule.parameter">
@@ -44,15 +42,6 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_ms_sit_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">[
( 10000.00, 290.0, 0.05),
( 5000.00, 90.0, 0.04),
( 2000.00, 0.0, 0.03),
]</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ms_sit_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- https://www.dor.ms.gov/Documents/Computer%20Payroll%20Flowchart.pdf -->
<!-- Table D. -->
<record id="rule_parameter_us_ms_sit_rate_2020" model="hr.rule.parameter.value">
@@ -64,6 +53,17 @@
<field name="rule_parameter_id" ref="rule_parameter_us_ms_sit_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<!-- https://www.dor.ms.gov/Documents/Computer%20Payroll%20Flowchart%209-9-20.pdf -->
<!-- Table D. -->
<record id="rule_parameter_us_ms_sit_rate_2021" model="hr.rule.parameter.value">
<field name="parameter_value">[
( 10000.00, 230.0, 0.05),
( 5000.00, 30.0, 0.04),
( 3000.00, 0.0, 0.03),
]</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ms_sit_rate"/>
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
</record>
</data>
<record id="rule_parameter_us_ms_sit_deduction" model="hr.rule.parameter">
@@ -72,18 +72,9 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_ms_sit_deduction_2019" model="hr.rule.parameter.value">
<field name="parameter_value">{
'single': 2300.0,
'head_of_household': 3400.0,
'married_dual': 2300.0,
'married': 4600.0,
}</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ms_sit_deduction"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- https://www.dor.ms.gov/Documents/Computer%20Payroll%20Flowchart.pdf -->
<!-- Table C. -->
<!-- Unchanged in 2021 https://www.dor.ms.gov/Documents/Computer%20Payroll%20Flowchart%209-9-20.pdf -->
<record id="rule_parameter_us_ms_sit_deduction_2020" model="hr.rule.parameter.value">
<field name="parameter_value">{
'single': 2300.0,

View File

@@ -1,94 +0,0 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .common import TestUsPayslip
class TestUsMsPayslip(TestUsPayslip):
# Calculations from https://www.dor.ms.gov/Documents/Computer%20Payroll%20Accounting%201-2-19.pdf
MS_UNEMP = -1.2 / 100.0
def test_2019_taxes_one(self):
salary = 1250.0
ms_89_350_exemption = 11000.0
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MS'),
ms_89_350_sit_filing_status='head_of_household',
ms_89_350_sit_exemption_value=ms_89_350_exemption,
state_income_tax_additional_withholding=0.0,
schedule_pay='semi-monthly')
self._log('2019 Mississippi tax single first payslip:')
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.MS_UNEMP)
STDED = 3400.0 # Head of Household
AGP = salary * 24 # Semi-Monthly
TI = AGP - (ms_89_350_exemption + STDED)
self.assertPayrollEqual(TI, 15600.0)
TAX = ((TI - 10000) * 0.05) + 290 # Over 10,000
self.assertPayrollEqual(TAX, 570.0)
ms_withhold = round(TAX / 24) # Semi-Monthly
self.assertPayrollEqual(cats['EE_US_SIT'], -ms_withhold)
def test_2019_taxes_one_exempt(self):
salary = 1250.0
ms_89_350_exemption = 11000.0
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MS'),
ms_89_350_sit_filing_status='',
ms_89_350_sit_exemption_value=ms_89_350_exemption,
state_income_tax_additional_withholding=0.0,
schedule_pay='semi-monthly')
self._log('2019 Mississippi tax single first payslip:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats.get('EE_US_SIT', 0.0), 0.0)
def test_2019_taxes_additional(self):
salary = 1250.0
ms_89_350_exemption = 11000.0
additional = 40.0
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('MS'),
ms_89_350_sit_filing_status='head_of_household',
ms_89_350_sit_exemption_value=ms_89_350_exemption,
state_income_tax_additional_withholding=additional,
schedule_pay='semi-monthly')
self._log('2019 Mississippi tax single first payslip:')
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.MS_UNEMP)
STDED = 3400.0 # Head of Household
AGP = salary * 24 # Semi-Monthly
TI = AGP - (ms_89_350_exemption + STDED)
self.assertPayrollEqual(TI, 15600.0)
TAX = ((TI - 10000) * 0.05) + 290 # Over 10,000
self.assertPayrollEqual(TAX, 570.0)
ms_withhold = round(TAX / 24) # Semi-Monthly
self.assertPayrollEqual(cats['EE_US_SIT'], -ms_withhold + -additional)

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 TestUsMsPayslip(TestUsPayslip):
# Calculations from https://www.dor.ms.gov/Documents/Computer%20Payroll%20Flowchart.pdf
MS_UNEMP = 1.0
MS_UNEMP_MAX_WAGE = 14000.0
def _test_sit(self, wage, filing_status, additional_withholding, exemption, schedule_pay, date_start, expected_withholding):
employee = self._createEmployee()
contract = self._createContract(employee,
wage=wage,
state_id=self.get_us_state('MS'),
ms_89_350_sit_filing_status=filing_status,
state_income_tax_additional_withholding=additional_withholding,
ms_89_350_sit_exemption_value=exemption,
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('MS', self.MS_UNEMP, date(2021, 1, 1), wage_base=self.MS_UNEMP_MAX_WAGE)
self._test_sit(1250.0, 'head_of_household', 0.0, 11000, 'semi-monthly', date(2021, 1, 1), 21.00)
self._test_sit(500.0, '', 5.0, 0, 'bi-weekly', date(2021, 1, 1), 0.00)
self._test_sit(12000.0, 'single', 0.0, 11000, 'monthly', date(2021, 1, 1), 522.00)
self._test_sit(2500.0, 'married', 5.0, 500, 'bi-weekly', date(2021, 1, 1), 110.00)