Skip to content

Commit

Permalink
Add more reverse sort orders
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyq committed Apr 14, 2022
1 parent 087de82 commit 344276c
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client_invoices.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
$sb = "invoice_number";
}

// Reverse default sort
if(!isset($_GET['o'])){
$o = "DESC";
$disp = "ASC";
}

//Rebuild URL
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));

Expand Down
6 changes: 6 additions & 0 deletions client_payments.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
$sb = "payment_date";
}

// Reverse default sort
if(!isset($_GET['o'])){
$o = "DESC";
$disp = "ASC";
}

//Rebuild URL
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));

Expand Down
6 changes: 6 additions & 0 deletions client_quotes.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
$sb = "quote_number";
}

// Reverse default sort
if(!isset($_GET['o'])){
$o = "DESC";
$disp = "ASC";
}

//Rebuild URL
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));

Expand Down
6 changes: 6 additions & 0 deletions client_tickets.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
$sb = "ticket_number";
}

// Reverse default sort
if(!isset($_GET['o'])){
$o = "DESC";
$disp = "ASC";
}

//Rebuild URL
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));

Expand Down
6 changes: 6 additions & 0 deletions client_trips.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
$sb = "trip_date";
}

// Reverse default sort
if(!isset($_GET['o'])){
$o = "DESC";
$disp = "ASC";
}

//Date From and Date To Filter
if(isset($_GET['dtf'])){
$dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']);
Expand Down
8 changes: 8 additions & 0 deletions expenses.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
<?php include("inc_all.php");

//$o = "DESC";

if(!empty($_GET['sb'])){
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
}else{
$sb = "expense_date";
}

// Reverse default sort
if(!isset($_GET['o'])){
$o = "DESC";
$disp = "ASC";
}

if(empty($_GET['canned_date'])){
//Prevents lots of undefined variable errors.
// $dtf and $dtt will be set by the below else to 0000-00-00 / 9999-00-00
Expand Down

0 comments on commit 344276c

Please sign in to comment.