From 727bdc61e677efe62cde8429e3c987d7872fbf6a Mon Sep 17 00:00:00 2001 From: Stephen Waits <1+swaits@noreply.git.swaits.com> Date: Sun, 11 Oct 2026 08:15:22 +0000 Subject: [PATCH] Period close, bank rec, AR/AP, multi-currency (41 MCP tools) --- crates/ledger-core/src/journal.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/ledger-core/src/journal.rs b/crates/ledger-core/src/journal.rs index 984344d..f885ed4 100644 --- a/crates/ledger-core/src/journal.rs +++ b/crates/ledger-core/src/journal.rs @@ -29,8 +29,18 @@ pub struct JournalLine { pub account: AccountId, /// Which side of the entry this line is on. pub side: Side, - /// The exact amount. Never zero (rejected at validation). + /// The exact amount, in the ledger's base currency. Never zero (rejected + /// at validation). pub amount: Money, + /// For foreign-currency lines: the original currency. `None` for base- + /// currency lines. When set, `amount` is the base-currency equivalent + /// converted at the line's rate. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub foreign_currency: Option, + /// For foreign-currency lines: the original foreign amount. `None` for + /// base-currency lines. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub foreign_amount: Option, } /// A balanced set of journal lines with a date and a description.