From 9ad04fb4d58ae3af383f5e1a610e7cbc3fcdffcb Mon Sep 17 00:00:00 2001 From: Pratik Joshi Date: Wed, 5 Mar 2014 11:06:39 +0530 Subject: [PATCH] CRM-13965-qa-fixes : BAO renaming, event.balance token money formatting --- CRM/Contribute/BAO/Contribution.php | 2 +- CRM/Contribute/Form/AdditionalPayment.php | 4 ++-- CRM/Core/BAO/ActionSchedule.php | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index de635bdff6..9cf0594ef3 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -2956,7 +2956,7 @@ WHERE contribution_id = %1 "; return FALSE; } - static function recordAdditionPayment($contributionId, $trxnsData, $paymentType = 'owed', $participantId = NULL) { + static function recordAdditionalPayment($contributionId, $trxnsData, $paymentType = 'owed', $participantId = NULL) { $statusId = CRM_Core_OptionGroup::getValue('contribution_status', 'Completed', 'name'); $getInfoOf['id'] = $contributionId; $defaults = array(); diff --git a/CRM/Contribute/Form/AdditionalPayment.php b/CRM/Contribute/Form/AdditionalPayment.php index 073bd63c66..f8a2bf950b 100644 --- a/CRM/Contribute/Form/AdditionalPayment.php +++ b/CRM/Contribute/Form/AdditionalPayment.php @@ -377,7 +377,7 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract $this->processCreditCard($submittedValues); } else { - $result = CRM_Contribute_BAO_Contribution::recordAdditionPayment($this->_contributionId, $submittedValues, $this->_paymentType, $participantId); + $result = CRM_Contribute_BAO_Contribution::recordAdditionalPayment($this->_contributionId, $submittedValues, $this->_paymentType, $participantId); // email sending if (!empty($result) && !empty($submittedValues['is_email_receipt'])) { @@ -568,7 +568,7 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract } // process the additional payment - $trxnRecord = CRM_Contribute_BAO_Contribution::recordAdditionPayment($this->_contributionId, $submittedValues, $this->_paymentType, $participantId); + $trxnRecord = CRM_Contribute_BAO_Contribution::recordAdditionalPayment($this->_contributionId, $submittedValues, $this->_paymentType, $participantId); if ($trxnRecord->id && !empty($this->_params['is_email_receipt'])) { $sendReceipt = $this->emailReceipt($this->_params); diff --git a/CRM/Core/BAO/ActionSchedule.php b/CRM/Core/BAO/ActionSchedule.php index ac3f4501a6..b30a7599eb 100755 --- a/CRM/Core/BAO/ActionSchedule.php +++ b/CRM/Core/BAO/ActionSchedule.php @@ -731,7 +731,9 @@ WHERE reminder.action_schedule_id = %1 AND reminder.action_date_time IS NULL } elseif ($field == 'balance') { $info = CRM_Contribute_BAO_Contribution::getPaymentInfo($dao->entityID, 'event'); - $entityTokenParams["{$tokenEntity}." . $field] = CRM_Utils_Array::value('balance', $info); + $balancePay = CRM_Utils_Array::value('balance', $info); + $balancePay = CRM_Utils_Money::format($balancePay); + $entityTokenParams["{$tokenEntity}." . $field] = $balancePay; } else { $entityTokenParams["{$tokenEntity}." . $field] = $dao->$field; -- 2.25.1