Skip to content

Conversation

@MaxGhenis
Copy link
Contributor

Summary

  • Implements New Jersey's "same category rule" (N.J.S. 54A:5-1) for gross income calculation
  • Under this rule, if any income category has a net loss, that loss is disregarded (treated as $0) and cannot offset income from other categories
  • Applies max_(0, category_total) to capital gains, partnership/S-corp income, self-employment income, farm income, and rental income

Fixes #7017

Test plan

  • Added YAML tests covering the same-category loss rule scenarios
  • Verified existing NJ integration tests still pass
  • Ran make format to ensure code style compliance

🤖 Generated with Claude Code

Fixes #7017

Under NJ's "same category rule" (N.J.S. 54A:5-1), if any of the income
categories has a net loss, that loss must be disregarded (treated as $0)
and cannot offset income from other categories.

This change applies max_(0, category_total) to:
- Capital gains (short-term + long-term combined)
- Partnership/S-corp income
- Self-employment income
- Farm income
- Rental income

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (66ccff2) to head (9d19ed9).
⚠️ Report is 430 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##             main     #7280       +/-   ##
============================================
+ Coverage   72.72%   100.00%   +27.27%     
============================================
  Files        3757         1     -3756     
  Lines       54115        24    -54091     
  Branches      267         0      -267     
============================================
- Hits        39353        24    -39329     
+ Misses      14742         0    -14742     
+ Partials       20         0       -20     
Flag Coverage Δ
unittests 100.00% <100.00%> (+27.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NJ gross income incorrectly includes net losses from income categories; missing 'same category rule'

2 participants