From: Steve Sutton Date: Mon, 19 Mar 2018 15:39:40 +0000 (-0400) Subject: Update the order by for invoices X-Git-Tag: v1.0.0^2~124 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=f158d60f0407f301359d31f374b7d1eba04384b0;p=WP-Plugins%2Fglm-member-db-billing.git Update the order by for invoices Order by due date and transaction time. Due date asc transaction time desc --- diff --git a/models/admin/billing/index.php b/models/admin/billing/index.php index 998756a..553ae13 100644 --- a/models/admin/billing/index.php +++ b/models/admin/billing/index.php @@ -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 '
$invoicesResult: ' . print_r( $invoicesResult, true ) . '
'; diff --git a/models/admin/billing/invoices.php b/models/admin/billing/invoices.php index 66c3706..5c88006 100644 --- a/models/admin/billing/invoices.php +++ b/models/admin/billing/invoices.php @@ -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 '
$invoicesResult: ' . print_r( $invoicesResult, true ) . '
';