$this->addElement('hidden', 'batch_id', $this->_batchId);
- $batchTypes = CRM_Core_Pseudoconstant::get('CRM_Batch_DAO_Batch', 'type_id', ['flip' => 1], 'validate');
+ $batchTypes = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'type_id', ['flip' => 1], 'validate');
// get the profile information
if ($this->_batchInfo['type_id'] == $batchTypes['Contribution']) {
CRM_Utils_System::setTitle(ts('Batch Data Entry for Contributions'));
// set an offset to account for other vars we are not counting
$offset = 50;
if ((count($this->_elementIndex) + $offset) > ini_get("max_input_vars")) {
- CRM_Core_Error::fatal(ts('Batch size is too large. Increase value of php.ini setting "max_input_vars" (current val = ' . ini_get("max_input_vars") . ')'));
+ // Avoiding 'ts' for obscure messages.
+ CRM_Core_Error::fatal('Batch size is too large. Increase value of php.ini setting "max_input_vars" (current val = ' . ini_get("max_input_vars") . ')');
}
$this->assign('fields', $this->_fields);
*/
public static function formRule($params, $files, $self) {
$errors = [];
- $batchTypes = CRM_Core_Pseudoconstant::get('CRM_Batch_DAO_Batch', 'type_id', ['flip' => 1], 'validate');
+ $batchTypes = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'type_id', ['flip' => 1], 'validate');
$fields = [
'total_amount' => ts('Amount'),
'financial_type' => ts('Financial Type'),
$value['skipCleanMoney'] = TRUE;
//finally call contribution create for all the magic
$contribution = CRM_Contribute_BAO_Contribution::create($value);
- $batchTypes = CRM_Core_Pseudoconstant::get('CRM_Batch_DAO_Batch', 'type_id', ['flip' => 1], 'validate');
+ $batchTypes = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'type_id', ['flip' => 1], 'validate');
if (!empty($this->_batchInfo['type_id']) && ($this->_batchInfo['type_id'] == $batchTypes['Pledge Payment'])) {
$adjustTotalAmount = FALSE;
if (isset($params['option_type'][$key])) {
unset($value['membership_start_date']);
unset($value['membership_end_date']);
$ids = [];
+ // @todo stop passing empty $ids
$membership = CRM_Member_BAO_Membership::create($value, $ids);
}