From 76242628f17c7671de08927cdc723316c68b29e0 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Tue, 26 Mar 2024 12:47:18 +0530 Subject: [PATCH] invoice DataTable Order : ps --- app/Models/InvoiceModel.php | 1 + app/Views/invoice_list.php | 18 ++++++-------- app/Views/offline_invoice_list.php | 39 +++++++++--------------------- 3 files changed, 20 insertions(+), 38 deletions(-) diff --git a/app/Models/InvoiceModel.php b/app/Models/InvoiceModel.php index aff339d5..dd6a8e4b 100644 --- a/app/Models/InvoiceModel.php +++ b/app/Models/InvoiceModel.php @@ -373,6 +373,7 @@ public function get_general_invoice_data($f_date = null, $t_date = null) $result = $query->join('customers', 'customers.customer_id = invoice.customer_id', 'left') ->join('invoiceitems', 'invoiceitems.invoice_id = invoice.invoice_id', 'left') ->join('books', 'books.book_id = invoiceitems.product', 'left') + ->orderBy("invoice.invoice_date", "DESC") ->groupBy('invoice.invoice_id') // Assuming invoice_id is the primary key of the invoice table ->get() ->getResult(); diff --git a/app/Views/invoice_list.php b/app/Views/invoice_list.php index 3cb4859c..cb4b2158 100644 --- a/app/Views/invoice_list.php +++ b/app/Views/invoice_list.php @@ -54,6 +54,7 @@ + @@ -68,18 +69,13 @@ $invoice_date = date('d/m/Y', strtotime($row['invoice_date'])); ?> - - - - - + + + + + + diff --git a/app/Views/offline_invoice_list.php b/app/Views/offline_invoice_list.php index b212648f..f41cd8eb 100644 --- a/app/Views/offline_invoice_list.php +++ b/app/Views/offline_invoice_list.php @@ -1,5 +1,4 @@
Order Number Invoice Date Customer Name
- - " class="edit-button" title="Edit the Invoice">  - - - - " class="download-pdf-button" title="Download the Invoice">  " class="print-address-button" title="Print Address">