Support 2-Decimal Formatting & customizable decimal separator#192
Support 2-Decimal Formatting & customizable decimal separator#192hql287 merged 30 commits intohql287:devfrom
Conversation
|
The maintainers of this repository would appreciate it if you could provide more information. |
|
@DarkSmile92: This is not finished yet, right? |
|
@hql287 No I am adding the two settings right now and implement the display of currency sign before / after the amount. Will commit to PR and let you know once I'm done. |
|
@DarkSmile92 No pressure, Robin. I just added a [WIP] tag to the title, feel free to remove it once you're done with the PR. Thanks! |
|
Thanks @hql287 ! |
|
@DarkSmile92 Will do. Thanks! |
|
@DarkSmile92 Robin, I just tested out your PR and this is pretty cool. Everything seems to be working as expected. I really like the currency sign placement setting. Nice touch! 👍 There're still some issues though:
|
|
@DarkSmile92 Thanks, bro! 👍 |
|
| ); | ||
|
|
||
| // Notify user about invalid decimal fractions | ||
| export const notifyInvalidDecimalFractions = createAction( |
There was a problem hiding this comment.
Please use dialog for validation message. I would like to user to acknowledge this before moving on.
|
@hql287 Already checked, you should be able to push to my PR Hung 👍 |
It’s too big at the moment
|
@DarkSmile92 I just added some new definitions to facilitate the changes in this PR. Can you do the translation for those term on Crowdin (I would like to add German support with this PR)? Thanks! |
|
@hql287 Sure, translation on Crowdin done :) |
Currency settings now hold these 4 settings as default: - Currency (code) - Separator (thousand & decimal) - Sign placement - Decimal fraction Refactored FormReducer, Invoice & Currency component (in Settings page) with these changes
+ All operations related to constructing a new invoice has been moved to form helper. This makes sencse since most of them are already here and testing will be easier, too.
Also changed name to formatNumber
+ Invoices Container: + Invoice (Invoices Page) : display currency correctly + Settings Reducer: removed unnecessary selectors
|
Almost done.
@DarkSmile92: If you can review the changes, that would be great! 👍 |
+ Validate negative fraction, tax amount and item quantity + Added test cases
|
@hql287 sorry for not responding, something came up at work that needed my full attention. I reviewed the changes. I really like that you made currency an object with decimal and placement properties. This makes it extensible. All changes look good to me to I agree. Can't approve them via git review so take this as review succeeded and approved:) |
|
@DarkSmile92 Thanks, bro 👍 |
Shows 2 fractions on decimals and makes the decimal separator region aware.
Close #190, Closes #173