Summary: | When buying stocks with precision>2, the rounding rule used in the ledger is wrong | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | matt <kde.org> |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 5.1.2 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 5.2 | |
Sentry Crash Report: | |||
Attachments: |
screenshot showing the bug
Rounding in current master version |
Description
matt
2024-06-29 17:43:33 UTC
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 |