Skip to content

Commit

Permalink
Merge pull request #1 from rickecon/finpaul-mt
Browse files Browse the repository at this point in the history
Updates to mt branch
  • Loading branch information
finpaul authored Nov 16, 2023
2 parents f8799f6 + 0405d5f commit 363cb0a
Show file tree
Hide file tree
Showing 32 changed files with 52 additions and 37 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Updates Montana tax logic.

## [0.2.5] - 2023-10-24 22:00:00

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ values:
- mt_other_deduction
metadata:
unit: variable
label: montana itemized deductions
label: montana itemized deductions
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ metadata:
label: Montana itemized medical and dental rate
reference:
title: Montana Individual Tax Return Form 2 | Itemized Deductions Scedule | Line 1c
href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/05/Montana-Idividiual-Income-Tax-Return-Form-2-2022v6.2.pdf
href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/05/Montana-Idividiual-Income-Tax-Return-Form-2-2022v6.2.pdf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ metadata:
label: Montana political contributions cap
reference:
title: Montana Individual Tax Return Form 2 | Itemized Deductions Scedule | Line 16
href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/05/Montana-Idividiual-Income-Tax-Return-Form-2-2022v6.2.pdf
href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/05/Montana-Idividiual-Income-Tax-Return-Form-2-2022v6.2.pdf
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ SINGLE:
2022-01-01: 10000
WIDOW:
values:
2022-01-01: 10000
2022-01-01: 10000
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class mt_casualty_loss_deduction(Variable):
"""
Line 15 on Montana itemized deductions schedule
"""

value_type = float
entity = TaxUnit
label = "Montana casualty and theft losses"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ class mt_charitable_carryover_deduction(Variable):
"""
Line 13 on Montana itemized deductions schedule
"""

value_type = float
entity = TaxUnit
label = "Montana charitable carryover donation from previous year deduction"
label = (
"Montana charitable carryover donation from previous year deduction"
)
unit = USD
definition_period = YEAR
defined_for = StateCode.MT
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ class mt_charitable_cash_deduction(Variable):
"""
Line 11 on Montana itemized deductions schedule
"""

value_type = float
entity = TaxUnit
label = "Montana charitable cash donation deduction"
unit = USD
documentation = "Montana deduction from taxable income for charitable cash donations."
documentation = (
"Montana deduction from taxable income for charitable cash donations."
)
definition_period = YEAR
defined_for = StateCode.MT

def formula(tax_unit, period, parameters):
cash_donations = add(tax_unit, period, ["charitable_cash_donations"])
return cash_donations

return cash_donations
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class mt_charitable_noncash_deduction(Variable):
"""
Line 12 on Montana itemized deductions schedule
"""

value_type = float
entity = TaxUnit
label = "Montana charitable non-cash donation deduction"
Expand All @@ -14,5 +15,5 @@ class mt_charitable_noncash_deduction(Variable):

def formula(tax_unit, period, parameters):
noncash_donations = tax_unit(period, ["charitable_non_cash_donations"])
return noncash_donations

return noncash_donations
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ class mt_child_care_expense_deduction(Variable):
"""
Line 14 on Montana itemized deductions schedule
"""

value_type = float
entity = TaxUnit
label = "Montana child and dependent care expenses"
unit = USD
definition_period = YEAR
defined_for = StateCode.MT
defined_for = StateCode.MT
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ class mt_federal_income_tax_deduction(Variable):
label = "Montana federal tax paid/withheld in prior year"
unit = USD
definition_period = YEAR
defined_for = StateCode.MT
defined_for = StateCode.MT
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ class mt_gambling_loss_deduction(Variable):
label = "Montana gambling loss deduction"
unit = USD
definition_period = YEAR
defined_for = StateCode.MT
defined_for = StateCode.MT
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ class mt_home_mortage_interest_deduction(Variable):
label = "Montana home mortage interest deduction"
unit = USD
definition_period = YEAR
defined_for = StateCode.MT
defined_for = StateCode.MT
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ class mt_investment_interest_deduction(Variable):

def formula(tax_unit, period, parameters):
contributions = tax_unit("investment_income_form_4952")
return contributions

return contributions
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ class mt_light_vehicle_registration_deduction(Variable):
label = "Montana light vehicle registration fees"
unit = USD
definition_period = YEAR
defined_for = StateCode.MT
defined_for = StateCode.MT
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ class mt_long_term_care_premiums_deduction(Variable):
label = "Montana long-term care insurance premiums deduction"
unit = USD
definition_period = YEAR
defined_for = StateCode.MT
defined_for = StateCode.MT
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ class mt_medical_dental_expense(Variable):
label = "Montana medical and dental expense"
unit = USD
definition_period = YEAR
defined_for = StateCode.MT
defined_for = StateCode.MT
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ class mt_medical_dental_expenses_deduction(Variable):
unit = USD
definition_period = YEAR
defined_for = StateCode.MT

def formula(tax_unit, period, parameters):
p = parameters(period).gov.states.mt.tax.income.deductions.itemized.medical_dental
p = parameters(
period
).gov.states.mt.tax.income.deductions.itemized.medical_dental
line1a = tax_unit("mt_medical_dental_expense", period)
line1b = tax_unit("mt_adjusted_gross_income", period)
line1b = tax_unit("mt_agi", period)
line1c = line1b * p.rate

return max_(line1c - line1a, 0)

Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ class mt_medical_premiums_deduction(Variable):
label = "Montana medical insurance premiums"
unit = USD
definition_period = YEAR
defined_for = StateCode.MT
defined_for = StateCode.MT
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ class mt_other_deduction(Variable):
"""
Line 18 on itemized deductions schedule
"""

value_type = float
entity = TaxUnit
label = "Montana other deductions"
unit = USD
definition_period = YEAR
defined_for = StateCode.MT
defined_for = StateCode.MT
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ class mt_other_taxes_paid_deduction(Variable):
label = "Montana other deductible taxes paid"
unit = USD
definition_period = YEAR
defined_for = StateCode.MT
defined_for = StateCode.MT
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ class mt_per_capita_livestock_deduction(Variable):
label = "Montana per capita livestock fees"
unit = USD
definition_period = YEAR
defined_for = StateCode.MT
defined_for = StateCode.MT
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class mt_political_contributions(Variable):
label = "Montana political contributions"
unit = USD
definition_period = YEAR
defined_for = StateCode.MT
defined_for = StateCode.MT
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ class mt_political_contributions_deduction(Variable):
unit = USD
definition_period = YEAR
defined_for = StateCode.MT

def formula(tax_unit, period, parameters):
p = parameters(period).gov.states.mt.tax.income.deductions.itemized.misc
p = parameters(
period
).gov.states.mt.tax.income.deductions.itemized.misc
cap = p.political_contribution_cap
contributions = tax_unit("mt_political_contributions")
return min_(cap, contributions)

return min_(cap, contributions)
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ def formula(tax_unit, period, parameters):
period
).gov.state.mt.tax.income.deductions.itemized.misc
cap = salt.salt_cap[tax_unit("filing_status", period)]
return min(cap, salt_amount)
return min(cap, salt_amount)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class mt_standard_deduction(Variable):
def formula(tax_unit, period, parameters):
filing_status = tax_unit("filing_status", period)
p = parameters(period).gov.states.mt.tax.income.deductions.standard
agi = tax_unit("mt_adjusted_gross_income", period)
agi = tax_unit("mt_agi", period)
# standard deduction is a percentage of AGI that
# is bounded by a min/max by filing status.
min_amount = p.min[filing_status]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from fiscalsim_us.model_api import *


class mt_adjusted_gross_income(Variable):
class mt_agi(Variable):
"""
Line 14 on Montana individual income tax return form 2
Montana adjusted gross income. Line 14 on Montana individual income tax
return form 2
"""

value_type = float
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ def formula(tax_unit, period, parameters):
exemptions = tax_unit("mt_exemptions", period)
return max(
0,
tax_unit("mt_adjusted_gross_income", period) - deductions - exemptions,
tax_unit("mt_agi", period) - deductions - exemptions,
)

0 comments on commit 363cb0a

Please sign in to comment.