From 0bf170de95dc539bead6b9a97dad9b03bd6be532 Mon Sep 17 00:00:00 2001 From: Wouter H Date: Wed, 27 Feb 2019 10:57:20 +0100 Subject: [PATCH] Changed $total_value declaration Fixed: this will make $total_value equal to 1 --- CRM/Contribute/Form/Contribution.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index d1b1e06d12..6edae916c5 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -366,8 +366,9 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP $this->assign('newCredit', CRM_Core_Config::isEnabledBackOfficeCreditCardPayments()); // Fix the display of the monetary value, CRM-4038. - if ($total_value = isset($defaults['total_amount'])) { - $defaults['total_amount'] = CRM_Utils_Money::format($defaults['total_amount'], NULL, '%a'); + if (isset($defaults['total_amount'])) { + $total_value = $defaults['total_amount']; + $defaults['total_amount'] = CRM_Utils_Money::format($total_value, NULL, '%a'); if (!empty($defaults['tax_amount'])) { $componentDetails = CRM_Contribute_BAO_Contribution::getComponentDetails($this->_id); if (!(CRM_Utils_Array::value('membership', $componentDetails) || CRM_Utils_Array::value('participant', $componentDetails))) { -- 2.25.1