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

# Investments

> Manage and view CDs, money markets, treasuries, bonds, and other investment instruments with portfolio-level metrics and detail views.

The Investments page lists all investment records for the organization and provides portfolio-level summary statistics. It is accessible at route `/fa/investments`.

## Overview

The page displays four summary stat cards (Total Invested, Active Investments, Maturing Soon, Interest Earned) followed by an `InvestmentsTable` card. Filters for **Status** (`active`, `matured`, `liquidated`) and **Type** (`cd`, `money_market`, `treasury`, `bond`, `other`) are available above the table.

An **Add Investment** button opens `InvestmentDialog` for creating a new record. Clicking the edit action on a table row opens the same dialog pre-populated.

**Maturing soon** is calculated as investments with maturity dates within the next 30 days.

**Primary hooks:** `useInvestmentList`, `useMaturingInvestments`

**Permission gate:** `fa.investments.view` (route level)

## Who it's for

Permission required: `fa.investments.view`

## Before you start

* At least one bank account should be configured to link investments.
* GL accounts for investment principal and interest income should exist in the chart of accounts.

## Steps

**View investments**

1. Navigate to `/fa/investments`.
2. Review the summary stat cards and the investment table.
3. Use the **Status** and **Type** dropdowns to filter the list.

**Add an investment**

1. Click **Add Investment** (top right).
2. Complete the `InvestmentDialog` fields (investment number is system-generated or entered manually).
3. Save to create the record.

**Edit an investment**

1. Locate the investment in the table.
2. Click the edit action.
3. Modify fields and save.

## Key concepts

* **Investment Types:** `cd` (Certificate of Deposit), `money_market`, `treasury`, `bond`, `other`.
* **Statuses:** `active`, `matured`, `liquidated`.
* **Maturing Soon:** Investments with a `maturity_date` within 30 days.

## Viewing an investment

The Investment Details page at `/fa/investments/:id` shows full information for a single investment record.

The page loads an investment record via `useInvestment(id, organizationId)` and displays:

* **Header:** Investment number, status badge (`active`, `matured`, `liquidated`), type label, and linked bank account name. An **Edit Investment** button opens `InvestmentDialog`.
* **Performance Metrics:** Four stat cards — Principal Amount, Interest Rate, Days to Maturity (with "Soon" warning badge if ≤ 30 days), Interest Earned.
* **Investment Details:** Type, bank account (masked last 4), investment GL account, interest income account, maturity date, created/updated timestamps.
* **Notes:** Free-text notes field if present.

Key concepts:

* **Days to Maturity:** Calculated as the difference between `maturity_date` and today. Displays "Matured" if the date has passed. A "Soon" badge appears if ≤ 30 days remain.
* **Interest Earned:** Displayed as `investment.interest_earned`. The source and calculation of this value are not determinable from the component alone.

1. Navigate to `/fa/investments` and click an investment row, or go directly to `/fa/investments/:id`.
2. Review the performance metric cards and detail section.
3. Click **Edit Investment** (top right) to open `InvestmentDialog` pre-populated with current values, make changes, and save.

## 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/InvestmentsPage.tsx
  * src/cores/fa/pages/InvestmentDetailPage.tsx
  * src/cores/fa/hooks/useInvestments.ts
  * src/cores/fa/components/InvestmentsTable.tsx
  * src/cores/fa/components/InvestmentDialog.tsx
  * src/cores/fa/components/InvestmentStatusBadge.tsx
</Accordion>
