[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:
Bhoomi Vaishnani
2020-08-19 18:52:39 -04:00
parent 5d4325d1a0
commit 8937bde8e8
3 changed files with 8 additions and 4 deletions

View File

@@ -44,6 +44,8 @@
<field name="country_id" ref="base.us"/>
</record>
<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">
<field name="parameter_value">{
'weekly': {'allowance': 48.08, 'standard_deduction': 192.31, 'standard_deduction_hh': 288.46},
@@ -54,6 +56,8 @@
<field name="rule_parameter_id" ref="rule_parameter_us_nc_sit_allowance_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</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">
<field name="parameter_value">{
'weekly': {'allowance': 48.08, 'standard_deduction': 206.73, 'standard_deduction_hh': 310.10},

View File

@@ -190,7 +190,6 @@ class HRContractUSPayrollConfig(models.Model):
('', 'Exempt'),
('single', 'Single'),
('married', 'Married'),
('surviving_spouse', 'Surviving Spouse'),
('head_household', 'Head of Household')
], 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.')

View File

@@ -11,7 +11,7 @@ class TestUsNCPayslip(TestUsPayslip):
NC_UNEMP_MAX_WAGE = 25200.0
NC_UNEMP = 1.0
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):
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(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(7000.0, '', 1, 5.0, 'monthly', date(2020, 1, 1), 0.0)