Fixed a sorting issue (depending on point of view). When sorting by date, or effective date, I find it useful to have the next order of sort be entry ID, so they can be viewed in the order actually entered. Ideally, we'll get to a 4 date system: charge-from date, charge-to date, effective date (whatever date the user feels is the right date for the transaction), and _actual_ date, which is the true and correct entry date/time and _not_ user settable. The names of each may need to be different, but that's where we need to head, in which case, we would sort on actual date instead of entry-id.
git-svn-id: file:///svn-source/pmgr/branches/v0.3_work@975 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -158,8 +158,11 @@ class StatementEntriesController extends AppController {
|
||||
// defaults into the sort mechanism. If we're already
|
||||
// sorting by one of them, it will only be redundant,
|
||||
// and should cause no harm (possible a longer query?)
|
||||
$order[] = 'Transaction.stamp ' . $direction;
|
||||
$order[] = 'StatementEntry.effective_date ' . $direction;
|
||||
if ($index != 'Transaction.stamp' &&
|
||||
$index != 'StatementEntry.effective_date') {
|
||||
$order[] = 'Transaction.stamp ' . $direction;
|
||||
$order[] = 'StatementEntry.effective_date ' . $direction;
|
||||
}
|
||||
$order[] = 'StatementEntry.id ' . $direction;
|
||||
|
||||
return $order;
|
||||
|
||||
Reference in New Issue
Block a user