$batch['check'] = $value['check'];
}
$batch['batch_name'] = $value['title'];
- $batch['total'] = $batch['item_count'] = '';
+ $batch['total'] = '';
$batch['payment_instrument'] = $value['payment_instrument'];
$batch['item_count'] = CRM_Utils_Array::value('item_count', $value);
+ $batch['type'] = $value['batch_type'];
if (!empty($value['total'])) {
$batch['total'] = CRM_Utils_Money::format($value['total']);
}
$batches = CRM_Batch_BAO_Batch::getBatchListSelector($params);
$iFilteredTotal = $iTotal = $params['total'];
- $selectorElements = array(
- 'batch_name',
- 'payment_instrument',
- 'item_count',
- 'total',
- 'status',
- 'created_by',
- 'links',
- );
if ($context == 'financialBatch') {
- $selectorElements = array_merge(array('check'), $selectorElements);
+ $selectorElements = array(
+ 'check',
+ 'batch_name',
+ 'payment_instrument',
+ 'item_count',
+ 'total',
+ 'status',
+ 'created_by',
+ 'links',
+ );
+ }
+ else {
+ $selectorElements = array(
+ 'batch_name',
+ 'type',
+ 'item_count',
+ 'total',
+ 'status',
+ 'created_by',
+ 'links',
+ );
}
echo CRM_Utils_JSON::encodeDataTableSelector($batches, $sEcho, $iTotal, $iFilteredTotal, $selectorElements);
CRM_Utils_System::civiExit();