$newLinks = array();
}
elseif ($params['context'] == 'financialBatch') {
- $values['check'] = "<input type='checkbox' id='check_".$object->id."' name='check_".$object->id."' value='1' data-status_id='".$values['status_id']."' class='select-row'></input>";
+ $values['check'] =
+ "<input type='checkbox' id='check_" .
+ $object->id .
+ "' name='check_" .
+ $object->id .
+ "' value='1' data-status_id='" .
+ $values['status_id']."' class='select-row'></input>";
switch ($values['status_id']) {
case '1':
$tokens = array('id' => $object->id, 'status' => $values['status_id']);
if ($values['status_id'] == CRM_Core_OptionGroup::getValue('batch_status', 'Exported')) {
$aid = CRM_Core_OptionGroup::getValue('activity_type','Export Accounting Batch');
- $activityParams = array('source_record_id' => $object->id, 'activity_type_id' => $aid );
+ $activityParams = array('source_record_id' => $object->id, 'activity_type_id' => $aid);
$exportActivity = CRM_Activity_BAO_Activity::retrieve($activityParams, $val);
- $fid = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_EntityFile', $exportActivity->id, 'file_id', 'entity_id' );
+ $fid = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_EntityFile', $exportActivity->id, 'file_id', 'entity_id');
$tokens = array_merge(array('eid' => $exportActivity->id, 'fid' => $fid), $tokens);
}
$values['action'] = CRM_Core_Action::formLink(
}
}
if (!empty($query->_where[0])) {
- $where = implode(' AND ', $query->_where[0])."
- AND civicrm_entity_batch.batch_id IS NULL
- AND civicrm_entity_financial_trxn.entity_table = 'civicrm_contribution'";
+ $where = implode(' AND ', $query->_where[0]) .
+ "AND civicrm_entity_batch.batch_id IS NULL
+ AND civicrm_entity_financial_trxn.entity_table = 'civicrm_contribution'";
$searchValue = TRUE;
}
else {
}
}
- $sql = "SELECT {$select}
-FROM {$from}
-WHERE {$where}
-{$orderBy}
+ $sql = "
+SELECT {$select}
+FROM {$from}
+WHERE {$where}
+ {$orderBy}
";
if (isset($limit)) {
static function getBatchNames($batchIds) {
$query = 'SELECT id, title
FROM civicrm_batch
- WHERE id IN ('.$batchIds.')';
+ WHERE id IN ('. $batchIds . ')';
$batches = array();
$dao = CRM_Core_DAO::executeQuery($query);
*/
static function getBatchList() {
$sortMapper = array(
- 0 => 'batch.title', 1 => 'batch.type_id', 2 => '',
- 3 => 'batch.total', 4 => 'batch.status_id', 5 => '',
+ 0 => 'batch.title',
+ 1 => 'batch.type_id',
+ 2 => '',
+ 3 => 'batch.total',
+ 4 => 'batch.status_id',
+ 5 => '',
);
$sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer');
- $offset = isset($_REQUEST['iDisplayStart']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0;
- $rowCount = isset($_REQUEST['iDisplayLength']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25;
- $sort = isset($_REQUEST['iSortCol_0']) ? CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 'Integer'), $sortMapper) : NULL;
- $sortOrder = isset($_REQUEST['sSortDir_0']) ? CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc';
- $context = isset($_REQUEST['context']) ? CRM_Utils_Type::escape($_REQUEST['context'], 'String') : NULL;
+ $offset =
+ isset($_REQUEST['iDisplayStart']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0;
+ $rowCount =
+ isset($_REQUEST['iDisplayLength']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25;
+ $sort =
+ isset($_REQUEST['iSortCol_0']) ?
+ CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 'Integer'), $sortMapper) :
+ NULL;
+ $sortOrder =
+ isset($_REQUEST['sSortDir_0']) ? CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc';
+ $context =
+ isset($_REQUEST['context']) ? CRM_Utils_Type::escape($_REQUEST['context'], 'String') : NULL;
$params = $_REQUEST;
if ($sort && $sortOrder) {
// data entry status batches
$params['status_id'] = 3;
}
-
+
$params['context'] = $context;
// get batch list