diff --git a/client_invoices.php b/client_invoices.php index 01e146c6..6a202a42 100644 --- a/client_invoices.php +++ b/client_invoices.php @@ -6,6 +6,12 @@ if(!empty($_GET['sb'])){ $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))); diff --git a/client_payments.php b/client_payments.php index 3b57e0d6..26b7678c 100644 --- a/client_payments.php +++ b/client_payments.php @@ -6,6 +6,12 @@ if(!empty($_GET['sb'])){ $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))); diff --git a/client_quotes.php b/client_quotes.php index 24236166..90bd4e35 100644 --- a/client_quotes.php +++ b/client_quotes.php @@ -6,6 +6,12 @@ if(!empty($_GET['sb'])){ $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))); diff --git a/client_tickets.php b/client_tickets.php index edf9866e..82bc92c8 100644 --- a/client_tickets.php +++ b/client_tickets.php @@ -6,6 +6,12 @@ if(!empty($_GET['sb'])){ $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))); diff --git a/client_trips.php b/client_trips.php index 79a18944..61511245 100644 --- a/client_trips.php +++ b/client_trips.php @@ -6,6 +6,12 @@ if(!empty($_GET['sb'])){ $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']); diff --git a/expenses.php b/expenses.php index 807c687e..6a0a1e0e 100644 --- a/expenses.php +++ b/expenses.php @@ -1,4 +1,6 @@