AK Alaska

This commit is contained in:
Jared Self
2021-01-06 16:02:47 -07:00
parent e8b105adbe
commit cc688c9df2
3 changed files with 31 additions and 76 deletions

View File

@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Wage Base -->
<!-- https://labor.alaska.gov/estax/faq/w1.htm Rates are at same site-->
<record id="rule_parameter_us_ak_suta_wage_base" model="hr.rule.parameter">
<field name="name">US AK Alaska SUTA Wage Base</field>
<field name="code">us_ak_suta_wage_base</field>
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_ak_suta_wage_base_2019" model="hr.rule.parameter.value">
<field name="parameter_value">39900.00</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ak_suta_wage_base"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_ak_suta_wage_base_2020" model="hr.rule.parameter.value">
<field name="parameter_value">41500.00</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ak_suta_wage_base"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_ak_suta_wage_base_2021" model="hr.rule.parameter.value">
<field name="parameter_value">43600.00</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ak_suta_wage_base"/>
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
</record>
</data>
<!-- Rate -->
@@ -26,16 +27,16 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_ak_suta_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">1.780</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ak_suta_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_ak_suta_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">1.590</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ak_suta_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_ak_suta_rate_2021" model="hr.rule.parameter.value">
<field name="parameter_value">2.570</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ak_suta_rate"/>
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
</record>
</data>
<record id="rule_parameter_us_ak_suta_ee_rate" model="hr.rule.parameter">
@@ -44,16 +45,16 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_ak_suta_ee_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">0.500</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ak_suta_ee_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_ak_suta_ee_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">0.500</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ak_suta_ee_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_ak_suta_ee_rate_2021" model="hr.rule.parameter.value">
<field name="parameter_value">0.500</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ak_suta_ee_rate"/>
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
</record>
</data>
<!-- Partners and Contribution Registers -->

View File

@@ -1,61 +0,0 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .common import TestUsPayslip, process_payslip
class TestUsAKPayslip(TestUsPayslip):
# TAXES AND RATES
AK_UNEMP_MAX_WAGE = 39900.00
AK_UNEMP = -(1.780 / 100.0)
AK_UNEMP_EE = -(0.5 / 100.0)
def test_taxes_monthly_over_max(self):
salary = 50000.00
schedule_pay = 'monthly'
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('AK'),
state_income_tax_additional_withholding=0.0,
schedule_pay=schedule_pay)
self._log('2019 Alaska tax first payslip monthly:')
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], self.AK_UNEMP_MAX_WAGE * self.AK_UNEMP)
self.assertPayrollEqual(cats['EE_US_SUTA'], self.AK_UNEMP_MAX_WAGE * self.AK_UNEMP_EE)
process_payslip(payslip)
remaining_ak_unemp_wages = 0.00 # We already reached the maximum wage for unemployment insurance.
self._log('2019 Alaska tax second payslip monthly:')
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
payslip.compute_sheet()
cats = self._getCategories(payslip)
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_ak_unemp_wages * self.AK_UNEMP) # 0
def test_taxes_weekly_under_max(self):
salary = 5000.00
schedule_pay = 'weekly'
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('AK'),
state_income_tax_additional_withholding=0.0,
schedule_pay=schedule_pay)
self._log('2019 Alaska 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.AK_UNEMP)
self.assertPayrollEqual(cats['EE_US_SUTA'], salary * self.AK_UNEMP_EE)
process_payslip(payslip)

View File

@@ -0,0 +1,15 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from datetime import date
from .common import TestUsPayslip
class TestUsAKPayslip(TestUsPayslip):
# TAXES AND RATES
AK_UNEMP_MAX_WAGE = 43600.00
AK_UNEMP = 2.57
AK_UNEMP_EE = 0.5
def test_2021_taxes(self):
self._test_er_suta('AK', self.AK_UNEMP, date(2021, 1, 1), wage_base=self.AK_UNEMP_MAX_WAGE)
self._test_ee_suta('AK', self.AK_UNEMP_EE, date(2021, 1, 1), wage_base=self.AK_UNEMP_MAX_WAGE)