Skip to content

Finance: expense and income tracking, books (ledger, VAT, cheques, receivables, bills) and year-end close - #37

Merged
Vishnu90Coreinn merged 52 commits into
master-qafrom
feat/finance-accounts
Nov 29, 2026
Merged

Vishnu90Coreinn merged 52 commits into
master-qafrom
feat/finance-accounts

Conversation

@Vishnu90Coreinn

@Vishnu90Coreinn Vishnu90Coreinn commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

What this adds

Phase 3 Stage 3 of quotation QTN-HR-2026-005 (expense and income tracking), plus the work that lets the client leave Daftra: a double-entry ledger, VAT, cheques, receivables, supplier bills and year-end close. The ledger and everything after it is outside the Phase 3 quotation (see docs/phase4-ledger-plan.md).

Who can use it: Manager and Administrator add and change; the Partner (Viewer) reads and changes nothing; HR and Supervisor have no access. Staff given the right can enter their own expenses (Employee role, /api/finance/my only).

Tracking (the original scope)

  • Accounts, transfers, categories (F1). Bank and cash accounts with opening balances; balances are worked out from entries, never stored.
  • Expenses and income (F2, F3). Receipt rules, search, filters, server-computed totals.
  • Void, correct, month lock (F4). Nothing is deleted. A month can be locked; unlocking needs a reason.
  • Overview, partners and capital, reports (F5, F6). Excel, PDF and CSV come from one server calculation.

Gaps found in the Daftra review (docs/finance-client-roadmap.md)

Payees, split expenses, cheque register, staff expense entry with approval, petty cash per staff member, Excel import, and more reports (by payee, by who entered it, cash flow, day/week/year).

The books (Phase 4, docs/phase4-ledger-plan.md)

  • Ledger. Journals are derived from the finance records and never edited; a change is a reversing journal. Chart of accounts, a mapping screen (where each category, account and partner posts), trial balance, ledger per account, journals, manual journals, Profit & Loss and Balance Sheet, with Excel/PDF/CSV. A safety check runs on every read: ledger balances equal the finance screens, partner capital agrees, debits equal credits, receivables and payables equal the unpaid invoices and bills.
  • VAT. Tax types per entry (Standard, Zero, Exempt, Reverse Charge, Intra GCC) with a default per category, inclusive or added on top; VAT return with Excel download.
  • Cheques. A linked cheque sits in "cheques payable" (or "receivable") until it clears; the account shows the bank statement balance next to the book balance.
  • Year-end close. Books > Year end closes a finished year (31 December): locks its months and moves income and expenses to Retained earnings in one journal. The year's Profit & Loss still reads the same. An Administrator can reopen the latest closed year with a reason.
  • Receivables. Issuing a tax invoice books receivable, sales and VAT. A payment on an invoice now picks a bank or cash account and adds an income entry that clears the receivable (not new revenue). Books > Receivables shows the aging.
  • Standard chart. The books start from a short English chart (prepaid, deposits, fixed assets, accrued items, loans, named expense accounts) instead of Daftra's ~70 accounts; the starting categories post to named accounts from the first day. See docs/finance-chart-of-accounts.md.
  • Monthly journals. Books > Monthly journals: set up a journal once (day of month, first and optional last month), then press Post due months. Each month posts once as a manual journal; a locked month is left and reported; nothing posts in the background. Covers prepaid spreading, depreciation and accruals.
  • Paying VAT to the tax authority. Two seeded categories (ids 13 and 14): VAT paid to tax authority debits VAT payable, VAT refund from tax authority credits VAT recoverable. No VAT of their own, not a cost in the Books P&L, not in the VAT return, not offered to staff or on bills.
  • Supplier bills (payables). Finance > Bills: entering a bill books the cost, VAT and the payable; paying it from an account clears the payable (not a second cost). The supplier's invoice (PDF, JPEG or PNG, up to 5 MB, at most 5) can be attached to a bill and viewed from it. Books > Payables shows the aging.

Also in this PR: app-wide design refinement

Not finance-specific; it changes the shared styles and kit so every screen picks it up (see docs/design-system.md): Solid button style, Inter body text with Plus Jakarta Sans titles and money figures (new @fontsource-variable packages), mint-tinted surfaces, layered card shadows, a custom select chevron, animated dialogs, shimmer skeletons and gentle reveals (all honouring reduced motion). Reviewers may want to look at apps/web/src/styles.css and apps/web/src/ui/* first.

Usability pass (from a review of every finance screen, docs/finance-ux-review.md is local only)

  • A new entry no longer assumes "Standard rated": a category can say it never carries VAT (salaries, advances, government procedures), offer a type first, or ask each time. The app's own categories are marked system and kept off forms.
  • Payments on invoices and bills are tagged in the lists; Books statements say they are accrual figures.
  • Books is grouped into Statements, Owed, Records and Setup. Month lock can lock up to a month and warns about gaps. Finance > Setup (new) holds categories, month lock and staff entry.
  • Finance overview has a "Needs attention" panel (new endpoint GET /api/finance/attention).
  • VAT page works by quarter and shows the due date. Entry form reordered, Save stays visible, "Save and add another". Bills show owed, overdue and due soon, in due order. Phone menu has headings.
  • The top bar (desktop) also finds entries, bills, cheques and invoices by number, name or amount (GET /api/finance/search) and opens the list on the record.
  • Polish: larger meta text, plain words for Correct and Void, a chart that shows figures on tap, a first-run "Get started" checklist. Keyboard focus rings were checked and show.
  • Not done: search on phones, a Finance tab in the phone bar.

Sessions and staff data (app-wide for sign-ins)

  • Changing or resetting a password now ends the sign-ins made before it. The person changing it gets a new token and stays signed in; change-password returns 200 with that session instead of 204. Nobody is signed out by the upgrade itself.
  • The options for staff expense entry send only what the form needs.

Accounting controls (from a later review)

  • VAT recovery percentage on expenses and bills; blocked VAT is added to the cost and left out of reclaimable VAT. Only a Manager or Administrator sets it; a staff submission is saved at 100%.
  • Assigned VAT period (monthly or quarterly, any start month) in Finance > Setup, used for filing estimates once confirmed.
  • Trial balance shows closing balances at a chosen date. An invoice payment must name the receiving account. The same supplier invoice number is not accepted twice.
  • The books check now counts journals posted by hand and all invoice payments, so older unlinked payments show as a difference until cleared (runbook, section 3). Books also lists classification warnings.
  • Salary advances post to an asset (1510); a journal moves deducted advances to salaries, since payroll does not post to the books.

Desktop layout pass

  • Page actions are level with the title, with the description under both and a rule before the content (PageHeader and CardHeader are shared, so HR screens change too). Month fields share a toolbar on the payroll and deductions pages; Petty cash shows totals as figures; Finance setup and Settings use the same section links.
  • Card actions sit top right; one switch style for periods; Reports and VAT share a toolbar; Books downloads sit in the card header.
  • Fixed layouts that broke at desktop widths: entries table, VAT tables, category rows in Finance setup (two columns on very wide screens), report dates, bill rows.
  • A bill or payee can no longer use a category the app posts to itself, and the server refuses it on a bill.

Screen reworks (HR and finance)

  • Accounts: bank and cash sections, banks-versus-cash bar, masked IBAN, pending-cheque notice, voiding a transfer needs a reason, card actions in a menu.
  • Dashboard: "attendance not marked" state, waiting items oldest first with late tags, clearer chart, invoice aging, pay by name behind a toggle. The bell counts decisions waiting; each menu entry counts its own module (two extra pending-leave reads for Managers).
  • Staff Leave: Requests, Balances and Leave types tabs; balance, overlap and document context on a decision; filters, sorting and paging; rename and confirm for leave types. The leave export takes optional status, search, from and to. No undo: a decided request cannot be reverted.
  • HR Letters: "New request" sits in the page header. Dialogs that are removed return focus to their opener.

Toasts and motion on money screens (c3a4819)

Dashboard, finance (not Finance setup), invoices, payroll and deductions screens. Adds two web dependencies, sonner and motion (both MIT).

  • Toasts: action results (saved, issued, paid, voided and so on) and failed file downloads. Field errors, failed loads and blocking errors stay inline.
  • Motion: content fades in where the skeleton was, bars are drawn from the left, and a figure that changes is underlined briefly. Figures are never counted up. Everything is at rest with reduced motion and in print. The rules are in docs/design-system.md.
  • Tests: a page test that expects an action message now renders <AppToaster />. On this commit, locally: 902 web tests pass, tsc clean, build succeeds.
  • Checked in the app at desktop and phone widths. Reduced motion is covered by unit test only; no print preview was run.

Things worth a reviewer's eye

  • Migrations (in order): AddFinance, AddFinAttachments, AddFinMonthLocks, AddFinPartnersAndCapital, AddFinPayeesAndEntryLines, AddFinCheques, AddStaffExpenseEntry, AddFinCustodyAccounts, AddLedger, AddLedgerManualJournals, AddVatAndChequeBooks, AddInvoiceReceivables, AddSupplierBills, AddRecurringJournals, AddBillAttachments, AddVatSettlementCategories, AddCategoryNoVatAndSystem, AddUserSecurityStamp, FinanceAccountantControls. AddVatAndChequeBooks changes a constraint on journals. Back up the database and the receipts folder first.
  • FinanceCalculator is the only place with balance, share, VAT and allocation arithmetic, pinned by docs/finance-test-vectors.json.
  • System ledger accounts are created on first read and their codes are reserved: 1500 VAT recoverable, 1550 receivables, 1600 cheques receivable, 2150 cheques payable, 2200 VAT payable, 2300 payables, 3800 retained earnings, 3900 opening balance equity, 4900 sales. The standard chart accounts (1700, 1750, 1800, 1850, 2400, 2450, 2500, 4100, 5100 to 5700) are ordinary editable accounts made on first use; a code already in use is left alone.
  • Concurrency. Journal posting runs under one static gate and is idempotent; SyncAsync runs after finance writes and before every ledger read. Never call it while holding the gate.
  • Invoice payments made before this change have no linked entry: they are marked "Not in the books", reduce the invoice but were never added to an account, and Receivables shows a warning with their count.
  • Receipts live in a server folder (Finance:ReceiptsPath, see docs/DEPLOY.md). Back it up with the database.
  • Known gap: the month lock is checked just before saving, not inside a database lock, so a save at the exact instant of locking could slip through.
  • Not built: bank reconciliation, payroll journals, the receipt scanner (skipped on purpose).

Verification

  • API: 1,484 tests pass on real SQL Server (including an end-to-end scenario that walks the client's story and checks every screen agrees). Web: 883 tests pass, tsc clean.
  • Checked in the browser as Manager: Books (all tabs including Year end, Receivables and Payables), Bills (entering a bill), and the books banner stays green. Monthly journals: set up a template, posted a due month, banner stayed green (59 journals).
  • Two web tests (App.test, Layout.phone) can fail under load and pass on their own.
  • Not done: the production deploy, the migrations against production, and the client's opening balances. docs/finance-cutover-runbook.md lists the steps. The accountant still needs to confirm the VAT type per category, reverse charge at 5%, prepaid rent, and the Daftra chart of accounts.

🤖 Generated with Claude Code

Vishnu90Coreinn and others added 10 commits November 24, 2026 17:11
Bank and cash accounts with balances worked out from the opening balance,
entries and transfers; expense and income categories managed in Settings;
transfers between accounts. Manager and Administrator edit, the Partner
reads with account numbers masked, other roles have no access.

- API: /api/finance accounts, categories and transfers, FinanceCalculator
  with shared test vectors, Fin* tables and the AddFinance migration
- Web: Accounts page (total panel, account cards, recent transfers),
  account and transfer dialogs, Settings finance categories card
- Docs: Phase 3 stage 3 build plan

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Record, list and filter expenses. A receipt (PDF, JPEG or PNG, up to 5 MB,
at most 5 files, judged by content) is required; files are kept in a server
folder and only their details in the database.

- API: /api/finance/expenses (create as multipart, list with filters and
  server-side total, get, paid-to suggestions) and receipt download;
  FinAttachments table and EXP/INC number sequences (AddFinAttachments)
- Web: Expenses page (period chips, search, filters, table and phone cards),
  Add expense form with camera capture, receipt viewer dialog
- Deploy: Finance__ReceiptsPath documented; App_Data ignored

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Income entries share the expense page and dialog. Entries and transfers are
never deleted: they are voided with a reason, or corrected by voiding the
original and adding a linked replacement. Managers can lock a month (and
unlock it with a reason); locked months reject every change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
New /finance page: net result for the last 7, 30 or 365 days against the days before, income and expenses by day or month, spending by category, balances today and the latest entries. All figures come from one server-side /api/finance/dashboard endpoint.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…shboard replies

Corrections claim the original entry or transfer inside the transaction, so two simultaneous corrections cannot both succeed. The dashboard shows only the reply to the latest period click.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…, F6)

New /finance/reports page: a period statement per account (opening, income, expenses, transfers, closing) and by category, downloadable as Excel, PDF or CSV from one server-side calculation. The staff export code gained a multi-table PDF and a shared workbook builder so finance reuses the company letterhead.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The client will enter everything by hand and may reconsider an import later.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Partners page with each partner's exact capital and two-decimal share that always adds up to 100.00. Capital added or returned raises or lowers an account balance but is never income or expense; it can be voided, corrected and month-locked like other entries. The report statement gains a Capital column and a Partners' capital section in the screen, Excel, PDF and CSV.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Each calendar month of the period gets its own entries, income, expenses, net, capital and Locked or Open marker, with a total row, on screen and in the Excel, PDF and CSV files. Also stops the CSV from altering negative numbers.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…wn, nav fixes)

Entry tables keep their row tools in view and sort by any column; expense and income lists download as CSV; account cards link to their entries; the overview gains Add income and Add expense, change against the previous period and a labelled chart axis. The menu highlight, breadcrumb and tab title now pick the longest matching path, and the tab title no longer shows a stray character.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e4ebb1ac-5c63-4cb0-b2d7-639ddf1fdb4c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Vishnu90Coreinn and others added 15 commits November 25, 2026 10:32
A name such as ..\..\evil.pdf kept its dots on Linux because only / is a path separator there. Backslashes are now treated as separators on every host. Fixes the failing API test on CI.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ta Sans, softer surfaces, motion)

Shared tokens and kit components only: Solid button style, Inter body with Plus Jakarta Sans for titles and key figures, mint-tinted surfaces, layered card shadows, a custom select chevron, animated dialogs, shimmer skeletons and gentle reveals, all honouring reduced motion. Also fixes literal placeholder text in the receipt help line. design-system.md updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Category shares are worked out to one decimal with the largest-remainder rule so they add up to exactly 100.0 (whole numbers gave 101). Bars are drawn as the share of the total, not relative to the biggest item. The overview shows the money in the accounts under the net result, a Partners' capital card with exact shares, and capital entries in the latest list. Account cards use exact one-decimal shares too.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Amount and counterparty lead, date second, notes, account and reference quieter, actions quietest with Void in red. Applied to expense and income cards and rows, partner movements, transfers, latest entries, account and partner cards and the report statements, where zero amounts are muted so the figures that moved stand out. Also fixes the settings category rows, whose names collapsed to one letter per line on a phone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…enses, staff entry with approval, petty cash, Excel import, more reports)

Cheque register (tracking only), saved payees, expenses split between categories, staff expense submission with Manager approval and an Entered by column, petty cash as custody accounts, Excel import with row checks, and reports by payee, by person, cash flow and day/week/year views. Four migrations. Adds an end-to-end scenario test on the client's real kind of data.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…urnals, safety checks, Books screen)

Every entry, transfer, capital movement and opening balance posts a balanced journal by itself; voids post reversals. Journals are derived and idempotent, so they sync after every finance write and before every read. Safety checks compare the books with the finance screens. Adds the Books page (trial balance, ledger, journals) and a migration.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…r the books (L2, L3)

Add, rename and switch off ledger accounts; choose which ledger account each category, account and partner posts to (rebuilds the books, Administrator only, refused once a month is locked); manual journals that must balance, respect month locks and are undone by reversal; Excel, PDF and CSV of the trial balance, each ledger and the journals. The safety checks compare the records alone and count manual journals apart. Adds a migration.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Both statements come from the journals alone. The P&L net equals the finance report net for the same period, and total assets equal the sum of the account balances; journals posted by hand are included and counted on the statement. Excel, PDF and CSV downloads and two new Books tabs. API suite 1,394 passing; web suite 787 passing, with one timing-dependent test (App.test or Layout.phone, a different one each full run) failing under whole-suite load and passing alone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ivable until they clear

- Tax types (Standard, Zero, Exempt, Reverse Charge, Intra GCC) per entry, with a category default; inclusive or added on top
- VAT posted to the ledger; VAT return report with Excel download and a VAT screen
- Linked cheques post to Cheques payable/receivable at issue and clear to the bank; bank statement balance shown on accounts
- Calculator vectors for VAT and allocation; API (1,430) and web (805) suites pass

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Closing a finished year locks its twelve months and posts one journal that moves income and expenses to Retained earnings
- Years close in order; staff expenses still waiting for approval block the close; months of a closed year cannot be unlocked until the year is reopened
- Administrator can reopen the latest closed year with a reason (reversing journal); Profit & Loss of a closed year still reads the same
- Books > Year end tab; API (1,433) and web (809) suites pass

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Issuing an invoice posts receivable, sales and output VAT; cancelling reverses it
- A payment on an invoice now picks the bank or cash account and adds an income entry that clears the receivable (not new revenue); removing it voids that entry; such an entry cannot be voided or corrected on its own
- Books > Receivables: aging by how late, total equals the receivables account; new safety check compares the ledger with unpaid invoices
- VAT return counts an invoice once, from its issue date
- Invoices cannot be issued, and payments cannot be recorded, in a locked month
- API (1,436) and web (814) suites pass

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Decisions needed, what to collect from Daftra, entering the opening position, dry run, release and rollback, checks, parallel month, switch-off.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Finance > Bills: enter a supplier bill (lines by category, VAT type); it books the cost, VAT and payable at once and moves no bank balance
- Pay a bill (all or part) from a bank or cash account: adds an expense entry that clears the payable, not a second cost; take a payment back with a reason; void a bill while nothing is paid
- Payment entries cannot be voided or corrected on their own; locked months refuse bills and payments
- Books > Payables aging, new Payables safety check, VAT return counts bill VAT once from the bill date (reverse charge posts the input/output pair)
- API (1,439) and web (822) suites pass

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…k covers supplier bills

The previous commit staged docs/ wholesale and pulled in quotations and sample files that do not belong to this change. They stay on disk, untracked.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Vishnu90Coreinn Vishnu90Coreinn changed the title Finance: expense and income tracking, partner capital and reports (Phase 3, stage 3) Finance: expense and income tracking, books (ledger, VAT, cheques, receivables, bills) and year-end close Nov 25, 2026
Vishnu90Coreinn and others added 3 commits November 25, 2026 19:20
- The books start from a short standard chart (prepaid, deposits, fixed assets, accrued items, loans, named expense accounts); the starting categories post to their named accounts from the first day; the two capital categories make no empty accounts
- Books > Monthly journals: set up a journal once (day of month, first and optional last month) and press Post due months; each month posts once as a manual journal, a locked month is left and reported, nothing posts in the background; covers prepaid spreading, depreciation and accruals
- docs/finance-chart-of-accounts.md replaces the Daftra-shaped mapping: the chart, how each thing is booked, and a crosswalk used once for opening balances
- API (1,444) and web (827) suites pass

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…red on every database

- Bills keep PDF, JPEG or PNG files (judged by their bytes, 5 MB each, at most 5); view, add and remove from the bill or attach while entering it; a bill whose file upload fails is still saved and the user is told
- Files cannot be added to a voided bill or changed in a locked month; the file lives in the receipts folder like every receipt
- The standard chart accounts are created on every sync, so databases set up before it get them too (existing codes are left alone)
- Monthly journals checked in the browser: template created, due month posted, books banner stayed green
- API (1,446) and web (829) suites pass

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…with a timeline

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Vishnu90Coreinn and others added 24 commits November 25, 2026 19:48
…funds

- "VAT paid to tax authority" (expense) debits VAT payable; "VAT refund from tax authority" (income) credits VAT recoverable; the bank moves, nothing is a cost or income
- They carry no VAT, are left out of the VAT return, cannot be split or used on supplier bills, and are not offered to staff; the entry form hides the VAT choice for them
- Seeded by migration (ids 13 and 14); mapped to the system VAT accounts by id, so renaming them is safe
- Docs: how a return is settled (net with a manual journal, then pay), and the VAT brought forward at 31 December
- API (1,450) and web (831) suites pass

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… do not block year-end close)

- A cheque linked to an expense or income is booked in the ledger on its write, clear and cancel dates, so creating, editing or changing it in a locked month is now refused
- A year that holds only opening balances no longer blocks closing the years after it
- Runbook: check for invoices already issued in the app before entering the opening position, since they post to the books on their invoice date
- API suite (1,452) passes

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…, recurring start month)

- The VAT settlement categories take ids 13 and 14; the migration first moves any user category already on those ids to new ids and repoints entries, lines, bill lines and payees, so an already-migrated database can still upgrade (tried on a scratch database)
- The bill list works out unpaid, overdue and paid before capping at 500, so a pile of newer paid bills cannot hide an old unpaid one
- A monthly journal cannot start more than two years back, so one click cannot post hundreds of journals
- API suite (1,454) passes

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nd bill payments, explain accrual vs cash

From the finance screen review:
- A new entry no longer starts on "Standard rated". A category can say it never carries VAT (salaries, advances and government procedures are seeded that way), offer a VAT type first, or ask each time; the form remembers the choice per category and refuses to save until a type (or "no VAT") is chosen
- Categories gain NoVat and IsSystem; the app's own categories (invoice and supplier bill payments) are kept off entry forms and refused on entries
- Payments on tax invoices and supplier bills are tagged on the Income and Expenses lists and offer no Correct or Void there; the Income subtitle no longer says it is not linked to invoices
- Books profit and loss and balance sheet say they count invoiced and billed amounts, so they can differ from the cash Finance screens
- Settings shows system categories read-only; the VAT default picker gains "Never carries VAT"

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
From the finance screen review:
- Books: the eleven views are grouped into Statements, Owed, Records and Setup, so none is hidden off the end of a scrolling strip
- Month lock: "Lock every month up to" (asks first, oldest month first), a plain "Locked up to ..." line, and a warning when a month is open although a later one is locked; Expenses and Income say why an old month cannot be changed
- Where records post: bank, cash and partner rows offer only ledger accounts they can take and that no other row uses; "Custody" reads "Petty cash"; a sentence says what changing it does

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
From the finance screen review:
- Finance > Setup (Manager and Administrator): categories with their VAT, the month lock and the staff who may enter expenses, moved out of the HR Settings page, which now links to it
- Finance overview: a Needs attention panel with overdue and due-this-week bills, cheques and invoices, staff expenses to approve, a finished month still open, and the next VAT return date (new endpoint /api/finance/attention)
- API and web tests added for both

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
From the finance screen review:
- VAT page: This quarter, Last quarter and This year; says when the quarter's return is due; downloads sit under the figures
- Add expense and income: date and who first, then amount, category and account; Save stays at the foot of the dialog; "Save and add another" keeps the date, account, category and VAT; the camera button shows only on phones

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… in due order

From the finance screen review:
- The phone More sheet has headings where the finance screens begin and end
- On a phone, Download CSV and Import wait behind "More tools", so the expense list starts higher
- Bills: owed, overdue and due-in-7-days figures above the unpaid list, which reads in the order the bills fall due
- API (1,458) and web (850) suites pass

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Finance roles can search entries, supplier bills, cheques and tax invoices by number, name (spaces ignored, so "msk" finds "M S K Luxuries"), reference or exact amount (new endpoint /api/finance/search)
- Picking a result opens its list on that record, across all dates and whether or not it is paid or cleared
- Web (854) and API search tests pass

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Meta text on the finance screens goes from 12px to 13px
- Expenses and Income say what Correct and Void do; the ledger picker says "Ledger account"
- The income and expenses chart shows a pair's figures when pointed at or tapped, and the legend says which bar is which
- First-run "Get started" checklist on the finance overview, ticked off from what exists, hideable, gone when done
- Web suite (857) passes

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…arry less

- Changing or resetting a password ends the sign-ins made before it. The person
  changing it is given a new token and stays signed in. Existing sessions carry
  on after the upgrade until their password changes. Adds a Users.SecurityStamp
  column.
- The options for staff expense entry send only what the form needs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ments up to date

- The VAT return download's first note was broken mid-sentence.
- Runbook: how to clear invoice payments made before they were linked to an
  account, the VAT period step, current migrations and what turns the books
  banner red. A test follows the journal the runbook describes.
- Chart of accounts: salary advances are an asset cleared by journal, customer
  advances, VAT recovery.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A staff submission is saved at 100 percent and refused if it asks for anything
else; the field is not on the staff form.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ries off bills

- Page and card actions sit top right; one control for period switches; one
  toolbar for Reports and VAT; downloads in the card header in Books.
- Layouts that broke at desktop widths: the entries table, the VAT tables,
  category rows in Finance setup, the report dates, bill rows.
- Voiding a bill or taking back a payment uses the danger button.
- A bill or a payee can no longer use a category the app posts to itself; the
  server refuses it on a bill.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…aders

- One page header: actions level with the title, the description under both,
  and a rule before the content.
- Month fields and their buttons share a toolbar on the payroll and deductions
  pages; the staff payroll table fits the page.
- Petty cash shows its totals as figures; Finance setup and Settings use the
  same section links.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t into the Letters header

- Accounts: bank and cash sections, banks-versus-cash bar, masked IBAN, pending
  cheque notice, quieter transfer voiding with a required reason, card actions
  in a menu.
- Dashboard: "attendance not marked" state, waiting items oldest first with late
  tags, clearer chart, invoice aging, pay by name behind a toggle. The bell
  counts decisions waiting; each menu entry counts its own module.
- Staff Leave: tabs, decision context (balance, overlap, document), reject
  reason, filters, sorting and paging, rename and confirm for leave types. The
  leave export takes optional status, search and date filters.
- HR Letters: "New request" sits in the page header.
- Dialogs that are removed return focus to their opener.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… Finance

- Each invoice has one VAT type: Standard 5%, Zero rated or Exempt. The screen,
  PDF and VAT report follow it, and an exempt document is headed "Invoice".
- Finance income picks from the same client list as invoices, invoice payments
  are filed under their client, and Payees now holds only who the company pays.
  A name typed on an invoice joins the list.
- The Income form warns when the client still owes on issued invoices.
- Record payment offers the method as a list instead of free text.

Two migrations: AddInvoiceVatTreatment (existing invoices stay standard rated)
and ShareClientListWithFinance (links existing invoices and income to clients
and switches off income payees).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Dashboard, finance, invoices, payroll and deductions screens now use
motion for loading-to-content, chart and page transitions, and sonner
for the results of actions. A figure that changes is underlined briefly;
figures are never counted up. Field errors, failed loads and blocking
errors stay inline. Everything is at rest with reduced motion and in
print.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Vishnu90Coreinn
Vishnu90Coreinn changed the base branch from master to master-qa November 29, 2026 07:32
@Vishnu90Coreinn
Vishnu90Coreinn merged commit 9c8fc71 into master-qa Nov 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant