Implemented the balance field of Leases as part of a single query. This not only reduces the number of queries required, it also allows balance to be a sortable column, so that we can determine which customers are overdue.
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@251 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -112,6 +112,9 @@ class AppController extends Controller {
|
||||
array('link'=>1, 'contain'=>1));
|
||||
$query['conditions'] = $this->jqGridDataConditions($params, $model);
|
||||
|
||||
// DEBUG PURPOSES ONLY!
|
||||
$params['count_query'] = $query;
|
||||
|
||||
// Get the number of records prior to pagination
|
||||
$count = $this->jqGridDataRecordCount($params, $model, $query);
|
||||
|
||||
@@ -136,15 +139,15 @@ class AppController extends Controller {
|
||||
$query['fields'] = $this->jqGridDataFields($params, $model);
|
||||
$results = $this->jqGridDataRecords($params, $model, $query);
|
||||
|
||||
// DEBUG PURPOSES ONLY!
|
||||
$params['query'] = $query;
|
||||
|
||||
// Post process the records
|
||||
$this->jqGridRecordsPostProcess($params, $model, $results);
|
||||
|
||||
// Add in any needed hyperlinks
|
||||
$this->jqGridRecordLinks($params, $model, $results, array());
|
||||
|
||||
// DEBUG PURPOSES ONLY!
|
||||
$params['query'] = $query;
|
||||
|
||||
// Finally, dump out the data
|
||||
$this->jqGridDataOutputHeader($params, $model);
|
||||
echo "<?xml version='1.0' encoding='utf-8'?>\n";
|
||||
|
||||
Reference in New Issue
Block a user