[IMP] l10n_us_hr_payroll: Refactored Tax table and Improved test case for ME Maine 2020.

This commit is contained in:
Bhoomi Vaishnani
2020-08-18 15:15:37 -04:00
parent 14aa5f89a3
commit c53ce9ead7
4 changed files with 22 additions and 17 deletions

View File

@@ -47,7 +47,6 @@ def me_maine_state_income_withholding(payslip, categories, worked_days, inputs):
standard_deduction_amt = last * (amt - taxable_income) / flat_amt
break
last = flat_amt
annual_income = taxable_income - (exemption_amt + standard_deduction_amt)
withholding = 0.0
for row in tax_rate:
@@ -57,8 +56,7 @@ def me_maine_state_income_withholding(payslip, categories, worked_days, inputs):
break
last = amt
if withholding < 0.0:
withholding = 0.0
withholding = max(withholding, 0.0)
withholding = round(withholding / pay_periods)
withholding += additional
return wage, -((withholding / wage) * 100.0)

View File

@@ -143,7 +143,7 @@ class HRContractUSPayrollConfig(models.Model):
me_w4me_sit_filing_status = fields.Selection([
('', 'Exempt'),
('single', 'Single'),
('single', 'Single or Head of Household'),
('married', 'Married'),
], string='Maine W-4ME Filing Status', help='ME W-4ME 3.')
me_w4me_sit_allowances = fields.Integer(string='Maine Allowances', help='W-4ME 4.')