Bug 280915 - The import logic should use an existing account based on bank name read from :20: and the account number read from :25:.
Summary: The import logic should use an existing account based on bank name read from ...
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Stephane MANKOWSKI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-28 07:17 UTC by jens
Modified: 2011-08-28 19:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jens 2011-08-28 07:17:45 UTC
Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

Skrooge 0.9.1

Hello there,

I have a single mt940 file for different (5) accounts. The initial import went fine with 5 accounts being created and filled with operations. Unfortunately on every created account the bank name and the account name is filled with the account number from the import (:25:) and the account number in skrooge is filled with 'mt940'. If you don't touch the bank name, account name and number a second import is just fine. But a second import will create a new bank of even a new account if you set the bank name to the correct name and/or alter the account name to something meaningful.  

In an ideal scenario the bank name should be picked up from the :20: prefix, the account number should be filled with the value from :25: and the account name should be set to eg. 'MT940'. Furthermore instead of account name, the account number should be used during import for identify if an account already exists.

Regards,
Jens


Reproducible: Always

Steps to Reproduce:
a)
1) Import an mt940 file which contains operations for several accounts
2) Rename the bank name because after the initial import bank name is the same as account name.
3) import a new set of operations

or

b)
1) Import an mt940 file which contains operations for several accounts
2) Rename the account name because after the initial import bank name and account name is filled with the account number.
3) import a new set of operations


Actual Results:  
a)
A new bank is created because I had set the bank name manually to the correct value.

b)
A new account will be created if the account name had been set to a 'meaningful' name.

Expected Results:  
The import logic should create a bank name based on :20: during account creation.

The import logic should search for an existing account based on the bank name read from :20: and the account number (not the account name).

This is an example of an operation inside my mt940 file:

ABNANL2A
940
ABNANL2A
:20:ABN AMRO BANK NV
:25:123456789
:28:93101/1
:60F:C818EUR46,83
:61:1107310819D2,75N526NONREF
:86:MAANDBIJDRAGE ABNAMRO            YP PAKKET                   2,75
:62F:C819EUR44,08
-
Comment 1 Stephane MANKOWSKI 2011-08-28 11:24:44 UTC
Hi Jens,

I am not able to reproduce the problem.

I don' really understand why when you change the name of the bank or the name of the account, the second import is not done in the right import.

Indeed, to identify the target account during the import, Skrooge looks for the account have the number of ":25:" field.

So, the identification is not done on the name but on the number.

Could you send me a detailed scenario with mt940 files used ?
Comment 2 Stephane MANKOWSKI 2011-08-28 19:29:25 UTC
Git commit 71fede7f467b4ccd0c507c85f63c5e52b913c244 by Stephane Mankowski.
Committed on 28/08/2011 at 21:29.
Pushed by smankowski into branch 'Feature'.

BUG: 280915: The import logic should use an existing account based on bank name read from :20: and the account number read from :25:

M  +6    -3    plugins/import/skrooge_import_mt940/skgimportpluginmt940.cpp
M  +7    -1    TODO
M  +1    -0    CHANGELOG

http://commits.kde.org/skrooge/71fede7f467b4ccd0c507c85f63c5e52b913c244