Logistiki.Projections.ProjectionEngine (logistiki v0.1.0)

Copy Markdown View Source

Computes projections over immutable postings.

Balances are never authoritative stored state; they are derived here. The simulation backend delegates to this engine. The Beancount backend uses beancount_ex as the oracle and its results are compared against this engine's.

Supported projections

Summary

Functions

Computes the balance(s) for account (a struct, id, or code). Aggregates descendants for parent accounts.

Computes balances for accounts linked to entity.

Computes balances for accounts linked to entity or any of its descendants.

Builds a balance sheet (assets, liabilities, equity).

Builds a general ledger view of all posted postings.

Builds an income statement (income, expenses, net profit).

Builds a running-balance statement for account (aggregates descendant postings).

Builds a trial balance across all posted journals.

Functions

balance(account, opts \\ [])

(since 0.1.0)

Computes the balance(s) for account (a struct, id, or code). Aggregates descendants for parent accounts.

balance_for_entity(entity, opts \\ [])

(since 0.1.0)

Computes balances for accounts linked to entity.

balance_for_entity_tree(entity, opts \\ [])

(since 0.1.0)

Computes balances for accounts linked to entity or any of its descendants.

balance_sheet(opts \\ [])

(since 0.1.0)

Builds a balance sheet (assets, liabilities, equity).

general_ledger(opts \\ [])

(since 0.1.0)

Builds a general ledger view of all posted postings.

income_statement(opts \\ [])

(since 0.1.0)

Builds an income statement (income, expenses, net profit).

statement(account, opts \\ [])

(since 0.1.0)

Builds a running-balance statement for account (aggregates descendant postings).

trial_balance(opts \\ [])

(since 0.1.0)

Builds a trial balance across all posted journals.