Changed statement/ledger entries to defaultly sort by date in descending order. For small lists, ascending order is more logical, but for larger lists, this buries the most relevant items at the very back.
git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@739 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -75,6 +75,8 @@ echo $this->element('leases', array
|
||||
('caption' => 'Lease History',
|
||||
'filter' => array('Customer.id' => $customer['Customer']['id']),
|
||||
'exclude' => array('Customer'),
|
||||
'sort_column' => 'Move-In',
|
||||
'sort_order' => 'DESC',
|
||||
)));
|
||||
|
||||
|
||||
@@ -89,8 +91,6 @@ echo $this->element('statement_entries', array
|
||||
'filter' => array('Customer.id' => $customer['Customer']['id'],
|
||||
'type !=' => 'VOID'),
|
||||
'exclude' => array('Customer'),
|
||||
'sort_column' => 'Effective',
|
||||
'sort_order' => 'DESC',
|
||||
)));
|
||||
|
||||
|
||||
@@ -109,8 +109,6 @@ echo $this->element('ledger_entries', array
|
||||
),
|
||||
'include' => array('Transaction'),
|
||||
'exclude' => array('Entry', 'Account', 'Cr/Dr'),
|
||||
'sort_column' => 'Date',
|
||||
'sort_order' => 'DESC',
|
||||
)));
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ $cols['Sub-Total'] = array('index' => 'subtotal-balance', 'formatter' =>
|
||||
$grid
|
||||
->limit(50)
|
||||
->columns($cols)
|
||||
->sortField('Date')
|
||||
->sortField('Date', 'DESC')
|
||||
->defaultFields(array('Entry', 'Date', 'Amount'))
|
||||
->searchFields(array('Customer', 'Unit'))
|
||||
->render($this, isset($config) ? $config : null,
|
||||
|
||||
@@ -38,7 +38,7 @@ $grid->customData(compact('statement_entry_id'));
|
||||
// Render the grid
|
||||
$grid
|
||||
->columns($cols)
|
||||
->sortField('Date')
|
||||
->sortField('Date', 'DESC')
|
||||
->defaultFields(array('Entry', 'Date', 'Charge', 'Payment'))
|
||||
->searchFields(array('Customer', 'Unit'))
|
||||
->render($this, isset($config) ? $config : null,
|
||||
|
||||
@@ -89,8 +89,6 @@ echo $this->element('statement_entries', array
|
||||
'filter' => array('Lease.id' => $lease['id']),
|
||||
'include' => array('Through'),
|
||||
'exclude' => array('Customer', 'Lease', 'Unit'),
|
||||
'sort_column' => 'Effective',
|
||||
'sort_order' => 'DESC',
|
||||
)));
|
||||
|
||||
|
||||
@@ -109,8 +107,6 @@ echo $this->element('ledger_entries', array
|
||||
),
|
||||
'include' => array('Transaction'),
|
||||
'exclude' => array('Entry', 'Account', 'Cr/Dr'),
|
||||
'sort_column' => 'Date',
|
||||
'sort_order' => 'DESC',
|
||||
)));
|
||||
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ echo $this->element('leases', array
|
||||
('caption' => 'Lease History',
|
||||
'filter' => array('Unit.id' => $unit['id']),
|
||||
'exclude' => array('Unit'),
|
||||
'sort_column' => 'Move-In',
|
||||
'sort_order' => 'DESC',
|
||||
)));
|
||||
|
||||
|
||||
@@ -87,8 +89,6 @@ if (isset($current_lease['id'])) {
|
||||
'filter' => array('Lease.id' => $current_lease['id']),
|
||||
'include' => array('Through'),
|
||||
'exclude' => array('Customer', 'Lease', 'Unit'),
|
||||
'sort_column' => 'Effective',
|
||||
'sort_order' => 'DESC',
|
||||
)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user