Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Idaho tax logic #72

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Idaho deductible medical expenses must be greater than this percentage rate of an individual's income.
values:
2022-01-01: 0.075
metadata:
label: Idaho minimum medical expense rate
period: year
unit: currency-USD
reference:
- title: Itemized Deduction Worksheet for Idaho, Line 1
href: https://tax.idaho.gov/wp-content/uploads/forms/EIS00407/EIS00407_01-05-2023.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Idaho addition to earned income to calculate standard deduction if you can be claimed as a dependent and earned income is more than $750.
values:
2022-01-01: 400
metadata:
unit: currency-USD
period: year
label: Dependent earned income addition for standard deduction
reference:
- title: Idaho Form 40, Individual Income Tax Return and Instructions 2022, page 8
href: https://tax.idaho.gov/wp-content/uploads/forms/EFO00089/EFO00089_12-30-2022.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
description: Idaho alternative energy device deduction percentages.
metadata:
period: year
unit: currency-USD
breakdown:
- year aquired
reference:
- title: Form 39R 2022 Residential Supplemental Schedule, Part B Line 5
href: https://tax.idaho.gov/wp-content/uploads/forms/EFO00088/EFO00088_12-30-2022.pdf

# Sum amounts and take minimimum of deduction or $5,000
2022:
2022-01-01: .40
2021:
2022-01-01: .20
2020:
2022-01-01: .20
2019:
2022-01-01: .20
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Idaho alternative energy device deduction limit.
values:
2022-01-01: 5000
metadata:
unit: currency-USD
period: year
label: Idaho deduction limit for alternative energy device deduction
reference:
- title: Idaho Form 39R, Residential Supplemental Schedule and Instructions 2022
href: https://tax.idaho.gov/wp-content/uploads/forms/EFO00088/EFO00088_12-30-2022.pdf
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ values:
- taxable_social_security # (5)
- military_service_income # (4)
- workers_compensation # (13)
2022-01-01:
- salt_refund_income # (2)
- us_govt_interest # (3)
- alt_energy_device_deduction # (5)
- taxable_social_security # (7)
- workers_compensation # (20)

metadata:
unit: list
references:
- title: 2022 Idaho CodeSection 63-3022D - deduction of expenses for household and dependent care services
href: https://law.justia.com/codes/idaho/2022/title-63/chapter-30/section-63-3022d/
- title: 2022 Idaho Form 39R
href: https://tax.idaho.gov/wp-content/uploads/forms/EFO00088/EFO00088_03-01-2023.pdf
- title: Individual Income Tax Forms and Instructions 2021
href: https://tax.idaho.gov/wp-content/uploads/forms/EIN00046/EIN00046_11-15-2021.pdf#page=30
- title: Section 35.01.01.254 - (5) / (3) (a)
Expand Down
11 changes: 11 additions & 0 deletions fiscalsim_us/variables/gov/states/id/tax/income/id_additions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@


class id_additions(Variable):
"""
Section A on Idaho 2022 Form 39R. These additions to income include:

* Federal net operating loss deduction
* Capital loss carryover incurred outside the state before becoming an Idaho resident
* Non-Idaho state and local bond interest and dividends
* Idaho college savings account withdrawal
* Bonus Depreciation
"""

value_type = float
entity = TaxUnit
label = "Idaho additions"
unit = USD
definition_period = YEAR
reference = "https://tax.idaho.gov/wp-content/uploads/forms/EFO00089/EFO00089_12-30-2022.pdf"
defined_for = StateCode.ID
2 changes: 1 addition & 1 deletion fiscalsim_us/variables/gov/states/id/tax/income/id_agi.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ class id_agi(Variable):
defined_for = StateCode.ID

adds = ["id_additions", "adjusted_gross_income"]
subtracts = ["id_subtractions"]
subtracts = ["id_subtractions", "alt_energy_device_deduction"]
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ def formula(tax_unit, period, parameters):
"id_income_tax_before_non_refundable_credits", period
)
non_refundable_credits = tax_unit("id_non_refundable_credits", period)
return max_(before_non_refundable_credits - non_refundable_credits, 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sydneybeutler. I don't think you want to make this change. The max_() format is correct. It is a policyengine-core function.

return max(before_non_refundable_credits - non_refundable_credits, 0)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from fiscalsim_us.model_api import *


class alt_energy_device_cost_2019(Variable):
value_type = float
entity = TaxUnit
label = "Idaho Qualifying Alternative Energy Device Cost 2019"
documentation = "Cost of Idaho qualifying alternative energy device 2019"
definition_period = YEAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from fiscalsim_us.model_api import *


class alt_energy_device_cost_2020(Variable):
value_type = float
entity = TaxUnit
label = "Idaho Qualifying Alternative Energy Device Cost 2020"
documentation = "Cost of Idaho qualifying alternative energy device 2020"
definition_period = YEAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from fiscalsim_us.model_api import *


class alt_energy_device_cost_2021(Variable):
value_type = float
entity = TaxUnit
label = "Idaho Qualifying Alternative Energy Device Cost 2021"
documentation = "Cost of Idaho qualifying alternative energy device 2021"
definition_period = YEAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from fiscalsim_us.model_api import *


class alt_energy_device_cost_2022(Variable):
value_type = float
entity = TaxUnit
label = "Idaho Qualifying Alternative Energy Device Cost 2022"
documentation = "Cost of Idaho qualifying alternative energy device 2022"
definition_period = YEAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from fiscalsim_us.model_api import *


class alt_energy_device_deduction(Variable):
value_type = float
entity = TaxUnit
label = "Idaho Alternative Energy Device Deduction"
unit = USD
definition_period = YEAR

def formula(tax_unit, period, parameters):
p = parameters(
period
).gov.states.id.tax.income.subtractions.id_alt_energy_device_deduction
limit = p.alt_energy_device_deduction_limit
cost_19 = tax_unit("alt_energy_device_cost_2019", period)
cost_20 = tax_unit("alt_energy_device_cost_2020", period)
cost_21 = tax_unit("alt_energy_device_cost_2021", period)
cost_22 = tax_unit("alt_energy_device_cost_2022", period)
portion_deductible = p.alt_energy_device_deduction[year]

# Multiply percentage by device and sum
deduction_2019 = cost_19 * portion_deductible
deduction_2020 = cost_20 * portion_deductible
deduction_2021 = cost_21 * portion_deductible
deduction_2022 = cost_22 * portion_deductible
deduction_total = (
deduction_2019 + deduction_2020 + deduction_2021 + deduction_2022
)
return min(deduction_total, limit)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from fiscalsim_us.model_api import *


class alt_energy_device_2019(Variable):
value_type = bool
entity = TaxUnit
label = "Idaho Qualifying Alternative Energy Device 2019"
documentation = "Idaho qualifying alternative energy device 2019"
definition_period = YEAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from fiscalsim_us.model_api import *


class alt_energy_device_2020(Variable):
value_type = bool
entity = TaxUnit
label = "Idaho Qualifying Alternative Energy Device 2020"
documentation = "Idaho qualifying alternative energy device 2020"
definition_period = YEAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from fiscalsim_us.model_api import *


class alt_energy_device_2021(Variable):
value_type = bool
entity = TaxUnit
label = "Idaho Qualifying Alternative Energy Device 2021"
documentation = "Idaho qualifying alternative energy device 2021"
definition_period = YEAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from fiscalsim_us.model_api import *


class alt_energy_device_2022(Variable):
value_type = bool
entity = TaxUnit
label = "Idaho Qualifying Alternative Energy Device 2022"
documentation = "Idaho qualifying alternative energy device 2022"
definition_period = YEAR
Loading