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#1682 - Invalid currency on sending offline membership receipt. #16943

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

jitendrapurohit
Copy link
Contributor

Overview

Fix error on offline membership form when receipt checkbox is enabled.

Before

See steps to replicate on gitlab - https://lab.civicrm.org/dev/core/-/issues/1682

image

After

Fixed.

Technical Details

When the membership form is rendered, currency variable is set to the symbol value to display it on the form. Same value is carried to the message template which errors on translating the amount value with {$amount|crmMoney:$currency} token.

Comments

Gitlab - https://lab.civicrm.org/dev/core/-/issues/1682

@civibot
Copy link

civibot bot commented Apr 1, 2020

(Standard links)

@civibot civibot bot added the master label Apr 1, 2020
@@ -1617,8 +1617,7 @@ public function submit() {
}

if (!empty($lineItem[$this->_priceSetId])) {
$invoiceSettings = Civi::settings()->get('contribution_invoice_settings');
$invoicing = $invoiceSettings['invoicing'] ?? NULL;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contribution_invoice_settings is a deprecated setting, the correct value of invoicing can be directly obtained from Civi::settings()->get('invoicing');

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton looks like in your sweep missed one

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seamuslee001 yep - I made it so that still works rather than replacing them all

@eileenmcnaughton
Copy link
Contributor

I'm ok with this - tbh the send template code should take care of assigning it's own variables & this should be overwritten. However, this fixes a bug (which doesn't look like a recent regression) and since it's all on the form layer I'm OK....ish ... with no test

@eileenmcnaughton eileenmcnaughton merged commit 55e77e8 into civicrm:master Apr 1, 2020
@jitendrapurohit jitendrapurohit deleted the core-1682 branch April 2, 2020 05:30
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.

3 participants