Values converted to HUF from EUR is wrong
sasyor opened this issue · comments
Beancount version: 2.3.6
Fava version: 1.27.3
Browser: Brave, version: 1.63.174 chromium: 122.0.6261.128
Values converted to HUF from EUR is wrong.
Data to reproduce issue:
plugin "beancount.plugins.implicit_prices"
option "operating_currency" "HUF"
option "render_commas" "TRUE"
2010-01-01 custom "fava-option" "locale" "de"
2013-01-01 open Assets:HU:Paypal
2013-01-01 open Expenses:Entertainment:Games
2013-06-24 * ""
Assets:HU:Paypal -2,500 HUF @@ 1.99 EUR
Expenses:Entertainment:Games 1.99 EUR
2013-06-25 * ""
Assets:HU:Paypal -2,801 HUF @@ 1.99 EUR
Expenses:Entertainment:Games 1.99 EUR
2013-06-26 * ""
Assets:HU:Paypal -2,500 HUF @@ 1.99 EUR
Expenses:Entertainment:Games 1.99 EUR
2013-06-27 * ""
Assets:HU:Paypal -2,500 HUF @@ 1.99 EUR
Expenses:Entertainment:Games 1.99 EUR
Expected balance values to be:
10.301 HUF
7.801 HUF
5.301 HUF
2.500 HUF
This works as intended. Beancount does not remember the prices in your inventories, so your account Expenses:Entertainment:Games only contains EUR, and e.g. on 2023-06-27, the 7.96 in that account are correctly converted at that date's conversion rate to 10 HUF.
If you use the cost syntax, then the attached cost would be stored (so you would have e.g. 1.99 with a total cost of 2.801 HUF on 2013-06-25 in your account Expenses:Entertainment:Games) and then, with the "At cost" Fava conversion, you could get the "original" prices in HUF back as well.