mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
MO Missouri
This commit is contained in:
@@ -7,16 +7,17 @@
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_mo_suta_wage_base_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">12000.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_mo_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_mo_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">11500.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_mo_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
<!-- https://labor.mo.gov/news/press-releases/missouri-employers-receive-unemployment-tax-rate-reduction-2021#:~:text=Jefferson%20City%2C%20MO%20%E2%80%93%20Effective%20January,as%20of%20January%201%2C%202021. -->
|
||||
<record id="rule_parameter_us_mo_suta_wage_base_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">11000.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_mo_suta_wage_base"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Rate -->
|
||||
@@ -26,16 +27,18 @@
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_mo_suta_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2.376</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_mo_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_mo_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2.376</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_mo_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
<!-- https://labor.mo.gov/DES/Employers/tax_rates -->
|
||||
<!-- In "Beginning Tax Rates" section, the last sentence says "or 2.7%, whichever is highest -->
|
||||
<record id="rule_parameter_us_mo_suta_rate_2021" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2.7</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_mo_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_mo_sit_rate" model="hr.rule.parameter">
|
||||
@@ -44,22 +47,6 @@
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<!-- https://dor.mo.gov/forms/4282_2019.pdf -->
|
||||
<record id="rule_parameter_us_mo_sit_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">[
|
||||
(1053.0, 1.5),
|
||||
(1053.0, 2.0),
|
||||
(1053.0, 2.5),
|
||||
(1053.0, 3.0),
|
||||
(1053.0, 3.5),
|
||||
(1053.0, 4.0),
|
||||
(1053.0, 4.5),
|
||||
(1053.0, 5.0),
|
||||
( 'inf', 5.4),
|
||||
]</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_mo_sit_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<!-- https://dor.mo.gov/forms/4282_2020.pdf -->
|
||||
<!-- Income Tax Withholding Percentage Table-->
|
||||
<record id="rule_parameter_us_mo_sit_rate_2020" model="hr.rule.parameter.value">
|
||||
@@ -77,6 +64,24 @@
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_mo_sit_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
|
||||
<!-- todo: This parameter is to the example not to the rates-->
|
||||
<!-- page 13 https://dor.mo.gov/forms/4282_2021.pdf -->
|
||||
<record id="rule_parameter_us_mo_sit_rate_2021" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">[
|
||||
(1088.0, 1.5),
|
||||
(1088.0, 2.0),
|
||||
(1088.0, 2.5),
|
||||
(1088.0, 3.0),
|
||||
(1088.0, 3.5),
|
||||
(1088.0, 4.0),
|
||||
(1088.0, 4.5),
|
||||
(1088.0, 5.0),
|
||||
( 'inf', 5.4),
|
||||
]</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_mo_sit_rate"/>
|
||||
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<record id="rule_parameter_us_mo_sit_deduction" model="hr.rule.parameter">
|
||||
@@ -85,16 +90,6 @@
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<!-- https://dor.mo.gov/forms/4282_2019.pdf -->
|
||||
<record id="rule_parameter_us_mo_sit_deduction_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': 12400.0,
|
||||
'married': 24800.0,
|
||||
'head_of_household': 18650.0,
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_mo_sit_deduction"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<!-- https://dor.mo.gov/forms/4282_2020.pdf -->
|
||||
<!-- 2020 Missouri Withholding Tax Formula Page.12 -->
|
||||
<record id="rule_parameter_us_mo_sit_deduction_2020" model="hr.rule.parameter.value">
|
||||
@@ -106,6 +101,17 @@
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_mo_sit_deduction"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
<!-- https://dor.mo.gov/forms/4282_2021.pdf -->
|
||||
<!-- 2020 Missouri Withholding Tax Formula Page.12 -->
|
||||
<record id="rule_parameter_us_mo_sit_deduction_2021" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">{
|
||||
'single': 12550.0,
|
||||
'married': 25100.0,
|
||||
'head_of_household': 18800.0,
|
||||
}</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_mo_sit_deduction"/>
|
||||
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
|
||||
from datetime import date
|
||||
from .common import TestUsPayslip
|
||||
|
||||
|
||||
class TestUsMoPayslip(TestUsPayslip):
|
||||
# Calculations from http://dor.mo.gov/forms/4282_2019.pdf
|
||||
SALARY = 12000.0
|
||||
MO_UNEMP = -2.376 / 100.0
|
||||
|
||||
TAX = [
|
||||
(1053.0, 1.5),
|
||||
(1053.0, 2.0),
|
||||
(1053.0, 2.5),
|
||||
(1053.0, 3.0),
|
||||
(1053.0, 3.5),
|
||||
(1053.0, 4.0),
|
||||
(1053.0, 4.5),
|
||||
(1053.0, 5.0),
|
||||
(999999999.0, 5.4),
|
||||
]
|
||||
|
||||
def test_2019_taxes_single(self):
|
||||
# Payroll Period Monthly
|
||||
salary = self.SALARY
|
||||
pp = 12.0
|
||||
gross_salary = salary * pp
|
||||
spouse_employed = False
|
||||
|
||||
# Single
|
||||
standard_deduction = 12400.0
|
||||
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
state_id=self.get_us_state('MO'),
|
||||
mo_mow4_sit_filing_status='single',
|
||||
state_income_tax_additional_withholding=0.0,
|
||||
schedule_pay='monthly')
|
||||
|
||||
self._log('2019 Missouri 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.MO_UNEMP)
|
||||
|
||||
mo_taxable_income = gross_salary - standard_deduction
|
||||
self._log('%s = %s - %s -' % (mo_taxable_income, gross_salary, standard_deduction))
|
||||
|
||||
remaining_taxable_income = mo_taxable_income
|
||||
tax = 0.0
|
||||
for amt, rate in self.TAX:
|
||||
amt = float(amt)
|
||||
rate = rate / 100.0
|
||||
self._log(str(amt) + ' : ' + str(rate) + ' : ' + str(remaining_taxable_income))
|
||||
if (remaining_taxable_income - amt) > 0.0 or (remaining_taxable_income - amt) == 0.0:
|
||||
tax += rate * amt
|
||||
else:
|
||||
tax += rate * remaining_taxable_income
|
||||
break
|
||||
remaining_taxable_income = remaining_taxable_income - amt
|
||||
|
||||
tax = -tax
|
||||
self._log('Computed annual tax: ' + str(tax))
|
||||
|
||||
tax = tax / pp
|
||||
tax = round(tax)
|
||||
self._log('Computed period tax: ' + str(tax))
|
||||
self.assertPayrollEqual(cats['EE_US_SIT'], tax)
|
||||
|
||||
def test_2019_spouse_not_employed(self):
|
||||
# Payroll Period Semi-monthly
|
||||
salary = self.SALARY
|
||||
pp = 24.0
|
||||
gross_salary = salary * pp
|
||||
|
||||
# Married
|
||||
standard_deduction = 24800.0
|
||||
|
||||
employee = self._createEmployee()
|
||||
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
state_id=self.get_us_state('MO'),
|
||||
mo_mow4_sit_filing_status='married',
|
||||
state_income_tax_additional_withholding=0.0,
|
||||
schedule_pay='semi-monthly')
|
||||
|
||||
self._log('2019 Missouri tax first payslip:')
|
||||
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
|
||||
|
||||
payslip.compute_sheet()
|
||||
|
||||
cats = self._getCategories(payslip)
|
||||
|
||||
mo_taxable_income = gross_salary - standard_deduction
|
||||
self._log(mo_taxable_income)
|
||||
|
||||
remaining_taxable_income = mo_taxable_income
|
||||
tax = 0.0
|
||||
for amt, rate in self.TAX:
|
||||
amt = float(amt)
|
||||
rate = rate / 100.0
|
||||
self._log(str(amt) + ' : ' + str(rate) + ' : ' + str(remaining_taxable_income))
|
||||
if (remaining_taxable_income - amt) > 0.0 or (remaining_taxable_income - amt) == 0.0:
|
||||
tax += rate * amt
|
||||
else:
|
||||
tax += rate * remaining_taxable_income
|
||||
break
|
||||
remaining_taxable_income = remaining_taxable_income - amt
|
||||
|
||||
tax = -tax
|
||||
self._log('Computed annual tax: ' + str(tax))
|
||||
|
||||
tax = tax / pp
|
||||
tax = round(tax)
|
||||
self._log('Computed period tax: ' + str(tax))
|
||||
self.assertPayrollEqual(cats['EE_US_SIT'], tax)
|
||||
|
||||
def test_2019_head_of_household(self):
|
||||
# Payroll Period Weekly
|
||||
salary = self.SALARY
|
||||
|
||||
# Payroll Period Weekly
|
||||
salary = self.SALARY
|
||||
pp = 52.0
|
||||
gross_salary = salary * pp
|
||||
|
||||
# Single HoH
|
||||
standard_deduction = 18650.0
|
||||
|
||||
employee = self._createEmployee()
|
||||
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
state_id=self.get_us_state('MO'),
|
||||
mo_mow4_sit_filing_status='head_of_household',
|
||||
state_income_tax_additional_withholding=0.0,
|
||||
schedule_pay='weekly')
|
||||
|
||||
self._log('2019 Missouri tax first payslip:')
|
||||
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
|
||||
|
||||
payslip.compute_sheet()
|
||||
|
||||
cats = self._getCategories(payslip)
|
||||
|
||||
mo_taxable_income = gross_salary - standard_deduction
|
||||
self._log(mo_taxable_income)
|
||||
|
||||
remaining_taxable_income = mo_taxable_income
|
||||
tax = 0.0
|
||||
for amt, rate in self.TAX:
|
||||
amt = float(amt)
|
||||
rate = rate / 100.0
|
||||
self._log(str(amt) + ' : ' + str(rate) + ' : ' + str(remaining_taxable_income))
|
||||
if (remaining_taxable_income - amt) > 0.0 or (remaining_taxable_income - amt) == 0.0:
|
||||
tax += rate * amt
|
||||
else:
|
||||
tax += rate * remaining_taxable_income
|
||||
break
|
||||
remaining_taxable_income = remaining_taxable_income - amt
|
||||
tax = -tax
|
||||
self._log('Computed annual tax: ' + str(tax))
|
||||
|
||||
tax = tax / pp
|
||||
tax = round(tax)
|
||||
self._log('Computed period tax: ' + str(tax))
|
||||
self.assertPayrollEqual(cats['EE_US_SIT'], tax)
|
||||
|
||||
def test_2019_underflow(self):
|
||||
# Payroll Period Weekly
|
||||
salary = 200.0
|
||||
|
||||
employee = self._createEmployee()
|
||||
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
state_id=self.get_us_state('MO'))
|
||||
|
||||
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
|
||||
payslip.compute_sheet()
|
||||
cats = self._getCategories(payslip)
|
||||
|
||||
self.assertPayrollEqual(cats['EE_US_SIT'], 0.0)
|
||||
34
l10n_us_hr_payroll/tests/test_us_mo_missouri_payslip_2021.py
Executable file
34
l10n_us_hr_payroll/tests/test_us_mo_missouri_payslip_2021.py
Executable file
@@ -0,0 +1,34 @@
|
||||
# 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 TestUsMoPayslip(TestUsPayslip):
|
||||
# Calculations from http://dor.mo.gov/forms/4282_2021.pdf
|
||||
MO_UNEMP_MAX_WAGE = 11000.0
|
||||
MO_UNEMP = 2.7
|
||||
|
||||
def _test_sit(self, wage, filing_status, additional_withholding, schedule_pay, date_start, expected_withholding):
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=wage,
|
||||
state_id=self.get_us_state('MO'),
|
||||
mo_mow4_sit_filing_status=filing_status,
|
||||
state_income_tax_additional_withholding=additional_withholding,
|
||||
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('MO', self.MO_UNEMP, date(2021, 1, 1), wage_base=self.MO_UNEMP_MAX_WAGE)
|
||||
self._test_sit(750.0, 'single', 0.0, 'weekly', date(2021, 1, 1), 24.00)
|
||||
self._test_sit(2500.0, 'single', 5.0, 'bi-weekly', date(2021, 1, 1), 107.00)
|
||||
self._test_sit(7000.0, 'married', 0.0, 'monthly', date(2021, 1, 1), 249.00)
|
||||
self._test_sit(5000.0, 'married', 10.0, 'semi-monthly', date(2021, 1, 1), 216.00)
|
||||
self._test_sit(6000.0, '', 0.0, 'monthly', date(2021, 1, 1), 0.00)
|
||||
|
||||
Reference in New Issue
Block a user