+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016 |
+ | Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2017
*/
/**
}
$this->_showHide->addToTemplate();
$this->assign('inDate', $this->_inDate);
-
if (!empty($defaults['payment_processor'])) {
- $defaults['payment_processor'] = str_replace(CRM_Core_DAO::VALUE_SEPARATOR, ',',
+ $defaults['payment_processor'] = array_fill_keys(explode(CRM_Core_DAO::VALUE_SEPARATOR,
$defaults['payment_processor']
- );
+ ), '1');
}
+
return $defaults;
}
$paymentProcessor = CRM_Core_PseudoConstant::paymentProcessor();
$this->assign('paymentProcessor', $paymentProcessor);
-
- $this->addEntityRef('payment_processor', ts('Payment Processor'), array(
- 'entity' => 'PaymentProcessor',
- 'multiple' => TRUE,
- 'api' => array(
- 'params' => array('domain_id' => CRM_Core_Config::domainID()),
- ),
- 'select' => array('minimumInputLength' => 0),
- ));
+ $this->addCheckBox('payment_processor', ts('Payment Processor'),
+ array_flip($paymentProcessor),
+ NULL, NULL, NULL, NULL,
+ array(' ', ' ', ' ', '<br/>')
+ );
// financial type
if (!CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus() ||
$this->addElement('submit', $this->getButtonName('submit'), ts('Add Discount Set to Fee Table'),
array('class' => 'crm-form-submit cancel')
);
-
+ if (CRM_Contribute_BAO_Contribution::checkContributeSettings('deferred_revenue_enabled')) {
+ $deferredFinancialType = CRM_Financial_BAO_FinancialAccount::getDeferredFinancialType();
+ $this->assign('deferredFinancialType', array_keys($deferredFinancialType));
+ }
$this->buildAmountLabel();
parent::buildQuickForm();
}
}
}
}
- // CRM-16189
- try {
- CRM_Financial_BAO_FinancialAccount::validateFinancialType($values['financial_type_id']);
- }
- catch (CRM_Core_Exception $e) {
- $errors['financial_type_id'] = $e->getMessage();
- }
return empty($errors) ? TRUE : $errors;
}
}
if (!empty($params['payment_processor'])) {
- $params['payment_processor'] = str_replace(',', CRM_Core_DAO::VALUE_SEPARATOR, $params['payment_processor']);
+ $params['payment_processor'] = implode(CRM_Core_DAO::VALUE_SEPARATOR, array_keys($params['payment_processor']));
}
else {
$params['payment_processor'] = 'null';