[IMP] l10n_us_hr_payroll: Reformat tax table, improved comments and test case for CA California 2020

This commit is contained in:
Bhoomi Vaishnani
2020-08-20 16:30:43 -04:00
parent 5ccd8a5e9b
commit 3e1225a72a
2 changed files with 515 additions and 42 deletions

View File

@@ -85,64 +85,528 @@
<record id="rule_parameter_us_ca_sit_tax_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">{
'head_household': {
'weekly': ((316, 0.011, 0.0), (750, 0.022, 3.48), (967, 0.044, 13.03), (1196, 0.066, 22.58), (1413, 0.088, 37.69), (7212, 0.1023, 56.79), (8654, 0.1133, 650.03), (14423, 0.1243, 813.41), (19231, 0.1353, 1530.50), ('inf', 0.1463, 2181.02)),
'bi-weekly': ((632, 0.011, 0.0), (1500, 0.022, 6.95), (1934, 0.044, 26.05), (2392, 0.066, 45.15), (2826, 0.088, 75.38), (14424, 0.1023, 113.57), (17308, 0.1133, 1300.05), (28846, 0.1243, 1626.81), (38462, 0.1353, 3060.98), ('inf', 0.1463, 4362.02)),
'semi-monthly': ((686, 0.011, 0.0), (1625, 0.022, 7.55), (2094, 0.044, 28.21), (2592, 0.066, 48.85), (3062, 0.088, 81.72), (15625, 0.1023, 123.08), (18750, 0.1133, 1408.27), (31250, 0.1243, 1762.33), (41667, 0.1353, 3316.08), ('inf', 0.1463, 4725.50)),
'monthly': ((1372, 0.011, 0.0), (3250, 0.022, 15.09), (4188, 0.044, 56.41), (5184, 0.066, 97.68), (6124, 0.088, 163.42), (31250, 0.1023, 246.148), (37500, 0.1133, 2816.53), (62500, 0.1243, 3524.66), (83334, 0.1353, 6632.16), ('inf', 0.1463, 9451.00)),
'quarterly': ((4114, 0.011, 0.0), (9748, 0.022, 45.25), (12566, 0.044, 169.20), (15552, 0.066, 293.19), (18369, 0.088, 490.27), (93751, 0.1023, 738.17), (112501, 0.1133, 8449.75), (187501, 0.1243, 10574.13), (250000, 0.1353, 19896.63), ('inf', 0.1463, 28352.74)),
'semi-annual': ((8228, 0.011, 0.0), (19496, 0.022, 90.51), (25132, 0.044, 338.41), (31104, 0.066, 586.39), (36738, 0.088, 980.54), (187502, 0.1023, 1476.33), (225002, 0.1133, 16899.49), (375002, 0.1243, 21148.24), (500000, 0.1353, 39793.24), ('inf', 0.1463, 56705.47)),
'annually': ((16457, 0.011, 0.0), (38991, 0.022, 181.03), (50264, 0.044, 676.78), (62206, 0.066, 1172.79), (73477, 0.088, 1960.96), (375002, 0.1023, 2952.81), (450003, 0.1133, 33798.82), (750003, 0.1243, 42296.43), (1000000, 0.1353, 79586.43), ('inf', 0.1463, 113411.02)),
'weekly': (
( 316, 0.0110, 0.00),
( 750, 0.0220, 3.48),
( 967, 0.0440, 13.03),
( 1196, 0.0660, 22.58),
( 1413, 0.0880, 37.69),
( 7212, 0.1023, 56.79),
( 8654, 0.1133, 650.03),
(14423, 0.1243, 813.41),
(19231, 0.1353, 1530.50),
('inf', 0.1463, 2181.02),
),
'bi-weekly': (
( 632, 0.0110, 0.00),
( 1500, 0.0220, 6.95),
( 1934, 0.0440, 26.05),
( 2392, 0.0660, 45.15),
( 2826, 0.0880, 75.38),
(14424, 0.1023, 113.57),
(17308, 0.1133, 1300.05),
(28846, 0.1243, 1626.81),
(38462, 0.1353, 3060.98),
('inf', 0.1463, 4362.02),
),
'semi-monthly': (
( 686, 0.0110, 0.00),
( 1625, 0.0220, 7.55),
( 2094, 0.0440, 28.21),
( 2592, 0.0660, 48.85),
( 3062, 0.0880, 81.72),
(15625, 0.1023, 123.08),
(18750, 0.1133, 1408.27),
(31250, 0.1243, 1762.33),
(41667, 0.1353, 3316.08),
('inf', 0.1463, 4725.50),
),
'monthly': (
( 1372, 0.0110, 0.00),
( 3250, 0.0220, 15.09),
( 4188, 0.0440, 56.41),
( 5184, 0.0660, 97.68),
( 6124, 0.0880, 163.42),
(31250, 0.1023, 246.14),
(37500, 0.1133, 2816.53),
(62500, 0.1243, 3524.66),
(83334, 0.1353, 6632.16),
('inf', 0.1463, 9451.00),
),
'quarterly': (
( 4114, 0.0110, 0.00),
( 9748, 0.0220, 45.25),
( 12566, 0.0440, 169.20),
( 15552, 0.0660, 293.19),
( 18369, 0.0880, 490.27),
( 93751, 0.1023, 738.17),
(112501, 0.1133, 8449.75),
(187501, 0.1243, 10574.13),
(250000, 0.1353, 19896.63),
( 'inf', 0.1463, 28352.74),
),
'semi-annual': (
( 8228, 0.0110, 0.00),
( 19496, 0.0220, 90.51),
( 25132, 0.0440, 338.41),
( 31104, 0.0660, 586.39),
( 36738, 0.0880, 980.54),
(187502, 0.1023, 1476.33),
(225002, 0.1133, 16899.49),
(375002, 0.1243, 21148.24),
(500000, 0.1353, 39793.24),
( 'inf', 0.1463, 56705.47),
),
'annually': (
( 16457, 0.0110, 0.00),
( 38991, 0.0220, 181.03),
( 50264, 0.0440, 676.78),
( 62206, 0.0660, 1172.79),
( 73477, 0.0880, 1960.96),
( 375002, 0.1023, 2952.81),
( 450003, 0.1133, 33798.82),
( 750003, 0.1243, 42296.43),
(1000000, 0.1353, 79586.43),
( 'inf', 0.1463, 113411.02),
),
},
'married': {
'weekly': ((316, 0.011, 0.0),(750, 0.022, 3.48),(1184, 0.044, 13.03),(1642, 0.066, 32.13), (2076, 0.088, 62.36),(10606, 0.1023, 100.55),(12726, 0.1133, 973.17),(19231, 0.1243, 1213.37),(21210, 0.1353, 2021.94),('inf', 0.1463, 2289.70)),
'bi-weekly': ((632, 0.011, 0.0), (1500, 0.022, 6.95), (2368, 0.044, 26.05), (3284, 0.066, 64.24), (4152, 0.088, 124.70), (21212, 0.1023, 201.08), (25452, 0.1133, 1946.32), (38462, 0.1243, 2426.71), (42420, 0.1353, 4043.85), ('inf', 0.1463, 4579.37)),
'semi-monthly': ((686, 0.011, 0.0), (1624, 0.022, 7.55), (2564, 0.044, 28.19), (3560, 0.066, 69.55), (4498, 0.088, 135.29), (22978, 0.1023, 217.83), (27574, 0.1133, 2108.33), (41667, 0.1243, 2629.06), (45956, 0.1353, 4380.82), ('inf', 0.1463, 4961.12)),
'monthly': ((1372, 0.011, 0.0), (3248, 0.022, 15.09), (5128, 0.044, 56.36), (7120, 0.066, 139.08), (8996, 0.088, 270.55), (45956, 0.1023, 435.64), (55148, 0.1133, 4216.65), (83334, 0.1243, 5258.10), (91912, 0.1353, 8761.62), ('inf', 0.1463, 9922.22)),
'quarterly': ((4112, 0.011, 0.0), (9748, 0.022, 45.23), (15384, 0.044, 169.22), (21356, 0.066, 417.20), (26990, 0.088, 811.35), (137870, 0.1023, 1307.14), (165442, 0.1133, 12650.16), (250000, 0.1243, 15774.07), (275736, 0.1353, 26284.63), ('inf', 0.1463, 29766.71)),
'semi-annual': ((8224, 0.011, 0.0), (19496, 0.022, 90.46), (30768, 0.044, 338.44), (42712, 0.066, 834.41), (53980, 0.088, 1622.71), (275740, 0.1023, 2614.29), (330884, 0.1133, 25300.34), (500000, 0.1243, 31548.16), (551472, 0.1353, 52569.28), ('inf', 0.1463, 59533.44)),
'annually': ((16446, 0.011, 0.0), (38990, 0.022, 180.91), (61538, 0.044, 676.88), (85422, 0.066, 1668.99), (107960, 0.088, 3245.33), (551476, 0.1023, 5228.67), (661768, 0.1133, 50600.36), (1000000, 0.1243, 63096.44), (1102946, 0.1353, 105138.68), ('inf', 0.1463, 119067.26)),
'weekly': (
( 316, 0.0110, 0.00),
( 750, 0.0220, 3.48),
( 1184, 0.0440, 13.03),
( 1642, 0.0660, 32.13),
( 2076, 0.0880, 62.36),
(10606, 0.1023, 100.55),
(12726, 0.1133, 973.17),
(19231, 0.1243, 1213.37),
(21210, 0.1353, 2021.94),
('inf', 0.1463, 2289.70),
),
'bi-weekly': (
( 632, 0.0110, 0.00),
( 1500, 0.0220, 6.95),
( 2368, 0.0440, 26.05),
( 3284, 0.0660, 64.24),
( 4152, 0.0880, 124.70),
(21212, 0.1023, 201.08),
(25452, 0.1133, 1946.32),
(38462, 0.1243, 2426.71),
(42420, 0.1353, 4043.85),
('inf', 0.1463, 4579.37),
),
'semi-monthly': (
( 686, 0.0110, 0.00),
( 1624, 0.0220, 7.55),
( 2564, 0.0440, 28.19),
( 3560, 0.0660, 69.55),
( 4498, 0.0880, 135.29),
(22978, 0.1023, 217.83),
(27574, 0.1133, 2108.33),
(41667, 0.1243, 2629.06),
(45956, 0.1353, 4380.82),
('inf', 0.1463, 4961.12),
),
'monthly': (
( 1372, 0.0110, 0.00),
( 3248, 0.0220, 15.09),
( 5128, 0.0440, 56.36),
( 7120, 0.0660, 139.08),
( 8996, 0.0880, 270.55),
(45956, 0.1023, 435.64),
(55148, 0.1133, 4216.65),
(83334, 0.1243, 5258.10),
(91912, 0.1353, 8761.62),
('inf', 0.1463, 9922.22),
),
'quarterly': (
( 4112, 0.0110, 0.00),
( 9748, 0.0220, 45.23),
( 15384, 0.0440, 169.22),
( 21356, 0.0660, 417.20),
( 26990, 0.0880, 811.35),
(137870, 0.1023, 1307.14),
(165442, 0.1133, 12650.16),
(250000, 0.1243, 15774.07),
(275736, 0.1353, 26284.63),
( 'inf', 0.1463, 29766.71),
),
'semi-annual': (
( 8224, 0.0110, 0.00),
( 19496, 0.0220, 90.46),
( 30768, 0.0440, 338.44),
( 42712, 0.0660, 834.41),
( 53980, 0.0880, 1622.71),
(275740, 0.1023, 2614.29),
(330884, 0.1133, 25300.34),
(500000, 0.1243, 31548.16),
(551472, 0.1353, 52569.28),
( 'inf', 0.1463, 59533.44),
),
'annually': (
( 16446, 0.0110, 0.00),
( 38990, 0.0220, 180.91),
( 61538, 0.0440, 676.88),
( 85422, 0.0660, 1668.99),
( 107960, 0.0880, 3245.33),
( 551476, 0.1023, 5228.67),
( 661768, 0.1133, 50600.36),
(1000000, 0.1243, 63096.44),
(1102946, 0.1353, 105138.68),
( 'inf', 0.1463, 119067.26),
),
},
'single': {
'weekly': ((158, 0.011, 0.0), (375, 0.022, 1.74), (592, 0.044, 6.51), (821, 0.066, 16.06), (1038, 0.088, 31.17), (5303, 0.1023, 50.27), (6363, 0.1133, 486.58), (10605, 0.1243, 606.68), (19231, 0.1353, 1133.96), ('inf', 0.1463, 2301.06)),
'bi-weekly': ((316, 0.011, 0.0), (750, 0.022, 3.48), (1184, 0.044, 13.03), (1642, 0.066, 32.13), (2076, 0.088, 62.36), (10606, 0.1023, 100.55), (12726, 0.1133, 973.17), (21210, 0.1243, 1213.37), (38462, 0.1353, 2267.93), ('inf', 0.1463, 4602.13)),
'semi-monthly': ((343, 0.011, 0.0), (812, 0.022, 3.77), (1282, 0.044, 14.09), (1780, 0.066, 34.77), (2249, 0.088, 67.64), (11489, 0.1023, 108.91), (13787, 0.1133, 1054.16), (22978, 0.1243, 1314.52), (41667, 0.1353, 2456.96),('inf', 0.1463, 4985.58)),
'monthly': ((686, 0.011, 0.0), (1624, 0.022, 7.55), (2564, 0.044, 28.19), (3560, 0.066, 69.55), (4498, 0.088, 135.29), (22978, 0.1023, 217.83), (27574, 0.1133, 2108.33), (45956, 0.1243, 2629.06), (83334, 0.1353, 4913.94), ('inf', 0.1463, 9971.18)),
'quarterly': ((2056, 0.011, 0.0), (4874, 0.022, 22.62), (7692, 0.044, 84.62), (10678, 0.066, 208.61), (13495, 0.088, 405.69), (68935, 0.1023, 653.59), (82721, 0.1133, 6325.10), (137868, 0.1243, 7887.05), (250000, 0.1353, 14741.82), ('inf', 0.1463, 29913.28)),
'semi-annual': ((4112, 0.011, 0.0), (9748, 0.022, 45.23), (15384, 0.044, 169.22), (21356, 0.066, 417.20), (26990, 0.088, 811.35), (137870, 0.1023, 1307.14), (165442, 0.1133, 12650.16), (275736, 0.1243, 15774.07), (500000, 0.1353, 29483.61), ('inf', 0.1463, 59826.53)),
'annually': ((8223, 0.011, 0.0), (19495, 0.022, 90.45), (30769, 0.044, 338.43), (42711, 0.066, 834.49), (53980, 0.088, 1622.66), (275738, 0.1023, 2614.33), (330884, 0.1133, 25300.17), (551473, 0.1243, 31548.21), (1000000, 0.1353, 58967.42), ('inf', 0.1463, 119653.12)),
'weekly': (
( 158, 0.0110, 0.00),
( 375, 0.0220, 1.74),
( 592, 0.0440, 6.51),
( 821, 0.0660, 16.06),
( 1038, 0.0880, 31.17),
( 5303, 0.1023, 50.27),
( 6363, 0.1133, 486.58),
(10605, 0.1243, 606.68),
(19231, 0.1353, 1133.96),
('inf', 0.1463, 2301.06),
),
'bi-weekly': (
( 316, 0.0110, 0.00),
( 750, 0.0220, 3.48),
( 1184, 0.0440, 13.03),
( 1642, 0.066, 32.13),
( 2076, 0.0880, 62.36),
(10606, 0.1023, 100.55),
(12726, 0.1133, 973.17),
(21210, 0.1243, 1213.37),
(38462, 0.1353, 2267.93),
('inf', 0.1463, 4602.13),
),
'semi-monthly': (
( 343, 0.0110, 0.00),
( 812, 0.0220, 3.77),
( 1282, 0.0440, 14.09),
( 1780, 0.0660, 34.77),
( 2249, 0.0880, 67.64),
(11489, 0.1023, 108.91),
(13787, 0.1133, 1054.16),
(22978, 0.1243, 1314.52),
(41667, 0.1353, 2456.96),
('inf', 0.1463, 4985.58),
),
'monthly': (
( 686, 0.0110, 0.00),
( 1624, 0.0220, 7.55),
( 2564, 0.0440, 28.19),
( 3560, 0.0660, 69.55),
( 4498, 0.0880, 135.29),
(22978, 0.1023, 217.83),
(27574, 0.1133, 2108.33),
(45956, 0.1243, 2629.06),
(83334, 0.1353, 4913.94),
('inf', 0.1463, 9971.18),
),
'quarterly': (
( 2056, 0.0110, 0.00),
( 4874, 0.0220, 22.62),
( 7692, 0.0440, 84.62),
( 10678, 0.066, 208.61),
( 13495, 0.0880, 405.69),
( 68935, 0.1023, 653.59),
( 82721, 0.1133, 6325.10),
(137868, 0.1243, 7887.05),
(250000, 0.1353, 14741.82),
( 'inf', 0.1463, 29913.28),
),
'semi-annual': (
( 4112, 0.0110, 0.00),
( 9748, 0.0220, 45.23),
( 15384, 0.0440, 169.22),
( 21356, 0.0660, 417.20),
( 26990, 0.0880, 811.35),
(137870, 0.1023, 1307.14),
(165442, 0.1133, 12650.16),
(275736, 0.1243, 15774.07),
(500000, 0.1353, 29483.61),
('inf', 0.1463, 59826.53),
),
'annually': (
( 8223, 0.0110, 0.00),
( 19495, 0.0220, 90.45),
( 30769, 0.0440, 338.43),
( 42711, 0.0660, 834.49),
( 53980, 0.0880, 1622.66),
( 275738, 0.1023, 2614.33),
( 330884, 0.1133, 25300.17),
( 551473, 0.1243, 31548.21),
(1000000, 0.1353, 58967.42),
( 'inf', 0.1463, 119653.12),
),
},
}</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ca_sit_tax_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- https://www.edd.ca.gov/pdf_pub_ctr/20methb.pdf -->
<!-- Table 5. Tax rate table -->
<record id="rule_parameter_us_ca_sit_tax_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">{
'head_household': {
'weekly': ((339, 0.011, 0.0), (803, 0.022, 3.73), (1035, 0.044, 13.93), (1281, 0.066, 24.15), (1514, 0.088, 40.39), (7725, 0.1023, 60.89), (9270, 0.1133, 696.28), (15450, 0.1243, 871.33), (19231, 0.1353, 1639.50), ('inf', 0.1463, 2151.07)),
'bi-weekly': ((678, 0.011, 0.0), (1606, 0.022, 7.46), (2070, 0.044, 27.88), (2562, 0.066, 48.30), (3028, 0.088, 80.77), (15450, 0.1023, 121.78), (18540, 0.1133, 1392.55), (30900, 0.1243, 1742.65), (38462, 0.1353, 3279.00), ('inf', 0.1463, 4302.14)),
'semi-monthly': ((735, 0.011, 0.0), (1740, 0.022, 8.09), (2243, 0.044, 30.20), (2777, 0.066, 52.33), (3280, 0.088, 87.57), (16738, 0.1023, 131.83), (20085, 0.1133, 1508.58), (33475, 0.1243, 1887.80), (41667, 0.1353, 3552.18), ('inf', 0.1463, 4660.56)),
'monthly': ((1470, 0.011, 0.0), (3480, 0.022, 16.17), (4486, 0.044, 60.39), (5554, 0.066, 104.65), (6560, 0.088, 175.14), (33476, 0.1023, 263.67), (40170, 0.1133, 3017.18), (66950, 0.1243, 3775.61), (83334, 0.1353, 7104.36), ('inf', 0.1463, 9321.12)),
'quarterly': ((4407, 0.011, 0.0), (10442, 0.022, 48.48), (13461, 0.044, 181.25), (16659, 0.066, 314.09), (19678, 0.088, 525.16), (100426, 0.1023, 790.83), (120512, 0.1133, 9051.35), (200853, 0.1243, 11327.09), (250000, 0.1353, 21313.48), ('inf', 0.1463, 27963.07)),
'semi-annual': ((8814, 0.011, 0.0), (20884, 0.022, 96.95), (26922, 0.044, 362.49), (33318, 0.066, 628.16), (39356, 0.088, 1050.30), (200852, 0.1023, 1581.64), (241024, 0.1133, 18102.68), (401706, 0.1243, 22654.17), (500000, 0.1353, 42626.94), ('inf', 0.1463, 55926.12)),
'annually': ((17629, 0.011, 0.0), (41768, 0.022, 193.92), (53843, 0.044, 724.98), (66636, 0.066, 1256.28), (78710, 0.088, 2100.62), (401705, 0.1023, 3163.13), (482047, 0.1133, 36205.52), (803410, 0.1243, 45308.27), (1000000, 0.1353, 85253.69), ('inf', 0.1463, 111852.32)),
'weekly': (
( 339, 0.0110, 0.00),
( 803, 0.0220, 3.73),
( 1035, 0.0440, 13.93),
( 1281, 0.0660, 24.15),
( 1514, 0.0880, 40.39),
( 7725, 0.1023, 60.89),
( 9270, 0.1133, 696.28),
(15450, 0.1243, 871.33),
(19231, 0.1353, 1639.50),
('inf', 0.1463, 2151.07),
),
'bi-weekly': (
( 678, 0.0110, 0.00),
( 1606, 0.0220, 7.46),
( 2070, 0.0440, 27.88),
( 2562, 0.0660, 48.30),
( 3028, 0.0880, 80.77),
(15450, 0.1023, 121.78),
(18540, 0.1133, 1392.55),
(30900, 0.1243, 1742.65),
(38462, 0.1353, 3279.00),
('inf', 0.1463, 4302.14),
),
'semi-monthly': (
( 735, 0.0110, 0.00),
( 1740, 0.0220, 8.09),
( 2243, 0.0440, 30.20),
( 2777, 0.0660, 52.33),
( 3280, 0.0880, 87.57),
(16738, 0.1023, 131.83),
(20085, 0.1133, 1508.58),
(33475, 0.1243, 1887.80),
(41667, 0.1353, 3552.18),
('inf', 0.1463, 4660.56),
),
'monthly': (
( 1470, 0.0110, 0.00),
( 3480, 0.0220, 16.17),
( 4486, 0.0440, 60.39),
( 5554, 0.0660, 104.65),
( 6560, 0.0880, 175.14),
(33476, 0.1023, 263.67),
(40170, 0.1133, 3017.18),
(66950, 0.1243, 3775.61),
(83334, 0.1353, 7104.36),
('inf', 0.1463, 9321.12),
),
'quarterly': (
( 4407, 0.0110, 0.00),
( 10442, 0.0220, 48.48),
( 13461, 0.0440, 181.25),
( 16659, 0.0660, 314.09),
( 19678, 0.0880, 525.16),
(100426, 0.1023, 790.83),
(120512, 0.1133, 9051.35),
(200853, 0.1243, 11327.09),
(250000, 0.1353, 21313.48),
( 'inf', 0.1463, 27963.07),
),
'semi-annual': (
( 8814, 0.0110, 0.00),
( 20884, 0.0220, 96.95),
( 26922, 0.0440, 362.49),
( 33318, 0.0660, 628.16),
( 39356, 0.0880, 1050.30),
(200852, 0.1023, 1581.64),
(241024, 0.1133, 18102.68),
(401706, 0.1243, 22654.17),
(500000, 0.1353, 42626.94),
( 'inf', 0.1463, 55926.12),
),
'annually': (
( 17629, 0.0110, 0.00),
( 41768, 0.0220, 193.92),
( 53843, 0.0440, 724.98),
( 66636, 0.0660, 1256.28),
( 78710, 0.0880, 2100.62),
( 401705, 0.1023, 3163.13),
( 482047, 0.1133, 36205.52),
( 803410, 0.1243, 45308.27),
(1000000, 0.1353, 85253.69),
( 'inf', 0.1463, 111852.32),
),
},
'married': {
'weekly': ((338, 0.011, 0.0),(804, 0.022, 3.72),(1268, 0.044, 13.97),(1760, 0.066, 34.39), (2224, 0.088, 66.86),(11360, 0.1023, 107.69),(13632, 0.1133, 1042.30),(19231, 0.1243, 1299.72),(22721, 0.1353, 1995.68),('inf', 0.1463, 2467.88)),
'bi-weekly': ((676, 0.011, 0.0), (1608, 0.022, 7.44), (2536, 0.044, 27.94), (3520, 0.066, 68.77), (4448, 0.088, 124.70), (21212, 0.1023, 201.08), (25452, 0.1133, 1946.32), (38462, 0.1243, 2426.71), (42420, 0.1353, 4043.85), ('inf', 0.1463, 4579.37)),
'semi-monthly': ((734, 0.011, 0.0), (1740, 0.022, 8.07), (2746, 0.044, 30.20), (3812, 0.066, 74.46), (4818, 0.088, 144.82), (24614, 0.1023, 233.35), (29538, 0.1133, 2258.48), (41667, 0.1243, 2816.37), (49229, 0.1353, 4324.00), ('inf', 0.1463, 5347.14)),
'monthly': ((1468, 0.011, 0.0), (3480, 0.022, 16.15), (5492, 0.044, 60.41), (7624, 0.066, 148.94), (9636, 0.088, 2889.65), (49228, 0.1023, 466.71), (59076, 0.1133, 4516.97), (83334, 0.1243, 5632.75), (98458, 0.1353, 8648.02), ('inf', 0.1463, 10694.30)),
'quarterly': ((4404, 0.011, 0.0), (10442, 0.022, 48.44), (16480, 0.044, 181.28), (22876, 0.066, 446.95), (28912, 0.088, 869.09), (147686, 0.1023, 1400.26), (177222, 0.1133, 13550.84), (250000, 0.1243, 16897.27), (295371, 0.1353, 25943.58), ('inf', 0.1463, 32082.28)),
'semi-annual': ((8808, 0.011, 0.0), (20884, 0.022, 96.89), (32960, 0.044, 362.56), (45752, 0.066, 893.90), (57824, 0.088, 1738.17), (295372, 0.1023, 2800.51), (354444, 0.1133, 27101.67), (500000, 0.1243, 33794.53), (590742, 0.1353, 51887.14), ('inf', 0.1463, 64164.53)),
'annually': ((17618, 0.011, 0.0), (41766, 0.022, 193.80), (65920, 0.044, 725.06), (91506, 0.066, 1787.84), (115648, 0.088, 3476.52), (590746, 0.1023, 5601.02), (708890, 0.1133, 54203.55), (1000000, 0.1243, 67589.27), (1181484, 0.1353, 103774.24), ('inf', 0.1463, 128329.03)),
'weekly': (
( 338, 0.0110, 0.00),
( 804, 0.0220, 3.72),
( 1268, 0.0440, 13.97),
( 1760, 0.0660, 34.39),
( 2224, 0.0880, 66.86),
(11360, 0.1023, 107.69),
(13632, 0.1133, 1042.30),
(19231, 0.1243, 1299.72),
(22721, 0.1353, 1995.68),
('inf', 0.1463, 2467.88),
),
'bi-weekly': (
( 676, 0.0110, 0.00),
( 1608, 0.0220, 7.44),
( 2536, 0.0440, 27.94),
( 3520, 0.0660, 68.77),
( 4448, 0.0880, 124.70),
(21212, 0.1023, 201.08),
(25452, 0.1133, 1946.32),
(38462, 0.1243, 2426.71),
(42420, 0.1353, 4043.85),
('inf', 0.1463, 4579.37),
),
'semi-monthly': (
( 734, 0.0110, 0.00),
( 1740, 0.0220, 8.07),
( 2746, 0.0440, 30.20),
( 3812, 0.0660, 74.46),
( 4818, 0.0880, 144.82),
(24614, 0.1023, 233.35),
(29538, 0.1133, 2258.48),
(41667, 0.1243, 2816.37),
(49229, 0.1353, 4324.00),
('inf', 0.1463, 5347.14),
),
'monthly': (
( 1468, 0.0110, 0.00),
( 3480, 0.0220, 16.15),
( 5492, 0.0440, 60.41),
( 7624, 0.0660, 148.94),
( 9636, 0.0880, 289.65),
(49228, 0.1023, 466.71),
(59076, 0.1133, 4516.97),
(83334, 0.1243, 5632.75),
(98458, 0.1353, 8648.02),
('inf', 0.1463, 10694.30),
),
'quarterly': (
( 4404, 0.0110, 0.00),
( 10442, 0.0220, 48.44),
( 16480, 0.0440, 181.28),
( 22876, 0.0660, 446.95),
( 28912, 0.0880, 869.09),
(147686, 0.1023, 1400.26),
(177222, 0.1133, 13550.84),
(250000, 0.1243, 16897.27),
(295371, 0.1353, 25943.58),
( 'inf', 0.1463, 32082.28),
),
'semi-annual': (
( 8808, 0.0110, 0.00),
( 20884, 0.0220, 96.89),
( 32960, 0.0440, 362.56),
( 45752, 0.0660, 893.90),
( 57824, 0.0880, 1738.17),
(295372, 0.1023, 2800.51),
(354444, 0.1133, 27101.67),
(500000, 0.1243, 33794.53),
(590742, 0.1353, 51887.14),
( 'inf', 0.1463, 64164.53),
),
'annually': (
( 17618, 0.0110, 0.00),
( 41766, 0.0220, 193.80),
( 65920, 0.0440, 725.06),
( 91506, 0.0660, 1787.84),
( 115648, 0.0880, 3476.52),
( 590746, 0.1023, 5601.02),
( 708890, 0.1133, 54203.55),
(1000000, 0.1243, 67589.27),
(1181484, 0.1353, 103774.24),
( 'inf', 0.1463, 128329.03),
),
},
'single': {
'weekly': ((169, 0.011, 0.0), (402, 0.022, 1.86), (634, 0.044, 6.99), (880, 0.066, 17.20), (1112, 0.088, 33.44), (5680, 0.1023, 53.86), (6816, 0.1133, 521.17), (11360, 0.1243, 649.88), (19231, 0.1353, 1214.70), ('inf', 0.1463, 2279.65)),
'bi-weekly': ((338, 0.011, 0.0), (804, 0.022, 3.72), (1268, 0.044, 13.97), (1760, 0.066, 34.39), (2224, 0.088, 66.86), (11360, 0.1023, 107.69), (13632, 0.1133, 1042.30), (22720, 0.1243, 1299.72), (38462, 0.1353, 2429.36), ('inf', 0.1463, 4559.25)),
'semi-monthly': ((367, 0.011, 0.0), (870, 0.022, 4.04), (1373, 0.044, 15.11), (1906, 0.066, 37.24), (2409, 0.088, 72.42), (12307, 0.1023, 116.68), (14769, 0.1133, 1129.25), (24614, 0.1243, 1408.19), (41667, 0.1353, 2631.92),('inf', 0.1463, 4939.19)),
'monthly': ((734, 0.011, 0.0), (1740, 0.022, 8.07), (2746, 0.044, 30.20), (3812, 0.066, 74.46), (4818, 0.088, 144.82), (24614, 0.1023, 233.35), (29538, 0.1133, 2258.48), (49228, 0.1243, 2816.37), (83334, 0.1353, 5263.84), ('inf', 0.1463, 9878.38)),
'quarterly': ((2202, 0.011, 0.0), (5221, 0.022, 24.22), (8240, 0.044, 90.64), (11438, 0.066, 223.48), (14456, 0.088, 434.55), (73843, 0.1023, 700.13), (88611, 0.1133, 6775.42), (147686, 0.1243, 8448.63), (250000, 0.1353, 15791.65), ('inf', 0.1463, 29634.73)),
'semi-annual': ((4404, 0.011, 0.0), (10442, 0.022, 48.44), (16480, 0.044, 181.28), (22876, 0.066, 446.95), (28912, 0.088, 869.09), (147686, 0.1023, 1400.26), (177222, 0.1133, 13550.84), (295372, 0.1243, 16897.27), (500000, 0.1353, 31583.32), ('inf', 0.1463, 59269.49)),
'annually': ((8809, 0.011, 0.0), (20883, 0.022, 96.90), (32960, 0.044, 362.53), (45753, 0.066, 893.92), (57824, 0.088, 1738.26), (295373, 0.1023, 2800.51), (354445, 0.1133, 27101.77), (590742, 0.1243, 33794.63), (1000000, 0.1353, 63166.35), ('inf', 0.1463, 118538.96)),
'weekly': (
( 169, 0.0110, 0.00),
( 402, 0.0220, 1.86),
( 634, 0.0440, 6.99),
( 880, 0.0660, 17.20),
( 1112, 0.0880, 33.44),
( 5680, 0.1023, 53.86),
( 6816, 0.1133, 521.17),
(11360, 0.1243, 649.88),
(19231, 0.1353, 1214.70),
('inf', 0.1463, 2279.65),
),
'bi-weekly': (
( 338, 0.0110, 0.00),
( 804, 0.0220, 3.72),
( 1268, 0.0440, 13.97),
( 1760, 0.0660, 34.39),
( 2224, 0.0880, 66.86),
(11360, 0.1023, 107.69),
(13632, 0.1133, 1042.30),
(22720, 0.1243, 1299.72),
(38462, 0.1353, 2429.36),
('inf', 0.1463, 4559.25),
),
'semi-monthly': (
( 367, 0.0110, 0.00),
( 870, 0.0220, 4.04),
( 1373, 0.0440, 15.11),
( 1906, 0.0660, 37.24),
( 2409, 0.0880, 72.42),
(12307, 0.1023, 116.68),
(14769, 0.1133, 1129.25),
(24614, 0.1243, 1408.19),
(41667, 0.1353, 2631.92),
('inf', 0.1463, 4939.19),
),
'monthly': (
( 734, 0.0110, 0.00),
( 1740, 0.0220, 8.07),
( 2746, 0.0440, 30.20),
( 3812, 0.0660, 74.46),
( 4818, 0.0880, 144.82),
(24614, 0.1023, 233.35),
(29538, 0.1133, 2258.48),
(49228, 0.1243, 2816.37),
(83334, 0.1353, 5263.84),
('inf', 0.1463, 9878.38),
),
'quarterly': (
( 2202, 0.0110, 0.00),
( 5221, 0.0220, 24.22),
( 8240, 0.0440, 90.64),
( 11438, 0.0660, 223.48),
( 14456, 0.0880, 434.55),
( 73843, 0.1023, 700.13),
( 88611, 0.1133, 6775.42),
(147686, 0.1243, 8448.63),
(250000, 0.1353, 15791.65),
( 'inf', 0.1463, 29634.73),
),
'semi-annual': (
( 4404, 0.0110, 0.00),
( 10442, 0.0220, 48.44),
( 16480, 0.0440, 181.28),
( 22876, 0.0660, 446.95),
( 28912, 0.0880, 869.09),
(147686, 0.1023, 1400.26),
(177222, 0.1133, 13550.84),
(295372, 0.1243, 16897.27),
(500000, 0.1353, 31583.32),
( 'inf', 0.1463, 59269.49),
),
'annually': (
( 8809, 0.0110, 0.00),
( 20883, 0.0220, 96.90),
( 32960, 0.0440, 362.53),
( 45753, 0.0660, 893.92),
( 57824, 0.0880, 1738.26),
( 295373, 0.1023, 2800.51),
( 354445, 0.1133, 27101.77),
( 590742, 0.1243, 33794.63),
(1000000, 0.1353, 63166.35),
( 'inf', 0.1463, 118538.96),
),
},
}</field>
<field name="rule_parameter_id" ref="rule_parameter_us_ca_sit_tax_rate"/>
@@ -169,6 +633,8 @@
<field name="rule_parameter_id" ref="rule_parameter_us_ca_sit_income_exemption_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- https://www.edd.ca.gov/pdf_pub_ctr/20methb.pdf -->
<!-- Table 1. Low income exemption table -->
<record id="rule_parameter_us_ca_sit_income_exemption_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">{
'weekly': ( 289, 289, 579, 579),
@@ -203,6 +669,8 @@
<field name="rule_parameter_id" ref="rule_parameter_us_ca_sit_estimated_deduction_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- https://www.edd.ca.gov/pdf_pub_ctr/20methb.pdf -->
<!-- Table 2. Estimated Deduction table -->
<record id="rule_parameter_us_ca_sit_estimated_deduction_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">{
'weekly': ( 19, 38, 58, 77, 96, 115, 135, 154, 173, 192),
@@ -237,6 +705,8 @@
<field name="rule_parameter_id" ref="rule_parameter_us_ca_sit_standard_deduction_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- https://www.edd.ca.gov/pdf_pub_ctr/20methb.pdf -->
<!-- Table 3. Standard Deduction table -->
<record id="rule_parameter_us_ca_sit_standard_deduction_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">{
'weekly': ( 87, 87, 175, 175),
@@ -271,6 +741,8 @@
<field name="rule_parameter_id" ref="rule_parameter_us_ca_sit_exemption_allowance_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record>
<!-- https://www.edd.ca.gov/pdf_pub_ctr/20methb.pdf -->
<!-- Table 4. Exemption Allowance table -->
<record id="rule_parameter_us_ca_sit_exemption_allowance_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">{
'weekly': ( 2.58, 5.16, 7.74, 10.32, 12.90, 15.48, 18.07, 20.65, 23.23, 25.81),

View File

@@ -40,3 +40,4 @@ class TestUsCAPayslip(TestUsPayslip):
self._test_sit(1800.0, 'married', 4, 0, 0, 'semi-monthly', date(2020, 1, 1), 0.84)
self._test_sit(45000.0, 'married', 4, 0, 0, 'annually', date(2020, 1, 1), 59.78)
self._test_sit(45000.0, 'married', 4, 0, 20.0, 'annually', date(2020, 1, 1), 79.78)
self._test_sit(6000.0, '', 4, 0, 20.0, 'annually', date(2020, 1, 1), 0.00)