Bug 332282 - qif import with splits duplicates transactions
Summary: qif import with splits duplicates transactions
Status: RESOLVED WORKSFORME
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.6.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2014-03-18 13:25 UTC by Chris J. Kiick
Modified: 2018-10-27 02:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Qdatabug.QIF - example QIF file to reproduce problem. (522 bytes, text/plain)
2014-03-18 13:27 UTC, Chris J. Kiick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris J. Kiick 2014-03-18 13:25:46 UTC
Importing a QIF file with a split transaction that transfers to another account results in duplicate transactions in the target account.  The transacations are not matched, even though they have the same date, amount, account, etc.  This results in balances being way off when importing data from quicken.



Reproducible: Always

Steps to Reproduce:
1. file:import:QIf...: select Qdatabug.QIF, default profile, "Other application", OK.
2. Go to Acct2 register, note duplicate transaction, and that balance is double what it should be.
3.
Actual Results:  
Two transactions for $1850 in Acct2, which are obviously the same.

Expected Results:  
The transactions should have been matched.

Qdatabug.QIF:
!Option:AutoSwitch
!Account
NAcct1
TBank
DFirst account
$0.00
^
NAcct2
TBank
Dsecond account
$12,502.01
^
!Clear:AutoSwitch
!Option:AutoSwitch
!Account
NAcct1
DFirst account
TBank
^
!Type:Bank 
D7/25' 3
U15,460.62
T15,460.62
CX
POpening Balance
L[Acct1]
^
D8/ 8' 3
U-1,850.00
T-1,850.00
N102
PSomebody
L[Acct2]
^
!Account
NAcct2
Dsecond account
TBank
^
!Type:Bank 
D8/ 8' 3
U1,900.00
T1,900.00
CX
PSomebody
L[Acct1]
S[Acct1]
$1,850.00
SAnother:category
Erefund
$50.00
^
Comment 1 Chris J. Kiick 2014-03-18 13:27:36 UTC
Created attachment 85629 [details]
Qdatabug.QIF - example QIF file to reproduce problem.
Comment 2 allan 2014-03-20 22:34:14 UTC
Please see comments interspersed below.

On 18/03/14 13:25, Chris J. Kiick wrote:
> https://bugs.kde.org/show_bug.cgi?id=332282
>
>              Bug ID: 332282
>             Summary: qif import with splits duplicates transactions
>      Classification: Unclassified
>             Product: kmymoney4
>             Version: 4.6.3
>            Platform: Ubuntu Packages
>                  OS: Linux
>              Status: UNCONFIRMED
>            Severity: normal
>            Priority: NOR
>           Component: general
>            Assignee: kmymoney-devel@kde.org
>            Reporter: chris@kiicks.net
>
> Importing a QIF file with a split transaction that transfers to another account
> results in duplicate transactions in the target account.  The transacations are
> not matched, even though they have the same date, amount, account, etc.  This
> results in balances being way off when importing data from quicken.
>
>
>
> Reproducible: Always
>
> Steps to Reproduce:
> 1. file:import:QIf...: select Qdatabug.QIF, default profile, "Other
> application", OK.
> 2. Go to Acct2 register, note duplicate transaction, and that balance is double
> what it should be.
> 3.
> Actual Results:
> Two transactions for $1850 in Acct2, which are obviously the same.
>
> Expected Results:
> The transactions should have been matched.
>
> Qdatabug.QIF:
> !Option:AutoSwitch
> !Account
> NAcct1
> TBank
> DFirst account
> $0.00
> ^
> NAcct2
> TBank
> Dsecond account
> $12,502.01
> ^
Not sue what is the purpose of the '$' line.  The '$' is supposed to 
refer to a split or transfer entry.

> !Clear:AutoSwitch
> !Option:AutoSwitch
> !Account
> NAcct1
> DFirst account
> TBank
> ^
> !Type:Bank
> D7/25' 3
> U15,460.62
> T15,460.62
> CX
> POpening Balance
> L[Acct1]
> ^
> D8/ 8' 3
> U-1,850.00
> T-1,850.00
> N102
> PSomebody
> L[Acct2]
> ^
> !Account
> NAcct2
> Dsecond account
> TBank
> ^
> !Type:Bank
> D8/ 8' 3
> U1,900.00
> T1,900.00
> CX
> PSomebody
> L[Acct1]
> S[Acct1]
> $1,850.00
> SAnother:category
> Erefund
> $50.00
> ^
The L[Acct1] line indicates a transfer to account Acct1.  Similarly for the
S[Acct1] in a split.  These are the cause of your duplication.  They 
signify a transfer to Acct1, which is what happens with your file.

The two transactions will not match in KMyMoney because they occur in 
different accounts, and also because they are both import transactions. 
  KMyMoney will match only a manual entry against an imported one, in 
the same account.

This is one of the weaknesses in the QIF format, in that there is no 
unique id for each transaction, so no sure-fire way to match.  The 
problem of entries for the same transaction in a transfer operation is a 
general problem. See 
http://en.wikipedia.org/wiki/Quicken_Interchange_Format for a suggestion 
on how to avoid this problem.

However, even that does not produce what is needed.  I think you need to 
keep the Acct2 entry referring to the transfer and delete the Acct1 
entry with the check number, adding the check number afterwards.

Allan
Comment 3 Cristian Oneț 2014-07-31 13:50:13 UTC
Allan explained why is this happening. Transfers should not be duplicated in QIF.
Comment 4 Andrew Crouthamel 2018-09-25 03:52:58 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Andrew Crouthamel 2018-10-27 02:26:49 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!