Refactor to mitigate the fact that eligible 401(k) contributions reduce taxable wage (gross) but not FICA/FUTA etc.

This refactor bases all/most 'wage' categories off of BASIC instead of GROSS to allow all 'Income Tax' rules to continue to be based on GROSS.
This commit is contained in:
Jared Kipe
2018-12-09 11:51:01 -08:00
parent 2e4d4682c0
commit 2db0ec3b3c
2 changed files with 7 additions and 6 deletions

View File

@@ -18,10 +18,10 @@ ytd += contract.external_wages
remaining = 12500.0 - ytd
if remaining <= 0.0:
result = 0
elif remaining < categories.GROSS:
elif remaining < categories.BASIC:
result = remaining
else:
result = categories.GROSS
result = categories.BASIC
</field>
<field name="appears_on_payslip" eval="False"/>
</record>

View File

@@ -45,7 +45,7 @@ class TestUsMoPayslip(TestUsPayslip):
# tax rates
mo_unemp = contract.mo_unemp_rate(2018) / -100.0
self._log('2018 Missouri tax first payslip:')
self._log('2018 Missouri tax single first payslip:')
payslip = self._createPayslip(employee, '2018-01-01', '2018-01-31')
payslip.compute_sheet()
@@ -62,11 +62,12 @@ class TestUsMoPayslip(TestUsPayslip):
# 5000 for single and married with spouse working, 10000 for married spouse not working
us_withholding = min(5000, us_withholding)
# 5000
self._log(us_withholding)
mo_taxable_income = gross_salary - standard_deduction - mo_allowance_calculated - us_withholding
# 48306.14
self._log(mo_taxable_income)
# 44000.0
self._log('%s = %s - %s - %s - %s' % (mo_taxable_income, gross_salary, standard_deduction, mo_allowance_calculated, us_withholding))
remaining_taxable_income = mo_taxable_income
tax = 0.0