-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support float amount values, and fix debts and gifts amount forms #3906
Conversation
…q/monica into 2020-04-25-stores-amount-integer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this change was needed.
The reason for this PR is explain in this tweet: https://twitter.com/michaeldyrynda/status/1253516294571175938 In addition, as you may now, some currency have a 2 digit precision (like $ 12.34), but others could have 3 digits (dinar), 1 digit (Cambodian Riel), or 0. |
…q/monica into 2020-04-25-stores-amount-integer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😀 Go to go!
This pull request has been automatically locked since there |
This fix #333
This also fix #3761, storing amount in database as integer value, rather that decimal.
Every currencies don't use a 2 digits precision, and using decimal/float can lead to calculation errors.
This introduce the notions of monetary amount vs exchange value: