sundaysebasidian-byte/moonbean/realization does not have a README file

    ConversionIssue

    pub(all) struct ConversionIssue {
    code : String
    account : String
    currency : String
    target : String
    }

    A report retains its values when conversion is incomplete; hosts must inspect this diagnostic.

    InventoryReportRow

    pub(all) struct InventoryReportRow {
    account : String
    units :
    Amount

    cost : String?
    value :
    Amount
    ?
    }

    PriceDb

    pub(all) struct PriceDb {
    points : Array[PricePoint]
    }

    PriceDb::add

    PriceDb::convert

    Converts one amount into a target currency, returning None when no price path is known.

    PriceDb::from_entries

    PriceDb::latest

    PriceDb::new

    fn PriceDb::new() -> PriceDb

    PriceDb::rate

    Finds the shortest dated quote path. Equal-length paths use lexical currency order. Each currency is visited once, so cycles cannot cause nontermination.

    PriceDb::to_json

    fn PriceDb::to_json(self : PriceDb) -> String

    PricePoint

    pub(all) struct PricePoint {
    date :
    Date

    base : String
    quote : String
    rate :
    Decimal

    }

    RealizedLedger

    RealizedLedger::account_names

    fn RealizedLedger::account_names(self : RealizedLedger) -> Array[String]

    RealizedLedger::combined_inventory

    fn RealizedLedger::combined_inventory(self : RealizedLedger, account : String, subtree? : Bool) ->
    Inventory

    Direct inventory of an account, or the combined inventory of the account and all of its subaccounts when subtree is true.

    RealizedLedger::inventory

    RealizedLedger::rate

    RegisterRow

    pub(all) struct RegisterRow {
    date :
    Date

    flag : String
    payee : String
    narration : String
    account : String
    amount :
    Amount

    running :
    Amount

    cost :
    CostSpec
    ?
    }

    Report

    pub(all) struct Report {
    title : String
    rows : Array[ReportRow]
    totals : Array[ReportRow]
    diagnostics : Array[ConversionIssue]
    display_scales : Map[String, Int]
    }

    Report::to_json

    fn Report::to_json(self : Report) -> String

    Report::to_text

    fn Report::to_text(self : Report) -> String

    Renders using inferred currency precision without changing stored amounts.

    Report::to_text_with_options

    fn Report::to_text_with_options(self : Report, options :
    Options
    ) -> String

    Renders report amounts using CCY:NUMBER precision options; JSON stays exact.

    ReportRow

    pub(all) struct ReportRow {
    label : String
    amount :
    Amount

    }

    balance_sheet

    fn balance_sheet(realized : RealizedLedger, convert? : String?, start? :
    Date
    ?) -> Report

    income_statement

    fn income_statement(realized : RealizedLedger, start? :
    Date
    ?, convert? : String?) -> Report

    inventory_rows

    fn inventory_rows(realized : RealizedLedger, convert? : String?) -> Array[InventoryReportRow]

    inventory_to_json

    fn inventory_to_json(rows : Array[InventoryReportRow]) -> String

    inventory_to_text

    fn inventory_to_text(rows : Array[InventoryReportRow]) -> String

    is_subaccount

    fn is_subaccount(name : String, parent : String) -> Bool

    json_escape

    fn json_escape(text : String) -> String

    realize

    Builds the realized view of a validated ledger, optionally stopping at a date (balance assertions and other non-transaction directives are kept for querying, but only transactions affect inventories).

    register_rows

    fn register_rows(realized : RealizedLedger, account : String, subtree? : Bool) -> Array[RegisterRow]

    register_to_json

    fn register_to_json(rows : Array[RegisterRow]) -> String

    register_to_text

    fn register_to_text(rows : Array[RegisterRow]) -> String

    trial_balance

    fn trial_balance(realized : RealizedLedger, convert? : String?) -> Report

    Powered by MoonBit

    Site sourceReport issueModulesSkillsBuild queueStatistics

    © 2026 mooncakes.io