Skip to content
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#1019 Calculate.tpl: fix the Total Amount currency formatting. #16487

Merged
merged 2 commits into from
Feb 10, 2020

Conversation

mlutfy
Copy link
Member

@mlutfy mlutfy commented Feb 6, 2020

Overview

Gitlab: https://lab.civicrm.org/dev/core/issues/1019

On contribution forms where the Total Amount is displayed (ex with a Price Set), the Total Amount did not respect the locale's money format. This can yield weird results:

Capture d’écran de 2020-02-06 14-57-39

To replicate (copied from Gitlab):

  • Go to Administer > Localization > Language and Currency Change Monetary Amount Display to %a %c
  • Configure price sets with some amounts
  • Use this price set for any event/contribution,etc each item will respect the amount display but not the total(since it is auto calculated)

Before

Broken.

After

  • Formats the Total Amount correctly
  • Removes the bold around the currency, since it makes no sense either.

Capture d’écran de 2020-02-06 15-01-00

Technical Details

  • Removes code duplication.
  • Two separate commits, one for the code reformatting.

Comments

Screenshot uses the taxcalculator extension, but it does not have an impact on the bug itself.

@civibot
Copy link

civibot bot commented Feb 6, 2020

(Standard links)

@civibot civibot bot added the master label Feb 6, 2020
@yashodha
Copy link
Contributor

yashodha commented Feb 7, 2020

@mlutfy I tested this and seems to be working well
money

@yashodha
Copy link
Contributor

@mlutfy I am merging this as this is working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants