We no longer require that all amounts in a bank statement have a
resolution of hundreds.
Banks could also truncate zeros, so we allow banks to also have zero or
one decimal digits in their amounts.
For example, prior to this PR, the following amounts are invalid for a bank with . as its decimal separator:
10
10.0
The accepted format would be 10.00.
The above could also have a minus sign and still be invalid.
This PR updates the regular expression used by TransactionValueParser to allow one or zero decimals in amounts.
Tests
A test is included that has amounts with both zero and just a single decimal.
The test computes the net flow in the output file and compares it against a hardcoded value (computed manually from the test data).
Description
We no longer require that all amounts in a bank statement have a resolution of hundreds. Banks could also truncate zeros, so we allow banks to also have zero or one decimal digits in their amounts.
For example, prior to this PR, the following amounts are invalid for a bank with
.
as its decimal separator:10
10.0
The accepted format would be
10.00
. The above could also have a minus sign and still be invalid.This PR updates the regular expression used by
TransactionValueParser
to allow one or zero decimals in amounts.Tests
A test is included that has amounts with both zero and just a single decimal. The test computes the net flow in the output file and compares it against a hardcoded value (computed manually from the test data).