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 Receipt page at /fa/receipts/new lets users record physical receipt of goods against an existing purchase order, entering quantities received per line item.

Overview

The route /fa/receipts/new loads ReceiptCreatePage. The page requires a poId query parameter; if the purchase order is not found, an empty state is shown with a back navigation. When a valid PO is loaded, the form shows the PO number, vendor name, and all PO lines available for receipt. On submit, useCreatePOReceipt calls the fa_create_receipt RPC (a SECURITY DEFINER database function that validates PO and line ownership for the organization). On success, the user is redirected to /fa/purchase-orders/:poId.

Who it’s for

No explicit permission gate on this route.

Before you start

  • Identify the purchase order number or ID for the goods being received.
  • Know the quantity received for each relevant line item.

Steps

  1. Navigate to the purchase order detail page and use the Record Receipt action (which should pass ?poId=<id>), or go directly to /fa/receipts/new?poId=<purchase-order-id>.
  2. The form displays the PO number, vendor, and available lines.
  3. Enter the quantity received for each line.
  4. Add a receipt date and optional notes.
  5. Select Submit. The receipt is created and you are returned to the purchase order detail page.

Key concepts

fa_create_receipt RPC — A server-side function that validates the PO and all line IDs belong to the current organization before inserting receipt records. This enforces tenant isolation at the database layer. Partial receipt — Each line may have a quantity received less than the PO line quantity, supporting partial delivery scenarios.

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/ReceiptCreatePage.tsx
  • src/cores/fa/hooks/usePOReceipts.ts
  • src/cores/fa/hooks/usePOReceiptLines.ts