mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[IMP] l10n_us_hr_payroll: Added Comment, removed one filing status which was not used in calculation and improve test case for exempt for NC North Carolina 2020
This commit is contained in:
@@ -44,6 +44,8 @@
|
|||||||
<field name="country_id" ref="base.us"/>
|
<field name="country_id" ref="base.us"/>
|
||||||
</record>
|
</record>
|
||||||
<data noupdate="1">
|
<data noupdate="1">
|
||||||
|
<!-- https://files.nc.gov/ncdor/documents/files/NC-30_book_Web_1-16-19_v4_Final.pdf -->
|
||||||
|
<!-- Allowance Table Page 19. + SD For single or married + SD for Head of household (SD Page. 16-18)-->
|
||||||
<record id="rule_parameter_us_nc_sit_allowance_rate_2019" model="hr.rule.parameter.value">
|
<record id="rule_parameter_us_nc_sit_allowance_rate_2019" model="hr.rule.parameter.value">
|
||||||
<field name="parameter_value">{
|
<field name="parameter_value">{
|
||||||
'weekly': {'allowance': 48.08, 'standard_deduction': 192.31, 'standard_deduction_hh': 288.46},
|
'weekly': {'allowance': 48.08, 'standard_deduction': 192.31, 'standard_deduction_hh': 288.46},
|
||||||
@@ -54,10 +56,12 @@
|
|||||||
<field name="rule_parameter_id" ref="rule_parameter_us_nc_sit_allowance_rate"/>
|
<field name="rule_parameter_id" ref="rule_parameter_us_nc_sit_allowance_rate"/>
|
||||||
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
|
||||||
</record>
|
</record>
|
||||||
|
<!-- https://files.nc.gov/ncdor/documents/files/2020-NC-30_Final.pdf -->
|
||||||
|
<!-- Allowance Table Page 19. + SD For single or married + SD for Head of household (SD Page. 16-18)-->
|
||||||
<record id="rule_parameter_us_nc_sit_allowance_rate_2020" model="hr.rule.parameter.value">
|
<record id="rule_parameter_us_nc_sit_allowance_rate_2020" model="hr.rule.parameter.value">
|
||||||
<field name="parameter_value">{
|
<field name="parameter_value">{
|
||||||
'weekly': {'allowance': 48.08, 'standard_deduction': 206.73, 'standard_deduction_hh': 310.10},
|
'weekly': {'allowance': 48.08, 'standard_deduction': 206.73, 'standard_deduction_hh': 310.10},
|
||||||
'bi-weekly': {'allowance': 96.15, 'standard_deduction': 413.46, 'standard_deduction_hh': 620.19},
|
'bi-weekly': {'allowance': 96.15, 'standard_deduction': 413.46, 'standard_deduction_hh': 620.19},
|
||||||
'semi-monthly': {'allowance': 104.17, 'standard_deduction': 447.92, 'standard_deduction_hh': 671.88},
|
'semi-monthly': {'allowance': 104.17, 'standard_deduction': 447.92, 'standard_deduction_hh': 671.88},
|
||||||
'monthly': {'allowance': 208.33, 'standard_deduction': 895.83, 'standard_deduction_hh': 1343.75},
|
'monthly': {'allowance': 208.33, 'standard_deduction': 895.83, 'standard_deduction_hh': 1343.75},
|
||||||
}</field>
|
}</field>
|
||||||
|
|||||||
@@ -190,7 +190,6 @@ class HRContractUSPayrollConfig(models.Model):
|
|||||||
('', 'Exempt'),
|
('', 'Exempt'),
|
||||||
('single', 'Single'),
|
('single', 'Single'),
|
||||||
('married', 'Married'),
|
('married', 'Married'),
|
||||||
('surviving_spouse', 'Surviving Spouse'),
|
|
||||||
('head_household', 'Head of Household')
|
('head_household', 'Head of Household')
|
||||||
], string='North Carolina NC-4 Filing Status', help='NC-4')
|
], string='North Carolina NC-4 Filing Status', help='NC-4')
|
||||||
nc_nc4_sit_allowances = fields.Integer(string='North Carolina NC-4 Allowances', help='NC-4 1.')
|
nc_nc4_sit_allowances = fields.Integer(string='North Carolina NC-4 Allowances', help='NC-4 1.')
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class TestUsNCPayslip(TestUsPayslip):
|
|||||||
NC_UNEMP_MAX_WAGE = 25200.0
|
NC_UNEMP_MAX_WAGE = 25200.0
|
||||||
NC_UNEMP = 1.0
|
NC_UNEMP = 1.0
|
||||||
NC_INC_TAX = 0.0535
|
NC_INC_TAX = 0.0535
|
||||||
|
# Example based on https://files.nc.gov/ncdor/documents/files/NC-30_book_Web_1-16-19_v4_Final.pdf
|
||||||
def _test_sit(self, wage, filing_status, allowances, additional_withholding, schedule_pay, date_start, expected_withholding):
|
def _test_sit(self, wage, filing_status, allowances, additional_withholding, schedule_pay, date_start, expected_withholding):
|
||||||
|
|
||||||
employee = self._createEmployee()
|
employee = self._createEmployee()
|
||||||
@@ -34,3 +34,4 @@ class TestUsNCPayslip(TestUsPayslip):
|
|||||||
self._test_sit(20000.0, 'single', 1, 100.0, 'weekly', date(2020, 1, 1), 1156.0)
|
self._test_sit(20000.0, 'single', 1, 100.0, 'weekly', date(2020, 1, 1), 1156.0)
|
||||||
self._test_sit(5000.0, 'married', 1, 0.0, 'weekly', date(2020, 1, 1), 254.0)
|
self._test_sit(5000.0, 'married', 1, 0.0, 'weekly', date(2020, 1, 1), 254.0)
|
||||||
self._test_sit(4000.0, 'head_household', 1, 5.0, 'semi-monthly', date(2020, 1, 1), 177.0)
|
self._test_sit(4000.0, 'head_household', 1, 5.0, 'semi-monthly', date(2020, 1, 1), 177.0)
|
||||||
|
self._test_sit(7000.0, '', 1, 5.0, 'monthly', date(2020, 1, 1), 0.0)
|
||||||
|
|||||||
Reference in New Issue
Block a user