When I enter a transaction in an investment account where the price/share value has only 3 significant digits after the comma (2.2870) then I the yellow triangle in the ledger view with the message "This transaction has a missing assignment of XXX 0.01". If I enter a figure with 4 significant digits after the comma (e.g. 2.2871) then the warning disappears. I am aware of https://bugs.kde.org/show_bug.cgi?id=253007 but I don't think this applies here. In my case I get the warning when I enter *fewer* digits than the configured precision in the transaction, not more. Reproducible: Always
Could you provide a test file to reproduce this?
Created attachment 89183 [details] Test case with the problem Attached a test case that shows the yellow triangle in the "Stocks" and in the "Stocks (Brokerage)" accounts. The triangle shown in the transaction from 04/09/2014. I have tested this with KMymoney 4.6.6. In the KMyMoney settings I have a Price Precision of 6 digits.
*** Bug 253007 has been marked as a duplicate of this bug. ***
The problem is visible in the attached file now we just need to figure out what's causing it.
Git commit 1506b0ccacb9d4efa2b6aaeb725c2e73f5507d83 by Cristian Oneț. Committed on 18/10/2014 at 12:57. Pushed by conet into branch 'master'. Fix the validation of investment transactions. Don't ajust the values to the smallest account fraction of the currency. This will cause roundings that will lead to the reported validation error. Because at 0.5 AlkValue::RoundRound can round up/down depending on the result it could be that one split it rounded up while the other is rounded down leading to a 0.1 error while summing them. Having a value which is more precise than the smallest account fraction should not cause any issues since the UI should render the value according to this fraction anyway. If rounding is necessary a fix rounding method should be applied for all splits which are going to be summed up. M +0 -8 kmymoney/dialogs/investtransactioneditor.cpp http://commits.kde.org/kmymoney/1506b0ccacb9d4efa2b6aaeb725c2e73f5507d83
Git commit 1a76540fbc936dd6e80cfe9faaeef7b35d0c166b by Cristian Oneț. Committed on 18/10/2014 at 12:57. Pushed by conet into branch '4.7'. Fix the validation of investment transactions. Don't ajust the values to the smallest account fraction of the currency. This will cause roundings that will lead to the reported validation error. Because at 0.5 AlkValue::RoundRound can round up/down depending on the result it could be that one split it rounded up while the other is rounded down leading to a 0.1 error while summing them. Having a value which is more precise than the smallest account fraction should not cause any issues since the UI should render the value according to this fraction anyway. If rounding is necessary a fix rounding method should be applied for all splits which are going to be summed up. (cherry picked from commit 1506b0ccacb9d4efa2b6aaeb725c2e73f5507d83) M +0 -8 kmymoney/dialogs/investtransactioneditor.cpp http://commits.kde.org/kmymoney/1a76540fbc936dd6e80cfe9faaeef7b35d0c166b
Proposed patch does not work when reconciliating accounts : values that appear in Kmymoney and on your bank statement are not the ones that are summed to calculate the current balance. Example : Your account has 0.01€ precision, but 2 operations have 0.001€ precision. Displayed | Internally Op1 1.01€ | 1.014€ Op2 2.01€ | 2.014€ Sum = 3.02€ 3.028 What your bank will show on your statement is a balance of 3.02€ while Kmymoney's balance is round(3.028) = 3.03€, and you get an error when you try to reconcile your account.
I've just hit this problem, with the same cure (edit the price to have a non-zero final digit) in KMyMoney 5.0.3, running on Linux, encrypted database, not SQL.