Bug 250651

Summary: Can't delete investment accounts
Product: [Applications] kmymoney Reporter: allan <agander93>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: SVN   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description allan 2010-09-09 12:37:41 UTC
Version:           SVN trunk (using KDE 4.4.4) 
OS:                Linux

I've done this before several times, but cannot now delete an investment account or security.  I tried deleting all its prices, but that didn't help, and in fact, I only want to close the account, not delete it, so don't want to lose history.

I've tried in Account view, and in Investments view, but the option is not available/active.

There are no schedules and I've deleted the account from stored reports.

Reproducible: Always

Steps to Reproduce:
In Investments view, select the security.  Close account is disabled.
In Ledger view, select the account.  Close account is disabled.

Actual Results:  
Can't close.

Expected Results:  
Close the security/investment

Version 4.5.0-svn1172436
Comment 1 Alvaro Soliverez 2010-09-09 12:43:23 UTC
Make sure the balance is really zero
Comment 2 allan 2010-09-09 13:18:20 UTC
(In reply to comment #1)
> Make sure the balance is really zero

The balance shows as 0.00 and the investment value as ~£0.00.

Ahaaa...  In the security wizard, I changed the fraction from 1/100 to 1/1000, and now the balance shows as -0.001!  I need to unsell 0.001 items.

Thanks
Comment 3 allan 2010-09-09 13:59:50 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Make sure the balance is really zero
> 
> The balance shows as 0.00 and the investment value as ~£0.00.
> 
> Ahaaa...  In the security wizard, I changed the fraction from 1/100 to 1/1000,
> and now the balance shows as -0.001!  I need to unsell 0.001 items.
> 
> Thanks

PS

I needed to close three investments, and two of them had this type of issue.  Might there be a way to indicate that when a balance shows as 0.00, it is not really zero?  It would save head-scratching, bugs, and unnecessary twiddling.

PPS

I now want to close the relevant securities, but this doesn't seem to be possible, without destroying pricing history.  Can they be closed rather than deleted?
Comment 4 Alvaro Soliverez 2010-09-09 15:35:40 UTC
Securities cannot be closed. Think of them as currencies. Therefore, you can only delete them if you remove the corresponding price history.