Created attachment 171186 [details] screenshot showing the bug *** If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** SUMMARY When you buy stocks that have a precision > 2 and the rounding option is set to closest ("arrondi" in my french interface) the value is right in the edit window but the value that is written in the ledger seems to use the truncate rule instead. I have attached a screenshot that shows the discrepancy. STEPS TO REPRODUCE 1. 2. 3. OBSERVED RESULT EXPECTED RESULT The value written in the ledger should use the right rounding rule when buying stocks SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: ubuntu 22.04 (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
5.1.2 is a bit out-dated. Can you check if the problem persists in the current development version? You can get it as an AppImage. See https://kmymoney.org/appimage.html for details. In case the problem persists, please provide details about the settings in the investment and the transaction so that we are able to duplicate the problem. Merci d'avence.
I downloaded and tested the AppImage named kmymoney-5.1-3218-linux-gcc-x86_64.AppImage (version 5.1.3-eef04f1 in the UI). This version is much better. Only small detail left, 1.0051 is rounded up which is correct but the value 1.0050 is rounded down when using the round option, I think it should be rounded up. It seems there is no international standard but the EU provided one for the euro : https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=LEGISSUM:l25025&from=FR Rounding rules Monetary amounts in euros must, when a rounding takes place, be rounded up or down to the nearest cent. Monetary amounts converted into a national currency unit must be rounded up or down to the nearest sub-unit or in the absence of a sub-unit to the nearest unit. National law or practice is to be respected such that, in some countries, rounding may be to a multiple or fraction of the sub-unit or unit of the national currency. **If the application of the conversion rate gives a result which is exactly half-way, the sum is rounded up.**
Too bad Ubuntu is so late in updating the packages. The version I reported for is the latest in Ubuntu with apt. Time to switch to flatpak or snap for kmymoney?!
Created attachment 171438 [details] Rounding in current master version This has been corrected and is working properly in the master version. See attached screenshot showing the edit widgets on top and the ledger entry at the bottom.
Resolved as per previous comment