Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: patch
changes:
fixed:
- Delaware itemized deductions logic.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
input:
de_itemized_deductions_indv: 5_100
de_standard_deduction_indv: 5_000
de_tax_unit_itemizes: true
state_code: DE
output:
de_deduction_indv: 5_100
Expand All @@ -12,6 +13,7 @@
input:
de_itemized_deductions_indv: 5_000
de_standard_deduction_indv: 5_200
de_tax_unit_itemizes: false
state_code: DE
output:
de_deduction_indv: 5_200
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
period: 2022
input:
de_itemized_deductions_joint: 5_100
de_itemized_deductions_unit: true
ar_standard_deduction_joint: 5_000
state_code: DE
output:
Expand All @@ -11,6 +12,7 @@
period: 2022
input:
de_itemized_deductions_joint: 5_100
de_itemized_deductions_unit: false
de_standard_deduction_joint: 5_200
state_code: DE
output:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- name: Itemized over standard deduction amount
period: 2022
input:
de_itemized_deductions_unit: 5_100
de_standard_deduction_indv: 5_000
state_code: DE
output:
de_tax_unit_itemizes: true

- name: Itemized under standard deduction amount
period: 2022
input:
de_itemized_deductions_unit: 5_000
de_standard_deduction_indv: 5_200
state_code: DE
output:
de_tax_unit_itemizes: false
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class de_deduction_indv(Variable):
defined_for = StateCode.DE

def formula(person, period, parameters):
itemizes = person.tax_unit("de_tax_unit_itemizes", period)
itemized = person("de_itemized_deductions_indv", period)
standard = person("de_standard_deduction_indv", period)
return max_(itemized, standard)
return where(itemizes, itemized, standard)
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class de_deduction_joint(Variable):
defined_for = StateCode.DE

def formula(person, period, parameters):
itemizes = person.tax_unit("de_itemized_deductions_unit", period)
itemized = person("de_itemized_deductions_joint", period)
standard = person("de_standard_deduction_joint", period)
return max_(itemized, standard)
return where(itemizes, itemized, standard)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from policyengine_us.model_api import *


class de_tax_unit_itemizes(Variable):
value_type = bool
entity = TaxUnit
label = "Whether the tax unit in Delaware itemizes the deductions"
definition_period = YEAR
defined_for = StateCode.DE

def formula(tax_unit, period, parameters):
itemized_ded = tax_unit("de_itemized_deductions_unit", period)
standard_ded = add(tax_unit, period, ["de_standard_deduction_indv"])
return itemized_ded > standard_ded