Added ability to see the customer when listing transactions

git-svn-id: file:///svn-source/pmgr/branches/v0.3_work/site@974 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2010-03-30 15:57:54 +00:00
parent 3e68839706
commit e813849c86
2 changed files with 16 additions and 3 deletions

View File

@@ -54,6 +54,12 @@ class TransactionsController extends AppController {
$this->gridView('Deposits');
}
function gridView($title, $action = null, $element = null) {
if ($title != 'Deposits')
$this->set('include', array('Customer'));
parent::gridView($title, $action, $element);
}
/**************************************************************************
**************************************************************************
@@ -77,6 +83,7 @@ class TransactionsController extends AppController {
$link = $this->gridDataCountTables($params, $model);
$link['link']['StatementEntry'] = array('fields' => array());
$link['link']['DepositTender'] = array('fields' => array());
$link['link']['Customer'] = array('fields' => array('id', 'name'));
return $link;
}
@@ -101,6 +108,7 @@ class TransactionsController extends AppController {
function gridDataPostProcessLinks(&$params, &$model, &$records, $links) {
$links['Transaction'] = array('id', 'action' => ($params['action'] == 'deposit'
? 'deposit_slip' : 'view'));
$links['Customer'] = array('name');
return parent::gridDataPostProcessLinks($params, $model, $records, $links);
}