Persisted balance assertion (table beancount_balances).
Storage-layer counterpart of Beancount.Directives.Balance.
Fields
date- the day the assertion is checked (start of day).account- account whose balance is asserted.amount- expected balance asDecimal.t().currency- commodity of the expected balance.tolerance- optionalDecimal.t()tolerance (± amount), ornil.metadata- arbitrary key/value map.file_order- zero-based position of the directive in the source.
Example
%Beancount.Schemas.Balance{
date: ~D[2026-06-01],
account: "Assets:Bank",
amount: Decimal.new("100"),
currency: "USD",
tolerance: nil,
metadata: %{},
file_order: 8
}