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

# Compensation Statements

> Admin interface for generating, managing, and distributing total compensation statements to employees.

Compensation Statements (admin) is available at route `/hr/compensation/statements`. Access follows your organization's role and module configuration. ## Overview

The Total Compensation Statement List page (`TotalCompensationStatementListPage`) provides an admin view for managing all employee compensation statements. It includes year filtering (current year and two prior years), a tabbed list/summary view, and a data table with columns for employee name/number, statement year, status badge (`TotalCompensationStatementStatusBadge`), total compensation value, and row actions (view, send, delete with confirmation). A **Generate Statements** dialog allows bulk statement generation for a selected year. Statements can be sent to employees via a send action. The delete action triggers a confirmation dialog before removal.

## Who it's for

Access follows your organization's role and module configuration. ## Before you start

* Employee and compensation data must exist to generate statements.

## Steps

<Steps>
  <Step title="Open Compensation Statements">Navigate to `/hr/compensation/statements`.</Step>
  <Step title="Filter by year">Select the desired statement year from the filter.</Step>
  <Step title="Generate statements">Click the generate button to open the generation dialog and create statements for the selected year.</Step>
  <Step title="Send to employees">Use the send action on individual statements to distribute them.</Step>
  <Step title="Delete if needed">Use the delete action with confirmation to remove a statement.</Step>
</Steps>

## Key concepts

| Term                                    | Meaning in code                                |
| --------------------------------------- | ---------------------------------------------- |
| `TotalCompensationStatementFilters`     | Filter shape including `statementYear`         |
| `TotalCompensationStatementStatusBadge` | Visual status indicator component              |
| `useTotalCompensationStatementMutation` | Hook for send, delete, and generate operations |

## Viewing a statement

The Statement Details page at `/hr/compensation/statements/:id` displays the full contents of a single total compensation statement for a specific employee and period. This page is part of the HR-15 Compensation Management feature.

The page loads statement data via `useTotalCompensationStatementDetail`. It renders component cards for each compensation category with formatted currency values and percentage-of-total figures, a `CompensationBreakdownChart`, a status badge, and a PDF download button backed by `useCompensationStatementPdf`. Access control is expected to be enforced via the statements list page and RLS at the database level.

| Term                         | Meaning                                                                                                      |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Total compensation           | Combined value of all compensation components included in the statement. SME: confirm component definitions. |
| Statement status             | Lifecycle status of the statement (e.g., draft, finalized). SME: confirm valid statuses.                     |
| Compensation breakdown chart | Pie/bar visualization of component percentages rendered by `CompensationBreakdownChart`.                     |

Before you start: a total compensation statement must be created before it can be viewed; PDF generation requires the statement to have data — empty statements may not produce a valid PDF.

1. Navigate to **HR > Compensation > Statements** and click a statement row, or navigate directly to `/hr/compensation/statements/:id`.
2. Review the **Compensation Breakdown Chart** for a visual distribution of compensation components.
3. Examine individual component cards (each shows amount and percentage of total).
4. Check the **status badge** to confirm the statement's current state.
5. Click the **Download PDF** button to export the statement.

## Related

<Columns cols={2}>
  <Card title="Human Resources" icon="users" href="/hr/overview">
    Human Resources 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/hr.tsx
  * src/cores/hr/compensation/pages/TotalCompensationStatementListPage.tsx
  * src/cores/hr/compensation/pages/CompensationStatementDetailPage.tsx
  * src/cores/hr/compensation/hooks/useTotalCompensationStatementList.ts
  * src/cores/hr/compensation/hooks/useTotalCompensationStatementMutation.ts
  * src/cores/hr/compensation/hooks/useTotalCompensationStatementDetail.ts
  * src/cores/hr/compensation/hooks/useCompensationStatementPdf.ts
</Accordion>
