MIG l10n_us_nc_hr_payroll to 12.0 and FIX apparent missing year in rules calculation.

This commit is contained in:
Jared Kipe
2019-02-10 15:51:56 -08:00
parent 8746433a61
commit 64316290b6
2 changed files with 3 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
'license': 'AGPL-3',
'category': 'Localization',
'depends': ['l10n_us_hr_payroll'],
'version': '11.0.2019.0.0',
'version': '12.0.2019.0.0',
'description': """
USA::North Carolina Payroll Rules.
==================================

View File

@@ -13,7 +13,7 @@
<field name="amount_select">code</field>
<field name="amount_python_compute">
rate = payslip.dict.get_rate('US_NC_UNEMP')
year = int(payslip.dict.date_to[:4])
year = payslip.dict.date_to.year
ytd = payslip.sum('NC_UNEMP_WAGES_2018', str(year) + '-01-01', str(year+1) + '-01-01')
ytd += contract.external_wages
remaining = rate.wage_limit_year - ytd
@@ -57,6 +57,7 @@ if result_rate == 0.0:
<field name="condition_python">result = True</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">
year = payslip.dict.date_to.year
wages = categories.GROSS
allowances = contract.nc_nc4_allowances
schedule_pay = contract.schedule_pay