CRM-14793 use longer var name that clarifies what type of field
authorEileen McNaughton <eileen@fuzion.co.nz>
Wed, 4 Jun 2014 09:41:15 +0000 (21:41 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Wed, 4 Jun 2014 09:41:15 +0000 (21:41 +1200)
CRM/Batch/Form/Entry.php

index fabc5f5ffd22c516a2750b88db626b05d9e2f528..9e8f3b36eb95859f63c12e8e45b329cc8965a401 100644 (file)
@@ -393,7 +393,6 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
     $this->_priceSet = current(CRM_Price_BAO_PriceSet::getSetDetail($priceSetId));
     $priceFieldID = CRM_Price_BAO_PriceSet::getOnlyPriceFieldID($this->_priceSet);
     $priceFieldValueID = CRM_Price_BAO_PriceSet::getOnlyPriceFieldValueID($this->_priceSet);
-    $fieldID = $priceFieldID;
 
     if (isset($params['field'])) {
       foreach ($params['field'] as $key => $value) {
@@ -449,8 +448,8 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
         $value['skipRecentView'] = TRUE;
 
         // build line item params
-        $this->_priceSet['fields'][$fieldID]['options'][$priceFieldValueID ]['amount'] =  $value['total_amount'];
-        $value['price_'.$fieldID] = 1;
+        $this->_priceSet['fields'][$priceFieldID]['options'][$priceFieldValueID ]['amount'] =  $value['total_amount'];
+        $value['price_'. $priceFieldID] = 1;
 
         $lineItem = array();
         CRM_Price_BAO_PriceSet::processAmount($this->_priceSet['fields'], $value, $lineItem[$priceSetId]);