> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alforse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dimensions & cost centers

> Tag axes on journal lines that slice the general ledger without multiplying the chart of accounts.

A reporting dimension is a company-defined axis attached to individual journal lines. Dimensions support reporting by location, department, customer, and other attributes without adding accounts for every combination. **Cost centers** can serve as a dimension and as a hierarchy for cost ownership.

Dimensions and cost centers live in the [accounting](/docs/reference/accounting.md) module and are defined once per company group, alongside the chart of accounts.

## What a dimension is

A dimension has a name and an **entity type** that determines its values. Dimensions are scoped by company group. A posted journal line can contain at most one value for each dimension.

FieldType

<details>
  <summary>**Entity-type dimension**`from a source table`</summary>

  The values *are* rows of an existing table. A `Location` dimension draws its values from your locations, an `Employee` dimension from your people. You don't type the values in — they resolve from the entity the posting already references.
</details>

<details>
  <summary>**Custom dimension**`from dimension values`</summary>

  `entityType` is `Custom`. You supply the allowed values yourself as `dimensionValue` rows (Project A, Project B, …). Use it for an axis Alforse doesn't already model as a table.
</details>

The full set of entity types (`dimensionEntityTypes` in `apps/erp/app/modules/accounting/accounting.models.ts`): `CostCenter`, `Custom`, `Customer`, `CustomerType`, `Department`, `Employee`, `FixedAssetClass`, `Item`, `ItemPostingGroup`, `Location`, `Process`, `Project`, `ScrapReason`, `Supplier`, `SupplierType`, `WorkCenter`.

A dimension carries two flags: **active** (an inactive dimension stops being attached to new postings) and **required**. Names are unique per company group.

NOTE

**Dimensions are defined for the whole company group, not per company**

Dimensions and their values are scoped by company group — a dimension you define is shared across every company in the group. The *tags on a journal line* are scoped by company, like the journal itself.

## How a value lands on a journal line

Each tag on a journal line is a pair of a dimension and a **value id**. That value id is deliberately **polymorphic** — for a `Custom` dimension it is the id of one of the dimension's values; for an entity-type dimension it is the entity row's own id (a location, a customer, a cost center). The reference target depends on the dimension's entity type and is resolved in application code. A line holds at most one value per dimension.

Operational posting resolves dimensions automatically:

1. It loads every **active** dimension for the company group into a map keyed by entity type.
2. As it builds each journal line, it already knows the source facts — the customer, the item, the item posting group, the location, the cost center behind that line.
3. For each of those facts, **if an active dimension exists for that entity type**, it attaches a tag pointing the value at that entity's id No dimension defined for an axis means no tag on that axis — defining the dimension is what turns tagging on.

For example, a `Location` dimension is not entered on each shipment. After the dimension is defined, shipment, receipt, invoice, and inventory postings attach the location already present on the source document. Other posting functions use the same pattern.

NOTE

**Manual journal entries tag their lines directly**

A hand-entered journal doesn't have a source document to resolve tags from, so its lines carry the dimension values you assign in the entry form. Saving a line's tags replaces them wholesale — it clears the line's existing tags and inserts the new set. A posted journal's line can still be re-tagged this way.

## Cost centers

A **cost center** is a named organizational unit for grouping cost — a plant, a line, a service team. Cost centers form a **hierarchy**: each one may name a `parentCostCenterId`, so you can roll child centers up into a parent. Each carries an **owner** (`ownerId`, a user) responsible for it.

Cost centers play two roles:

* **A standalone tree** (scoped by company) you assign to purchase lines and other records to attribute spend to the responsible unit.
* **A dimension axis.** Define a dimension with `entityType: "CostCenter"` and postings begin tagging their journal lines with the cost center the source document carries — exactly like any other entity-type dimension. That's how cost-center-level P\&L reporting works: the cost center is a tag on the line, resolved from the document at posting time.

A journal line has no cost-center column of its own. A cost center reaches the ledger the same way every other axis does — as a dimension tag whose value is the cost center's id. Manage the tree under **Accounting → Cost Centers** and the dimensions under **Accounting → Dimensions**.

## Using dimensions in reports

Reports built from journal lines can group or filter by dimension value, such as COGS by location, expense by department, or revenue by customer. This keeps the chart of accounts compact: post to one COGS account and segment it with the `Location` dimension.

HEADS UP

**The core statements are unsliced; dimensions drive the analytical cut**

The trial balance, balance sheet, and income statement report the *whole* company's balances — they don't take a dimension filter. Dimension slicing is the analytical layer on top of those totals: it answers "of this account's balance, how much belongs to each location / department / cost center", not "restate the whole balance sheet for one project".

Because dimension slicing reads posted journal lines, it's only meaningful once a period's postings are final. See [period close](/docs/reference/period-close.md) for how a month's balances get snapshotted.

## Related

**Accounting & the ledger**

Accounts, journals, and the postings every flow produces — where dimension tags get attached.

[Open](/docs/reference/accounting.md)

**Period close**

Finalizing a period's balances, the numbers dimensions slice.

[Open](/docs/reference/period-close.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.