Dimensions: setting them up
Dimensions are always on; there is no app to switch on. This page lists what
you can configure and what each choice does. The reasoning is in
docs/adr/0004-customer-defined-dimensions.md.
Permissions
| Permission | What it allows | Granted to |
|---|---|---|
ledger_dimension.read | See dimensions, their values and requirements; use the line picker and the statements filter | Admin, Manager, Accounting |
ledger_dimension.manage | Add and change dimensions and values, switch them off, write requirements | Admin, Accounting |
A user without ledger_dimension.read sees no picker on lines; whatever the
customer's, supplier's or item's defaults say is still applied.
Dimensions
| Field | Meaning | Recommended |
|---|---|---|
| Key | How lines, files and reports name it. Lower snake case, at most 32 characters. Cannot collide with a built-in key | Short and plain: project, sales_route |
| Name | What people read | |
| Active | Off: no new posting may carry it | On |
A key cannot be renamed or the dimension removed once any posted line carries it. Switch it off instead, giving a reason; the reason is on the audit trail.
Seeded: department and location (built in; their values are yours to
keep), class and project (yours, empty).
Values
| Field | Meaning |
|---|---|
| Code | What a line stores. Up to 64 characters, without = or ; (journal files use them as separators). Fixed once posted with |
| Name | What reports and pickers show |
| Parent | Another value of the same dimension, for a hierarchy |
| Active | Off: retired; refused on new postings, kept on history |
| Valid from / to | Business dates the value may be used on, compared with the document's date |
A dimension with at least one value enforces its list. Leave a dimension
empty to accept any text. Note that location is filled in by stock movements
with the site's code: if you start a location list, add every site's code to it,
or stock postings at a missing site will be refused.
Defaults on customers, suppliers and items
Each customer, supplier and item has Default dimensions. A new invoice line takes the customer's, then the item's (the item wins where both say), then whatever the person picks on the line. Bills do the same with the supplier. Defaults are checked against the lists when they are saved.
Requirements (a Rule)
"Require dimension X on accounts matching Y" is a row of the rule set
ledger.dimension_requirements, kept on the Dimensions screen (the generic rules
screen cannot edit it). A rule names:
- the dimension;
- account types (
asset,liability,equity,income,expense) and/or an account code range (from, to); - optionally the sources it applies to (for example
manual_journal), so a rule can apply only to journals people key.
The rule is evaluated for each line when a journal posts. Cancellations of earlier postings are exempt. Recommended: start narrow (one code range, manual journals only) and widen once documents carry the dimension through defaults.
Interactions
- Allocations still keep departments on their own tab. Departments saved there appear in the department list too, and a department added here can be an allocation target.
- Journal import checks each row's
tagsagainst the lists and refuses the file naming the line. - Statements filter by any dimension and value.