The "actual vs actual" compare was expenses-only (WHERE amount < 0), so revenue categories were invisible — you could not tell a surplus from a deficit. Make it an income statement (the product's namesake "résultat"): - COMPARE_DELTA_SQL: broaden the WHERE and per-type CASE to include `income` as a signed SUM (like `transfer`), so revenue credits survive the outflow filter. Expenses stay ABS-of-outflows, byte-identical. Transfer netting (#243) intact. - Section order is now income -> expense -> transfer (COMPARE_TYPE_ORDER). - ComparePeriodTable: replace the now-meaningless flat grand total with two result lines — "result before transfers" (revenues - expenses) and the net "result" (after transfers) — extracted into a pure, tested compareResults module. Delta colours are direction-aware (income/result up = green, spending up = red); result amounts are coloured by sign (surplus/deficit). - ComparePeriodChart stays a spending view: filter to expense leaves so revenue bars don't mix into the same axis. - useCompare: skip the initial period-sync so the compare opens on the previous (last complete) month instead of the civil-year December that useReportsPeriod yields by default. Also anchor the `reports/` gitignore to `/reports/` — the unanchored rule was silently ignoring new files under src/components/reports/. Tests: new compareResults.test.ts (result roll-up, unbalanced transfer, deficit, subtotal exclusion); reportService.test.ts updated for the broadened SQL, the income bucket rule, and income-first section order. Build + 685 vitest green. Resolves #253 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
72 lines
1,012 B
Text
72 lines
1,012 B
Text
# Logs
|
|
logs
|
|
*.log
|
|
npm-debug.log*
|
|
|
|
# Dependencies
|
|
node_modules/
|
|
|
|
# Build output
|
|
dist/
|
|
dist-ssr/
|
|
target/
|
|
|
|
# User data
|
|
data/
|
|
!src/data/
|
|
*.db
|
|
*.db-journal
|
|
*.db-wal
|
|
|
|
# Imports
|
|
imports/*.csv
|
|
|
|
# Environment
|
|
.env
|
|
.env.local
|
|
.env.*
|
|
*.local
|
|
|
|
# Secrets
|
|
*.pem
|
|
*.key
|
|
|
|
# IDE
|
|
.vscode/*
|
|
!.vscode/extensions.json
|
|
.idea/
|
|
*.swp
|
|
*.swo
|
|
*.suo
|
|
*.ntvs*
|
|
*.njsproj
|
|
*.sln
|
|
|
|
# OS
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# Auto-generated changelogs (synced from root by vite.config.ts)
|
|
public/CHANGELOG.md
|
|
public/CHANGELOG.fr.md
|
|
|
|
# Tauri generated
|
|
src-tauri/gen/
|
|
|
|
# Tauri icon CLI also generates iOS/Android assets — desktop targets only (nsis, deb, rpm)
|
|
src-tauri/icons/android/
|
|
src-tauri/icons/ios/
|
|
|
|
# Claude Code local state
|
|
.claude/settings.local.json
|
|
.claude/scheduled_tasks.lock
|
|
.claude/worktrees/
|
|
decisions-log.md
|
|
|
|
# Autopilot scratch + daily reports (repo root only — must not match
|
|
# src/components/reports/, which is real tracked source)
|
|
/reports/
|
|
|
|
# Spec scratch (committed only when promoted to docs/archive/)
|
|
spec-decisions-*.md
|
|
spec-plan-*.md
|