LA Louisiana

This commit is contained in:
Jared Self
2021-01-14 13:09:03 -07:00
parent ee97a73375
commit 8e97119d40
3 changed files with 63 additions and 127 deletions

View File

@@ -7,11 +7,7 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_la_suta_wage_base_2019" model="hr.rule.parameter.value">
<field name="parameter_value">7700.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_la_suta_wage_base"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- unchanged in 2021 http://www.laworks.net/unemploymentinsurance/ui_lainsurancetaxrates.asp -->
<record id="rule_parameter_us_la_suta_wage_base_2020" model="hr.rule.parameter.value">
<field name="parameter_value">7700.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_la_suta_wage_base"/>
@@ -26,16 +22,18 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_la_suta_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">1.14</field>
<field name="rule_parameter_id" ref="rule_parameter_us_la_suta_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_la_suta_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">1.14</field>
<field name="rule_parameter_id" ref="rule_parameter_us_la_suta_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<!-- new employer is set a beginning rate according to industry. This rate is a place holder -->
<!-- http://www.laworks.net/FAQs/FAQ_UI_EmployerTaxes.asp -->
<record id="rule_parameter_us_la_suta_rate_2021" model="hr.rule.parameter.value">
<field name="parameter_value">1.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_la_suta_rate"/>
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
</record>
</data>
<!-- table data from http://www.revenue.louisiana.gov/taxforms/1306(7_09)W.pdf page 9. -->
<record id="rule_parameter_us_la_sit_tax_rate" model="hr.rule.parameter">
@@ -44,22 +42,6 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_la_sit_tax_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">{
'single': (
(12500.00, 2.10),
(50000.00, 1.60),
( 'inf', 1.35),
),
'married': (
( 25000.00, 2.10),
(100000.00, 1.65),
( 'inf', 1.35),
),
}</field>
<field name="rule_parameter_id" ref="rule_parameter_us_la_sit_tax_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<record id="rule_parameter_us_la_sit_tax_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">{
'single': (
@@ -76,6 +58,23 @@
<field name="rule_parameter_id" ref="rule_parameter_us_la_sit_tax_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
</record>
<!-- https://revenue.louisiana.gov/IndividualIncomeTax -->
<record id="rule_parameter_us_la_sit_tax_rate_2021" model="hr.rule.parameter.value">
<field name="parameter_value">{
'single': (
(12500.00, 2.00),
(50000.00, 4.00),
( 'inf', 6.00)
),
'married': (
( 25000.00, 2.00),
(100000.00, 4.00),
( 'inf', 6.00)
),
}</field>
<field name="rule_parameter_id" ref="rule_parameter_us_la_sit_tax_rate"/>
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
</record>
</data>
<record id="rule_parameter_us_la_sit_personal_exemption_rate" model="hr.rule.parameter">
@@ -84,11 +83,7 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_la_sit_personal_exemption_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">4500</field>
<field name="rule_parameter_id" ref="rule_parameter_us_la_sit_personal_exemption_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- Unchanged in 2021 http://revenue.louisiana.gov/taxforms/1306(1_12)TF.pdf -->
<record id="rule_parameter_us_la_sit_personal_exemption_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">4500</field>
<field name="rule_parameter_id" ref="rule_parameter_us_la_sit_personal_exemption_rate"/>
@@ -102,11 +97,7 @@
<field name="country_id" ref="base.us"/>
</record>
<data noupdate="1">
<record id="rule_parameter_us_la_sit_dependent_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">1000.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_la_sit_dependent_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- Unchanged in 2021 http://revenue.louisiana.gov/taxforms/1306(1_12)TF.pdf -->
<record id="rule_parameter_us_la_sit_dependent_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">1000.0</field>
<field name="rule_parameter_id" ref="rule_parameter_us_la_sit_dependent_rate"/>

View File

@@ -1,91 +0,0 @@
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from .common import TestUsPayslip, process_payslip
class TestUsLAPayslip(TestUsPayslip):
# TAXES AND RATES
LA_UNEMP_MAX_WAGE = 7700.00
LA_UNEMP = -(1.14 / 100.0)
def test_taxes_single_weekly(self):
salary = 700.00
schedule_pay = 'weekly'
filing_status = 'single'
exemptions = 1
dependents = 2
additional_withholding = 0
# SEE http://revenue.louisiana.gov/TaxForms/1306(1_12)TF.pdf for example calculations
# wh_to test is 19.42
# Our algorithm correctly rounds whereas theirs does it prematurely.
wh_to_check = -19.43
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('LA'),
la_l4_sit_filing_status=filing_status,
state_income_tax_additional_withholding=additional_withholding,
la_l4_sit_exemptions=exemptions,
la_l4_sit_dependents=dependents,
schedule_pay=schedule_pay)
self._log('2019 Louisiana 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.LA_UNEMP)
self.assertPayrollEqual(cats['EE_US_SIT'], wh_to_check)
process_payslip(payslip)
remaining_la_unemp_wages = self.LA_UNEMP_MAX_WAGE - salary if (self.LA_UNEMP_MAX_WAGE - 2*salary < salary) \
else salary
self._log('2019 Louisiana 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_la_unemp_wages * self.LA_UNEMP)
def test_taxes_married_biweekly(self):
salary = 4600.00
schedule_pay = 'bi-weekly'
filing_status = 'married'
exemptions = 2
dependents = 3
additional_withholding = 0
# SEE http://revenue.louisiana.gov/TaxForms/1306(1_12)TF.pdf for example calculations
# wh_to test is 157.12
wh_to_check = -157.12
employee = self._createEmployee()
contract = self._createContract(employee,
wage=salary,
state_id=self.get_us_state('LA'),
la_l4_sit_filing_status=filing_status,
state_income_tax_additional_withholding=additional_withholding,
la_l4_sit_exemptions=exemptions,
la_l4_sit_dependents=dependents,
schedule_pay=schedule_pay)
self._log('2019 Louisiana tax first payslip bi-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.LA_UNEMP)
self.assertPayrollEqual(cats['EE_US_SIT'], wh_to_check)
process_payslip(payslip)
remaining_la_unemp_wages = self.LA_UNEMP_MAX_WAGE - salary if (self.LA_UNEMP_MAX_WAGE - 2*salary < salary) \
else salary
self._log('2019 Louisiana tax second payslip bi-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_la_unemp_wages * self.LA_UNEMP)

View File

@@ -0,0 +1,36 @@
# 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 TestUsLAPayslip(TestUsPayslip):
###
# 2020 Taxes and Rates
###
LA_UNEMP_MAX_WAGE = 7700.0
LA_UNEMP = 1.14
# Calculation based on http://revenue.louisiana.gov/TaxForms/1306(1_12)TF.pdf
def _test_sit(self, wage, filing_status, additional_withholding, exemptions, dependents, schedule_pay, date_start, expected_withholding):
employee = self._createEmployee()
contract = self._createContract(employee,
wage=wage,
state_id=self.get_us_state('LA'),
la_l4_sit_filing_status=filing_status,
state_income_tax_additional_withholding=additional_withholding,
la_l4_sit_exemptions=exemptions,
la_l4_sit_dependents=dependents,
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_2020_taxes_example(self):
self._test_er_suta('LA', self.LA_UNEMP, date(2020, 1, 1), wage_base=self.LA_UNEMP_MAX_WAGE)
self._test_sit(700.0, 'single', 0.0, 1.0, 2.0, 'weekly', date(2020, 1, 1), 19.43)
self._test_sit(4600.0, 'married', 0.0, 2.0, 3.0, 'bi-weekly', date(2020, 1, 1), 157.12)
self._test_sit(6000.0, 'single', 10.0, 2.0, 3.0, 'monthly', date(2020, 1, 1), 219.08)