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

# Inventory

> Manage inventory items and stock levels — with category and low-stock filters, and a detail view with location quantities, costs, and transaction history.

This screen lists all inventory items and is available at `/fm/inventory`.

## Overview

The Inventory page loads active items by default (`is_active: true`) via `useInventoryList`. Users can search by text, filter by category using `INVENTORY_CATEGORY_LABELS`, and toggle a **Low Stock Only** switch to surface items at or below their reorder point. The page supports five dialogs: **Add/Edit Item** (`InventoryItemFormDialog`), **Record Purchase** (`RecordPurchaseDialog`), **Record Usage** (`RecordUsageDialog`), **Transfer** (`RecordTransferDialog`), and **Adjust Quantity** (`RecordAdjustmentDialog`). A **Locations** button navigates to `/fm/inventory/locations`.

## Who it's for

Requires permission `fm.dashboard.view`. Creating items requires `fm.inventory.create`; editing requires `fm.inventory.edit` (enforced within dialogs).

## Before you start

* Hold `fm.dashboard.view` and, for write actions, `fm.inventory.create` or `fm.inventory.edit`.

## Finding an item

1. Navigate to `/fm/inventory` via the FM sidebar or the Low Stock Items stat card on the dashboard.
2. Use the search bar, Category dropdown, or the Low Stock Only toggle to narrow results.
3. Click **Add Item** to open the item creation dialog; fill in name, SKU, category, unit of measure, costs, and reorder settings.
4. From the table row actions, choose Record Purchase, Record Usage, Transfer, or Adjust Quantity to update stock levels.
5. Click an item row to navigate to `/fm/inventory/:id` for the full detail view.
6. Click **Locations** to navigate to `/fm/inventory/locations`.

* **Low stock** — an item is considered low stock when `current_quantity` is at or below `reorder_point`.
* **Transaction types** — purchase (adds stock), usage (removes stock), transfer (moves stock between locations), adjustment (corrects quantity).

## Viewing an item

The Inventory Detail page (`/fm/inventory/:id`) loads a single item by ID via `useInventoryDetail`. It renders three detail cards: **Item Details** (SKU, category, unit of measure, description), **Quantities** (current quantity, reorder point, reorder quantity, in-stock/low-stock/out-of-stock badge), and **Costs & Value** (unit cost, average cost, last purchase cost, total value computed as `current_quantity * (average_cost || unit_cost)`). A **Location Quantities** card shows the item distributed across storage locations. A **Transaction History** card lists recent inventory movements via `InventoryTransactionList`. Action dialogs available from the dropdown: Edit, Record Purchase, Record Usage, Transfer, Adjust Quantity, and Deactivate Item.

Requires `fm.dashboard.view`. Edit and transaction actions require `fm.inventory.edit`.

Before you start: the inventory item must exist and be active (deactivated items navigate back to `/fm/inventory`).

1. From the Inventory list, click any item row to navigate to `/fm/inventory/:id`.
2. Examine the Item Details, Quantities, and Costs & Value cards.
3. If stock is distributed across locations, review the Location Quantities card.
4. Click **Actions** and choose Record Purchase, Record Usage, Transfer, or Adjust Quantity.
5. Click **Edit** to modify item metadata such as name, SKU, costs, and reorder thresholds.
6. From the Actions dropdown, choose **Deactivate Item** to mark the item inactive and return to the list.
7. Scroll to the Transaction History card to audit recent stock movements.

* **Total value** — `current_quantity × (average_cost || unit_cost)`.
* **Low stock** / **out of stock** — determined by `isLowStock` and `isOutOfStock` from `inventoryValidation` utilities.
* **Location quantities** — per-location breakdown from `item.locationQuantities`.

## Related

<Columns cols={2}>
  <Card title="Facilities & Inventory" icon="warehouse" href="/fm/overview">
    Facilities & Inventory 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/fm.tsx
  * src/cores/fm/pages/InventoryPage.tsx
  * src/cores/fm/pages/InventoryDetailPage.tsx
</Accordion>
