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',
|
('caption' => 'Lease History',
|
||||||
'filter' => array('Customer.id' => $customer['Customer']['id']),
|
'filter' => array('Customer.id' => $customer['Customer']['id']),
|
||||||
'exclude' => array('Customer'),
|
'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'],
|
'filter' => array('Customer.id' => $customer['Customer']['id'],
|
||||||
'type !=' => 'VOID'),
|
'type !=' => 'VOID'),
|
||||||
'exclude' => array('Customer'),
|
'exclude' => array('Customer'),
|
||||||
'sort_column' => 'Effective',
|
|
||||||
'sort_order' => 'DESC',
|
|
||||||
)));
|
)));
|
||||||
|
|
||||||
|
|
||||||
@@ -109,8 +109,6 @@ echo $this->element('ledger_entries', array
|
|||||||
),
|
),
|
||||||
'include' => array('Transaction'),
|
'include' => array('Transaction'),
|
||||||
'exclude' => array('Entry', 'Account', 'Cr/Dr'),
|
'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
|
$grid
|
||||||
->limit(50)
|
->limit(50)
|
||||||
->columns($cols)
|
->columns($cols)
|
||||||
->sortField('Date')
|
->sortField('Date', 'DESC')
|
||||||
->defaultFields(array('Entry', 'Date', 'Amount'))
|
->defaultFields(array('Entry', 'Date', 'Amount'))
|
||||||
->searchFields(array('Customer', 'Unit'))
|
->searchFields(array('Customer', 'Unit'))
|
||||||
->render($this, isset($config) ? $config : null,
|
->render($this, isset($config) ? $config : null,
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ $grid->customData(compact('statement_entry_id'));
|
|||||||
// Render the grid
|
// Render the grid
|
||||||
$grid
|
$grid
|
||||||
->columns($cols)
|
->columns($cols)
|
||||||
->sortField('Date')
|
->sortField('Date', 'DESC')
|
||||||
->defaultFields(array('Entry', 'Date', 'Charge', 'Payment'))
|
->defaultFields(array('Entry', 'Date', 'Charge', 'Payment'))
|
||||||
->searchFields(array('Customer', 'Unit'))
|
->searchFields(array('Customer', 'Unit'))
|
||||||
->render($this, isset($config) ? $config : null,
|
->render($this, isset($config) ? $config : null,
|
||||||
|
|||||||
@@ -89,8 +89,6 @@ echo $this->element('statement_entries', array
|
|||||||
'filter' => array('Lease.id' => $lease['id']),
|
'filter' => array('Lease.id' => $lease['id']),
|
||||||
'include' => array('Through'),
|
'include' => array('Through'),
|
||||||
'exclude' => array('Customer', 'Lease', 'Unit'),
|
'exclude' => array('Customer', 'Lease', 'Unit'),
|
||||||
'sort_column' => 'Effective',
|
|
||||||
'sort_order' => 'DESC',
|
|
||||||
)));
|
)));
|
||||||
|
|
||||||
|
|
||||||
@@ -109,8 +107,6 @@ echo $this->element('ledger_entries', array
|
|||||||
),
|
),
|
||||||
'include' => array('Transaction'),
|
'include' => array('Transaction'),
|
||||||
'exclude' => array('Entry', 'Account', 'Cr/Dr'),
|
'exclude' => array('Entry', 'Account', 'Cr/Dr'),
|
||||||
'sort_column' => 'Date',
|
|
||||||
'sort_order' => 'DESC',
|
|
||||||
)));
|
)));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ echo $this->element('leases', array
|
|||||||
('caption' => 'Lease History',
|
('caption' => 'Lease History',
|
||||||
'filter' => array('Unit.id' => $unit['id']),
|
'filter' => array('Unit.id' => $unit['id']),
|
||||||
'exclude' => array('Unit'),
|
'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']),
|
'filter' => array('Lease.id' => $current_lease['id']),
|
||||||
'include' => array('Through'),
|
'include' => array('Through'),
|
||||||
'exclude' => array('Customer', 'Lease', 'Unit'),
|
'exclude' => array('Customer', 'Lease', 'Unit'),
|
||||||
'sort_column' => 'Effective',
|
|
||||||
'sort_order' => 'DESC',
|
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user