MoneyInput component:
- Accepts flexible monetary input: 1234.50, 1234,50, 1.234,50, 1,234.50
- Heuristic: if both dot and comma present, last one is decimal separator
- If single separator followed by exactly 3 digits, it's thousands
- Shows "→ formatted" confirmation below the field while typing
- Returns value in cents (Int64) to parent
- Right-aligned monospace display with currency code adornment
- On blur, replaces raw input with formatted value
DateInput component:
- Wrapper around native date picker
- Always stores/communicates ISO 8601 (YYYY-MM-DD)
ExpenseClaimFormPage:
- Description, date, budget account selector, total amount, VAT amount
(when org VatEnabled), receipt upload, submit button
- Finds system accounts (Expense Claims debt, VAT inbound) automatically
- Shows net amount (excl. VAT) when VAT is entered
- Uploads attached document after claim creation
- Redirects to expense claims list on success
- "File Expense Claim" button added to expense claims list page
Made-with: Cursor
accounting-core spec: clarified Money representation unit model:
fiat cents ↔ crypto satoshis, dollars ↔ microcoins, both 2 decimal
places. 1 microcoin = 100 satoshis, same as 1 dollar = 100 cents.
exchange-rates spec: added investigation warning for BCH exception.
If BTC and BCH both use satoshi/microcoin units, the ÷1,000,000
micro-BTC scaling should apply to BCH too. The current exception
(BCH stored at face value) may be incorrect and could produce
conversions off by 6 orders of magnitude. Action required: verify
end-to-end with known amounts before live BCH conversions.
Made-with: Cursor
Backend: GET /api/organizations/{orgId}/search/transactions
- Text search on transaction description (case-insensitive)
- Tx# / sequence ID lookup
- Amount range (min/max in cents, matches absolute row amounts)
- Date range (from/to)
- Optional account filter
- Returns transactions with nested rows, same format as General Journal
- Results ordered by date descending, capped at 500
Frontend: SearchTab component
- Search bar with description field (autofocus, Enter to search),
Tx# field, amount min/max, date from/to pickers, Search button
- Results displayed in General Journal format: transaction headers
with account rows, clickable for transaction detail dialog
- "N transactions found" with query echo
- Empty state before first search, "No transactions found" after
- Same visual style as General Journal (badges, colSpan, monospace)
Search tab now enabled in the Inspect Ledgers tab bar.
Made-with: Cursor
Debit/Credit columns: 100px → 130px
Balance column: 110px → 140px
Accommodates million-scale amounts like 1,992,983.52 without overflow.
Applied to both Account Ledger and General Journal tabs.
Made-with: Cursor
TransactionDetailDialog: shared modal showing full transaction info:
- Header: Tx#, balanced/unbalanced chip
- Date, description, currency
- Dependency link (Expense Claim #N, Invoice #N, etc.)
- Blockchain hash if present
- Documentation indicator
- Row table: account name, debit, credit, foreign currency, totals
Wired into both tabs:
- Account Ledger: Tx# column is now clickable (blue, underline on hover)
- General Journal: transaction header row is clickable (hover highlight)
Both tabs load account name map from /inspect/accounts-tree for the
dialog's account name resolution.
Also updated TransactionDetail API type to include hasDocumentation,
dependency, and foreign currency fields on rows.
Made-with: Cursor
General Journal: account rows now use colSpan=2 to merge the Date and
Description columns, so the badge+account name starts under the
transaction date rather than being deeply indented under the description.
Creates a more natural visual hierarchy.
Account Ledger: fixed prior balance calculation for result accounts
(Income/Cost) — now computed from fiscal year start to period start,
matching the General Journal fix. Balance accounts (Asset/Debt) still
use all-time cumulative.
Made-with: Cursor
- Moved account type badge into the Description/Account cell, inline
with the account name. Badge and name are now in the same column as
the transaction description, creating natural visual alignment.
- Widened balance column to 120px, added whiteSpace: nowrap + overflow:
hidden on all numeric columns to prevent layout breakage with large
numbers.
- Trimmed Tx# column to 55px.
Made-with: Cursor
- Fixed result account (Income/Cost) running balance: now computed from
fiscal year start to period start, not from dawn of time. Balance
accounts (Asset/Debt) still use all-time cumulative as before.
- Narrowed date column from 145px to 130px
- Right-aligned account type badge (pr: 4px) so it acts as a bullet
point for the account name (pl: 4px), creating visual continuity
between badge and account name across the column boundary
Made-with: Cursor
- Added per-account running balance column: each row shows the account's
balance after this specific row's delta is applied. Balance accounts
(Asset/Debt) start from dawn-of-time prior balance; result accounts
(Income/Cost) start from fiscal year start.
- Removed collapse/expand on transaction headers — they're just headers,
not collapsible parents. Eliminates whitespace issue.
- Widened date column to 145px with whiteSpace: nowrap to prevent
date wrapping across lines.
- Simplified component by removing all collapse state and animation code.
Made-with: Cursor
AccountNameResolver strips [LOC] prefix and looks up English display
names from a static dictionary matching the v5 .resx resource file.
Applied to all API endpoints that return account names:
- Inspect ledger (account ledger + general journal)
- Accounts tree dropdown
- Tree report endpoints (balance sheet + P&L)
- Account list endpoint
Examples: [LOC]Asset_BitcoinHot → "Bitcoin Hot Wallet",
[LOC]Cost_ForexLosses → "Forex Capital Losses",
[LOC]Debt_Equity → "Equity"
Non-[LOC] names (user-created accounts) pass through unchanged.
Future: load per-language from database for i18n support.
Made-with: Cursor
- Checkbox for "own transactions only" now lives outside the
data-dependent rendering block — visible whenever the selected
account has children, regardless of query results
- Selected account stored as ID (number), not object reference,
eliminating React re-render reference-equality issues
- isGroupAccount derived via useMemo from stable primitives
- ownOnly reset moved to onChange handler, not effects
- Autocomplete uses isOptionEqualToValue for stable comparison
- Currency code (SEK/EUR) shown in ledger header from org API
Made-with: Cursor
- Checkbox "own transactions only" no longer disappears when checked:
group state tracked from account selection, not from API response
- Reset ownOnly to false when switching accounts
- Currency code (SEK, EUR) shown instead of org name in ledger header
- Organization list and detail API endpoints now include currencyCode
resolved from the Currencies table
Made-with: Cursor
Backend: inspect/ledger endpoint now supports group queries:
- Selecting a parent account returns merged transactions from all
descendants, sorted chronologically
- ?ownOnly=true filters to just the selected account's own transactions
- Response includes isGroup, groupAccountCount, accountName per entry
Frontend improvements:
- Account dropdown shows tree indentation matching account hierarchy
- Prior balance row at top of ledger, closing balance at bottom
- Period totals row shows only debit/credit sums (no balance)
- Account column appears automatically for group views
- Checkbox "Show only this account's own transactions (exclude
sub-accounts)" appears when viewing a parent account with children
- Currency label above table
- Entries sorted by date within group view
Made-with: Cursor
- Header and footer rows now use same CELL_PX padding as data rows,
fixing horizontal misalignment of column values
- New initialExpanded prop: 'roots' (default), 'all', 'none', or
Set<number> for specific node IDs
Made-with: Cursor
The tree grid now matches v5 Open Ledgers behavior:
Value crossfade (v5 pattern):
- Each parent cell holds BOTH the aggregate (Σ) and own value
- Two absolutely-positioned overlapping elements at right: 0
- isCollapsed toggles opacity between them via CSS transition
- One fades out, the other fades in — pure crossfade, no value swap
- Single state change drives everything, no JavaScript animation timing
Row animation:
- AnimatedCellContent wraps each cell's content in a height-animated div
- Fixed ROW_HEIGHT (28px) for consistent layout
- overflow: hidden clips vertically without horizontal shift
- Children slide in/out simultaneously with the parent value crossfade
Column stability:
- tableLayout: fixed with colgroup for locked column widths
- All cells use identical CELL_PX padding
- DualValueCell shared between root and animated rows
- position: absolute + right: 0 ensures alignment regardless of text length
Visual polish:
- Σ prefix: 14px bold, only on collapsed non-zero aggregates
- Expanded parents with zero own-value show empty (reduce clutter)
- Chevron rotates 90° smoothly on expand
- Folder/FolderOpen icons for parents, Description for leaves
Made-with: Cursor
New reusable AccountTreeGrid component:
- Hierarchical tree with expand/collapse per node
- Σ prefix on aggregated parent values when collapsed
- Parent nodes show sum of all descendants when collapsed
- Own-value shown when expanded (for nodes with direct amounts)
- Column totals invariant: same regardless of expand/collapse state
- Folder/document icons matching v5 visual language
- CSS transitions on hover and state changes
- CSV download support per section
New backend endpoints:
- GET /api/organizations/{orgId}/reports/balance-sheet-tree?year=N
Returns accounts with quarterly columns: Start, Q1, Q2, Q3, Q4, Current
- GET /api/organizations/{orgId}/reports/profit-loss-tree?year=N
Returns accounts with: Last Year, Q1, Q2, Q3, Q4, YTD
Rebuilt pages using tree grid:
- Balance Sheet: Assets and Liabilities sections with quarterly breakdown
- Profit & Loss: Revenue and Expenses sections with quarterly breakdown,
net result chip, CSV download
Modeled after v5 Open Ledgers treegrid functionality.
Made-with: Cursor
InvoiceEndpoints.cs called SetExpenseClaimAttested instead of
SetInboundInvoiceAttested — a copy-paste bug that would have updated
the wrong table. Added the missing SetInboundInvoiceAttested method
to ApArRepository.
Found by adversarial code review.
Made-with: Cursor
The auth/me endpoint was excluded from AuthMiddleware (as all /api/auth/
paths are), so dev-mode auto-auth never ran for it. Fixed by checking
DevMode config directly in the /me handler.
Also removed the aggressive window.location redirect from the API client
— the React router handles 401s via the RequireAuth wrapper instead.
Made-with: Cursor
Full React + MUI + TypeScript SPA at frontend/:
- API client with typed interfaces for all endpoints
- AuthContext (session cookies, dev impersonation)
- OrgContext (org list, active org switcher)
- Money formatting (cents → display, satoshis → BCH)
App shell:
- Sidebar navigation with collapsible Ledgers and Financial sections
- Top bar with org switcher, language selector (EN/SV/DE), user chip
- Material UI theme with Inter font
Live data pages (connected to real migrated production data):
- Dashboard: YTD P&L cards, pending tasks, quick links
- Balance Sheet: date picker, assets/debts tables with totals
- Profit & Loss: year selector, income/costs breakdown, net result
- Chart of Accounts: grouped by type with status chips
- Crypto Treasury: total balance, address table with BCH amounts
- Expense Claims: list with amounts, VAT, status chips
Placeholder pages for: Inspect Ledgers, Budget vs Actual, Inbound/
Outbound Invoices, Payouts, End of Month, Org Settings, User Management
Vite dev server proxies /api to ASP.NET Core backend on port 5222.
Made-with: Cursor