Convert currency amounts in database to cents - #133
Open
freestylebit wants to merge 5 commits into
Open
Conversation
freestylebit
force-pushed
the
pc-convert-to-cents
branch
from
August 29, 2026 15:46
e796e74 to
07e97b9
Compare
solebared
reviewed
Aug 29, 2026
freestylebit
force-pushed
the
pc-convert-to-cents
branch
2 times, most recently
from
August 29, 2026 20:13
73ba091 to
ea9659e
Compare
freestylebit
force-pushed
the
pc-convert-to-cents
branch
from
September 1, 2026 01:36
7f6fc5c to
d9f43cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #130
The system generally stores data in whole dollar amounts. This could cause issues when we start splitting allocations for different causes (e.g. We allocate $5, then split it equally between two causes; both causes would have $2.50, which the current system would obfuscate the cent detail by either removing it or inflating it depending on whether it rounds down or up respectively).
We still want to make sure we don't run into floating point error, so we store the number of cents as an integer in the database so all values are calculated accurately (provided the US government does not change how many decimal places there are in the dollar). This PR also goes through the view layer to clean up unnecessary formatting in response to this change.
This PR also updates column names to descriptively identify that it stores cents for documentation-sakes.