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
1 change: 1 addition & 0 deletions changelog.d/fix-nj-gross-income.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed NJ gross income formula that broke API reform calculations by replacing ParameterNode iteration with explicit category references.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def formula(person, period, parameters):
# Loss-eligible categories per N.J.S. 54A:5-1: each is
# summed within the category then clamped to $0.
cats = p.loss_eligible_categories
for cat in cats:
total += max_(add(person, period, cats[cat]), 0)
total += max_(add(person, period, cats.category_b), 0)
total += max_(add(person, period, cats.category_c), 0)
total += max_(add(person, period, cats.category_d), 0)
total += max_(add(person, period, cats.category_k_p), 0)
return total
Loading