-
Notifications
You must be signed in to change notification settings - Fork 61
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
ING sanitizeDescription update #63
Comments
@MrMoronIV Do you have a certain test to prove that it works like this? I currently created a branch with this change and have added a trim()-call to the return statement as not to return ' ' as that would possibly be silly :) I personally don't have any (modern) ING statements nor spec to validate this with (other than the already present ING spec) |
I've just encountered this while importing a recent ING bank export with various types of statements . There was information missing that I needed, hence this code I came up with. So this is by no means a complete implementation driven by specs but merely a working piece of code from "the fields". In other news, the camt export type is probably an easier one to work with for people since the bank actually provides the desired information in fixed fields instead of in this mt940 mess (who even came up with this standard :/). |
CAMT is another one of the various standards some of the banks employ... But then again, remember the famous XKCD It will always be sometype of mess :) Could you verify my patch still works with your sample? This atleast trim-s the output to prevent " "-descriptions and doesn't seem to break any (current) tests... |
I moved away from the mt940 format for now in favor of the camt type. However, I've been over your code and it looks good, I don't think you've changed any of my provided regular expressions which are the key in making this work. Here's the line that made me create my patch (I've changed the actual information):
This should return:
as its description |
I'll add that as a test to make sure it will keep working in the future ;) This also brought to light a seemingly error in the regex where the delimiter is included but shouldn't have been. I've updated the branch to match |
The description of the ING transactions hold more information which is discarded by this parser. For example Direct Debet (automatische incasso) transactions have their desscription next to the PREF identifier. Below is a function that adds this information to the description. Feel free to implement/rewrite this or do nothing with it ;)
The text was updated successfully, but these errors were encountered: