Skip to content

Parameter for sort order and date of statement of account #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
msc01 opened this issue May 11, 2020 · 0 comments
Open

Parameter for sort order and date of statement of account #7

msc01 opened this issue May 11, 2020 · 0 comments

Comments

@msc01
Copy link
Owner

msc01 commented May 11, 2020

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant