Modified the statement entries grid, as well as the underlying controller, to support a couple new fields, 'applied' and 'balance'.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@532 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -35,7 +35,7 @@ class StatementEntriesController extends AppController {
|
||||
* to jqGrid.
|
||||
*/
|
||||
|
||||
function gridDataTables(&$params, &$model) {
|
||||
function gridDataCountTables(&$params, &$model) {
|
||||
$link =
|
||||
array(// Models
|
||||
'Transaction' =>
|
||||
@@ -58,25 +58,18 @@ class StatementEntriesController extends AppController {
|
||||
),
|
||||
);
|
||||
|
||||
if (isset($params['post']['custom']['statement_entry_id'])) {
|
||||
$link['DisbursementEntry'] = array();
|
||||
$link['ChargeEntry'] = array();
|
||||
return array('link' => $link);
|
||||
}
|
||||
|
||||
function gridDataTables(&$params, &$model) {
|
||||
$tables = $this->gridDataCountTables($params, $model);
|
||||
|
||||
if (in_array('applied', $params['post']['fields'])) {
|
||||
$tables['link']['DisbursementEntry'] = array();
|
||||
$tables['link']['ChargeEntry'] = array();
|
||||
}
|
||||
|
||||
/* if ($params['action'] === 'collected') { */
|
||||
/* $link['DisbursementEntry'] = array('Receipt' => array('class' => 'Transaction')); */
|
||||
/* $link['ChargeEntry'] = array('Invoice' => array('class' => 'Transaction')); */
|
||||
/* } */
|
||||
|
||||
/* if (count(array_intersect($params['fields'], array('applied'))) == 1) { */
|
||||
/* $link['DisbursementEntry'] = array(); */
|
||||
/* $link['ChargeEntry'] = array(); */
|
||||
/* } */
|
||||
/* elseif (isset($params['post']['custom']['customer_id']) || isset($params['post']['custom']['lease_id'])) { */
|
||||
/* $link['DisbursementEntry'] = array(); */
|
||||
/* } */
|
||||
|
||||
return array('link' => $link);
|
||||
return $tables;
|
||||
}
|
||||
|
||||
function gridDataFields(&$params, &$model) {
|
||||
|
||||
Reference in New Issue
Block a user