From: Coleman Watts Date: Mon, 28 Apr 2014 20:22:41 +0000 (-0700) Subject: CRM-14490 - Fix batch entry table X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=957bbb1d91969d9cb27198681c10572d51b66e03;p=civicrm-core.git CRM-14490 - Fix batch entry table --- diff --git a/CRM/Batch/BAO/Batch.php b/CRM/Batch/BAO/Batch.php index bc690a37f6..4650a83a1a 100644 --- a/CRM/Batch/BAO/Batch.php +++ b/CRM/Batch/BAO/Batch.php @@ -217,9 +217,10 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch { $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']); } diff --git a/CRM/Batch/Page/AJAX.php b/CRM/Batch/Page/AJAX.php index a2dcf1a8ec..d5ea30b6ae 100644 --- a/CRM/Batch/Page/AJAX.php +++ b/CRM/Batch/Page/AJAX.php @@ -97,18 +97,29 @@ class CRM_Batch_Page_AJAX { $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();