Bug 272659 - Accounts and institutions views values not updated after prices update
Summary: Accounts and institutions views values not updated after prices update
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Unclassified
Component: general (show other bugs)
Version: SVN
Platform: Compiled Sources Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-07 00:05 UTC by David Houlden
Modified: 2011-05-10 19:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Houlden 2011-05-07 00:05:07 UTC
Version:           SVN trunk (using KDE 4.5.5) 
OS:                Linux

I select Tools -> Update Stock And Currency Prices and then click on Update All or Update Selected. After the prices are updated, the values of investment accounts in the accounts view and institutions view are not being updated to reflect the new prices. The home page, ledger view, and investments view do update correctly.

Reproducible: Always
Comment 1 Cristian Oneț 2011-05-07 11:57:22 UTC
SVN commit 1230778 by conet:

BUG: 272659

Add a valueChanged signal to the MyMoneyFile and use it to update the value of the accounts wherever they are rendered. 

The valueChanged approach was chosen because the value concept is very similar to the balance concept.
Plus fix the added/modified/removed notifications for schedule and security objects (observed during work on this).

 M  +1 -1      models/accountsmodel.cpp  
 M  +1 -1      models/accountsmodel.h  
 M  +41 -2     mymoney/mymoneyfile.cpp  
 M  +8 -0      mymoney/mymoneyfile.h  
 M  +89 -0     mymoney/mymoneyfiletest.cpp  
 M  +4 -0      mymoney/mymoneyfiletest.h  
 M  +12 -4     views/kmymoneyview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1230778
Comment 2 David Houlden 2011-05-07 13:23:50 UTC
The individual account values are now displayed correctly. However, the Net Worth total displayed at the bottom of the Institutions and Accounts views is not being recalculated.
Comment 3 Cristian Oneț 2011-05-07 15:01:06 UTC
SVN commit 1230799 by conet:

BUG: 272659

The net worth and profit where only computed after the initial load. Fixed this. Thanks David for catching it!

 M  +26 -3     accountsmodel.cpp  
 M  +2 -0      accountsmodel.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1230799
Comment 4 allan 2011-05-10 13:20:55 UTC
(In reply to comment #3)
> SVN commit 1230799 by conet:
> 
> BUG: 272659
> 
> The net worth and profit where only computed after the initial load. Fixed
> this. Thanks David for catching it!
> 
>  M  +26 -3     accountsmodel.cpp  
>  M  +2 -0      accountsmodel.h  
> 
> 
> WebSVN link: http://websvn.kde.org/?view=rev&revision=1230799

Not sure if there may be a residual problem .

If I enter a buy transaction into an empty account, the summary at the foot of ledger view does not reflect the new balance.  Change to another account and then back, and the new value now appears.  An edit of an existing item shows the correct amount at once.
Comment 5 Cristian Oneț 2011-05-10 19:00:54 UTC
The behaviour you have observed is another unrelated bug and it only affects Investment accounts AFAICS. See BUG 272962.