-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
dev/core#226 : use decimal point from config to fix european numbers formating #12396
Conversation
(Standard links)
|
@mattwire wanna input on this? Also looks like it needs a test.... |
@sunilpawar @eileenmcnaughton I'll review properly on Thursday. However first thoughts:
|
@mattwire we can do this in format function i tried with attached patch , it work for me. |
@sunilpawar Ok, I'm not completely understanding the issue - I thought that
|
@mattwire
crmMoney is not going to work. (it calls: CRM_Utils_Money::format(onlyNumber = FALSE)) I think we have two options
|
@sunilpawar I did some work a while ago here to add a set of money formatters to CiviCRM: master...mattwire:money_formatters The function From my point of view I think that:
Can you take a look at the code in the branch I've linked to and then propose what you think is the best way to solve this issue? |
So a few thoughts
|
@mlutfy can give his 2 cents, but from my perspective we should never store a localized monetary amount. All processing of amounts should remain in a standard format, and only be localized to a different currency on display at presentation layer. http://userguide.icu-project.org/formatparse/numbers#TOC-Currency-Formatting provides a sample of how ICU implements currency localization. |
@eileenmcnaughton @mattwire here screencast. |
@sunilpawar OK - so this is equivalent to how it's done on the contribution form
I note that the current formatting was set in https://issues.civicrm.org/jira/browse/CRM-20899 - but that seems unbroken by the above. |
@sunilpawar I don't think this is mergeable / reviewable as is - from your screencast the issue is the formatting is not done in the setDefaults function - which is a safe place to do it. I feel like you had a bunch of time on upstreaming but not enough to follow through to get them merged. If you don't have more time in the net couple of weeks we should close the PRs & track in gitlab until we have something review-ready |
I think this #12626 is actually a fix for the same bug - but fix is inline with above comments |
@sunilpawar Can you do a fix on top of #12626 for this? |
@mattwire i can implement this I tested this and its working. |
@sunilpawar once @mattwire has rebased #12684 can you test it - I think once that is done we'll be well placed on the currency separator formatting |
Overview
Format Amount using hardcoded decimal point, which is not fit for european format.