diff --git a/app/Controllers/Sales.php b/app/Controllers/Sales.php index e81ce7f9..a0f8ccb5 100755 --- a/app/Controllers/Sales.php +++ b/app/Controllers/Sales.php @@ -157,22 +157,13 @@ class Sales extends BaseController if ($this->request->getMethod(true) === 'POST' && $this->request->getPost('btn_submit')) { - $from_date = $this->request->getPost('from_date'); - $to_date = $this->request->getPost('to_date'); - $hsn_number = $this->request->getPost('hsn_number'); - $product_id = $this->request->getPost('product'); - $client_id = $this->request->getPost('client'); - - + $data['from_date'] = $this->request->getPost('from_date'); + $data['to_date'] = $this->request->getPost('to_date'); + $data['hsn_number'] = $this->request->getPost('hsn_number'); + $data['product_id'] = $this->request->getPost('product'); + $data['client_id'] = $this->request->getPost('client'); - $headline .= ((isset($from_date) && isset($to_date)) && (!empty($from_date) && !empty($to_date))) ? $from_date . ' to ' . $to_date. ', ' : ''; - $headline .= (isset($hsn_number) && !empty($hsn_number)) ? $hsn_number . ', ' : ''; - $headline .= (isset($product_id) && !empty($product_id)) ? $this->ipinvoice_model->getProductName($product_id) . ', ' : ''; - $headline .= (isset($client_id) && !empty($client_id)) ? $this->ipinvoice_model->getClientName($client_id) . ', ' : ''; - - - - $report = $this->ipinvoice_model->sales_report($from_date, $to_date, $hsn_number, $product_id, $client_id); + $report = $this->ipinvoice_model->sales_report($data['from_date'], $data['to_date'], $data['hsn_number'], $data['product_id'], $data['client_id']); } $data['hsn'] = $this->ipinvoice_model->getHsn(); $data['product'] = $this->ipinvoice_model->getProducts(); diff --git a/app/Models/Ipinvoice_model.php b/app/Models/Ipinvoice_model.php index dc662e6f..8d087f7e 100755 --- a/app/Models/Ipinvoice_model.php +++ b/app/Models/Ipinvoice_model.php @@ -130,7 +130,7 @@ class Ipinvoice_model extends Model } // Order by invoice number in descending order - $builder->orderBy('ip_invoices.invoice_number', 'DESC'); + $builder->orderBy('ip_invoices.invoice_date_created', 'DESC'); $query = $builder->get(); return $query->getResult(); diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index 00cb718f..a2cdcc45 100755 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -1662,7 +1662,7 @@ if (!empty($getlogpodtl)) {   Cancel -   Save As Draft +   Save As Draft   Submit   Approve @@ -2253,7 +2253,7 @@ if (!empty($getlogpodtl)) { @@ -2501,7 +2501,7 @@ if (!empty($getlogpodtl)) {
diff --git a/app/Views/editCapitalPo.php b/app/Views/editCapitalPo.php index 6cb37ba5..9d300c90 100755 --- a/app/Views/editCapitalPo.php +++ b/app/Views/editCapitalPo.php @@ -1597,7 +1597,7 @@ if (!empty($getlogpodtl)) {   Save as Draft   Submit -   Approve +   Approve OK diff --git a/app/Views/editRevenueAmendPO.php b/app/Views/editRevenueAmendPO.php index 4f55c8a5..17b54762 100755 --- a/app/Views/editRevenueAmendPO.php +++ b/app/Views/editRevenueAmendPO.php @@ -1673,7 +1673,7 @@ if (!empty($INRSYMBOL)) { -     Save as Draft   Approve diff --git a/app/Views/editRevenuepurchaseorder.php b/app/Views/editRevenuepurchaseorder.php index c330fdf5..a3784c7a 100755 --- a/app/Views/editRevenuepurchaseorder.php +++ b/app/Views/editRevenuepurchaseorder.php @@ -2958,7 +2958,7 @@ if (!empty($getlogpodtl)) {   Submit -   Approve   
- Cancel + Cancel   Update Service
diff --git a/app/Views/editimportpo.php b/app/Views/editimportpo.php index e4d9e32a..8fdb411c 100755 --- a/app/Views/editimportpo.php +++ b/app/Views/editimportpo.php @@ -2010,7 +2010,7 @@ if (!empty($getlogpodtl)) { @@ -2563,7 +2563,7 @@ if (!empty($getlogpodtl)) { @@ -3024,7 +3024,7 @@ if (!empty($getlogpodtl)) { diff --git a/app/Views/purchaseorder.php b/app/Views/purchaseorder.php index f3bb94ba..271f8516 100755 --- a/app/Views/purchaseorder.php +++ b/app/Views/purchaseorder.php @@ -2311,7 +2311,7 @@ if (!empty($INRSYMBOL)) {
-   Cancel +   Cancel   Save as Draft   Submit
diff --git a/app/Views/report_sales.php b/app/Views/report_sales.php index 17d5d175..04d7a270 100644 --- a/app/Views/report_sales.php +++ b/app/Views/report_sales.php @@ -84,7 +84,7 @@
- +
@@ -93,7 +93,7 @@
- +
@@ -105,7 +105,7 @@ - + @@ -119,7 +119,7 @@ - + @@ -133,15 +133,18 @@ - + -
-

- +
+ +
+ + + +
@@ -267,9 +270,7 @@ [10, 20, 30, 50, "All"] ], // Rows per page options responsive: true, // Responsive table - order: [ - [0, 'desc'] - ], // Default ordering (column index 0, descending) + ordering : false, language: { paginate: { next: '', // Next button icon