From d6399f063812facaf8d48e1f7fa806c1ff15e108 Mon Sep 17 00:00:00 2001 From: yashodha Date: Tue, 14 Jan 2014 15:16:46 +0530 Subject: [PATCH] CRM-14066: fix zero amount for discounted option --- CRM/Event/Form/ManageEvent/Fee.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CRM/Event/Form/ManageEvent/Fee.php b/CRM/Event/Form/ManageEvent/Fee.php index 8c7792ef98..9cc631cf76 100644 --- a/CRM/Event/Form/ManageEvent/Fee.php +++ b/CRM/Event/Form/ManageEvent/Fee.php @@ -685,9 +685,10 @@ class CRM_Event_Form_ManageEvent_Fee extends CRM_Event_Form_ManageEvent { $discountOptions = array(); for ($i = 1; $i < self::NUM_OPTION; $i++) { if (!empty($labels[$i]) && - !empty($values[$i][$j]) - ) { - $discountOptions[] = array('label' => trim($labels[$i]), + !CRM_Utils_System::isNull(CRM_Utils_Array::value($j, $values[$i])) + ) { + $discountOptions[] = array( + 'label' => trim($labels[$i]), 'value' => CRM_Utils_Rule::cleanMoney(trim($values[$i][$j])), 'weight' => $i, 'is_active' => 1, -- 2.25.1