Update the order by for invoices
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 19 Mar 2018 15:39:40 +0000 (11:39 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 19 Mar 2018 15:39:40 +0000 (11:39 -0400)
Order by due date and transaction time.
Due date asc
transaction time desc

models/admin/billing/index.php
models/admin/billing/invoices.php

index 998756a..553ae13 100644 (file)
@@ -346,7 +346,7 @@ class GlmMembersAdmin_billing_index extends GlmDataInvoices
             $where = implode( ' AND ', $where_params );
 
             // Get the list of invoices and determine number of invoices in list
-            $orderBy = 'transaction_time desc';
+            $orderBy = 'due_date ASC, transaction_time DESC';
             $this->line_items_post = true;
             $invoicesResult = $this->getList($where, $orderBy, true, 'id', $start, $limit);
             // echo '<pre>$invoicesResult: ' . print_r( $invoicesResult, true ) . '</pre>';
index 66c3706..5c88006 100644 (file)
@@ -429,7 +429,7 @@ class GlmMembersAdmin_billing_invoices extends GlmDataInvoices
             $where = implode( ' AND ', $where_params );
 
             // Get the list of invoices and determine number of invoices in list
-            $orderBy = 'transaction_time desc';
+            $orderBy = 'due_date ASC, transaction_time DESC';
             $this->line_items_post = true;
             $invoicesResult = $this->getList($where, $orderBy, true, 'id', $start, $limit);
             // echo '<pre>$invoicesResult: ' . print_r( $invoicesResult, true ) . '</pre>';