From 955d37f7dafaf403777b185a5c916b1bb3f655aa Mon Sep 17 00:00:00 2001 From: Austin Francis Date: Thu, 21 Sep 2023 23:05:30 -0600 Subject: [PATCH] fixed more filing status errors --- .../gov/states/va/tax/income/calc_line_14.py | 5 +++-- .../va/tax/income/va_adj_gross_income.py | 4 ++-- .../states/va/tax/income/va_age_deduction.py | 18 +++++++++--------- .../gov/states/va/tax/income/va_exemptions.py | 4 ++-- .../va/tax/income/va_standard_deduction.py | 4 ++-- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/fiscalsim_us/variables/gov/states/va/tax/income/calc_line_14.py b/fiscalsim_us/variables/gov/states/va/tax/income/calc_line_14.py index e8718bf48..a47c9a09c 100644 --- a/fiscalsim_us/variables/gov/states/va/tax/income/calc_line_14.py +++ b/fiscalsim_us/variables/gov/states/va/tax/income/calc_line_14.py @@ -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 diff --git a/fiscalsim_us/variables/gov/states/va/tax/income/va_adj_gross_income.py b/fiscalsim_us/variables/gov/states/va/tax/income/va_adj_gross_income.py index ecd4e08fd..be04036d6 100644 --- a/fiscalsim_us/variables/gov/states/va/tax/income/va_adj_gross_income.py +++ b/fiscalsim_us/variables/gov/states/va/tax/income/va_adj_gross_income.py @@ -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 diff --git a/fiscalsim_us/variables/gov/states/va/tax/income/va_age_deduction.py b/fiscalsim_us/variables/gov/states/va/tax/income/va_age_deduction.py index 7e8f90e06..4d3f71d31 100644 --- a/fiscalsim_us/variables/gov/states/va/tax/income/va_age_deduction.py +++ b/fiscalsim_us/variables/gov/states/va/tax/income/va_age_deduction.py @@ -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: @@ -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 ) @@ -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 diff --git a/fiscalsim_us/variables/gov/states/va/tax/income/va_exemptions.py b/fiscalsim_us/variables/gov/states/va/tax/income/va_exemptions.py index 254137527..11e95823c 100644 --- a/fiscalsim_us/variables/gov/states/va/tax/income/va_exemptions.py +++ b/fiscalsim_us/variables/gov/states/va/tax/income/va_exemptions.py @@ -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: diff --git a/fiscalsim_us/variables/gov/states/va/tax/income/va_standard_deduction.py b/fiscalsim_us/variables/gov/states/va/tax/income/va_standard_deduction.py index 3afff085a..358447ded 100644 --- a/fiscalsim_us/variables/gov/states/va/tax/income/va_standard_deduction.py +++ b/fiscalsim_us/variables/gov/states/va/tax/income/va_standard_deduction.py @@ -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 )