diff --git a/l10n_us_mi_hr_payroll/__manifest__.py b/l10n_us_mi_hr_payroll/__manifest__.py
index 8a28dfbe..8411421f 100755
--- a/l10n_us_mi_hr_payroll/__manifest__.py
+++ b/l10n_us_mi_hr_payroll/__manifest__.py
@@ -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::Michigan Payroll Rules.
==================================
diff --git a/l10n_us_mi_hr_payroll/data/rules.xml b/l10n_us_mi_hr_payroll/data/rules.xml
index 788808dd..4d302b1a 100755
--- a/l10n_us_mi_hr_payroll/data/rules.xml
+++ b/l10n_us_mi_hr_payroll/data/rules.xml
@@ -12,7 +12,7 @@
code
rate = payslip.dict.get_rate('US_MI_UNEMP')
-year = int(payslip.dict.date_to[:4])
+year = payslip.dict.date_to.year
ytd = payslip.sum('WAGE_US_MI_UNEMP', str(year) + '-01-01', str(year+1) + '-01-01')
ytd += contract.external_wages
remaining = rate.wage_limit_year - ytd
diff --git a/l10n_us_mi_hr_payroll/tests/test_us_mi_payslip.py b/l10n_us_mi_hr_payroll/tests/test_us_mi_payslip.py
index 17448df0..ae308f79 100755
--- a/l10n_us_mi_hr_payroll/tests/test_us_mi_payslip.py
+++ b/l10n_us_mi_hr_payroll/tests/test_us_mi_payslip.py
@@ -21,7 +21,7 @@ class TestUsMIPayslip(TestUsPayslip):
schedule_pay = 'weekly'
exemptions = 1
allowance_amount = self.ANNUAL_EXEMPTION_AMOUNT / self.PAY_PERIOD_DIVISOR[schedule_pay]
- wh = -round((salary - (allowance_amount * exemptions)) * -self.MI_INC_TAX)
+ wh = -((salary - (allowance_amount * exemptions)) * -self.MI_INC_TAX)
employee = self._createEmployee()
contract = self._createContract(employee,
@@ -100,7 +100,7 @@ class TestUsMIPayslip(TestUsPayslip):
allowance_amount = self.ANNUAL_EXEMPTION_AMOUNT / self.PAY_PERIOD_DIVISOR[schedule_pay]
allowances = 2
- wh = -round((salary - (allowance_amount * allowances)) * -self.MI_INC_TAX)
+ wh = -((salary - (allowance_amount * allowances)) * -self.MI_INC_TAX)
employee = self._createEmployee()
contract = self._createContract(employee, salary, struct_id=self.ref(
@@ -139,7 +139,7 @@ class TestUsMIPayslip(TestUsPayslip):
allowance_amount = self.ANNUAL_EXEMPTION_AMOUNT / self.PAY_PERIOD_DIVISOR[schedule_pay]
allowances = 1
- wh = -round((salary - (allowance_amount * allowances)) * -self.MI_INC_TAX)
+ wh = -((salary - (allowance_amount * allowances)) * -self.MI_INC_TAX)
employee = self._createEmployee()
contract = self._createContract(employee, salary, struct_id=self.ref(
@@ -178,7 +178,7 @@ class TestUsMIPayslip(TestUsPayslip):
allowance_amount = self.ANNUAL_EXEMPTION_AMOUNT / self.PAY_PERIOD_DIVISOR[schedule_pay]
allowances = 1
- wh = -round((salary - (allowance_amount * allowances)) * -self.MI_INC_TAX)
+ wh = -((salary - (allowance_amount * allowances)) * -self.MI_INC_TAX)
employee = self._createEmployee()
contract = self._createContract(employee, salary, struct_id=self.ref(
@@ -259,7 +259,7 @@ class TestUsMIPayslip(TestUsPayslip):
additional_wh = 40.0
allowances = 1
- wh = -round(((salary - (allowance_amount * allowances)) * -self.MI_INC_TAX) + additional_wh)
+ wh = -(((salary - (allowance_amount * allowances)) * -self.MI_INC_TAX) + additional_wh)
employee = self._createEmployee()
contract = self._createContract(employee,