Functional contract

Billing and finance

Clinic invoice issue from a sales order is built. Payments, cash-up, taxes, and reports remain intended. Clinic invoices are hybrid: the legal header comes from the Location’s Legal Entity; the sale is attributed to the Location where the work or retail happened. Payouts follow the Legal Entity’s merchant account. Drawers close per Location. For TaskPaws platform subscriptions (plans, credits, Stripe), see SaaS billing.

Invoice issue built Payments later

Invoices

Built (v1): issue one invoice from one open sales order under Clinic → Invoices (invoices.*). Do not confuse with Settings → Billing / billing.* / BillingInvoice. Contract: docs/functional/clinic-invoices.md.

When a Location charges a client:

Historical invoices do not change if the Location is later moved to another Legal Entity.

Payments

ConcernLevelBehavior
Merchant account (e.g. Stripe Connect)Legal EntityLocations A and B that share an entity settle to that entity’s bank; Location C with its own entity settles separately
Card terminalLocationHardware and “which desk took the payment” are site-local
Cash / checkLocationCounted in that site’s drawer
Payment applicationLocation + Legal EntityApplied to invoices of that Location’s entity; do not silently pay another entity’s AR

A client may have invoices under more than one Legal Entity in the same Organization. Those are separate balances.

Cross-site balances

If a client owes Location C and presents at Location A:

Same-entity, multi-site AR policy (A and B share an EIN) can allow an Organization admin to collect a sister site’s invoice without switching, but the payment remains attributed to the original Location. Default for v1: always collect in the originating Location’s context so behavior is identical for same-EIN and split-EIN groups.

Daily close

Each Location runs its own cash-up (expected vs counted, card totals, discrepancies).

Accounting export (QuickBooks, Xero, or file) groups by Legal Entity, not by mixing EINs in one export. Location is a dimension on the lines so operational profit per site remains available.

Reports

The report module has a three-way context. Every financial and volume report declares which context is active.

ContextQuestion it answers
OrganizationGroup performance: gross revenue, visit volume, across every site
Legal EntityBooks and tax: activity for one EIN, all of that entity’s Locations rolled up
LocationSite profitability: appointments, sales by room, local inventory, drawer

Filters must not leak Locations the User is not granted (Staff access). Organization admins may choose any of the three contexts. Location managers get Location context for granted sites only.

Acceptance (when built)

Out of scope: processor onboarding UI, tax-engine choice, tip lines, payment plans, chart of accounts. Integrations (Stripe, QuickBooks, Xero) are intended destinations; field mapping waits for the first finance implementation.