The result of Logistiki.process/1.
Captures the end-to-end outcome of the accounting pipeline for one business event: the selected policy, the generated journal and postings, the ledger backend result, projection updates, audit evidence id, warnings, and a human- readable explanation.
Fields
event_id—term() | nil— the originating event idpolicy—atom() | nil— the selected accounting policy (e.g.:cash_deposit);nilfor no-accounting-impact eventstemplate—atom() | nil— the selected templatejournal—Logistiki.Accounting.Journal.t() | nil— the posted journal;nilfor no-accounting-impact eventspostings—[Logistiki.Accounting.Posting.t()]— the journal's postingsledger_result—Logistiki.Ledger.Result.t() | nil— the backend resultprojection_updates—map()— balance updates keyed by account codeaudit_evidence_id—term() | nil— the event id for audit trail lookupwarnings—[term()]— non-fatal warningsexplanation—map()— the full pipeline explanation (policy, template, account roles, knowledge explanation, reason)
Example
%Logistiki.Accounting.Result{
event_id: "evt_001",
policy: :cash_deposit,
template: :cash_deposit,
journal: %Logistiki.Accounting.Journal{status: "posted", ...},
postings: [%Posting{...}, %Posting{...}],
ledger_result: %Logistiki.Ledger.Result{backend: Logistiki.Ledger.Simulation, status: :ok},
audit_evidence_id: "evt_001",
warnings: [],
explanation: %{policy: :cash_deposit, template: :cash_deposit, account_roles: %{...}}
}No-accounting-impact result
%Logistiki.Accounting.Result{
event_id: "evt_007",
policy: nil,
journal: nil,
postings: [],
explanation: %{reason: :no_accounting_impact}
}
Summary
Types
@type t() :: %Logistiki.Accounting.Result{ audit_evidence_id: term() | nil, event_id: term() | nil, explanation: map(), journal: Logistiki.Accounting.Journal.t() | nil, ledger_result: term() | nil, policy: atom() | nil, postings: [Logistiki.Accounting.Posting.t()], projection_updates: map(), template: atom() | nil, warnings: [term()] }
The struct type. See the module documentation for field details and examples.