Poor experience with MT940 statement import :-(

This weekend I tested importing MT940 statements. And I’m sorry to say: trytond-account-statement-mt940 has a pooooor user experience. This is really not a figurehead for Tryton. I would fully understand any company turning away from Tryton after testing MT940 statement import. We’d better not publish this module than publishing it in this quality!

Is there an alternative implementation for MT940 statement import?

These are the bugs I found when trying to import my real-live MT940 statement:

  • Importing a transaction dated 30th of February fails.

  • Importing a multi-line description fails with “illegal character ‘\n’” - well actually MT940 does not have multi-line descriptions since these lines are joined into a single line.

  • The description lines are not parsed properly: It contains many markers for sub-fields. (This seem to be a special encoding used be German Banks.)

After I hacked the code and was able to import the statement:

  • There is a separate “Statement” for each transaction day. How do you handle this?
    Also the Name is always Zero (from field 28C). Is this a restriction of MT940?

  • None of these "Statement"s contains a “statement line”:

    and there are many issues with the “Origins”:

    • the “Number” is not a number but (in my case) aways NDDT or NTRF
    • the text contains a lot of special markers like ?21 rendering barely readable it not usable.

I tested parsing my statement file with mt-940 · PyPI and it does a much, much better job:

  • 30th of February is handled (moved to 29th)
  • description does not contain newlines
  • these ?21 fields in description are parsed into many details like applicant name, IBAN, creditor id(!), posting text, and more if available
  • This module implements a full MT940 parser and has a quite huge test-suite, containing more then 51 statement files, including some of Abn Amro, ING, RaboBank — which trytond-account-statement-mt940 has special treatment for.

Maybe one making money with Tryton should step forward and implement a MT940 statement report based on the mt-940 package?

1 Like