Bug 374599

Summary: Cannot delete payee
Product: [Applications] kmymoney Reporter: Scott Russell <sruss157>
Component: databaseAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED WORKSFORME    
Severity: normal CC: ralf.habacker
Priority: NOR    
Version: 4.8.0   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: attachment-4280-0.html

Description Scott Russell 2017-01-05 16:42:34 UTC
Upgraded to latest release (4.8.0) but still have this problem.  Cannot delete a payee even though no transactions show for it. When I try to delete I get this: Cannot remove payee that is still referenced to a transaction thrown in e:\r\build\extragear\kmymoney-4.6.1-20110918\work\kmymoney-4.8.0\kmymoney\mymoney\storage\mymoneyseqaccessmgr.cpp:267

I presume it has to do with downloaded transactions that have incorrect payee that I change on the individual transactions in the checking ledger
Comment 1 Thomas Baumgart 2017-01-05 20:30:51 UTC
Could it be, that the payee is still referenced by a scheduled transaction?
Comment 2 Scott Russell 2017-01-05 21:13:51 UTC
Created attachment 103220 [details]
attachment-4280-0.html

I have no scheduled transactions.

On Jan 5, 2017 3:30 PM, "Thomas Baumgart" <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=374599
>
> --- Comment #1 from Thomas Baumgart <tbaumgart@kde.org> ---
> Could it be, that the payee is still referenced by a scheduled transaction?
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 Ralf Habacker 2017-06-27 14:51:51 UTC
A workaround is to save the kmymoney file as xml file and fix this issue using a text editor:

1. Search for 'PAYEE' which will get something like 

  <PAYEE matchingenabled="0" email="" id="P000001" name="test" reference="">

2. Then search for 'P000001'. If there any transactions it will return something like this:

    <SPLIT payee="P000001" reconcileflag="0" shares="-12121212/1" reconciledate="" action="" bankid="" account="A000001" number="" value="-12121212/1" memo="" id="S0001"/>
    <SPLIT payee="P000001" reconcileflag="0" shares="12121212/1" reconciledate="" action="" bankid="" account="A000002" number="" value="12121212/1" memo="" id="S0002"/>

3. Change payee="P000001" to payee=""

4. save file and open with kmymoney.

5. Save as .kmy file.

To get an idea what happens in the application it would still nice to get detailed step by step instruction how to reproduce this issue.