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

QIF import: class name used as account name

Tags: None
(comma "," separated)
j-m-s
Registered Member
Posts
7
Karma
0
When importing a .qif from Quicken, kmm uses the quicken class name in some cases to build an account name.
For example:
L[Verbindlichkeit]/Motobike => account Verbindlichkeit/Motobike created and used
S[Mehrwertsteuer]/_VATCode_N_I => account Mehrwertsteuer/_VATCode_N_I created.

This seems to be bug. The QIF importer does not check for the trailing delimiter.
Code: Select all
QString name = extractLine('L');
if (name.left(1) == m_qifProfile.accountDelimiter().left(1)) {
      name = name.mid(1, name.length() - 2);
}


Instead, I would use
Code: Select all
QRegExp exp(QString("\\%1(.*)\\%2(.*)").arg(leftDelim, rightDelim));


Also a lot of transaction contain nonsense characters in the FROM field. For example this transaction:
^
D2.10.13
U-2.00
T-2.00
CX
N2517
PPAYPAL EUROPE
MLASTSCHRIFT/BELAST.
LSonstiges
^

Here the FROM value is displayed as "Y". The same happens with many paypal transactions. All entries that start with "PPAY" get the payee "Y".
I think the reason for this is automatic payee matching. Is it possible to switch off payee matching globally?

And one more: if the .qif does not contain a "Popening balance" line, the account opening date is set wrong, I think it is set to the current date.

I see in the code that some info is written to kDebug(0). Where can I find this info or do I have to enable some debug flag?
zebulon
Registered Member
Posts
417
Karma
2
OS
j-m-s wrote:All entries that start with "PPAY" get the payee "Y".
I think the reason for this is automatic payee matching. Is it possible to switch off payee matching globally?

Check the matching tab for your Payee "Y" (Payees menu). It is probably set to "Match on a name listed below." Change it to "Match on Payee name," which should be the default, or fix the list, if there is a nontrivial one. It is possible that the wrong default was set when changing KMM versions. I found two bad settings like this so far, and I'm pretty sure I did not make those.
j-m-s
Registered Member
Posts
7
Karma
0
zebulon wrote:Check the matching tab for your Payee "Y" (Payees menu). It is probably set to "Match on a name listed below." Change it to "Match on Payee name," which should be the default, or fix the list, if there is a nontrivial one. It is possible that the wrong default was set when changing KMM versions. I found two bad settings like this so far, and I'm pretty sure I did not make those.


All payees (a few hundred) have been created by the qif import process. After the import process, I have the payee "Y" but in its settings there is no match list.
I think after kmm created to payee "Y" the first time, it tried other payees to match by some hash or soundex function, and the program thought "Y" and "paypal" might match. After the import it was too late.
zebulon
Registered Member
Posts
417
Karma
2
OS
j-m-s wrote:All payees (a few hundred) have been created by the qif import process. After the import process, I have the payee "Y" but in its settings there is no match list.

If you have no transactions associated with any of these payees, something got messed up. Perhaps a QIF syntax error? Hidden linefeed/control characters? I do not see how "Y" could be a valid payee. My guess is that your QIF file was not clean.

j-m-s wrote:I think after kmm created to payee "Y" the first time, it tried other payees to match by some hash or soundex function, and the program thought "Y" and "paypal" might match.

I am almost certain that is not the case. I do not think KMM matches payees if not explicitly requested.
j-m-s
Registered Member
Posts
7
Karma
0
zebulon wrote:I am almost certain that is not the case. I do not think KMM matches payees if not explicitly requested.


https://quickgit.kde.org/?p=kmymoney.gi ... reader.cpp

Line 898
zebulon
Registered Member
Posts
417
Karma
2
OS
j-m-s wrote:Line 898


Yes, but line 909?
j-m-s
Registered Member
Posts
7
Karma
0
About https://quickgit.kde.org/?p=kmymoney.git&a=blob&f=kmymoney%2Fconverter%2Fmymoneystatementreader.cpp

In 953, he sets the default message box answer to yes. The message box is supressed for qif import. Therefore he comes to 974.
In 983, he sets matchType to matchName. So we have a new payee with name "Y" and matchName=true.

The next time, he finds "paypal" and goes into 909. Here he comes to 912 matchName and 916 matchKey (because of tricky fall through).
But I don't understand what 917-923 do. Suspicious is 919.
zebulon
Registered Member
Posts
417
Karma
2
OS
First, a correction: the default according to the manual is No matching, but most of my payees are set to "Match on Payee name." Since I definitely did not change hundreds of payees myself, I think the manual is either incorrect or lying by omission, and does not mention in which cases the default is Match on Payee Name.

Next, since this discussion is turning towards code, I don't think this is of sufficient general interest. I'll contact you by PM.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]