$discountFields = current($val);
$discountFields = current($discountFields['fields']);
- $colCount = 1;
foreach ($discountFields['options'] as $discountFieldsval) {
- $defaults['discounted_label'][$colCount] = $discountFieldsval['label'];
- $defaults['discounted_value'][$colCount][$rowCount] =
+ $defaults['discounted_label'][$discountFieldsval['weight']] = $discountFieldsval['label'];
+ $defaults['discounted_value'][$discountFieldsval['weight']][$rowCount] =
CRM_Utils_Money::format($discountFieldsval['amount'], NULL, '%a');
- $defaults['discount_option_id'][$colCount][$rowCount]= $discountFieldsval['id'];
+ $defaults['discount_option_id'][$rowCount][$discountFieldsval['weight']]= $discountFieldsval['id'];
if (CRM_Utils_Array::value('is_default', $discountFieldsval)) {
$defaults['discounted_default'] = $discountFieldsval['weight'];
}
- $colCount++;
}
$rowCount++;
}
* @access public
*/
public function postProcess() {
+ $params = array();
$eventTitle = '';
$params = $this->exportValues();