Module Reference

Finance

Revenue reports, tax invoices, month-end close and accountant exports for the money the app takes.

Finance reports the money the rest of the app takes. Payments come in from Booking, POS and Storefront, and Finance shows them per currency, per Location and per company. It issues the tax documents for those sales (abbreviated and full tax invoices, receipts, credit notes), closes reporting periods, and exports a VAT sales report and a daily sales journal for the accountant. Finance takes no payments itself and doesn't hold sales: each selling Module keeps its own, and Finance reads them. Companies, tax IDs and Locations come from Branches.

What it handles

  • Invoice numbers that never repeat. A numbering format that could issue the same number twice (no running number, a month without its year, too long for an invoice's number field) is refused, and nothing is stored. A format change also checks invoices issued while the check was running. Staff signed in to one Location can read the formats but not change them. Tested: "Finance: tax document numbering"
  • A tax document that fails or arrives twice. A register sale whose document couldn't be issued still closes, and a later sweep issues it once. A payment webhook the provider delivers twice leaves the shop order with one document and one number. Tested: "Finance: POS tax documents" Tested: "Finance: storefront tax documents"
  • Full tax invoices for business buyers. A full tax invoice replaces the abbreviated one with the same totals and the next number, and asking again takes no new number. Fixing a buyer's details cancels the invoice and reissues it under a new number that points back. A receipt from a company that isn't VAT registered can't become a tax invoice, and staff at another Location are refused. Tested: "Finance: full tax invoices"
  • Refunds after the month is filed. A September order refunded in October, after September closed, gets an October credit note, and September's totals stay as filed. A ฿120 item paid back in four ฿30 payouts reverses exactly the ฿7.85 VAT it charged. A partial refund at the register gets one credit note at the sale's VAT rate. Tested: "Finance: storefront credit notes" Tested: "Finance: POS credit notes"
  • Closing the month Location by Location. Closing one Location leaves the others open. The business-wide close is refused until every active Location has closed, and after it no Location can reopen. A Location manager closes only their own books, while head office can act for any. Sending the same close twice is a no-op, and every close and reopen is in the audit log with the first close's evidence kept. Tested: "Finance: per-Location period close" Tested: "Finance: reporting period close lifecycle"
  • Exports an accountant can file. One company's VAT sales report lists exactly its live documents, and the CSV and Excel files agree. Each day's journal balances, and a payment method with no account code blocks the export and is named. A buyer name starting with = is written to the CSV as text. Tested: "Finance: accountant exports"
  • Keeping companies and Locations apart. A sale belongs to the company its Location had when the ticket opened, even if the Location moves before it closes. A session pinned to one Location can't open another Location's or another company's report, and staff without finance permissions can't read or close anything. Tested: "Finance: POS sales by company" Tested: "Finance: accountant exports" Tested: "Finance: reporting authorization"
  • Gift cards and VAT. Selling a ฿1,000 gift card charges no VAT, and the ฿1,070 order it later pays for carries VAT once. Tested: "Finance: storefront gift card VAT"

What you build on top

  • Where the money comes from. Switch on Booking, POS or Storefront. Each one reports its payments to Finance and gets tax documents for its sales. With Catalog on, Finance also values stock at its batches' cost.
  • Companies and VAT. Each company's legal name, tax ID and VAT registration, and which Locations sell for it, are set in Branches. Finance numbers documents per company.
  • Who sees the books. After switching Finance on, give the finance permissions to the staff roles that need them. Managers start with read and export, and only Admins start with closing a period.
  • In code. Your coding agent imports Finance only through its public API: index.ts and server/index.ts in apps/web/src/modules/finance/. See Build on a Module.

Limits

  • Finance reports sales only. It has no expenses, purchases or input VAT.
  • Tax documents and the VAT report follow Thai VAT rules. Other countries' invoice rules aren't modelled.
  • With none of Booking, POS or Storefront on, Finance has nothing to report.

Facts

Pages

WherePath
Admin/admin/finance

Permissions

Admin holds every key. The other roles listed hold it when the app first gets the Module; after that, roles are yours to change under Settings → Roles & Permissions.

PermissionWhat it allowsOrganization roles that start with it
finance:readView finance overview, transactions, reconciliation, and reporting periods.Admin, Manager, Viewer
settings:writeConfigure resources, schedules, availability, fares, blocked periods, and queue setup.Admin
finance:exportExport finance reports and audit evidence.Admin, Manager
finance:closeClose and reopen finance reporting periods.Admin

Data

  • Tables: finance_reporting_period, finance_document, finance_document_line, finance_document_series, finance_document_format, finance_document_miss, finance_account_mapping, finance_export_run

Tested workflows

  • Finance: reporting overview
  • Finance: reporting period close lifecycle
  • Finance: reporting authorization
  • Finance: per-Location reporting scope
  • Finance: per-Location period close
  • Finance: per-company reporting
  • Finance: tax document numbering
  • Finance: accountant exports
  • Finance: booking revenue provider (with Booking on)
  • Finance: booking tax documents (with Booking on)
  • Finance: booking credit notes (with Booking on)
  • Finance: POS settlement provider (with POS on)
  • Finance: POS sales by company (with POS on)
  • Finance: POS tax documents (with POS on)
  • Finance: POS sales journal (with POS on)
  • Finance: full tax invoices (with POS on)
  • Finance: POS credit notes (with POS on)
  • Finance: POS receipt document (with POS on)
  • Finance on the admin home and in search (with POS on)
  • Finance: storefront settlement provider (with Storefront on)
  • Finance: storefront tax documents (with Storefront on)
  • Finance: storefront credit notes (with Storefront on)
  • Finance: storefront gift card VAT (with Storefront on)
  • Finance: storefront VAT follows the company and the workspace rate (with Storefront on)
  • Finance: catalog tax metadata provider (with Catalog on)