Summary: | Investment doesn't show correct value after switching investments | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Ian Neal <iann_bugzilla> |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | git (master) | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kmymoney/1d9158e172c6636f992ee9ca05e7a0b67b6b00c5 | Version Fixed In: | 5.0.8 |
Sentry Crash Report: |
Description
Ian Neal
2019-08-17 16:21:33 UTC
This sounds possibly related to https://bugs.kde.org/show_bug.cgi?id=404753 (about the display not updating in a report after editing multiple transactions to change the memo field.) Does the correct value show if you switch to some different view (say reports or payees) and then back to the investments view? Or change the ledger to a different account and then back? (In reply to Jack from comment #1) > This sounds possibly related to https://bugs.kde.org/show_bug.cgi?id=404753 > (about the display not updating in a report after editing multiple > transactions to change the memo field.) Does the correct value show if you > switch to some different view (say reports or payees) and then back to the > investments view? Or change the ledger to a different account and then back? So done some more testing. After editing the buy from stock A to stock B, the value of stock B is increased correctly, it is stock A which does not get correctly reduced. Say stock A has £2 of shares and stock B has £10 of shares. A buy of £1 of stock A shares is done. Stock A now shows £3 in the investment page and the ledger page. Stock B shows as having £10 in both the investment and ledger pages. Edit the buy of stock A to be for stock B. Stock A still shows as £3 in both pages (incorrectly). Stock B shows the correct £11 in both pages (correctly). Switching to other pages, accounts, ledgers, etc makes no difference to the values reported. The only thing that seems to update the values is restarting kmymoney. It may not help any, but I would stick to number of shares in this discussion. If you talk value, you have to consider that it is (should be?) calculated using the most recent price for each stock, which is not necessarily the price used in the buy transaction. (In reply to Jack from comment #3) > It may not help any, but I would stick to number of shares in this > discussion. If you talk value, you have to consider that it is (should be?) > calculated using the most recent price for each stock, which is not > necessarily the price used in the buy transaction. All shares are priced at £1 each and that does not change. Git commit 1d9158e172c6636f992ee9ca05e7a0b67b6b00c5 by Thomas Baumgart. Committed on 13/10/2019 at 10:55. Pushed by tbaumgart into branch '5.0'. Changing the security of a transaction does not update balance When the security of an investment transaction (e.g. buy) is changed from security A to security B, the balance of security A does not get updated. This causes to display false values. This change fixes the problem by first removing the split referencing security A from the list of transactions and then updating the balance. FIXED-IN: 5.0.8 M +7 -11 kmymoney/mymoney/storage/mymoneystoragemgr.cpp https://commits.kde.org/kmymoney/1d9158e172c6636f992ee9ca05e7a0b67b6b00c5 |