This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Force imported transactions to have an unassigned category

Tags: None
(comma "," separated)
schnaffman
Registered Member
Posts
2
Karma
0
OS
I'm using KMyMoney 4.5.0 on Arch Linux

When I import a QIF file, I would like all the transactions to be created without any category assigned, so I can assign them all manually.

In Settings --> Configure KMyMoney --> Ledger --> Import tab, I have set "Match transactions within days" to "0", and none of the payees have a default account set. Yet, when I import a QIF file, the imported transactions get assigned to a category, which is not always the right one (which is why I would prefer UNASSIGNED).

How can I prevent KMyMoney from trying to guess a category for imported transactions?
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
Try to turn off the auto-fill option on the data-entry tab. That might do the trick. I should know, but it's too long ago that I was working on this part of the code.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
schnaffman
Registered Member
Posts
2
Karma
0
OS
The auto-fill option was turned off all along, so it doesn't work.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
Ah, shame on me. I should read the posts with more care. I thought we were talking about OFX but you mentioned QIF. That is a different story and I should also ask, if the QIF file contains any hints towards the categories (lines starting with an 'L' IIRC)?

Other than that, I need to go into the source and analyze the problem in more depth which should take some more time. Please feel free to ping us here if you don't get anything.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
sleeping2620
Registered Member
Posts
3
Karma
0
Digging in the source code, I found out that using the same category as the last similar transaction is actually hardcoded. I somewhat solved my problem with the following patch :

Code: Select all
diff -U 3 -H -d -r -N src/kmymoney-4.5/kmymoney/converter/mymoneystatementreader.cpp src.mine/kmymoney-4.5/kmymoney/converter/mymoneystatementreader.cpp
--- src/kmymoney-4.5/kmymoney/converter/mymoneystatementreader.cpp   2010-08-16 06:52:20.000000000 -0400
+++ src.mine/kmymoney-4.5/kmymoney/converter/mymoneystatementreader.cpp   2010-11-17 23:09:54.463333346 -0500
@@ -971,7 +971,7 @@
         QList<MyMoneyTransaction> list = file->transactionList(filter);
         if (!list.empty()) {
           // Default to using the most recent transaction as the reference
-          MyMoneyTransaction t_old = list.last();
+          MyMoneyTransaction t_old;// = list.last();
 
           // if there is more than one matching transaction, try to be a little
           // smart about which one we take.  for now, we'll see if there's one


It's a quick & dirty fix that seems to work for me. I'll try to turn it into a settings when I have some more time to play with the code.
Vangs
Registered Member
Posts
1
Karma
0
This is a useful setting. Any idea when it can be submitted

Thanks


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]