mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
OK Oklahoma
This commit is contained in:
@@ -12,6 +12,12 @@
|
|||||||
<field name="rule_parameter_id" ref="rule_parameter_us_ok_suta_wage_base"/>
|
<field name="rule_parameter_id" ref="rule_parameter_us_ok_suta_wage_base"/>
|
||||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||||
</record>
|
</record>
|
||||||
|
<!-- https://oklahoma.gov/content/dam/ok/en/omes/documents/car/newsletter/2021RatesAndMaximums.pdf -->
|
||||||
|
<record id="rule_parameter_us_ok_suta_wage_base_2021" model="hr.rule.parameter.value">
|
||||||
|
<field name="parameter_value">24000.0</field>
|
||||||
|
<field name="rule_parameter_id" ref="rule_parameter_us_ok_suta_wage_base"/>
|
||||||
|
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
|
||||||
|
</record>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<!-- Rate -->
|
<!-- Rate -->
|
||||||
@@ -26,7 +32,14 @@
|
|||||||
<field name="rule_parameter_id" ref="rule_parameter_us_ok_suta_rate"/>
|
<field name="rule_parameter_id" ref="rule_parameter_us_ok_suta_rate"/>
|
||||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||||
</record>
|
</record>
|
||||||
|
<!-- https://oklahoma.gov/content/dam/ok/en/omes/documents/car/newsletter/2021RatesAndMaximums.pdf -->
|
||||||
|
<record id="rule_parameter_us_ok_suta_rate_2021" model="hr.rule.parameter.value">
|
||||||
|
<field name="parameter_value">1.0</field>
|
||||||
|
<field name="rule_parameter_id" ref="rule_parameter_us_ok_suta_rate"/>
|
||||||
|
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
|
||||||
|
</record>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<!-- table from https://www.ok.gov/tax/documents/2020WHTables.pdf -->
|
<!-- table from https://www.ok.gov/tax/documents/2020WHTables.pdf -->
|
||||||
<record id="rule_parameter_us_ok_sit_allowances_rate" model="hr.rule.parameter">
|
<record id="rule_parameter_us_ok_sit_allowances_rate" model="hr.rule.parameter">
|
||||||
<field name="name">US OK Oklahoma Allowances Rate</field>
|
<field name="name">US OK Oklahoma Allowances Rate</field>
|
||||||
@@ -34,6 +47,7 @@
|
|||||||
<field name="country_id" ref="base.us"/>
|
<field name="country_id" ref="base.us"/>
|
||||||
</record>
|
</record>
|
||||||
<data noupdate="1">
|
<data noupdate="1">
|
||||||
|
<!-- Unchanged in 2021 https://www.ok.gov/tax/documents/2021WHTables.pdf -->
|
||||||
<record id="rule_parameter_us_ok_sit_allowances_rate_2020" model="hr.rule.parameter.value">
|
<record id="rule_parameter_us_ok_sit_allowances_rate_2020" model="hr.rule.parameter.value">
|
||||||
<field name="parameter_value">{
|
<field name="parameter_value">{
|
||||||
'weekly' : 19.23,
|
'weekly' : 19.23,
|
||||||
@@ -48,13 +62,15 @@
|
|||||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||||
</record>
|
</record>
|
||||||
</data>
|
</data>
|
||||||
<!-- table from https://www.ok.gov/tax/documents/2020WHTables.pdf -->
|
|
||||||
<record id="rule_parameter_us_ok_sit_tax_rate" model="hr.rule.parameter">
|
<record id="rule_parameter_us_ok_sit_tax_rate" model="hr.rule.parameter">
|
||||||
<field name="name">US OK Oklahoma SIT Tax Rate</field>
|
<field name="name">US OK Oklahoma SIT Tax Rate</field>
|
||||||
<field name="code">us_ok_sit_tax_rate</field>
|
<field name="code">us_ok_sit_tax_rate</field>
|
||||||
<field name="country_id" ref="base.us"/>
|
<field name="country_id" ref="base.us"/>
|
||||||
</record>
|
</record>
|
||||||
<data noupdate="1">
|
<data noupdate="1">
|
||||||
|
<!-- table from https://www.ok.gov/tax/documents/2020WHTables.pdf -->
|
||||||
|
<!-- Unchanged in 2021 https://www.ok.gov/tax/documents/2021WHTables.pdf -->
|
||||||
<record id="rule_parameter_us_ok_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
<record id="rule_parameter_us_ok_sit_tax_rate_2020" model="hr.rule.parameter.value">
|
||||||
<field name="parameter_value">{
|
<field name="parameter_value">{
|
||||||
'single': {
|
'single': {
|
||||||
|
|||||||
38
l10n_us_hr_payroll/tests/test_us_ok_oklahoma_payslip_2021.py
Executable file
38
l10n_us_hr_payroll/tests/test_us_ok_oklahoma_payslip_2021.py
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
# 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 TestUsOKPayslip(TestUsPayslip):
|
||||||
|
###
|
||||||
|
# 2021 Taxes and Rates
|
||||||
|
###
|
||||||
|
OK_UNEMP_MAX_WAGE = 24000.0
|
||||||
|
OK_UNEMP = 1.0
|
||||||
|
# Calculation based on example https://www.ok.gov/tax/documents/2021WHTables.pdf
|
||||||
|
|
||||||
|
def _test_sit(self, wage, filing_status, 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('OK'),
|
||||||
|
ok_w4_sit_filing_status=filing_status,
|
||||||
|
ok_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('OK', self.OK_UNEMP, date(2021, 1, 1), wage_base=self.OK_UNEMP_MAX_WAGE)
|
||||||
|
self._test_sit(1825, 'married', 2, 0, False, 'semi-monthly', date(2021, 1, 1), 46.00)
|
||||||
|
self._test_sit(1825, 'married', 2, 0, True, 'monthly', date(2021, 1, 1), 0.00)
|
||||||
|
self._test_sit(1000, 'single', 1, 0, False, 'weekly', date(2021, 1, 1), 39.00)
|
||||||
|
self._test_sit(1000, 'single', 1, 10, False, 'weekly', date(2021, 1, 1), 49.00)
|
||||||
|
self._test_sit(5000, 'head_household', 2, 10, False, 'monthly', date(2021, 1, 1), 210.00)
|
||||||
Reference in New Issue
Block a user