Bug 515098 - Ledger status bar and FX editor show wrong currencies and 1:1 rates in multi‑currency files (CLP base, USD/CLF accounts)
Summary: Ledger status bar and FX editor show wrong currencies and 1:1 rates in multi‑...
Status: NEEDSINFO WAITINGFORINFO
Alias: None
Product: kmymoney
Classification: Applications
Component: general (other bugs)
Version First Reported In: git (master)
Platform: Arch Linux Linux
: NOR grave
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-26 09:20 UTC by Martin Zecher
Modified: 2026-01-27 12:15 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Balance showing CLP instead of USD (72.25 KB, image/png)
2026-01-26 09:20 UTC, Martin Zecher
Details
the exchange rate is properly set (82.81 KB, image/png)
2026-01-26 09:21 UTC, Martin Zecher
Details
clicking modify always shows 1=1 and does not stack if saved (28.60 KB, image/png)
2026-01-26 09:22 UTC, Martin Zecher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Zecher 2026-01-26 09:20:47 UTC
Created attachment 188895 [details]
Balance showing CLP instead of USD

SUMMARY

With CLP as base currency and at least one foreign‑currency account (USD or CLF), KMyMoney:

    Shows the correct numeric balance, but the wrong currency code (base currency) in the ledger status bar.

    Shows 1:1 exchange rates in the “Exchange Rate/Price Editor” dialog, even when the price table contains correct non‑1 rates.

The underlying amounts and stored prices are correct; only the display/initialization logic is wrong. This  makes it impossible to safely work with different currencies. This happens since 5.2.0

Version: 5.2.70‑07ef61afd (master) and 5.2.1 stable
I'm running up to date ArchLinux
Base currency: CLP
Account currency: USD (and CLF in a separate test)

STEPS TO REPRODUCE
1.    Create a USD account while base currency is CLP.
2.    Enter a few USD transactions; ledger balance is ~6,839.40 USD.
3.    Observe ledger status bar: shows “Balance: CLP 6,839.40” although account currency is USD.
4.    Open Price Editor, ensure a CLP/CLF (or CLP/USD) rate is defined (non‑1).
5.    Select that price → Modify → Exchange Rate/Price Editor.

OBSERVED RESULT
 Observe “1 CLP = 1 CLF” and “1 CLF = 1 CLP” regardless of stored value.

EXPECTED RESULT
    Ledger status line uses the account currency (USD) for that account.
    FX/Price dialog initializes from the stored price, not 1:1.
Comment 1 Martin Zecher 2026-01-26 09:21:27 UTC
Created attachment 188896 [details]
the exchange rate is properly set
Comment 2 Martin Zecher 2026-01-26 09:22:06 UTC
Created attachment 188897 [details]
clicking modify always shows 1=1 and does not stack if saved
Comment 3 Thomas Baumgart 2026-01-27 12:15:25 UTC
As of now, it is unclear to me, how you get to the screenshot of the ledger showing currency symbols. This is clearly not the master code which does not display them (see https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/views/ledgerviewpage_p.h#L148-L159 where the first parameter to formatMoney is an empty string). Can you double check?

It would be cool if you could provide a sample .kmy file and attach it here for us to duplicate the problems.