Bug 312877 - Can create duplicate account
Summary: Can create duplicate account
Status: CONFIRMED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-08 13:15 UTC by allan
Modified: 2014-07-08 22:41 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 allan 2013-01-08 13:15:36 UTC
I notice that it seems possible, both in mymoneystatementreader.cpp and in mymoneyqifreader.cpp, to create an account with the same name and type as an existing account.

> It seems wrong. Are you sure it's not prevented by the engine?
> OTOH, perhaps it's allowed only for imports, in order to allow an import 
> from apps with looser rules.
> 
> Regards,
> Alvaro
> 

No, and mymoneystatementreader.cpp is used not just for imports.  I can create a duplicate from the UI, too.

I can then enter a transfer transaction between them, so they both seem functional.

Also, what seems strange is that the new account has as default opening date of 6 April 2014, the start of the next fiscal year here.  In addition, the transfer I entered to the new account, was accepted with today's date, before the opening date, although it couldn't then be edited.



Reproducible: Always

Steps to Reproduce:
1.Enter a new account with the same name and type as an existing account.


Actual Results:  
The new account seems fully functional, once the default opening date is changed to something more sensible.

Expected Results:  
A duplicate account name should be detected.
Comment 1 Thomas Baumgart 2013-01-13 09:48:50 UTC
Yes, a duplicate account can be created by design. The false opening date is a problem. I agree, that if the account is created using the UI the user should be warned that an account exists somehow.
Comment 2 george 2014-07-08 22:41:54 UTC
A duplicate (Brokerage) account is created if the QIF import contains an account by the same name.  In this case both accounts are created during the QIF processing.  I think the import code should detect that the QIF is already doing the security/brokerage split thing and not create a new (Brokerage) account.