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#2269 Use contribution's currency instead of the default #19290

Merged
merged 1 commit into from
Dec 30, 2020

Conversation

ahed-compucorp
Copy link
Contributor

Overview

Default currency shown on invoices if payment is made with different currency.

Before

For a contribution paid in GBP (USD is the default currency)
Invoice shows default currency rather than contribution's currency.
Screenshot from 2020-12-22 12-35-12

After

For a contribution paid in GBP (USD is the default currency)
Invoice shows contribution's currency.
103090962-52037c00-45fb-11eb-88f9-74f58c707371

Technical Details

In contribution_invoice_receipt_html.tpl the currency variable is null and smarty modifier crmMoney will always use default currency instead.
The second change is replacing any usage of defaultCurrency with currency in contribution_invoice_receipt_html.tpl.

Please note that we need to manually change the invoice template in live CiviCRM sites "Go to Mailings > Message Templates > System Workflow Messages > Contributions - Invoice" with replacing any usage of defaultCurrency with currency so that "Total USD" become "Total GBP"

Comments

Issue: https://lab.civicrm.org/dev/core/-/issues/2269

@civicrm-builder
Copy link

Can one of the admins verify this patch?

@civibot
Copy link

civibot bot commented Dec 30, 2020

(Standard links)

@civibot civibot bot added the master label Dec 30, 2020
@eileenmcnaughton
Copy link
Contributor

add to whitelist

@eileenmcnaughton
Copy link
Contributor

Change looks sensible & the test covers so I'm good with merge-on-pass

@ahed-compucorp - are you in contributors.yml yet?

@seamuslee001 seamuslee001 merged commit 88ccbca into civicrm:master Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants