Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

The New Invoice page creates a customer invoice. It is accessible at route /fa/invoices/new.

Overview

The page renders InvoiceForm inside a “Invoice Details” card. The invoice number is auto-generated via useGenerateInvoiceNumber. Form schema (validated with Zod):
  • invoice_number (required — auto-generated)
  • customer_id (required)
  • invoice_date (required — date)
  • due_date (required — date)
  • notes (optional)
  • tax_amount (number, default 0)
  • lines (array, min 1):
    • line_number, description (required), account_id (required), quantity, unit_price, line_amount
On submit, useCreateInvoice creates the header with status: "draft", then useCreateInvoiceLine creates each line. Navigates to /fa/invoices/:id on success. Primary mutations: useCreateInvoice, useCreateInvoiceLine

Who it’s for

No explicit permission gate on this route.

Before you start

  • At least one active customer must exist.
  • GL accounts for revenue must be configured.
  • Know the invoice date, due date, and all line item details.

Steps

  1. Navigate to /fa/invoices/new.
  2. Complete the Invoice Details form:
    • Customer (required), invoice date, due date
    • Optional: notes, tax amount
  3. Add at least one line item (description, account, quantity, unit price).
  4. Submit. On success, you are redirected to the new invoice’s detail page.
  5. From the detail page, send the invoice when ready.

Key concepts

  • Invoice number: Auto-generated — not user-entered by default.
  • Status on create: draft — must be sent to be considered issued.
  • Line amount: Derived from quantity × unit price (computed in InvoiceLineEditor).

Finance & Revenue

Finance & Revenue core overview.

Governance & parity

This page documents shipped product behavior. It is not medical, legal, or billing advice. Verify against your organization’s policies and applicable regulations before using it for clinical, compliance, or billing decisions. Protected health information (PHI) shown in the product is governed by your tenant’s access controls and is never exposed in this documentation.
  • src/routes/fa.tsx
  • src/cores/fa/pages/InvoiceCreatePage.tsx
  • src/cores/fa/hooks/useInvoices.ts
  • src/cores/fa/hooks/useInvoiceLines.ts
  • src/cores/fa/components/InvoiceForm.tsx
  • src/cores/fa/components/InvoiceLineEditor.tsx