[IMP] l10n_us_hr_payroll: Added Tax table and improved Test case for ID Idaho 2020

This commit is contained in:
Bhoomi Vaishnani
2020-08-21 14:36:05 -04:00
parent 4e7eecee52
commit 2f5503c0da
2 changed files with 305 additions and 31 deletions

View File

@@ -47,52 +47,324 @@
<record id="rule_parameter_us_id_sit_tax_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">{
'single': {
'weekly': ((235, 0.00, 0.00), (264, 0.00, 1.125), (294, 0.00, 3.125), (324, 1.00, 3.625), (353, 2.00, 4.625), (383, 4.00, 5.625), (457, 5.00, 6.625), ('inf', 10.00, 6.925)),
'bi-weekly': ((469, 0.00, 0.00), (529, 0.00, 1.125), (588, 1.00, 3.125), (647, 3.00, 3.625), (706, 5.00, 4.625), (766, 7.00, 5.625), (914, 11.00, 6.625), ('inf', 21.00, 6.925)),
'semi-monthly': ((508, 0.00, 0.00), (573, 0.00, 1.125), (637, 1.00, 3.125), (701, 3.00, 3.625), (765, 5.00, 4.625), (829, 8.00, 5.625), (990, 12.00, 6.625), ('inf', 22.00, 6.925)),
'monthly': ((1017, 0.00, 0.00), (1145, 0.00, 1.125), (1273, 1.00, 3.125), (1402, 5.00, 3.625), (1530, 10.00, 4.625), (1659, 16.00, 5.625), (1980, 23.00, 6.625), ('inf', 45.00, 6.925)),
'annually': ((12200, 0.00, 0.00), (13741, 0.00, 1.125), (15281, 17.00, 3.125), (16822, 65.00, 3.625), (18362, 121.00, 4.625), (19903, 192.00, 5.625), (23754, 279.00, 6.625), ('inf', 534.00, 6.925)),
'weekly': (
( 235, 0.00, 0.000),
( 264, 0.00, 1.125),
( 294, 0.00, 3.125),
( 324, 1.00, 3.625),
( 353, 2.00, 4.625),
( 383, 4.00, 5.625),
( 457, 5.00, 6.625),
('inf', 10.00, 6.925),
),
'bi-weekly': (
( 469, 0.00, 0.000),
( 529, 0.00, 1.125),
( 588, 1.00, 3.125),
( 647, 3.00, 3.625),
( 706, 5.00, 4.625),
( 766, 7.00, 5.625),
( 914, 11.00, 6.625),
('inf', 21.00, 6.925),
),
'semi-monthly': (
( 508, 0.00, 0.000),
( 573, 0.00, 1.125),
( 637, 1.00, 3.125),
( 701, 3.00, 3.625),
( 765, 5.00, 4.625),
( 829, 8.00, 5.625),
( 990, 12.00, 6.625),
('inf', 22.00, 6.925),
),
'monthly': (
( 1017, 0.00, 0.000),
( 1145, 0.00, 1.125),
( 1273, 1.00, 3.125),
( 1402, 5.00, 3.625),
( 1530, 10.00, 4.625),
( 1659, 16.00, 5.625),
( 1980, 23.00, 6.625),
('inf', 45.00, 6.925),
),
'annually': (
(12200, 0.00, 0.000),
(13741, 0.00, 1.125),
(15281, 17.00, 3.125),
(16822, 65.00, 3.625),
(18362, 121.00, 4.625),
(19903, 192.00, 5.625),
(23754, 279.00, 6.625),
('inf', 534.00, 6.925),
),
},
'married': {
'weekly': ((469, 0.00, 0.00), (529, 0.00, 1.125), (588, 0.00, 3.125), (647, 1.00, 3.625), (706, 2.00, 4.625), (766, 4.00, 5.625), (914, 5.00, 6.625), ('inf', 10.00, 6.925)),
'bi-weekly': ((938, 0.00, 0.00), (1057, 0.00, 1.125), (1175, 1.00, 3.125), (1294, 5.00, 3.625), (1412, 9.00, 4.625), (1531, 15.00, 5.625), (1827, 21.00, 6.625), ('inf', 41.00, 6.925)),
'semi-monthly': ((1017, 0.00, 0.00), (1145, 0.00, 1.125), (1273, 1.00, 3.125), (1402, 5.00, 3.625), (1530, 10.00, 4.625), (1659, 16.00, 5.625), (1980, 23.00, 6.625), ('inf', 45.00, 6.925)),
'monthly': ((2033, 0.00, 0.00), (2290, 0.00, 1.125), (2547, 3.00, 3.125), (2804, 11.00, 3.625), (3060, 20.00, 4.625), (3317, 32.00, 5.625), (3959, 47.00, 6.625), ('inf', 89.00, 6.925)),
'annually': ((24400, 0.00, 0.00), (27482, 0.00, 1.125), (30562, 35.00, 3.125), (33644, 131.00, 3.625), (36724, 243.00, 4.625), (39806, 385.00, 5.625), (47508, 558.00, 6.625), ('inf', 1068.00, 6.925)),
'weekly': (
( 469, 0.00, 0.000),
( 529, 0.00, 1.125),
( 588, 0.00, 3.125),
( 647, 1.00, 3.625),
( 706, 2.00, 4.625),
( 766, 4.00, 5.625),
( 914, 5.00, 6.625),
('inf', 10.00, 6.925),
),
'bi-weekly': (
( 938, 0.00, 0.000),
( 1057, 0.00, 1.125),
( 1175, 1.00, 3.125),
( 1294, 5.00, 3.625),
( 1412, 9.00, 4.625),
( 1531, 15.00, 5.625),
( 1827, 21.00, 6.625),
('inf', 41.00, 6.925),
),
'semi-monthly': (
( 1017, 0.00, 0.000),
( 1145, 0.00, 1.125),
( 1273, 1.00, 3.125),
( 1402, 5.00, 3.625),
( 1530, 10.00, 4.625),
( 1659, 16.00, 5.625),
( 1980, 23.00, 6.625),
('inf', 45.00, 6.925),
),
'monthly': (
( 2033, 0.00, 0.000),
( 2290, 0.00, 1.125),
( 2547, 3.00, 3.125),
( 2804, 11.00, 3.625),
( 3060, 20.00, 4.625),
( 3317, 32.00, 5.625),
( 3959, 47.00, 6.625),
('inf', 89.00, 6.925),
),
'annually': (
(24400, 0.00, 0.000),
(27482, 0.00, 1.125),
(30562, 35.00, 3.125),
(33644, 131.00, 3.625),
(36724, 243.00, 4.625),
(39806, 385.00, 5.625),
(47508, 558.00, 6.625),
('inf', 1068.00, 6.925),
),
},
'head of household': {
'weekly': ((235, 0.00, 0.00), (264, 0.00, 1.125), (294, 0.00, 3.125), (324, 1.00, 3.625), (353, 2.00, 4.625), (383, 4.00, 5.625), (457, 5.00, 6.625), ('inf', 10.00, 6.925)),
'bi-weekly': ((469, 0.00, 0.00), (529, 0.00, 1.125), (588, 1.00, 3.125), (647, 3.00, 3.625), (706, 5.00, 4.625), (766, 7.00, 5.625), (914, 11.00, 6.625), ('inf', 21.00, 6.925)),
'semi-monthly': ((508, 0.00, 0.00), (573, 0.00, 1.125), (637, 1.00, 3.125), (701, 3.00, 3.625), (765, 5.00, 4.625), (829, 8.00, 5.625), (990, 12.00, 6.625), ('inf', 22.00, 6.925)),
'monthly': ((1017, 0.00, 0.00), (1145, 0.00, 1.125), (1273, 1.00, 3.125), (1402, 5.00, 3.625), (1530, 10.00, 4.625), (1659, 16.00, 5.625), (1980, 23.00, 6.625), ('inf', 45.00, 6.925)),
'annually': ((12200, 0.00, 0.00), (13741, 0.00, 1.125), (15281, 17.00, 3.125), (16822, 65.00, 3.625), (18362, 121.00, 4.625), (19903, 192.00, 5.625), (23754, 279.00, 6.625), ('inf', 534.00, 6.925)),
'weekly': (
( 235, 0.00, 0.000),
( 264, 0.00, 1.125),
( 294, 0.00, 3.125),
( 324, 1.00, 3.625),
( 353, 2.00, 4.625),
( 383, 4.00, 5.625),
( 457, 5.00, 6.625),
('inf', 10.00, 6.925),
),
'bi-weekly': (
( 469, 0.00, 0.000),
( 529, 0.00, 1.125),
( 588, 1.00, 3.125),
( 647, 3.00, 3.625),
( 706, 5.00, 4.625),
( 766, 7.00, 5.625),
( 914, 11.00, 6.625),
('inf', 21.00, 6.925),
),
'semi-monthly': (
( 508, 0.00, 0.000),
( 573, 0.00, 1.125),
( 637, 1.00, 3.125),
( 701, 3.00, 3.625),
( 765, 5.00, 4.625),
( 829, 8.00, 5.625),
( 990, 12.00, 6.625),
('inf', 22.00, 6.925),
),
'monthly': (
( 1017, 0.00, 0.000),
( 1145, 0.00, 1.125),
( 1273, 1.00, 3.125),
( 1402, 5.00, 3.625),
( 1530, 10.00, 4.625),
( 1659, 16.00, 5.625),
( 1980, 23.00, 6.625),
('inf', 45.00, 6.925),
),
'annually': (
(12200, 0.00, 0.000),
(13741, 0.00, 1.125),
(15281, 17.00, 3.125),
(16822, 65.00, 3.625),
(18362, 121.00, 4.625),
(19903, 192.00, 5.625),
(23754, 279.00, 6.625),
('inf', 534.00, 6.925),
),
},
}</field>
<field name="rule_parameter_id" ref="rule_parameter_us_id_sit_tax_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- https://tax.idaho.gov/pubs/EPB00744_06-16-2020.pdf -->
<!-- Page 1 to 3 -->
<record id="rule_parameter_us_id_sit_tax_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">{
'single': {
'weekly': ((235, 0.00, 0.00), (264, 0.00, 1.125), (294, 0.00, 3.125), (324, 1.00, 3.625), (353, 2.00, 4.625), (383, 4.00, 5.625), (457, 5.00, 6.625), ('inf', 10.00, 6.925)),
'bi-weekly': ((469, 0.00, 0.00), (529, 0.00, 1.125), (588, 1.00, 3.125), (647, 3.00, 3.625), (706, 5.00, 4.625), (766, 7.00, 5.625), (914, 11.00, 6.625), ('inf', 21.00, 6.925)),
'semi-monthly': ((508, 0.00, 0.00), (573, 0.00, 1.125), (637, 1.00, 3.125), (701, 3.00, 3.625), (765, 5.00, 4.625), (829, 8.00, 5.625), (990, 12.00, 6.625), ('inf', 22.00, 6.925)),
'monthly': ((1017, 0.00, 0.00), (1145, 0.00, 1.125), (1273, 1.00, 3.125), (1402, 5.00, 3.625), (1530, 10.00, 4.625), (1659, 16.00, 5.625), (1980, 23.00, 6.625), ('inf', 45.00, 6.925)),
'annually': ((12200, 0.00, 0.00), (13741, 0.00, 1.125), (15281, 17.00, 3.125), (16822, 65.00, 3.625), (18362, 121.00, 4.625), (19903, 192.00, 5.625), (23754, 279.00, 6.625), ('inf', 534.00, 6.925)),
'weekly': (
( 238, 0.00, 0.000),
( 269, 0.00, 1.125),
( 299, 0.00, 3.125),
( 329, 1.00, 3.625),
( 359, 2.00, 4.625),
( 389, 4.00, 5.625),
( 465, 5.00, 6.625),
('inf', 10.00, 6.925),
),
'bi-weekly': (
( 477, 0.00, 0.000),
( 537, 0.00, 1.125),
( 598, 1.00, 3.125),
( 658, 3.00, 3.625),
( 718, 5.00, 4.625),
( 778, 8.00, 5.625),
( 929, 11.00, 6.625),
('inf', 21.00, 6.925),
),
'semi-monthly': (
( 517, 0.00, 0.000),
( 582, 0.00, 1.125),
( 647, 1.00, 3.125),
( 713, 3.00, 3.625),
( 778, 5.00, 4.625),
( 843, 8.00, 5.625),
( 1007, 12.00, 6.625),
('inf', 23.00, 6.925),
),
'monthly': (
( 1033, 0.00, 0.000),
( 1164, 0.00, 1.125),
( 1295, 1.00, 3.125),
( 1425, 6.00, 3.625),
( 1556, 10.00, 4.625),
( 1687, 16.00, 5.625),
( 2013, 24.00, 6.625),
('inf', 45.00, 6.925),
),
'annually': (
(12400, 0.00, 0.000),
(13968, 0.00, 1.125),
(15536, 18.00, 3.125),
(17104, 67.00, 3.625),
(18672, 124.00, 4.625),
(20240, 197.00, 5.625),
(24160, 285.00, 6.625),
('inf', 545.00, 6.925),
),
},
'married': {
'weekly': ((469, 0.00, 0.00), (529, 0.00, 1.125), (588, 0.00, 3.125), (647, 1.00, 3.625), (706, 2.00, 4.625), (766, 4.00, 5.625), (914, 5.00, 6.625), ('inf', 10.00, 6.925)),
'bi-weekly': ((938, 0.00, 0.00), (1057, 0.00, 1.125), (1175, 1.00, 3.125), (1294, 5.00, 3.625), (1412, 9.00, 4.625), (1531, 15.00, 5.625), (1827, 21.00, 6.625), ('inf', 41.00, 6.925)),
'semi-monthly': ((1017, 0.00, 0.00), (1145, 0.00, 1.125), (1273, 1.00, 3.125), (1402, 5.00, 3.625), (1530, 10.00, 4.625), (1659, 16.00, 5.625), (1980, 23.00, 6.625), ('inf', 45.00, 6.925)),
'monthly': ((2033, 0.00, 0.00), (2290, 0.00, 1.125), (2547, 3.00, 3.125), (2804, 11.00, 3.625), (3060, 20.00, 4.625), (3317, 32.00, 5.625), (3959, 47.00, 6.625), ('inf', 89.00, 6.925)),
'annually': ((24400, 0.00, 0.00), (27482, 0.00, 1.125), (30562, 35.00, 3.125), (33644, 131.00, 3.625), (36724, 243.00, 4.625), (39806, 385.00, 5.625), (47508, 558.00, 6.625), ('inf', 1068.00, 6.925)),
'weekly': (
( 477, 0.00, 0.000),
( 537, 0.00, 1.125),
( 598, 0.00, 3.125),
( 658, 1.00, 3.625),
( 718, 3.00, 4.625),
( 778, 5.00, 5.625),
( 929, 11.00, 6.625),
('inf', 21.00, 6.925),
),
'bi-weekly': (
( 954, 0.00, 0.000),
( 1074, 0.00, 1.125),
( 1195, 1.00, 3.125),
( 1316, 5.00, 3.625),
( 1436, 9.00, 4.625),
( 1557, 15.00, 5.625),
( 1858, 22.00, 6.625),
('inf', 42.00, 6.925),
),
'semi-monthly': (
( 1033, 0.00, 0.000),
( 1164, 0.00, 1.125),
( 1295, 1.00, 3.125),
( 1425, 6.00, 3.625),
( 1556, 10.00, 4.625),
( 1687, 16.00, 5.625),
( 2013, 24.00, 6.625),
('inf', 45.00, 6.925),
),
'monthly': (
( 2067, 0.00, 0.000),
( 2328, 0.00, 1.125),
( 2589, 3.00, 3.125),
( 2851, 11.00, 3.625),
( 3112, 21.00, 4.625),
( 3373, 33.00, 5.625),
( 4027, 47.00, 6.625),
('inf', 91.00, 6.925),
),
'annually': (
(24400, 0.00, 0.000),
(27482, 0.00, 1.125),
(30562, 35.00, 3.125),
(33644, 131.00, 3.625),
(36724, 243.00, 4.625),
(39806, 385.00, 5.625),
(47508, 558.00, 6.625),
('inf', 1068.00, 6.925),
),
},
'head of household': {
'weekly': ((235, 0.00, 0.00), (264, 0.00, 1.125), (294, 0.00, 3.125), (324, 1.00, 3.625), (353, 2.00, 4.625), (383, 4.00, 5.625), (457, 5.00, 6.625), ('inf', 10.00, 6.925)),
'bi-weekly': ((469, 0.00, 0.00), (529, 0.00, 1.125), (588, 1.00, 3.125), (647, 3.00, 3.625), (706, 5.00, 4.625), (766, 7.00, 5.625), (914, 11.00, 6.625), ('inf', 21.00, 6.925)),
'semi-monthly': ((508, 0.00, 0.00), (573, 0.00, 1.125), (637, 1.00, 3.125), (701, 3.00, 3.625), (765, 5.00, 4.625), (829, 8.00, 5.625), (990, 12.00, 6.625), ('inf', 22.00, 6.925)),
'monthly': ((1017, 0.00, 0.00), (1145, 0.00, 1.125), (1273, 1.00, 3.125), (1402, 5.00, 3.625), (1530, 10.00, 4.625), (1659, 16.00, 5.625), (1980, 23.00, 6.625), ('inf', 45.00, 6.925)),
'annually': ((12200, 0.00, 0.00), (13741, 0.00, 1.125), (15281, 17.00, 3.125), (16822, 65.00, 3.625), (18362, 121.00, 4.625), (19903, 192.00, 5.625), (23754, 279.00, 6.625), ('inf', 534.00, 6.925)),
'weekly': (
( 238, 0.00, 0.000),
( 269, 0.00, 1.125),
( 299, 0.00, 3.125),
( 329, 1.00, 3.625),
( 359, 2.00, 4.625),
( 389, 4.00, 5.625),
( 465, 5.00, 6.625),
('inf', 10.00, 6.925),
),
'bi-weekly': (
( 477, 0.00, 0.000),
( 537, 0.00, 1.125),
( 598, 1.00, 3.125),
( 658, 3.00, 3.625),
( 718, 5.00, 4.625),
( 778, 8.00, 5.625),
( 929, 11.00, 6.625),
('inf', 21.00, 6.925),
),
'semi-monthly': (
( 517, 0.00, 0.000),
( 582, 0.00, 1.125),
( 647, 1.00, 3.125),
( 713, 3.00, 3.625),
( 778, 5.00, 4.625),
( 843, 8.00, 5.625),
( 1007, 12.00, 6.625),
('inf', 23.00, 6.925),
),
'monthly': (
( 1033, 0.00, 0.000),
( 1164, 0.00, 1.125),
( 1295, 1.00, 3.125),
( 1425, 6.00, 3.625),
( 1556, 10.00, 4.625),
( 1687, 16.00, 5.625),
( 2013, 24.00, 6.625),
('inf', 45.00, 6.925),
),
'annually': (
(12400, 0.00, 0.000),
(13968, 0.00, 1.125),
(15536, 18.00, 3.125),
(17104, 67.00, 3.625),
(18672, 124.00, 4.625),
(20240, 197.00, 5.625),
(24160, 285.00, 6.625),
('inf', 545.00, 6.925),
),
},
}</field>
<field name="rule_parameter_id" ref="rule_parameter_us_id_sit_tax_rate"/>
@@ -117,6 +389,8 @@
<field name="rule_parameter_id" ref="rule_parameter_us_id_sit_ictcat_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- https://tax.idaho.gov/i-1026.cfm?seg=compute -->
<!-- Idaho Child Tax Credit Allowances Table -->
<record id="rule_parameter_us_id_sit_ictcat_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">{
'weekly': 56.92,

View File

@@ -30,6 +30,6 @@ class TestUsIDPayslip(TestUsPayslip):
self._test_er_suta('ID', self.ID_UNEMP, date(2020, 1, 1), wage_base=self.ID_UNEMP_MAX_WAGE)
self._test_sit(1212.0, 'single', 4.0, 'bi-weekly', date(2020, 1, 1), 10.0)
self._test_sit(10000.0, 'married', 1.0, 'annually', date(2020, 1, 1), 0.0)
self._test_sit(52000.0, 'married', 4.0, 'monthly', date(2020, 1, 1), 3348.02)
self._test_sit(52000.0, 'married', 4.0, 'monthly', date(2020, 1, 1), 3345.0)
self._test_sit(5000.0, 'head of household', 0.0, 'semi-monthly', date(2020, 1, 1), 300.0)
self._test_sit(5900.0, 'single', 5.0, 'weekly', date(2020, 1, 1), 367.0)