+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
- * @param null
- *
- * @return array array of action links that we need to display for the browse screen
- * @access public
- */ function &actionLinks() {
+ * @return array
+ * array of action links that we need to display for the browse screen
+ */
+ public function &actionLinks() {
if (!isset(self::$_actionLinks)) {
self::$_actionLinks = array(
CRM_Core_Action::UPDATE => array(
if (!isset(self::$_actionLinks)) {
self::$_actionLinks = array(
CRM_Core_Action::UPDATE => array(
$customOption = array();
CRM_Price_BAO_PriceFieldValue::getValues($this->_fid, $customOption);
$config = CRM_Core_Config::singleton();
$financialType = CRM_Contribute_PseudoConstant::financialType();
$taxRate = CRM_Core_PseudoConstant::getTaxRates();
// display taxTerm for priceFields
$customOption = array();
CRM_Price_BAO_PriceFieldValue::getValues($this->_fid, $customOption);
$config = CRM_Core_Config::singleton();
$financialType = CRM_Contribute_PseudoConstant::financialType();
$taxRate = CRM_Core_PseudoConstant::getTaxRates();
// display taxTerm for priceFields
$taxTerm = CRM_Utils_Array::value('tax_term', $invoiceSettings);
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$getTaxDetails = FALSE;
$taxTerm = CRM_Utils_Array::value('tax_term', $invoiceSettings);
$invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings);
$getTaxDetails = FALSE;
$taxAmount = CRM_Contribute_BAO_Contribution_Utils::calculateTaxAmount($customOption[$id]['amount'], $customOption[$id]['tax_rate']);
$customOption[$id]['tax_amount'] = $taxAmount['tax_amount'];
}
$taxAmount = CRM_Contribute_BAO_Contribution_Utils::calculateTaxAmount($customOption[$id]['amount'], $customOption[$id]['tax_rate']);
$customOption[$id]['tax_amount'] = $taxAmount['tax_amount'];
}
$customOption[$id]['financial_type_id'] = $financialType[$values['financial_type_id']];
}
// update enable/disable links depending on price_field properties.
$customOption[$id]['financial_type_id'] = $financialType[$values['financial_type_id']];
}
// update enable/disable links depending on price_field properties.
$session = CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url('civicrm/admin/price/field/option',
$session = CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url('civicrm/admin/price/field/option',
$controller = new CRM_Core_Controller_Simple('CRM_Price_Form_Option', ts('Price Field Option'), $action);
$controller->set('fid', $this->_fid);
$controller->setEmbedded(TRUE);
$controller = new CRM_Core_Controller_Simple('CRM_Price_Form_Option', ts('Price Field Option'), $action);
$controller->set('fid', $this->_fid);
$controller->setEmbedded(TRUE);
* This method is called after the page is created. It checks for the
* type of action and executes that action.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
*
- $this->_isSetReserved= CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_sid, 'is_reserved');
+ $this->_isSetReserved = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_sid, 'is_reserved');
$this->assign('isReserved', $this->_isSetReserved);
}
//as url contain $sid so append breadcrumb dynamically.
$this->assign('isReserved', $this->_isSetReserved);
}
//as url contain $sid so append breadcrumb dynamically.
// what action to take ?
if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD |
CRM_Core_Action::VIEW | CRM_Core_Action::DELETE
// what action to take ?
if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD |
CRM_Core_Action::VIEW | CRM_Core_Action::DELETE