I have a few KMyMoney accounts that I am unable to close. When I try to close these accounts (all of which have a zero balance), the “close” option is greyed-out. If I hover the mouse pointer over the “Close Account” button, the tool tip states that the account must have a zero balance. All these accounts are cash accounts associated with investment accounts that were used to receive dividends, interest payments, etc. The accounts definitely have a zero balance displayed on the home screen and when the account is accessed, but something in KMyMoney seems to think that the balance isn’t zero.
I’ve had a similar problem in the past. Try checking that all entries in the account have been reconciled, and also that there are no scheduled transactions still in place for the account.
It’s taken me a while to investigate this further. I had a number of warnings reported by the consistency checker - all to do with a price for a security not being available when the security account was created. I thought it was unlikely that these were having an impact on my ability to close some accounts, but I thought I’d better get the consistency checker running clean first.
I still have four accounts that I cannot close. All four are brokerage accounts that were linked to investment broker accounts that have been closed. All four are fully reconciled and have a zero balance, and none of them have any scheduled transactions associated with them.
Any ideas why they can’t be closed? The close button is greyed-out and there is a tooltip displayed that states that the account balance must be zero before the account can be closed…
This is all based on aging, fading memories, and an issue that I think has been fixed in current versions of KMM.
A year or two ago, I had the same problem with at least 1 investment brokerage account (IOW a bank account tied to an investment account in KMM). With a little experimentation, I figured out that the account balance displayed as 0.00, but internally, it was not exactly 0, but being rounded to 0.00 when displayed. IIRC, what I did was create a transaction that subtracted 0.01 (one cent) from the account. The balance would still show 0.00, but in a red font, indicating a negative balance.
I think, with the help of Ipwizard, in the old KDE forums, I was able to figure out which transactions caused this. IIRC, they involved buying and selling equities that had the “Price entry” setting to “Price per share” instead of “Total for all shares”. There were only a few such transactions, so I just set all the equities involved to “Total for all shares”, and manually updated each buy/sell transaction so the total amount was always an even number of cents.
I think this was fixed some time ago, but I have no idea when. Since I had this problem, I always set the “Price per share” option to “Total for all shares”. Even if it has been fixed, I suppose this could be your problem if your investment account has transactions that were entered before it was fixed.
None of the accounts were designated as the default category for any of my payees.
I have hundreds of transactions in the affected accounts. These have been entered over many years and numerous versions of KMM. Many of them originated in other financial applications and were imported into KMM when I switched to one of the earliest versions. In short, there are far too many transactions to start hunting around them and tweaking the data - so I looked at how the “account closed” status was reflected in the XML data file.
A typical closed account would look something like this:-
It appears to have worked - the accounts are now closed. If I uncheck the option “Don’t show closed accounts”, the affected accounts show up as expected and have a zero balance. Most important of all, the current assets and liabilities totals are correct, and the historical reports that I occasionally use show the same results as previously.
Please let me know if you think I might have caused problems elsewhere! In the meantime I’ll carry on checking that everything really is working OK.
For the benefit of anyone who might have a similar problem, it’s now six weeks or so since I tweaked the “account closed” status on the old unused accounts. In the intervening period, I’ve used KMM a lot and have had no problems whatsoever.
It may have been a rather crude sledgehammer solution to the problem of closing these rogue accounts, but it seems to have worked just fine.