Bug 418329 - Matching transaction incomplete on transfers with scheduled transaction.
Summary: Matching transaction incomplete on transfers with scheduled transaction.
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: importer (show other bugs)
Version: 5.0.8
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-29 17:13 UTC by Jonatan Cloutier
Modified: 2020-05-09 18:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Data file containing accounts and schedule (1.01 KB, application/x-kmymoney)
2020-05-09 08:39 UTC, Thomas Baumgart
Details
QIF import file containing a single transfer between two accounts (133 bytes, application/x-qw)
2020-05-09 08:43 UTC, Thomas Baumgart
Details
init kmy file (1.30 KB, application/x-kmymoney)
2020-05-09 15:23 UTC, Jonatan Cloutier
Details
result kmy file (1.62 KB, application/x-kmymoney)
2020-05-09 15:23 UTC, Jonatan Cloutier
Details
mars qfx file (1.92 KB, application/vnd.intu.qfx)
2020-05-09 15:23 UTC, Jonatan Cloutier
Details
april qfx file (1.92 KB, application/vnd.intu.qfx)
2020-05-09 15:23 UTC, Jonatan Cloutier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonatan Cloutier 2020-02-29 17:13:10 UTC
SUMMARY
I use a lot scheduled transaction for my forecast and thus I have many scheduled transactions that map to transfer between account (let say my weekly saving money transfert from my checking account). After that, when I import my bank transaction using ofx web connects the first transaction imported (checking account) match against the scheduled one, but the reverse (from saving account) doesn't get matched since the first one is already in "matched" state.

STEPS TO REPRODUCE
1. Create a scheduled transaction of a transfer between two accounts
2. Have that transfer happens between the two real account
3. Import the bank ofx file containing both account transactions


OBSERVED RESULT
The first transaction is matched against the scheduled one, the second duplicate the transaction.

EXPECTED RESULT
The 3 transaction should be matched at once or the scheduled one shouldn't get in the way

The work around currently is to accept the first match and then manually match the second one, but this crate a lot of research to find all the duplicate transaction on each import.

SOFTWARE/OS VERSIONS: 5.0.7
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.0
Comment 1 Jonatan Cloutier 2020-04-30 00:54:14 UTC
Still present on 5.0.8
Comment 2 Thomas Baumgart 2020-05-08 12:16:55 UTC
Can you provide the following for us to duplicate the problem, please?

a) sample .kmy file with two accounts and a scheduled transfer
b) sample ofx file with a transaction that causes the problem to show up

Attach those to this bug. Please make sure to modify the details in the OFX file so that no personal information is contained but leave the structure as it is when you get it from your institution. In case you cannot download a file but only have a direct connect, you can turn on OFX logging in 'Configure/General/Support'.

Many thanks in advance.
Comment 3 Thomas Baumgart 2020-05-09 08:39:41 UTC
Created attachment 128270 [details]
Data file containing accounts and schedule
Comment 4 Thomas Baumgart 2020-05-09 08:43:12 UTC
Created attachment 128271 [details]
QIF import file containing a single transfer between two accounts

There are two different ways I tested:

a) open the .kmy file, import the qif file and accepted the match to the schedule and
b) open the .kmy file, enter the overdue schedule, import the qif file.

In both cases, the transaction matches. It could well be that your problem is related to the OFX import and how it reports the data to the KMyMoney statement reader which is used by all importers. So I am waiting for an OFX sample showing the problem, maybe using the .kmy file attached here.
Comment 5 Jonatan Cloutier 2020-05-09 15:23:01 UTC
Created attachment 128288 [details]
init kmy file
Comment 6 Jonatan Cloutier 2020-05-09 15:23:19 UTC
Created attachment 128289 [details]
result kmy file
Comment 7 Jonatan Cloutier 2020-05-09 15:23:39 UTC
Created attachment 128290 [details]
mars qfx file
Comment 8 Jonatan Cloutier 2020-05-09 15:23:54 UTC
Created attachment 128291 [details]
april qfx file
Comment 9 Jonatan Cloutier 2020-05-09 15:24:40 UTC
Hello,

It took a bit of work to reproduce this on a vanilla file.

1. I started with a new data file, created 2 accounts and importing a first ofx file (for March). 
2. Both transactions were imported but not matched automatically (I don’t know if I messed up the qfx file or some kmymoney setting or it's another bug, but it doesn't really matter here). So I linked them manually and created a recurring transaction from them ( right click -> create recurring...)
3. I imported another qfx file for the April month
result: the transaction was imported and matched in the second account, but I have 2 transactions in the first one.

I upload both qfx file, the startup kmy file I produce and the result kmy file to make sure you have all the info.

To quickly reproduce you can start with the init kmy file and import April qfx file.

Thank you for looking into that.
Comment 10 Thomas Baumgart 2020-05-09 16:01:55 UTC
Thanks for the files. That shows me what is going on. The transaction matcher works on payees. The problem here is, that you have two different names for the same payee, so matching cannot work.

Solution: add '^VIR WEB CD - 1234$' as matching text to the payee 'Virement' and delete the "VIR WEB CD - 1234" payee. If you do the import with that setting, you get the result you expect.

Hope that helps.
Comment 11 Jonatan Cloutier 2020-05-09 18:18:43 UTC
Thanks, it did solve the issue.