> ## 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.

# Receipts

> View, record, and manage goods receipts against purchase orders with receipt number, status, line quantities, and partial delivery support.

The route `/fa/receipts` is a legacy redirect to `/fa/payables?tab=receipts`. The goods receipts list is now part of the Payables & Expenses hub.

## Overview

Navigating to `/fa/receipts` triggers a `<Navigate to="/fa/payables?tab=receipts" replace />`. The Receipts tab within the hub loads `ReceiptsPage` lazily, which fetches all PO receipts for the organization via `usePOReceiptList` and renders them in a `ReceiptsTable`. The page header shows "Goods Receipts" with a description of tracking received inventory from purchase orders.

## Who it's for

Access follows your organization's role and module configuration.

## Before you start

No setup required for viewing. To record a new receipt, identify the purchase order number or ID for the goods being received, and know the quantity received for each relevant line item.

## Steps

1. Navigate to **Finance & Revenue → Payables & Expenses → Receipts**, or go to `/fa/payables?tab=receipts`.
2. Review the list of goods receipts.
3. Select a receipt to view its details at `/fa/receipts/:id`.
4. To record a new receipt, go to the relevant purchase order and use the receipt recording action.

## Viewing a receipt

The Receipt Details page at `/fa/receipts/:id` displays the full record for a goods receipt, including its receipt number, status, date, linked purchase order, vendor, and received line items.

`ReceiptDetailPage` fetches data via `usePOReceipt`. The page uses `useEntityBreadcrumb` to display the `receipt_number` in the breadcrumb. The layout shows a receipt information card and a notes card, with a `ReceiptStatusBadge` for status display. Line details are shown via `POReceiptLineDetail` type fields.

Key concepts:

* **`receipt_number`** — The system-assigned identifier for the receipt, shown in the breadcrumb.
* **`ReceiptStatusBadge`** — Visual indicator for the receipt's status.

1. Navigate from a purchase order's receipt history or from **Finance & Revenue → Payables & Expenses → Receipts** and select a receipt.
2. Review the receipt header: receipt number, status, date, and PO reference.
3. Review the line items showing quantities received.
4. Review any notes attached to the receipt.

## Creating a receipt

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.

`ReceiptCreatePage` 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`.

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.

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.

## Related

<Columns cols={2}>
  <Card title="Finance & Revenue" icon="building-columns" href="/fa/overview">
    Finance & Revenue core overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index" />
</Columns>

<Note>
  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.
</Note>

<Accordion title="Documentation sources">
  * src/routes/fa.tsx
  * src/cores/fa/pages/ReceiptsPage.tsx
  * src/cores/fa/pages/PayablesHubPage.tsx
  * src/cores/fa/pages/ReceiptDetailPage.tsx
  * src/cores/fa/pages/ReceiptCreatePage.tsx
  * src/cores/fa/hooks/usePOReceipts.ts
  * src/cores/fa/hooks/usePOReceiptLines.ts
</Accordion>
