/** * build all the data structures needed to build the form * * @return void * @access public */ function preProcess() { $this->_batchId = CRM_Utils_Request::retrieve('id', 'Positive', $this, TRUE); $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); if (empty($this->_batchInfo)) { $params = array('id' => $this->_batchId); CRM_Batch_BAO_Batch::retrieve($params, $this->_batchInfo); $this->assign('batchTotal', !empty($this->_batchInfo['total']) ? $this->_batchInfo['total'] : NULL); $this->assign('batchType', $this->_batchInfo['type_id']); // get the profile id associted with this batch type $this->_profileId = CRM_Batch_BAO_Batch::getProfileId($this->_batchInfo['type_id']); } CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'templates/CRM/Batch/Form/Entry.js')->addSetting(array('batch' => array('type_id' => $this->_batchInfo['type_id'])))->addSetting(array('setting' => array('monetaryThousandSeparator' => CRM_Core_Config::singleton()->monetaryThousandSeparator)))->addSetting(array('setting' => array('monetaryDecimalPoint' => CRM_Core_Config::singleton()->monetaryDecimalPoint))); }