Closed LQkkeN closed 4 years ago
sorry for the late reply. sadly I do not know about that case. Do you know if some MT940 specs supports this?
This is my only experience with the format, so I unfortunately don't 😕
I don't think that the -
is a negative sign but is the placeholder for the currency (not valid though). the amount itself cannot be negative as it's numerical.
i like that source for quick reference: https://www.kontopruef.de/mt940s.shtml
I ended up doing this on each line:
# Replace `D-100,00` with `RD100,00`
content.gsub!(/D-/, 'RD')
# Replace `C-100,00` with `RC100,00`
content.gsub!(/C-/, 'RC')
And it has worked so far 🤷♂
:+1:
@LQkkeN have you checked if the - is really meant to be a negative sign and not a broken currency? if so all is well but if not this makes things worse as you return incorrect statements
Yes 😆
I have a case like this:
:61:1908150815D-104,12NMSCNONREF//010F214191270328
It fails to parse correctly, likely because of the
D-104,12
. I'm not certain that's correct or not though. I guess it comes down to the-
being allowed or not. Perhaps you've seen such a case before?