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 @@
| Order Number | Invoice Date | Customer Name | @@ -68,18 +69,13 @@ $invoice_date = date('d/m/Y', strtotime($row['invoice_date'])); ?>|||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| = $row['invoice_number']; ?> | -= $invoice_date; ?> | -= $row['customer_name']; ?> | -= $row['status']; ?> | -= "₹ " . $row['total_amount']; ?> | += $row['invoice_date']; ?> | += $row['invoice_number']; ?> | += $invoice_date; ?> | += $row['customer_name']; ?> | += $row['status']; ?> | += "₹ " . $row['total_amount']; ?> | - - " class="edit-button" title="Edit the Invoice"> - - - - " class="download-pdf-button" title="Download the Invoice"> " class="print-address-button" title="Print Address"> | 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 @@