Different banks use different formatting for amounts, particularly in the "outflow" column. For example, I've seen outflow values like these:
"-1,50"
"- 1,50"
"(1,50)"
"1,50"
It comes down to the fact that banks seem to treat these values as strings, and we have to convert them to decimal values. Right now it seems like we have a pretty naive conversion process. I think we can make it more robust:
remove spaces from everywhere in the number
parentheses converts to a negative value
trim anything before/after the value
"outflow" column uses a majority rule to decide if values are notated as negative or positive
I've submitted a separate issue for comma handling in #15
Different banks use different formatting for amounts, particularly in the "outflow" column. For example, I've seen outflow values like these:
It comes down to the fact that banks seem to treat these values as strings, and we have to convert them to decimal values. Right now it seems like we have a pretty naive conversion process. I think we can make it more robust: