mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
fl florida
This commit is contained in:
@@ -26,16 +26,16 @@
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<data noupdate="1">
|
||||
<record id="rule_parameter_us_fl_suta_rate_2019" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2.7</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_fl_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_fl_suta_rate_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2.7</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_fl_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
<record id="rule_parameter_us_fl_suta_rate_2021" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">2.9</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_fl_suta_rate"/>
|
||||
<field name="date_from" eval="datetime(2021, 1, 1).date()"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from .common import TestUsPayslip, process_payslip
|
||||
from odoo.addons.l10n_us_hr_payroll.models.hr_contract import USHRContract
|
||||
|
||||
|
||||
class TestUsFlPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2019 Taxes and Rates
|
||||
###
|
||||
FL_UNEMP_MAX_WAGE = 7000.0
|
||||
FL_UNEMP = -2.7 / 100.0
|
||||
|
||||
def test_2019_taxes(self):
|
||||
salary = 5000.0
|
||||
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
state_id=self.get_us_state('FL'))
|
||||
|
||||
self._log('2019 Florida tax 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.FL_UNEMP)
|
||||
|
||||
process_payslip(payslip)
|
||||
|
||||
# Make a new payslip, this one will have maximums
|
||||
|
||||
remaining_fl_unemp_wages = self.FL_UNEMP_MAX_WAGE - salary if (self.FL_UNEMP_MAX_WAGE - 2*salary < salary) \
|
||||
else salary
|
||||
|
||||
self._log('2019 Florida tax second payslip:')
|
||||
payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28')
|
||||
|
||||
payslip.compute_sheet()
|
||||
|
||||
cats = self._getCategories(payslip)
|
||||
|
||||
self.assertPayrollEqual(cats['ER_US_SUTA'], remaining_fl_unemp_wages * self.FL_UNEMP)
|
||||
|
||||
def test_2019_taxes_with_external(self):
|
||||
salary = 5000.0
|
||||
external_wages = 6000.0
|
||||
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
external_wages=external_wages,
|
||||
state_id=self.get_us_state('FL'))
|
||||
|
||||
self._log('2019 Forida_external tax 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'], (self.FL_UNEMP_MAX_WAGE - external_wages) * self.FL_UNEMP)
|
||||
|
||||
def test_2019_taxes_with_state_exempt(self):
|
||||
salary = 5000.0
|
||||
external_wages = 6000.0
|
||||
|
||||
employee = self._createEmployee()
|
||||
contract = self._createContract(employee,
|
||||
wage=salary,
|
||||
external_wages=external_wages,
|
||||
futa_type=USHRContract.FUTA_TYPE_BASIC,
|
||||
state_id=self.get_us_state('FL'))
|
||||
|
||||
self._log('2019 Forida_external tax first payslip:')
|
||||
payslip = self._createPayslip(employee, '2019-01-01', '2019-01-31')
|
||||
|
||||
payslip.compute_sheet()
|
||||
|
||||
cats = self._getCategories(payslip)
|
||||
|
||||
self.assertPayrollEqual(cats.get('ER_US_SUTA', 0.0), 0.0)
|
||||
16
l10n_us_hr_payroll/tests/test_us_fl_florida_payslip_2021.py
Executable file
16
l10n_us_hr_payroll/tests/test_us_fl_florida_payslip_2021.py
Executable file
@@ -0,0 +1,16 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from datetime import date
|
||||
from .common import TestUsPayslip
|
||||
|
||||
|
||||
class TestUsFlPayslip(TestUsPayslip):
|
||||
###
|
||||
# 2021 Taxes and Rates
|
||||
###
|
||||
FL_UNEMP_MAX_WAGE = 7000.0
|
||||
FL_UNEMP = 2.9
|
||||
|
||||
def test_2021_taxes(self):
|
||||
# Only has state unemployment
|
||||
self._test_er_suta('FL', self.FL_UNEMP, date(2021, 1, 1), wage_base=self.FL_UNEMP_MAX_WAGE)
|
||||
Reference in New Issue
Block a user