From b8cb5491ea00c36a38872340da62ca5ddee5c91e Mon Sep 17 00:00:00 2001 From: Jordan S Date: Tue, 26 Sep 2023 12:04:13 -0300 Subject: [PATCH] Ensure invoices show most recently due first, not oldest When a client has dozens of invoices, it doesn't make any sense to show the oldest ones first (after sorting by due date that is). This means that if all invoices are paid, it might show invoices from years ago rather than the most recent ones. This change ensures that unpaid invoices are shown first, then the most recent invoices. --- clientareainvoices.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientareainvoices.tpl b/clientareainvoices.tpl index 84ee773..6537d6c 100644 --- a/clientareainvoices.tpl +++ b/clientareainvoices.tpl @@ -5,7 +5,7 @@ var table = jQuery('#tableInvoicesList').show().DataTable(); {if $orderby == 'default'} - table.order([4, 'desc'], [2, 'asc']); + table.order([4, 'desc'], [2, 'desc']); {elseif $orderby == 'invoicenum'} table.order(0, '{$sort}'); {elseif $orderby == 'date'}