Skip to content

Bank Transaction Register XLSX overhaul + shared letterhead + memo entry-point + tx-detail deep-link

Goal (owner, 2026-06-15)

Eight asks against the Bank Transaction Register XLSX export (and exported XLSX files generally). The owner attached a hand-perfected target file bank-transaction-register-erl-2026-06-14.xlsx β€” its row 9 already shows the desired 13-column order + removals, and rows 1–9/10 show the header block + data-row alignments. The renames (ask 4) are NOT yet in the attached file.

Sub-tasks

  • T-046a β€” Filename: align bank register to the Records convention via buildRegisterXlsxFilename β†’ ERL_Register_BankTransaction_YYYYMMDD.xlsx (was bank-transaction-register-erl-2026-06-14.xlsx). [BankTransactionsTab.tsx ~5219]
  • T-046b β€” Bank register columns (asks 2,3,4,5). Final order + renames: Date [YYYY-MM-DD] Β· Currency Β· Amount Β· DR/CR Β· Bank Β· Type Β· Status Β· GL (was GL Account) Β· Detail Name (was Display Name) Β· Original Transaction Description (was Description) Β· Document Ref Β· Memo Β· Transaction ID. REMOVE: Payer/Payee, Reference, Source. Data-row alignment (NOT headers): Currency right, Amount left, DR/CR center, Bank center, Type center, GL center, rest left. [lib/export/transactionsXlsx.ts]
  • T-046c β€” Shared letterhead matching the attached: logo top-left; EN name Cormorant Infant Light Bold ~9; ZH name Kaiti TC Bold ~8; address/email/phone Cormorant Infant Light Regular ~9; title SF Pro ~30 left; header row SF Pro Text Bold 11 white-on-#B7B7B7. Extract a shared helper + apply to ALL xlsx exports (transactions, records registers, journals, COA, invoices). [new lib/export/xlsxLetterhead.ts]
  • T-046d β€” Memo field: ONLY entry point = Match Transaction modal (NOT bank sync/import). Show on Transaction Detail modal + allow editing AT ALL TIMES (even when matched). [memo write paths + detail modal β€” under investigation]
  • T-046e β€” Transaction ID in the register XLSX β†’ hyperlink to a login-gated Transaction Details PAGE. Logged-out: "To view detail of this transaction, please log in (log on) to the Establishers Operation Platform". [new page/route + auth]

Findings (attached file = the spec, parsed 2026-06-15)

  • Header block rows 1–8 (merged A:F): logo (A1:F2), EN (A3, Cormorant Infant Light Bold 9), ZH (A4, Kaiti TC Bold 8), address/email/phone (A5–A7, Cormorant Infant Light Regular 9), title (A8 "Bank Transaction Register", SF Pro 30, left/middle).
  • Header row 9: SF Pro Text Bold 11, grey fill. Data rows: SF Pro Regular 12.
  • 13 columns already in target order; Payer/Payee, Reference, Source already gone.
  • Records filename convention: buildRegisterXlsxFilename(sub, parts) β†’ ERL_Register_<parts>_YYYYMMDD.xlsx (components/records/recordsXlsx.ts).

Progress (2026-06-15)

  • T-046a DONE β€” bank register filename now buildRegisterXlsxFilename(SUB, ['BankTransaction']) β†’ ERL_Register_BankTransaction_YYYYMMDD.xlsx. [BankTransactionsTab.tsx]
  • T-046b DONE + verified β€” 13-col order + renames + data-row alignment in transactionsXlsx.ts. Generated a sample workbook and confirmed it matches the attached (headers + per-col header/data alignment differ exactly as in the reference). Removed dead CR_COLOR/DR_COLOR.
  • T-046c partial β€” NEW lib/export/xlsxLetterhead.ts (shared logo+identity+title block matching the attached) applied to the bank register + verified. ROLL-OUT to recordsXlsx registers / journalEntriesXlsx / invoices xlsx still pending (needs subsidiary identity threaded into recordsXlsx callers). Judgment calls: kept brand ZH font Iansui (attached showed "Kaiti TC" = macOS substitution artifact); title merged across full table width (cosmetically identical).
  • T-046d / #7 β€” DONE + REDESIGNED (origin/nightly 77a927cf; supersedes the period-gated first cut b1cecd7f). Owner split the single "memo" into TWO distinct concepts, kept in SEPARATE expandable sections in the detail drawer (transactionWorkspace/TransactionDetailsDrawer.tsx, as Collapse panels like Attachments), and NEITHER is bound by period-close β€” they're metadata / communication, not financial data: β€’ Note = the one-liner (rides the memo field; shows as its own column in the XLSX register) β€” always-editable section. Saved via NEW PATCH /api/accounting/transactions/[id]/note, which deliberately does NOT call assertTxPeriodOpen, so it's editable even in a CLOSED period. handleUpdateMemo β†’ handleUpdateNote; drawer prop onUpdateMemo β†’ onUpdateNote. β€’ Comments = NEW append-only personnel thread in a comments subcollection (author + server timestamp), own expandable section, NEVER exported to XLSX. GET/POST /api/accounting/transactions/[id]/comments (also not period-gated). New self-contained <TransactionComments>, lazy-loaded on first expand. Notifications (ping the other director) DEFERRED to the notification center (T-037–041). The financial PATCH/POST on /transactions/[id] stay STRICTLY period-gated β€” the guard never weakens for the data that matters. Both surfaces reach the Accounting page AND the standalone /transaction/[id] window via the shared workspace. tsc 0; suite 325/325; 0 new lint. FLAG (still open): bankAccountLifecycle.server.ts writes a hardcoded settlement memo (system-generated, not bank sync) β€” owner may want that reviewed against the "note = Match-modal + manual" intent.
  • T-046e (tx page) DONE + verified β€” owner chose App Router. Built app/transactions/[id]/page.tsx (server: getServerSession β€” NO requireRbac, so logged-out RENDERS the message instead of redirecting; loads getTransaction(id); maps to serializable props) + app/transactions/[id]/client.tsx (Antd Result/Descriptions: loggedOut message / notFound / detail card). Transaction ID column in the register XLSX is now an XlsxLink β†’ https://eop.theestablishers.com/transactions/<id> (blue underline like Document Ref). VERIFIED live (next-dev): logged-out β†’ 200 + exact message "To view detail of this transaction, please log in (log on) to the Establishers Operation Platform" + Log in button. Confirmed no layout/providers/middleware guard hijacks it (middleware only matches /api/*).

a/b/c-bank + e COMMITTED to nightly 1751ace8 (NOT main). #7 DONE β€” Note/Comments redesign (nightly 77a927cf). Only #6 β€” roll the shared letterhead out to recordsXlsx registers / journalEntriesXlsx / invoices xlsx β€” remains.

Log

  • 2026-06-15 created (owner, 8 asks). Parsed attached target file; split into a–e.
  • 2026-06-15 a+b done & verified; c shared letterhead built + applied to bank register; d+e investigated (agents). tsc+lint clean.
  • 2026-06-18 #7 first cut (b1cecd7f): editable memo in the detail drawer, but period-gated + a Descriptions row.
  • 2026-06-19 #7 REDESIGNED per owner (77a927cf): memo β†’ Note (one-liner, XLSX) + NEW Comments thread, two separate expandable sections, NEITHER period-gated (new /note + /comments endpoints skip assertTxPeriodOpen). Comments = append-only comments subcollection + <TransactionComments>; notifications deferred to T-037–041. tsc 0; suite 325/325. Only #6 remains.