Fixed bug with statement entry counts when statement_entry_id is set

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@554 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-14 21:00:21 +00:00
parent e42c83c585
commit 09e44995f3

View File

@@ -58,16 +58,21 @@ class StatementEntriesController extends AppController {
), ),
); );
if (!empty($params['post']['custom']['statement_entry_id'])) {
$link['ChargeEntry'] = array();
$link['DisbursementEntry'] = array();
}
return array('link' => $link); return array('link' => $link);
} }
function gridDataTables(&$params, &$model) { function gridDataTables(&$params, &$model) {
$tables = $this->gridDataCountTables($params, $model); $tables = $this->gridDataCountTables($params, $model);
if (in_array('applied', $params['post']['fields']) || if (in_array('applied', $params['post']['fields'])) {
isset($params['post']['custom']['statement_entry_id'])) { $tables['link'] +=
$tables['link']['DisbursementEntry'] = array(); array('ChargeEntry' => array(),
$tables['link']['ChargeEntry'] = array(); 'DisbursementEntry' => array());
} }
return $tables; return $tables;