<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
'price' => json_encode(array($elementName, $priceVal)),
'data-amount' => $opt[$valueFieldName],
'data-currency' => $currencyName,
+ 'data-price-field-values' => json_encode($customOption),
);
if (!empty($qf->_quickConfig) && $field->name == 'contribution_amount') {
$extra += array('onclick' => 'clearAmountOther();');
'' => ts('- select -'),
) + $selectOption,
$useRequired && $field->is_required,
- array('price' => json_encode($priceVal), 'class' => 'crm-select2')
+ array('price' => json_encode($priceVal), 'class' => 'crm-select2', 'data-price-field-values' => json_encode($customOption))
);
// CRM-6902 - Add "max" option for a price set field
if (isset($priceFieldValues['financial_type_id']) && array_key_exists($priceFieldValues['financial_type_id'], $taxRates)) {
$options[$fieldId][$priceFieldId]['tax_rate'] = $taxRates[$priceFieldValues['financial_type_id']];
$taxAmount = CRM_Contribute_BAO_Contribution_Utils::calculateTaxAmount($priceFieldValues['amount'], $options[$fieldId][$priceFieldId]['tax_rate']);
- $options[$fieldId][$priceFieldId]['tax_amount'] = round($taxAmount['tax_amount'], 2);
+ $options[$fieldId][$priceFieldId]['tax_amount'] = $taxAmount['tax_amount'];
}
}
}