Dimensions and locations
Tag ledger lines with classes, departments and locations (nested up to five tiers), mark a primary location, group accounts into statement line items, and filter every report by a dimension.
Dimensions are the tags that let one chart of accounts answer several questions: how much did the Dubai branch spend, what did the online class earn, which department carries the travel cost. Alya Books has three kinds of dimension beside the cost centres, projects and categories you already use on documents: classes, departments and locations. They live on every ledger line and travel into the trial balance, the general ledger, the account register and the statement of account.
Dimensions come only from explicit sources. A line takes its class, department or location from what you chose on the document, on the journal line, from a rule, from an import column or from a connector field. Nothing is ever read from an account name: an account called "Dubai branch sales" does not tag anything with the Dubai location.
Set up dimensions
- Go to Settings → Accounting, card Dimensions and locations.
- Pick the tab Classes, Departments or Locations and click Add.
- Give a code, a name and the Arabic name. To nest, choose the parent under Nested under: a dimension nests under a parent of the same kind, up to five tiers (for example
RETAIL › ONLINE › MARKETPLACE). - Archive hides a dimension from the pickers; lines that already carry it keep it.
Only owners, admins and accountants change dimensions. The API is GET/POST/PATCH /ledger/dimensions; the MCP tools are list_dimensions and save_dimension.
Business locations
Locations have two extra rules:
- The first location you add is the primary one. Make primary moves the flag; the primary location cannot be archived or unmarked until another one is primary.
- Use business locations (the switch above the list, owners and admins) turns locations on for the organisation. From then on every new invoice, bill, expense, bank line and journal line defaults to the primary location. A line may still name another location, or none. The switch needs at least one location.
While locations are off, documents carry no location and the pickers stay hidden.
Where the pickers are
| Screen | Picker |
|---|---|
| Invoice editor (issued or draft) | Location beside the category, in the Category and location card under Document settings |
| Bill page, expense editor | Location beside the cost centre |
| Invoice editor, bill page, expense editor (each line) | Class and Department (see below) |
| Journal editor | Expand a line (the chevron): Dimensions with cost centre, project, class, department and location |
| Reports → Trial balance | Dimension filter (cost centre, project, category, class, department, location) and Group by |
The pickers appear only once a dimension of that kind exists.
How lines get their dimensions
When a document posts, every ledger line copies the document's cost centre, project, category and location. A manual journal line carries what you chose on it; a line without a value takes the entry's default (its cost centre, the primary location). A reversal carries the dimensions of the lines it mirrors. The ledger refuses a dimension of the wrong kind or of another organisation (invalid_dimension).
Class and department on document lines
A single invoice, bill or expense often serves several parts of the business. Each of its lines can carry its own class and department, so one document can split revenue or cost between, say, the retail and the online class, or between operations and sales.
- Invoice: in the invoice editor, every line shows Class and Department under the revenue account. Pick a value or leave None.
- Bill: on the bill page, every line in the lines table shows Class and Department under the line name.
- Expense: in the expense editor, every line shows Class and Department under the description.
Each select appears only once your organisation has at least one class (or one department); with none, the line looks as before. When the document posts, the line's class and department are copied to its ledger lines: lines that share the account, the VAT rate and the same class and department book together, and a line without them books on its own line, exactly as before. The VAT, receivable and payable lines carry no line dimension. A class must be a class of your organisation and a department a department of it; anything else is refused (invalid_dimension). The values never appear on the printed invoice or in the e-invoice sent to the buyer.
Because the ledger lines carry them, every report that filters or groups by a dimension reads them, and the custom report builder groups by class and department (for example, expenses by department for twelve months).
API and MCP: invoice, bill and expense lines accept classId and departmentId (for example POST /invoices, POST /bills, PATCH /bills/{id}, POST /expenses, and the tools create_tax_invoice, create_bill, update_bill, create_expense); the line reads return them.
Reports by dimension
- Trial balance: pick a dimension kind and a value to see only those lines, or Group by a kind to get one row per account and dimension value (the dimension column shows the code).
- General ledger and account register: the same filter narrows the lines of one account.
- Statement of account: the API accepts
dimensionKindanddimensionId. - Every ledger line also shows its currency and local-currency amount, so a base-currency figure drills to the original USD or EUR line.
Account groups and statement ordering
Accounts roll into groups, the line items of the balance sheet and the income statement (the IFRS for SMEs section 4 and 5 items ship with the UAE pack: Cash and cash equivalents, Trade and other receivables, Revenue, Cost of sales, Employee costs, …). Every pack account is assigned a group when the ledger is enabled; a custom account gets one in the account form.
- On Chart of Accounts the Group column shows each account's group; Edit an account to move it.
- Click Groups to open the Groups dialog. Drag the groups into the order you want; Save stores the order for the whole organisation and the financial statements follow it. Add group creates a custom line item (code, names, statement, section); deleting a group moves its accounts to the one you pick.
API: GET/POST/PATCH /ledger/account-groups, PUT /ledger/account-groups/order, PATCH /ledger/accounts/{id} with groupId. MCP: list_account_groups, save_account_group.
Modules
Sub-ledgers (bank, schedules, fixed assets, budgets, VAT filing, corporate tax, close) post to the ledger through one function with an idempotent tag, so a run repeated twice books once. A module books nothing until it is switched on under Settings → Accounting → Modules (owners and admins); bank and VAT filing are on from the start. The API is GET/POST /ledger/modules; the MCP tool is enable_ledger_module.