Skip to content

Commit

Permalink
Merge pull request #16943 from jitendrapurohit/core-1682
Browse files Browse the repository at this point in the history
dev/core#1682 - Invalid currency  on sending offline membership receipt.
  • Loading branch information
eileenmcnaughton authored Apr 1, 2020
2 parents 566b10b + 9d3a6f9 commit 55e77e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions CRM/Member/Form/Membership.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Member/Form/Membership.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 55e77e8

Please sign in to comment.