Skip to content

Commit

Permalink
Reverse Orders & Invoice Listing Sort Order
Browse files Browse the repository at this point in the history
  • Loading branch information
BadPixxel committed Nov 16, 2023
1 parent 1927782 commit ca49edb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/splashsync/src/Objects/Invoice/ObjectsListTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public function objectsList(string $filter = null, array $params = array()): arr
$sql->where($where);
}
//====================================================================//
// Change Default Sort Direction to get Most Recent First
$params["sortorder"] ??= "DESC";
//====================================================================//
// Compute Total Number of Results
$total = $this->getObjectListTotal($sql);
//====================================================================//
Expand Down
3 changes: 3 additions & 0 deletions modules/splashsync/src/Objects/Order/ObjectsListTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public function objectsList(string $filter = null, array $params = array()): arr
$where .= " OR LOWER( o.date_add ) LIKE LOWER( '%".pSQL($filter)."%') ";
$sql->where($where);
}
//====================================================================//
// Change Default Sort Direction to get Most Recent First
$params["sortorder"] ??= "DESC";

//====================================================================//
// Execute Generic Search
Expand Down

0 comments on commit ca49edb

Please sign in to comment.