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

# Bills

> View, create, and manage vendor bills with line items, GL posting status, and approval actions in the Payables hub.

The path `/fa/bills` redirects to the Payables hub at `/fa/payables?tab=bills` and is not a standalone screen.

## Overview

This path is a legacy redirect. The route `/fa/bills` is registered in fa.tsx as `<Navigate to="/fa/payables?tab=bills" replace />`. Navigating to this URL will immediately redirect the browser to the Payables Hub with the bills tab active. Individual bill create and detail routes remain available at `/fa/bills/new` and `/fa/bills/:id`.

## Who it's for

Access follows your organization's role and module configuration. The Payables Hub has no top-level `RequirePermission` wrapper.

## Viewing a bill

Selecting a bill opens its detail view at `/fa/bills/:id`. The header shows the bill status badge (`draft`, `pending_approval`, `approved`, `paid`, `cancelled`) and an edit button navigating to the edit route. A `BillApprovalActions` component provides approval/rejection controls. A `GLPostingIndicator` shows the GL posting state for the bill. Bill line items are displayed in a data table with columns for line number, PO line reference, account, fund, department, description, quantity billed, unit price, and amount. The breadcrumb is set to the bill's identifying fields.

Before you start:

* The bill must already exist (created at `/fa/bills/new`).
* An organization must be selected.

Key concepts:

* `status` values: `draft`, `pending_approval`, `approved`, `paid`, `cancelled`
* `BillApprovalActions` — approval/rejection controls component
* `GLPostingIndicator` — shows GL posting state
* `balance_due` — remaining unpaid amount on the bill

1. Open the Payables Hub at `/fa/payables?tab=bills` and click a bill, or navigate to `/fa/bills/:id` directly.
2. Review the bill header: status badge and edit button.
3. Use `BillApprovalActions` to approve or reject the bill if in `pending_approval` status.
4. Check the `GLPostingIndicator` to see whether the bill has been posted to the general ledger.
5. Review line items: account, fund, department, and amount details per line.

## Creating a bill

The New Bill page (`/fa/bills/new`) creates a vendor bill in the accounts payable module. The page renders `BillForm` with data loaded for vendors (active only), accounts (active, ordered by account\_number), funds (active, ordered by fund\_number), departments (type `cost_center` or `both`, active), and programs (active).

On submit, `useCreateBill` is called with bill header fields (including `organization_id` and `created_by`) and an array of `BillLine` items. On success, navigates to `/fa/bills/:id`.

Before you start:

* At least one active vendor must exist.
* GL accounts should be configured.
* Optionally: funds, departments, and programs for line-item coding.

1. Navigate to `/fa/bills/new`.
2. Complete the **Bill Details** card using `BillForm`: vendor, bill date, due date, bill number (or reference), notes.
3. Add line items with description, account, quantity, amount, and optional fund/department/program coding.
4. Submit. On success, you are redirected to the new bill's detail page.

<Warning>
  SME: The exact bill header fields and their validation rules are encapsulated in `BillForm`. Confirm required fields with the implementation team.
</Warning>

## 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">
    Documentation coverage and governance.
  </Card>
</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/BillDetailPage.tsx
  * src/cores/fa/pages/BillCreatePage.tsx
  * src/cores/fa/hooks/useVendorBills.ts
  * src/cores/fa/hooks/useBillLines.ts
  * src/cores/fa/hooks/useVendors.ts
  * src/cores/fa/components/BillForm.tsx
  * src/cores/fa/components/BillLineEditor.tsx
</Accordion>
