You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As zagy pointed out in PR #6, there's an issue with sorting the SOA. The discussion led to the following conclusion:
The .csv statement of account file I receive by exporting from Commerzbank’s website currently is sorted starting with the youngest and ending with the oldest record; which is odd from my point of view as it’s contrary to what a statement of account in written or paper form looks like.
Generally I tend to be cautious at the interface level with input data be it its structure or order; Commerzbank changed the format of the .csv file some time ago, for instance, and added the new field »kategorie« without notice. That’s why I prefer sorting the raw data so that I / my program knows what to expect.
From a technical point of view the type 61 records („Umsätze“) of the MT940 file not necessarily need to be sorted in any form.
At the functional level I do extract the date of the statement of account (»datum_kontoauszug«) from the field »buchungstag« of the youngest record as no »datum_kontoauszug« is provided in the .csv file. It’s just an approximation, but I gave it some thought and think it’s a reasonable one as it at least comes close to what the date of the statement of account is in written or paper form. The other approach would have been to use the current date for »datum_kontoauszug«, but this might lead to odd situations when processing older SOA data.
The date of a statement of account needs to be filled in the footer (type 62 record) of the MT940 file. So when processing the SOA in the „natural“ order like in written / paper form (youngest last) it comes very handy that the »buchungstag« of the last type 61 record is still there an can easily be used as the »datum_kontoauszug«.
That’s why sorting the SOA by »buchungstag« imho in the current version is needed. But it’s of course needed in the form of year-month-day and not day-month-year; I do totally agree that the latter was a mistake by me and really do appreciate your pointing this out to me!
A great enhancement of the current version of the program would be having an optional parameter defining the sort order being ascending/descending; but then another parameter would be needed for supplying the date of the statement of account, too. And that would be a bigger change...will put it on the list for the next version!
As zagy pointed out in PR #6, there's an issue with sorting the SOA. The discussion led to the following conclusion:
The .csv statement of account file I receive by exporting from Commerzbank’s website currently is sorted starting with the youngest and ending with the oldest record; which is odd from my point of view as it’s contrary to what a statement of account in written or paper form looks like.
Generally I tend to be cautious at the interface level with input data be it its structure or order; Commerzbank changed the format of the .csv file some time ago, for instance, and added the new field »kategorie« without notice. That’s why I prefer sorting the raw data so that I / my program knows what to expect.
From a technical point of view the type 61 records („Umsätze“) of the MT940 file not necessarily need to be sorted in any form.
At the functional level I do extract the date of the statement of account (»datum_kontoauszug«) from the field »buchungstag« of the youngest record as no »datum_kontoauszug« is provided in the .csv file. It’s just an approximation, but I gave it some thought and think it’s a reasonable one as it at least comes close to what the date of the statement of account is in written or paper form. The other approach would have been to use the current date for »datum_kontoauszug«, but this might lead to odd situations when processing older SOA data.
The date of a statement of account needs to be filled in the footer (type 62 record) of the MT940 file. So when processing the SOA in the „natural“ order like in written / paper form (youngest last) it comes very handy that the »buchungstag« of the last type 61 record is still there an can easily be used as the »datum_kontoauszug«.
That’s why sorting the SOA by »buchungstag« imho in the current version is needed. But it’s of course needed in the form of year-month-day and not day-month-year; I do totally agree that the latter was a mistake by me and really do appreciate your pointing this out to me!
A great enhancement of the current version of the program would be having an optional parameter defining the sort order being ascending/descending; but then another parameter would be needed for supplying the date of the statement of account, too. And that would be a bigger change...will put it on the list for the next version!
Originally posted by @msc01 in #6 (comment)
The text was updated successfully, but these errors were encountered: