fix(transactions): include one-time in reports, keep out of budget medians
Merge conflicts
GL
21d ago+132+132+012345678901234567890123456789-50-50-01234567890123456789
Fixes #1994
Summary
- Adds
Transaction::REPORT_EXCLUDED_KINDS(transfers + CC payments only) - Historical totals, reports, and default
expense_totals/income_totalsinclude one-time transactions - Budget medians, budget category actuals, and
for_budget: trueperiod totals still exclude one-time Budget#actual_incomenow uses budget-scopedincome_totals(matchesactual_spending)
Test plan
-
bin/rails test test/models/income_statement_test.rb -
bin/rails test test/models/budget_test.rb:457
Summary by CodeRabbit
-
Bug Fixes
- Fixed transaction-kind filtering so reports, exports, and budget calculations use the correct exclusion set, improving accuracy of breakdowns and exported aggregates.
-
Refactor
- Totals now distinguish budget vs. report modes so cached totals and period calculations reflect the proper exclusion rules.
-
Documentation
- Updated description of one-time transactions in historical reports and budget medians.
-
Tests
- Added tests ensuring one-time transactions are included in standard totals but excluded for budget-scoped totals.