@nucleontum thanks as always for your thorough investigation!
Multi-currency support has existed in Surebeans for about a month now. You’re possibly the first to try it other than me. You’ve definitely found a bug and some unfinished bits, all of which I want to fix. Let me also explain a couple of things.
‘Funds by Commodity’.
The term “Commodity” is from hledger, which treats currency as just another commodity, e.g. these are all commodities: AAPL, EUR, USD, DOGE.
There are a couple of options here. I could rename it to “Funds by Currency”, but then a user with AAPL holdings in an Asset account will think “by Commodity” makes more sense. Splitting them out into two cards is harder since Surebeans doesn’t contain a list of all currencies. Do you think “Funds by Currency / Commodity” would work for now?
I do not understand the purpose of having this row in the Plan tab.
It definitely has a purpose, and I should update the docs to explain:
A multi-currency budget app has to make some tough UX choices. For example, if I have 5000 EUR and 1000 USD, what is my RTA? Surebeans could just say, “You have 5000 EUR and 1000 USD”, but I can’t think of a good way to plan with that. I’d need Groceries (EUR) and Grocieries (USD) categories. Each record would take a currency-specific category. Not to mention, what if I hold 5 currencies? Might as well do what YNAB does and require separate budgets per currency.
So for RTA, Activity, and Available, I decided to convert all currencies into the main currency so they could be just one number. That of course has a tradeoff: it requires currency conversions, which Surebeans tries to fetch for you. Like you pointed out, what is missing in the Plan tab is a way to fetch them on demand or to add them manually (if e.g. you don’t have internet). I will add those. I’ve also got a ticket to add a comprehensive prices editor.
Now it gets really interesting, and this is why the “Funds by Commodity” card exists. If I hold 5000 EUR and 1000 USD, and my main currency is EUR, then daily USD-EUR financial exchange rate fluctuations will cause RTA to go up or down. Today I might have 5874 EUR (= 5000 EUR + 1000 USD at today’s rate). I might allocate all of that, and overnight the USD loses strength vs the euro. RTA shows 5500 EUR and I’m overspent by 374 EUR. That would be a tough start to the day!
The “Funds by Commodity” card mitigates overallocation arising from FX fluctuation. With it, I can see plainly that 874 of my 5874 EUR comes from USD holdings, and I can plan accordingly.
Now, what the card is supposed to do is make it clear when the exchange rate (“price” in hledger) is missing so you can do something about it. As you pointed out, the Plan tab quietly falls back to counting such a currency as the main currency. I’m open to ideas here. What would you like to see it do? It would be incorrect to deduct nothing from RTA. Should I make the warning triangle more obvious? Hide RTA? Fallback to the last known FX rate (if there is one)?