Bug 397024

Summary: Wrong date choice when a schedule transaction is recognised
Product: [Applications] kmymoney Reporter: antoine <antoine>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal CC: sdepiets
Priority: NOR    
Version: 5.0.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Ledger of imported and matched scheduled transaction
Testfile

Description antoine 2018-07-31 20:56:36 UTC
Hi,

I noticed some changes since I moved from kmy 4.6 to 5.0, especially when I import transaction from a qif file.
As usual, kmy recognises a transaction , then it offers me the possibility to accept or not this recognition

First, when I refuse a recognition, kmy stop to look at the other transactions in the .qif for another recognition

Second, once in the ledger, I can valid a transaction recognition, when the date of real transaction (imported) and the schedule transaction are different, the validation of the recognition set the date of the transaction equals to the date of the scheduled transaction, not the real, this behavior is not logical in my opinion

xubuntu 18.04
antoine@Frankenstein:~$ apt show kmymoney
Package: kmymoney
Version: 5.0.1-2
Priority: optional
Section: universe/kde
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>
Comment 1 Thomas Baumgart 2018-08-05 08:33:46 UTC
Regarding your first problem: I am unable to duplicate this in master

Regarding your second problem: Please try to select the two transactions in reverse order and see if that makes a difference and report back.
Comment 2 antoine 2018-08-05 12:36:56 UTC
Hi,

First problem, maybe I am wrong and maybe there is a relation with https://bugs.kde.org/show_bug.cgi?id=397022 (my point of view), kmy really missed obvious recognition since I am on kmy 5.0

Second, 
I am not sure I understand what you mean.
I do not select two transactions to set a recognition

this is how I have this problem
1> start kmy
2> import transaction from qif file
3> go in the ledger
4> when I valid a match (there is tow button "match" and "accept", I do not remember which on I clicked), the date of the final transaction is the one of the scheduled transaction (not the one from the imported transaction)
Comment 3 Thomas Baumgart 2018-08-05 13:54:39 UTC
Created attachment 114303 [details]
Ledger of imported and matched scheduled transaction

OK, let's focus on the second problem here then. I think I now understood what you mean: you import a QIF file. A transaction is matched (recognized) against an existing scheduled transaction. When you accept (valid) the match, KMyMoney uses the post date of the scheduled transaction rather than the post date of the import.

I am unable to duplicate this here. I have set the schedule to 30.7.18 and the imported transaction happened on 1.8.18. It reported, that it found the schedule, I accepted to enter it into the ledger and the date there was set to 1.8.18. See attachment.

The two buttons you see in step #4 are 'Accept' and 'Unmatch'.

This is done with current master.
Comment 4 antoine 2018-08-05 15:54:48 UTC
"The two buttons you see in step #4 are 'Accept' and 'Unmatch'."

There is maybe a mistake in the french translation,
they are called Accepter (Accept) and Correspond (Match)

When I click accept, it works,
When I click Correspond, the scheduled transaction is added in the ledger
Comment 5 Thomas Baumgart 2018-08-06 18:35:49 UTC
I took a look at the french translation:

#: kmymoney/kmymoney.cpp:702 kmymoney/views/kgloballedgerview.cpp:262
#: kmymoney/views/kgloballedgerview.cpp:1700
#, kde-format
msgctxt "Button text for match transaction"
msgid "Match"
msgstr "Correspond"

#: kmymoney/views/kgloballedgerview.cpp:332
#, kde-format
msgctxt "Button text for unmatch transaction"
msgid "Unmatch"
msgstr "Supprimer la mise en correspondance"

Maybe that text "Supprimer la mise en correspondance" is too long and does not get applied to the button so that it stays with "Correspond". In the original version it switches between Match and Unmatch.

The problem seems to be with the button text, but that is a translation issue I don't have under control. The logic is working. Could be, that the same applies to German. There is also a long text, but I have not checked.

#: kmymoney/views/kgloballedgerview.cpp:332
#, kde-format
msgctxt "Button text for unmatch transaction"
msgid "Unmatch"
msgstr "Zuordnung rückgängig machen"
Comment 6 Simon Depiets 2018-08-07 01:10:51 UTC
I've amended the translation to

"Ne correspond pas"

I hope it will be short enough, the shorter alternatives "associer/dissocier/apparier/etc." are less accurate and for some of them already used (for associated accounts).

https://phabricator.kde.org/R883:1522012
Comment 7 Thomas Baumgart 2018-08-07 04:32:10 UTC
Created attachment 114348 [details]
Testfile

Attached a sample file. It has a single account (named Current) and contains two transactions. One is matched (Test1, 200 EUR) and the button shows 'Unmatch' if it is selected, the other one (Test2, 300 EUR) the button shows 'Match' (though disabled but that is OK) if selected in the ledger. Does the problem persist using this sample file?
Comment 8 antoine 2018-08-07 15:48:18 UTC
Hi, 

Yes, with the sample file, the "Supprimer la mise correspondance" (Unmatch) button also does not appear on my computer.

When I click the "Correspond" (Match) button, transaction are unmatched...

What is funny is that the "Correspond" button tooltip is "Supprimer la mise en correspondance"
Comment 9 antoine 2020-07-13 17:11:30 UTC
French translation for the "match" button has been fixed since at least 5.0.8