Summary: | When buying / selling shares for an investment, the value is rounded to two decimal places | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Ian Neal <iann_bugzilla> |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dbyy |
Priority: | NOR | Keywords: | regression |
Version: | git (master) | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kmymoney/bd103f87388b56c873210266887272d490b22ad2 | Version Fixed In: | 5.0.3 |
Sentry Crash Report: |
Description
Ian Neal
2019-01-15 21:36:56 UTC
The currency I used for the investments is Palladium as it gives smallest money/cash unit of 0.000001 This must be a side effect/consequene of commit https://cgit.kde.org/kmymoney.git/commit/?id=c6e31c96a03ad5a7ec5e3695bbfa8336181ab81c which solves a bunch of other issues. I don't want to break those by reverting the patch, so it needs further analysis. Git commit e38492cbc059796addb5a62861e75b851b2428e0 by Thomas Baumgart. Committed on 19/01/2019 at 15:27. Pushed by tbaumgart into branch '5.0'. Fix security creation logic In case no smallest account fraction is provided in the ctor of a MyMoneySecurity object it should use the same value as provided for the smallest cash fraction. Providing a default value of 100 destroys this logic. This forced Palladium to have values always rounded to two decimals. In case the user has such a security on file there is no other way as manually fixing it by copying the value from the SCF attribute to the SAF attribute in the XML file and the value in the smallestCashFraction column to the smallestAccountFraction column in the database. M +1 -1 kmymoney/mymoney/mymoneysecurity.h https://commits.kde.org/kmymoney/e38492cbc059796addb5a62861e75b851b2428e0 Git commit bd103f87388b56c873210266887272d490b22ad2 by Thomas Baumgart. Committed on 19/01/2019 at 15:32. Pushed by tbaumgart into branch '5.0'. Setup the transaction commodity based on the trading currency For new investment transactions the commodity was always set to the baseCurrency instead of the securities trading currency. This usually caused the values to be rounded to two decimals (smallest account fraction of the base currency). This change fixes the problem by not looking at the empty original transaction in this case. FIXED-IN: 5.0.3 M +7 -4 kmymoney/dialogs/investtransactioneditor.cpp https://commits.kde.org/kmymoney/bd103f87388b56c873210266887272d490b22ad2 Pulled latest git master and can verify this has fixed my issue. just correcting final status, but thanks for confirming that the fix works. |