Normalize line endings in vault balance plan doc
Deploy website via FTP / Deploy (push) Skipped

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.
This commit is contained in:
Keith Solomon
2026-08-10 20:40:55 -05:00
parent bd120608d7
commit 4339958b5e
@@ -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:** **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:** **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. - `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** - [ ] **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 ```php
function vaultLoop ($name=null) { function vaultLoop ($name=null) {
@@ -285,13 +285,13 @@ function vaultLoop ($name=null) {
- [ ] **Step 2: Verify the file parses** - [ ] **Step 2: Verify the file parses**
Run: `php -l functions.php` Run: `php -l includes/utilities.php`
Expected: `No syntax errors detected`. Expected: `No syntax errors detected`.
- [ ] **Step 3: Commit** - [ ] **Step 3: Commit**
```bash ```bash
git add functions.php git add includes/utilities.php
git commit -m "vaultLoop: use MAX(running_balance) per user instead of SUM(amount)" git commit -m "vaultLoop: use MAX(running_balance) per user instead of SUM(amount)"
``` ```