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

Fix for dev/core#2503 #19962

Merged
merged 1 commit into from
Apr 1, 2021
Merged

Fix for dev/core#2503 #19962

merged 1 commit into from
Apr 1, 2021

Conversation

jaapjansma
Copy link
Contributor

Overview

CiviReport does not localize custom fields of type Money.

Before

Reports did not localize the display value of custom fields of type Money.

After

Reports localizes the display value of custom fields of type Money.

Technical Details

This PR sets the field type in the report to T_FLOAT instead of T_MONEY.
This will do two things:

  1. CRM_Core_BAO_CustomField::displayValue is called in alterCustomDataDisplay which results in correctly localize the value
  2. In the report template the smarty modifier |crmMoney is called for money fields. Setting it to T_FLOAT will prevent this being called for an already localized custom money field.

Comments

See as well: https://lab.civicrm.org/dev/core/-/issues/2503

@civibot
Copy link

civibot bot commented Apr 1, 2021

(Standard links)

@civibot civibot bot added the master label Apr 1, 2021
@eileenmcnaughton
Copy link
Contributor

Thanks @jaapjansma - I'm going to merge this based on your analysis / testing as I can't see it impacting outside of what you have tested - I appreciate you working on these

@eileenmcnaughton eileenmcnaughton merged commit 6517979 into civicrm:master Apr 1, 2021
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