diff --git a/l10n_us_nc_hr_payroll/data/rules.xml b/l10n_us_nc_hr_payroll/data/rules.xml index 8d06ea80..6d404cd0 100755 --- a/l10n_us_nc_hr_payroll/data/rules.xml +++ b/l10n_us_nc_hr_payroll/data/rules.xml @@ -14,7 +14,7 @@ rate = payslip.dict.get_rate('US_NC_UNEMP') year = payslip.dict.date_to.year -ytd = payslip.sum('NC_UNEMP_WAGES_2018', str(year) + '-01-01', str(year+1) + '-01-01') +ytd = payslip.sum('WAGE_US_NC_UNEMP', str(year) + '-01-01', str(year+1) + '-01-01') ytd += contract.external_wages remaining = rate.wage_limit_year - ytd if remaining <= 0.0: diff --git a/l10n_us_nc_hr_payroll/tests/test_us_nc_payslip_2018.py b/l10n_us_nc_hr_payroll/tests/test_us_nc_payslip_2018.py index eb5079fe..b5ae614b 100755 --- a/l10n_us_nc_hr_payroll/tests/test_us_nc_payslip_2018.py +++ b/l10n_us_nc_hr_payroll/tests/test_us_nc_payslip_2018.py @@ -248,13 +248,13 @@ class TestUsNCPayslip(TestUsPayslip): salary = 4000.0 wh = 0 schedule_pay = 'weekly' - excemptions = 1 + exemptions = 1 employee = self._createEmployee() contract = self._createContract(employee, salary, struct_id=self.ref( 'l10n_us_nc_hr_payroll.hr_payroll_salary_structure_us_nc_employee'), schedule_pay=schedule_pay) - contract.nc_nc4_allowances = excemptions + contract.nc_nc4_allowances = exemptions contract.nc_nc4_filing_status = 'exempt' self.assertEqual(contract.schedule_pay, 'weekly') diff --git a/l10n_us_nc_hr_payroll/tests/test_us_nc_payslip_2019.py b/l10n_us_nc_hr_payroll/tests/test_us_nc_payslip_2019.py index 2b30e8c1..79599fb1 100755 --- a/l10n_us_nc_hr_payroll/tests/test_us_nc_payslip_2019.py +++ b/l10n_us_nc_hr_payroll/tests/test_us_nc_payslip_2019.py @@ -10,9 +10,8 @@ class TestUsNCPayslip(TestUsPayslip): NC_UNEMP = -1.0 / 100.0 NC_INC_TAX = -0.0535 - def test_2019_taxes_weekly(self): - salary = 5000.0 + salary = 20000.0 schedule_pay = 'weekly' # allowance_multiplier and Portion of Standard Deduction for weekly allowance_multiplier = 48.08 @@ -20,11 +19,9 @@ class TestUsNCPayslip(TestUsPayslip): exemption = 1 # Algorithm derived from percentage method in https://files.nc.gov/ncdor/documents/files/nc-30_book_web.pdf - wh = -round((salary - (PST + (allowance_multiplier * exemption))) * -self.NC_INC_TAX) employee = self._createEmployee() - contract = self._createContract(employee, salary, struct_id=self.ref('l10n_us_nc_hr_payroll.hr_payroll_salary_structure_us_nc_employee'), schedule_pay=schedule_pay) contract.nc_nc4_allowances = exemption @@ -47,7 +44,6 @@ class TestUsNCPayslip(TestUsPayslip): remaining_NC_UNEMP_wages = self.NC_UNEMP_MAX_WAGE - salary if (self.NC_UNEMP_MAX_WAGE - 2*salary < salary) \ else salary - self._log('2019 North Carolina tax second payslip weekly:') payslip = self._createPayslip(employee, '2019-02-01', '2019-02-28') @@ -249,13 +245,13 @@ class TestUsNCPayslip(TestUsPayslip): salary = 4000.0 wh = 0 schedule_pay = 'weekly' - excemptions = 1 + exemptions = 1 employee = self._createEmployee() contract = self._createContract(employee, salary, struct_id=self.ref( 'l10n_us_nc_hr_payroll.hr_payroll_salary_structure_us_nc_employee'), schedule_pay=schedule_pay) - contract.nc_nc4_allowances = excemptions + contract.nc_nc4_allowances = exemptions contract.nc_nc4_filing_status = 'exempt' self.assertEqual(contract.schedule_pay, 'weekly')