fix(transactions): include one-time in reports, keep out of budget medians

Merge conflicts
GL
21d ago
+132-50

Fixes #1994

Summary

  • Adds Transaction::REPORT_EXCLUDED_KINDS (transfers + CC payments only)
  • Historical totals, reports, and default expense_totals / income_totals include one-time transactions
  • Budget medians, budget category actuals, and for_budget: true period totals still exclude one-time
  • Budget#actual_income now uses budget-scoped income_totals (matches actual_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.

Review Change Stack