Skip to content

Commit

Permalink
Add money formatter to base presenter
Browse files Browse the repository at this point in the history
https://eaflood.atlassian.net/browse/WATER-4070
https://eaflood.atlassian.net/browse/WATER-4155
https://eaflood.atlassian.net/browse/WATER-4132
https://eaflood.atlassian.net/browse/WATER-4156

We are working on replacing the legacy bill view page because it crashes for large bills. As were doing this work we are creating some new presenters and have found all rely on taking a value stored in the DB as pence, for example `12776805` and formatting it as money `£127,768.05`.

This means each presenter is going through the same steps

- make the value positive (we don't show a sign but instead will add ` credit` after the formatted number)
- convert it to pounds
- format it with `£` and commas for large numbers

We're doing this enough it is time to move the logic to our base presenter.
  • Loading branch information
Cruikshanks committed Nov 1, 2023
1 parent 003c03f commit 9fdbdb6
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 9fdbdb6

Please sign in to comment.