test fix
authorJitendra Purohit <jitendra@fuzion.co.nz>
Fri, 31 Mar 2017 13:48:08 +0000 (19:18 +0530)
committerJitendra Purohit <jitendra@fuzion.co.nz>
Fri, 31 Mar 2017 13:48:08 +0000 (19:18 +0530)
CRM/Contribute/BAO/Contribution.php

index 39443bf8f45417a889d3717c5f1ac46ba56dfb99..bfdebab190cbeb65b4f82b2318fc714089b5a3f0 100644 (file)
@@ -2561,6 +2561,11 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
             if ($membership_status == 'Pending' && $membership->is_pay_later == 1) {
               $values['is_pay_later'] = 1;
             }
+            // Pass amount to floatval as string '0.00' is considered a
+            // valid amount and includes Fee section in the mail.
+            if (isset($values['amount'])) {
+              $values['amount'] = floatval($values['amount']);
+            }
 
             if (!empty($this->contribution_recur_id) && $paymentObject) {
               $url = $paymentObject->subscriptionURL($membership->id, 'membership', 'cancel');