Working on MT940 importer

Best, Jan-Pascal van j.p.vanbest at tbm.tudelft.nl
Tue Sep 16 18:43:17 CDT 2003


Christian wrote:
> By the way, did you create 
> your patch against CVS HEAD branch or the gnucash-1-8-branch?
Again CVS HEAD

[Stuff in the SWIFTParser class, parsing the :25: tag]
> Err... could you post a diff to openhbci-general? I can't immediately 
> tell whether changes here are possible without breaking 
> anything. But I guess your reasoning sounds good.

I'll post it there.

> > Is there a way to handle "special cases" like this in the 
> code?  It would
> > probably mean that the parser needs to act differently 
> depending on the
> > bank that issued the mt940 data.
> 
> I don't really understand. Where is it that the parser needs to act 
> differently? 

Maybe it doesn't - if the information is there (the booking code) it
could be used and ignored if it isn't (or if the field is set to 999).
Or maybe the information should only be used in the gnucash code, not
in the hbci code. I'll try toying with  it, maybe tonight. Anyway, this
discussion should probably also be move to the openhcbi lists.

> In any case that would require some major changes in the 
> parser, which are probably not encouraged... In another library I saw 
> that those "special bank cases" are handled by something like a 
> pre-parser which only eliminated those bank weirdnesses, but 
> the actual parsing was done bank-independently.

That would probably be the best course. Or alternatively, a post-parser
with could look at the transaction description in combination with the
booking code and do something intelligent.

> > By the way, I tried the make-gnucash-patch script which created a
> > multi-megabyte diff, so I'm attaching only the files in
> > src/import-export/mt940. There are some other changes to be made,
> > for instance in configure.in and in (I think) src/scm/main.scm, but
> > they are montly trivial.
> > 
> > What do you think?
> 
> Sounds very good. Obviously you now submitted a patch. I'll 
> check later today or maybe tomorrow.

Wonderful.

Jan-Pascal


More information about the gnucash-devel mailing list