The handling of decimal numbers from HTTP requests in the FundraisingFrontend is inconsistent:
* `donation/new` expects English-formatted numbers (using a locale-aware parser) and will default to 0 if the number can't be parsed.
* `donation/add` expects German-formatted numbers (using a locale-aware parser) and will default to 0 if the number can't be parsed.
* `apply-for-membership` expects German-formatted numbers (using simple string-replacement of comma to dot) and has no default.
* `validate-amount` expects an integer (Euro Cents)
* `validate-fee` can handle both English and German-formated numbers (using simple string-replacement from comma to dot)
To make the amount handling more consistent, I propose the following steps:
* Decide if the Request value objects of the use cases (add donation, new donation, validate amount, add membership, validate memebership fee,My proposal would be to get rid of the existing locale-aware `AmountParser` and standardize on EuroCents. etc) get `Euro` objects or strings (dot-delimited) and make the Request objects consistent.
* Use the locale-aware parser everywhere.
* Set a global locale that's used for amount parsingThis will avoid rounding errors. We *don't* use the locale for determining translaFor this solutions, as that might be differentthe client-side code, especially in Switzerland where there are several languages.
* Use the locale for parsing AND on the client side for formatting amounts that are submitted.
* Standardize on the de_DE locale for the fundraising application.
* Adjust the banners accordingly.
A smaller fix would be to use string replacement instead of a number parser and to standardize on decimal points instead of commas throughout the applicationboth in FundraisingFRontend and in the banners needs to be changed.
**Note:** This inconsistency has forced us to add workaround code in banners at least 2 times.
When this issue is fixed, check the banner code if the amount is passed on correctly, both to `donation/new` and to `donation/add`.
**Note:** Check for usages of `AmountFormatter` which will format the amount for rendering it in the template. If the amount is rendered as a string in the template then everything is fine, but if the amount is processed by JavaScript, it needs to re-parse the (German-formatted) amount again.