From b40381fb8950cb5613a2af15d2421d5bc5dbc588 Mon Sep 17 00:00:00 2001 From: le king fu Date: Sat, 11 Jul 2026 15:17:48 -0400 Subject: [PATCH] docs(reports): fix stale COMPARE_DELTA_SQL comment references The constant became the compareDeltaSql() function in the previous commit (Issue #273); three comments still named the old constant. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/services/reportService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/reportService.ts b/src/services/reportService.ts index 7acebc7..67dcc19 100644 --- a/src/services/reportService.ts +++ b/src/services/reportService.ts @@ -691,7 +691,7 @@ export function buildLeafDrivenTree(leaves: T[], opts: LeafDrivenTreeOptions< * Minimal category metadata for building the compare tree. Fetched WITHOUT an * `is_active` filter so soft-deleted categories (is_active = 0) that still carry * historic transactions keep their place in the hierarchy — matching the raw - * LEFT JOIN behavior of COMPARE_DELTA_SQL (no regression on the leaves shown). + * LEFT JOIN behavior of compareDeltaSql() (no regression on the leaves shown). */ type CompareCatMeta = TreeCatMeta; @@ -702,7 +702,7 @@ const COMPARE_CATEGORIES_SQL = `SELECT id, name, color, type, parent_id FROM cat const COMPARE_TYPE_ORDER: Record = { income: 0, expense: 1, transfer: 2 }; /** - * Turns the flat per-category deltas returned by COMPARE_DELTA_SQL into a + * Turns the flat per-category deltas returned by compareDeltaSql() into a * parent/child tree with subtotal (`is_parent`) rows, mirroring the hierarchy of * getBudgetVsActualData. * @@ -1418,7 +1418,7 @@ export async function getCartesSnapshot( // Top movers: biggest MoM increases / decreases. `momRows` now carries the // compare hierarchy (Issue #247) — skip the subtotal (`is_parent`) rows so a // parent group can't double-count against its own leaves. Keep only EXPENSE - // leaves: since Issue #253 broadened COMPARE_DELTA_SQL to surface income (and + // leaves: since Issue #253 broadened compareDeltaSql() to surface income (and // net transfers), momRows now also carries revenue rows — and this card is a // spending view whose colours read "up = red" (more spending is bad), so a // salary rise must not appear under "biggest increases" in red. Mirror the