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 9b7fcf315b
commit 5c702908ba

View File

@@ -19,10 +19,10 @@ ytd += contract.external_wages
remaining = 33700.0 - ytd remaining = 33700.0 - ytd
if remaining <= 0.0: if remaining <= 0.0:
result = 0 result = 0
elif remaining < categories.GROSS: elif remaining < categories.BASIC:
result = remaining result = remaining
else: else:
result = categories.GROSS result = categories.BASIC
</field> </field>
<field name="appears_on_payslip" eval="False"/> <field name="appears_on_payslip" eval="False"/>
</record> </record>
@@ -82,10 +82,10 @@ ytd += contract.external_wages
remaining = 33700.0 - ytd remaining = 33700.0 - ytd
if remaining &lt;= 0.0: if remaining &lt;= 0.0:
result = 0 result = 0
elif remaining &lt; categories.GROSS: elif remaining &lt; categories.BASIC:
result = remaining result = remaining
else: else:
result = categories.GROSS result = categories.BASIC
</field> </field>
<field name="appears_on_payslip" eval="False"/> <field name="appears_on_payslip" eval="False"/>
</record> </record>
@@ -144,10 +144,10 @@ ytd += contract.external_wages
remaining = 33700.0 - ytd remaining = 33700.0 - ytd
if remaining &lt;= 0.0: if remaining &lt;= 0.0:
result = 0 result = 0
elif remaining &lt; categories.GROSS: elif remaining &lt; categories.BASIC:
result = remaining result = remaining
else: else:
result = categories.GROSS result = categories.BASIC
</field> </field>
<field name="appears_on_payslip" eval="False"/> <field name="appears_on_payslip" eval="False"/>
</record> </record>
@@ -183,10 +183,10 @@ ytd += contract.external_wages
remaining = 33700.0 - ytd remaining = 33700.0 - ytd
if remaining &lt;= 0.0: if remaining &lt;= 0.0:
result = 0 result = 0
elif remaining &lt; categories.GROSS: elif remaining &lt; categories.BASIC:
result = remaining result = remaining
else: else:
result = categories.GROSS result = categories.BASIC
</field> </field>
<field name="appears_on_payslip" eval="False"/> <field name="appears_on_payslip" eval="False"/>
</record> </record>