From 92979f7de72e1e4fe2e0ae6e2a42588b78a73c75 Mon Sep 17 00:00:00 2001 From: JasonFraser Date: Mon, 12 Oct 2026 07:21:52 -0400 Subject: [PATCH] Show why the balance doesn't match, not just a grey readout Grey (vs green) on the calc-readouts said something was wrong but never what - the actual explanation (the statement_balance check's own detail text, with the full math and "off by \$X") only existed in the checks list, which starts collapsed by default, with no visible link back to the readouts near the balance fields. Surfaces that same detail text directly under the balance fields/Recheck button when the check outcome is "fail" - no new backend call or logic, just showing what was already being computed and returned, in the place the user is actually looking. Co-Authored-By: Claude Sonnet 5 --- frontend/src/assets/main.css | 1 + frontend/src/components/TransactionsTable.vue | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/frontend/src/assets/main.css b/frontend/src/assets/main.css index 2ae101a..e6357de 100644 --- a/frontend/src/assets/main.css +++ b/frontend/src/assets/main.css @@ -109,6 +109,7 @@ h1{ font-family:var(--fd); font-weight:800; font-size:30px; letter-spacing:-.01e border:1px solid rgba(220,38,38,.3); border-radius:9px; padding:11px 14px; margin-top:12px; } .error-note.visible{ display:block; } +.fields-row + .error-note.visible{ margin-bottom:14px; } .status-banner{ display:inline-flex; align-items:center; gap:9px; padding:7px 15px; border-radius:20px; diff --git a/frontend/src/components/TransactionsTable.vue b/frontend/src/components/TransactionsTable.vue index 87f42ff..b137685 100644 --- a/frontend/src/components/TransactionsTable.vue +++ b/frontend/src/components/TransactionsTable.vue @@ -44,6 +44,17 @@ const closingCalcText = computed(() => { const toggleLabel = computed(() => (uiStore.pdfColHidden ? 'Show Source Doc' : 'Hide Source Doc')) +// The grey (non-matching) calc-readout on its own doesn't say WHY - +// surface the statement_balance check's own detail text (it already +// has the full math and the "off by $X" amount, no need to re-derive +// that client-side) right under the fields where the mismatch is +// actually visible, instead of leaving the user to find the same line +// in the (collapsed-by-default) checks list elsewhere on the page. +const balanceMismatchText = computed(() => { + const check = balanceCheck.value + return check?.outcome === 'fail' ? check.detail : '' +}) + // ── Balance recheck ────────────────────────────────────────────────── // Entering opening/closing balance AFTER extraction (e.g. the user // forgot to type it before clicking Extract) doesn't update anything on @@ -97,6 +108,7 @@ async function handleRecheck() { {{ rechecking ? 'Checking…' : 'Recheck Balance' }} +
Balance doesn't match the statement — {{ balanceMismatchText }}
This statement format may not print a clean opening/closing balance — enter them here to run the full statement balance check; otherwise it's marked "not available" rather than guessed.
Click the pencil on a row to edit it, then Save to commit - edits are saved to this browser as you confirm them, row by row.