Skip to content

Commit

Permalink
fixed more filing status errors
Browse files Browse the repository at this point in the history
  • Loading branch information
austinperryfrancis committed Sep 22, 2023
1 parent 63ab73b commit 955d37f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ def formula(tax_unit, period, parameters):
# line_11 = tax_unit("va_standard_deduction",period)

filing_status = tax_unit("filing_status", period)

if filing_status == 0:

# for single, head of household, widow filing status
if filing_status == 0 or filing_status == 2 or filing_status == 4:
va_standard_deduction = parameters(
period
).gov.states.va.tax.income.va_standard_deduction.SINGLE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ def formula(tax_unit, period, parameters):

subtotal = line3 - line8

if filing_status == 1 or filing_status == 3:
if filing_status == 0 or filing_status == 2 or filing_status == 4 or filing_status == 2:
if subtotal < single:
tax_owed = 0

return tax_owed

if filing_status == 2:
if filing_status == 1:
if subtotal < joint:
tax_owed = 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@ def formula(tax_unit, period, parameters):
spouse_fdcs = 0 # change this

if age_of_head > 65:
if filing_status == 1:
if filing_status == 0 or filing_status == 2 or filing_status == 4:
age_deduction_count = 1

if filing_status == 2 & age_of_spouse > 65:
if (filing_status == 1 or filing_status == 3) & age_of_spouse > 65:
age_deduction_count = 2

if filing_status == 1:
if filing_status == 0 or filing_status == 2 or filing_status == 4:
total_agi = federal_agi

else:
total_agi = federal_agi + spouse_agi

if filing_status == 1:
if filing_status == 0 or filing_status == 2 or filing_status == 4:
total_fda = you_fdca

else:
total_fda = you_fdca + spouse_fdca

if filing_status == 1:
if filing_status == 0 or filing_status == 2 or filing_status == 4:
total_fds = you_fdcs

else:
Expand All @@ -61,12 +61,12 @@ def formula(tax_unit, period, parameters):

line8 = line6 - line7

if filing_status == 1:
if filing_status == 0 or filing_status == 2 or filing_status == 4:
threshold_ln9 = (
parameters.gov.states.va.tax.income.va_age_deduction_threshold.single
)

if filing_status == 2:
if filing_status == 1:
threshold_ln9 = (
parameters.gov.states.va.tax.income.va_age_deduction_threshold.joint
)
Expand All @@ -87,8 +87,8 @@ def formula(tax_unit, period, parameters):
if line11 < line12:
line14 = line12 - line11

if filing_status == 1 or filing_status == 2:
if filing_status == 0 or filing_status == 2 or filing_status == 4 or filing_status == 1:
return line14

if filing_status == 3:
if filing_status == 3 and age_of_spouse >= 65:
return line14 / 2
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ def formula(tax_unit, period, parameters):

filing_status = tax_unit("filing_status", period)

if filing_status == 1:
if filing_status == 0 or filing_status == 2 or filing_status == 4:
spouse_if_filing_jointly = 0

elif filing_status == 2:
elif filing_status == 1:
spouse_if_filing_jointly = 1

else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ class va_standard_deduction(Variable):
def formula(tax_unit, period, parameters):
filing_status = tax_unit("filing_status", period)

if filing_status == 1:
if filing_status == 0 or filing_status == 2 or filing_status == 4:
standard_deduction = (
parameters.gov.states.va.tax.income.va_standard_deduction.SINGLE
)

if filing_status == 2:
if filing_status == 1:
standard_deduction = (
parameters.gov.states.va.tax.income.va_standard_deduction.JOINT
)
Expand Down

0 comments on commit 955d37f

Please sign in to comment.