Bug 355108 - Home screen !M C !R don't work for investment accounts
Summary: Home screen !M C !R don't work for investment accounts
Status: RESOLVED NOT A BUG
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.7.2
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-09 21:20 UTC by Jeff
Modified: 2021-04-17 23:40 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 Jeff 2015-11-09 21:20:01 UTC
On the Home screen Assets and Liabilities Summary section, the !C, M, and !R columns always show "-" for investment accounts.

Reproducible: Always

Steps to Reproduce:
1. Enable the !C, M, and/or !R columns in the KMM settings for the home screen

Actual Results:  
KMM does not count transactions in investment accounts.

Expected Results:  
Provide the counts of matching transactions.

It looks like MyMoneyFile::countTransactionsWithSpecificReconciliationState() is only used for the home view and can be fixed to count investment transactions with the following change:

  MyMoneyAccount acc = account(accId);
  if (acc.accountType() == MyMoneyAccount::Investment)
    filter.addAccount(acc.accountList());
  else
    filter.addAccount(accId);
Comment 1 Jack 2015-11-09 23:20:26 UTC
I believe the column for balance status for mapped accounts is also not done for investment accounts.  (I assume you made a typo of M and !C instead of !M and C.)  Interestingly, these DO work for the associated Brokerage accounts.

There are other things where investment accounts are treated differently, such as reconciliation.  I suspect what is really needed is a rather significant reworking of how investments are handled, especially concerning transaction import (either from file or online) and the interaction with an associated brokerage account, since that distinction is not made by all institutions.  Unfortunately, this is not high on the list of bugs and wishlist items, so it's clearly not going to happen soon.  Your change, however, looks promising.  You might want to submit it to reviewboard, to facilitate the process.
Comment 2 Jeff 2015-11-10 00:33:13 UTC
Yes - there's typos in the description for !M C !R. The bug title is correct.

Yes - the !M C !R works for "checking" accounts, so they work for mapped (Brokerage) accounts.

I believe I also have the mapped account balance status column working.  It didn't take "significant rework", but it was more than the few lines of code for this fix. And I had to modify libofx so it would parse the cash balance for an investment account. So I'm not sure where I'm going with that one.
Comment 3 Justin Zobel 2021-03-10 00:16:19 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 4 Jack 2021-04-17 23:40:05 UTC
I just noticed the OP closed this as unmaintained, which is not really correct, even 5 years later, so I'm changing to NOT A BUG.

Jeff - note that there have been recent changes to libofx in this area, so it might be worth a fresh look, especially if you have patches to offer that would work with the current state of KMM.