# trialBalance

## Overview

Returns the trial balance report for a company, optionally scoped to one accounting
period. financial-accounting does not materialize GL balances, so this computes them
on the fly: it sums the debit and credit amounts of every POSTED journal line for the
company, grouped by GL account, then classifies each account into the Balance Sheet
(ASSET/LIABILITY/EQUITY) or Profit & Loss (REVENUE/EXPENSE) subtotals. Because posted
entries always balance, the grand total debit equals the grand total credit
(`balanced`). Accounts whose debit and credit both net to zero are omitted unless
`includeZeroBalance` is set.

## Modules Commands Used

- (none) — the per-account balances are computed inline in the resolver over `JournalLine` / `JournalEntry` / `Account`; it issues no module command.

## Exception Handling

| Error Code | Description |
| --- | --- |
| N/A | Read-only aggregation; returns an empty report when the company has no posted entries |
