[IMP] l10n_us_hr_payroll: Improved Tax table and Test case for HI Hawaii 2020

This commit is contained in:
Bhoomi Vaishnani
2020-08-20 18:51:17 -04:00
parent 002b3e5c5d
commit 383a1e8f6c
2 changed files with 64 additions and 6 deletions

View File

@@ -46,18 +46,74 @@
<data noupdate="1"> <data noupdate="1">
<record id="rule_parameter_us_hi_sit_tax_rate_2019" model="hr.rule.parameter.value"> <record id="rule_parameter_us_hi_sit_tax_rate_2019" model="hr.rule.parameter.value">
<field name="parameter_value">{ <field name="parameter_value">{
'single': ((2400, 0.00, 1.40), (4800, 34.00, 3.20), (9600, 110.00, 5.50), (14400, 374.00, 6.40), (19200, 682.00, 6.80), (24000, 1008.00, 7.20), (36000, 1354.00, 7.60), ('inf', 2266.00, 7.90)), 'single': (
'married': ((4800, 0.00, 1.40), (9600, 67.00, 3.20), (19200, 221.00, 5.50), (28800, 749.00, 6.40), (38400, 1363.00, 6.80), (48000, 2016.00, 7.20), (72000, 2707.00, 7.60), ('inf', 4531.00, 7.90)), ( 2400, 0.00, 1.40),
'head_of_household': ((2400, 0.00, 1.40), (4800, 34.00, 3.20), (9600, 110.00, 5.50), (14400, 374.00, 6.40), (19200, 682.00, 6.80), (24000, 1008.00, 7.20), (36000, 1354.00, 7.60), ('inf', 2266.00, 7.90)), ( 4800, 34.00, 3.20),
( 9600, 110.00, 5.50),
(14400, 374.00, 6.40),
(19200, 682.00, 6.80),
(24000, 1008.00, 7.20),
(36000, 1354.00, 7.60),
('inf', 2266.00, 7.90),
),
'married': (
( 4800, 0.00, 1.40),
( 9600, 67.00, 3.20),
(19200, 221.00, 5.50),
(28800, 749.00, 6.40),
(38400, 1363.00, 6.80),
(48000, 2016.00, 7.20),
(72000, 2707.00, 7.60),
('inf', 4531.00, 7.90),
),
'head_of_household': (
( 2400, 0.00, 1.40),
( 4800, 34.00, 3.20),
( 9600, 110.00, 5.50),
(14400, 374.00, 6.40),
(19200, 682.00, 6.80),
(24000, 1008.00, 7.20),
(36000, 1354.00, 7.60),
('inf', 2266.00, 7.90),
),
}</field> }</field>
<field name="rule_parameter_id" ref="rule_parameter_us_hi_sit_tax_rate"/> <field name="rule_parameter_id" ref="rule_parameter_us_hi_sit_tax_rate"/>
<field name="date_from" eval="datetime(2019, 1, 1).date()"/> <field name="date_from" eval="datetime(2019, 1, 1).date()"/>
</record> </record>
<!-- https://files.hawaii.gov/tax/forms/2019/19table.pdf -->
<!-- Table from Schedule I, II and III -->
<record id="rule_parameter_us_hi_sit_tax_rate_2020" model="hr.rule.parameter.value"> <record id="rule_parameter_us_hi_sit_tax_rate_2020" model="hr.rule.parameter.value">
<field name="parameter_value">{ <field name="parameter_value">{
'single': ((2400, 0.00, 1.40), (4800, 34.00, 3.20), (9600, 110.00, 5.50), (14400, 374.00, 6.40), (19200, 682.00, 6.80), (24000, 1008.00, 7.20), (36000, 1354.00, 7.60), ('inf', 2266.00, 7.90)), 'single': (
'married': ((4800, 0.00, 1.40), (9600, 67.00, 3.20), (19200, 221.00, 5.50), (28800, 749.00, 6.40), (38400, 1363.00, 6.80), (48000, 2016.00, 7.20), (72000, 2707.00, 7.60), ('inf', 4531.00, 7.90)), ( 2400, 0.00, 1.40),
'head_of_household': ((2400, 0.00, 1.40), (4800, 34.00, 3.20), (9600, 110.00, 5.50), (14400, 374.00, 6.40), (19200, 682.00, 6.80), (24000, 1008.00, 7.20), (36000, 1354.00, 7.60), ('inf', 2266.00, 7.90)), ( 4800, 34.00, 3.20),
( 9600, 110.00, 5.50),
(14400, 374.00, 6.40),
(19200, 682.00, 6.80),
(24000, 1008.00, 7.20),
(36000, 1354.00, 7.60),
('inf', 2266.00, 7.90),
),
'married': (
( 4800, 0.00, 1.40),
( 9600, 67.00, 3.20),
(19200, 221.00, 5.50),
(28800, 749.00, 6.40),
(38400, 1363.00, 6.80),
(48000, 2016.00, 7.20),
(72000, 2707.00, 7.60),
('inf', 4531.00, 7.90),
),
'head_of_household': (
( 2400, 0.00, 1.40),
( 4800, 34.00, 3.20),
( 9600, 110.00, 5.50),
(14400, 374.00, 6.40),
(19200, 682.00, 6.80),
(24000, 1008.00, 7.20),
(36000, 1354.00, 7.60),
('inf', 2266.00, 7.90),
),
}</field> }</field>
<field name="rule_parameter_id" ref="rule_parameter_us_hi_sit_tax_rate"/> <field name="rule_parameter_id" ref="rule_parameter_us_hi_sit_tax_rate"/>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/> <field name="date_from" eval="datetime(2020, 1, 1).date()"/>

View File

@@ -33,3 +33,5 @@ class TestUsHIPayslip(TestUsPayslip):
self._test_sit(5000.0, 'married', 0.0, 2.0, 'monthly', date(2020, 1, 1), 287.1) self._test_sit(5000.0, 'married', 0.0, 2.0, 'monthly', date(2020, 1, 1), 287.1)
self._test_sit(5000.0, 'married', 10.0, 2.0, 'monthly', date(2020, 1, 1), 297.1) self._test_sit(5000.0, 'married', 10.0, 2.0, 'monthly', date(2020, 1, 1), 297.1)
self._test_sit(50000.0, 'head_of_household', 0.0, 3.0, 'weekly', date(2020, 1, 1), 3933.65) self._test_sit(50000.0, 'head_of_household', 0.0, 3.0, 'weekly', date(2020, 1, 1), 3933.65)
self._test_sit(750.0, 'single', 10.0, 3.0, 'bi-weekly', date(2020, 1, 1), 40.59)
self._test_sit(3000.0, '', 0.0, 3.0, 'weekly', date(2020, 1, 1), 0.00)