From 9d3a6f9fa2edf78b14ae35bc045f587b1570883d Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Wed, 1 Apr 2020 17:02:30 +0530 Subject: [PATCH] dev/core#1682 - Invalid currency on sending offline membership receipt. --- CRM/Member/Form/Membership.php | 5 ++--- templates/CRM/Member/Form/Membership.tpl | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index 0fdbff6ff473..7a13df8b7162 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -392,7 +392,7 @@ public function setDefaultValues() { public function buildQuickForm() { $this->buildQuickEntityForm(); - $this->assign('currency', CRM_Core_BAO_Country::defaultCurrencySymbol()); + $this->assign('currency_symbol', CRM_Core_BAO_Country::defaultCurrencySymbol()); $isUpdateToExistingRecurringMembership = $this->isUpdateToExistingRecurringMembership(); // build price set form. $buildPriceSet = FALSE; @@ -1617,8 +1617,7 @@ public function submit() { } if (!empty($lineItem[$this->_priceSetId])) { - $invoiceSettings = Civi::settings()->get('contribution_invoice_settings'); - $invoicing = $invoiceSettings['invoicing'] ?? NULL; + $invoicing = Civi::settings()->get('invoicing'); $taxAmount = FALSE; $totalTaxAmount = 0; foreach ($lineItem[$this->_priceSetId] as & $priceFieldOp) { diff --git a/templates/CRM/Member/Form/Membership.tpl b/templates/CRM/Member/Form/Membership.tpl index 8ed15678bde5..ca9071bb70ce 100644 --- a/templates/CRM/Member/Form/Membership.tpl +++ b/templates/CRM/Member/Form/Membership.tpl @@ -301,7 +301,7 @@ var taxRates = {/literal}{$taxRates}{literal}; var taxTerm = {/literal}{$taxTerm|@json_encode}{literal}; var taxRate = taxRates[allMemberships[memType]['financial_type_id']]; - var currency = {/literal}{$currency|@json_encode}{literal}; + var currency = {/literal}{$currency_symbol|@json_encode}{literal}; var taxAmount = (taxRate/100)*allMemberships[memType]['total_amount_numeric']; taxAmount = isNaN (taxAmount) ? 0:taxAmount; if (term) {