From 4339958b5e92b6679556172c92b2ff8d602a5e5a Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Mon, 10 Aug 2026 20:40:55 -0500 Subject: [PATCH] Normalize line endings in vault balance plan doc The plan was committed with LF endings; the editor normalized to CRLF on save. Restore LF for consistency with the rest of the repo's plan docs. --- .../plans/2026-08-03-vault-balance-from-api-design.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/superpowers/plans/2026-08-03-vault-balance-from-api-design.md b/docs/superpowers/plans/2026-08-03-vault-balance-from-api-design.md index 36aab2e..da90352 100644 --- a/docs/superpowers/plans/2026-08-03-vault-balance-from-api-design.md +++ b/docs/superpowers/plans/2026-08-03-vault-balance-from-api-design.md @@ -248,10 +248,10 @@ git commit -m "fetchVaultRecords: explicit column list including running_balance --- -### Task 4: Switch `vaultLoop` / `generateBalance` / `getSpace` to MAX(running_balance) +### Task 4: Switch `vaultLoop` to MAX(running_balance) **Files:** -- Modify: `functions.php` (the three functions) +- Modify: `includes/utilities.php` (`vaultLoop` lives there; `generateBalance` and `getSpace` already wrap it via `functions.php` — they don't need changes) **Interfaces:** - `vaultLoop($name=null)`: returns the per-user vault balance (the most recent entry's `running_balance`) for the given user, or the sum of those across all users when `$name` is null. Goes directly to PDO instead of fetching records. @@ -260,7 +260,7 @@ git commit -m "fetchVaultRecords: explicit column list including running_balance - [ ] **Step 1: Replace `vaultLoop` with a SQL-based implementation** -In `functions.php`, replace `vaultLoop` (currently at lines 199-208) with: +In `includes/utilities.php`, replace `vaultLoop` (currently at lines 202-208) with: ```php function vaultLoop ($name=null) { @@ -285,13 +285,13 @@ function vaultLoop ($name=null) { - [ ] **Step 2: Verify the file parses** -Run: `php -l functions.php` +Run: `php -l includes/utilities.php` Expected: `No syntax errors detected`. - [ ] **Step 3: Commit** ```bash -git add functions.php +git add includes/utilities.php git commit -m "vaultLoop: use MAX(running_balance) per user instead of SUM(amount)" ```