Created attachment 188039 [details] Screenshot – correctly rounded total, incorrect entry SUMMARY I noticed a rounding or input error when entering investment transactions. I enter the total price of all shares instead of the price per share. As can be seen in the screenshot at the beginning. The total amount is rounded correctly in the input window, but then entered incorrectly. A similar bug was reported as bug 439861 and should have been fixed in version 5.1.3, but it is still present in this version. STEPS TO REPRODUCE 1. Create a transaction for the purchase of an investment share. 2. Create a total amount of xx.225; xx.445; xx.665 or xx.885 €. OBSERVED RESULT In one case, the correctly rounded total is displayed, but entered incorrectly in the book. In further tests, the total was also rounded incorrectly. xx.225 --> xx.22 xx.445 --> xx.44 xx.665 --> xx.66 xx.885 --> xx.88 The error does not occur with other entries such as xx.115; xx.335, etc. EXPECTED RESULT Correct rounding of all amounts SOFTWARE/OS VERSIONS Linux/KDE Plasma: openSUSE Leap 15.6 KDE Plasma Version: 5.27.11 KDE Frameworks Version: 5.115.0 Qt Version: 5.15.12 ADDITIONAL INFORMATION In the securities settings, the ‘Round’ option is selected for the remainder.
Created attachment 188040 [details] Screenshot - Incorrect rounding x.885
Created attachment 188041 [details] Screenshot - Correct rounding x.775
Does the problem still exist on a newer version? You can simply try by using an AppImage from https://kmymoney.org/appimage.html
Created attachment 188078 [details] Incorrect Rounding on Appimage (5.2.1-c9efa7a)
The same problem exists here too. The numbers are rounded incorrectly and even my input is overwritten. Previously, entries with 3 or 4 decimal places were still saved and displayed again when edited. The correct value was still saved, but here only the rounded value seems to be saved.
Created attachment 188079 [details] Rounding of x.8855 on Appimage (5.2.1-c9efa7a)
Created attachment 188111 [details] Setting the rounding option on the investment It looks like your rounding option is set to RoundRound which causes the behavior you encounter (see attached screenshot). I have not found a respective section on rounding in the KMyMoney documentation, but the different settings are very well explained in the comment of the source code at https://invent.kde.org/office/alkimia/-/blob/master/src/alkvalue.h.in?ref_type=heads#L30-L78.
Regarding the modification of the value entry in 5.2.1+ it has to be noted, that keeping the original value caused other (rounding) problems down the line. There are (closed) bug entries about it, which I did not find on first glance. If you want to keep the original detail, you may want to switch to the price per share entry method. That allows to control the number of digits using the price precision of the investment.
It seems that some rounding options were not yet available in this version. Only Round, Ceil, Floor and Truncate are offered. From the wording, “Round” was the option I was looking for, because the other two options rounded up or down completely. However, “RoundHalfUp” would probably be the best option here. I'll probably have to wait until the new version is available for me.