From e26e5290a32b0118317de9955eab903769c21f1a Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Thu, 28 Nov 2024 11:53:58 +0530 Subject: [PATCH] Gas stock details changes-3 vadivel J 28-11-2024 --- app/Controllers/StockController.php | 13 +++++++------ app/Views/CoatingMachineDetail.php | 6 ++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/app/Controllers/StockController.php b/app/Controllers/StockController.php index 793c73ee..99ec8a48 100644 --- a/app/Controllers/StockController.php +++ b/app/Controllers/StockController.php @@ -145,7 +145,7 @@ class StockController extends BaseController $date = $postData['date']; $shift = $postData['shift']; - // Check if the same shift already exists on the same date + // Check if the same shift already exists on the same date $sameShiftOnDateExists = $this->coatingMachineDetails_model ->where('date', $date) ->where('shift', $shift) @@ -177,6 +177,7 @@ class StockController extends BaseController throw new \Exception('Failed to update gas stock consumption.'); } $message2 = 'And updated gas stock consumption.'; + $message3 =" Warning..!! Kindly Update the next subsequent month Gas Stock If older month Gas Stock Updated..!!"; } else { throw new \Exception('Failed to insert Coating machine details.'); } @@ -188,7 +189,7 @@ class StockController extends BaseController } $this->db->transCommit(); - $message3 ="Kindly Update the next month Gas Stock If older month Gas Stock Updated..!!"; + // Set flashdata for success message return redirect()->to("/coatingMachineDetails?month=$month") @@ -237,7 +238,7 @@ class StockController extends BaseController } $message2 = 'And updated gas stock consumption.'; - $message3 ="Kindly Update the next month Gas Stock If older month Gas Stock Updated..!!"; + $message3 ="Warning..!! Kindly Update the next subsequent month Gas Stock If older month Gas Stock Updated..!!"; } // Commit the transaction if all queries succeed @@ -959,7 +960,7 @@ class StockController extends BaseController } } - echo "Data Saved Successfully"; + echo "Data Saved Successfully Warning..!! Kindly Update the next subsequent month Gas Stock If older month Gas Stock Updated..!!"; } private function updateGasStockConsumption($date, $consumption) @@ -1248,13 +1249,13 @@ class StockController extends BaseController if (!empty($inserts)) { $this->drierMachineDetails_model->insertBatch($inserts); - $message3 ="Kindly Update the next month Gas Stock If older month Gas Stock Updated..!!"; + $message1 ="Warning..!! Kindly Update the next subsequent month Gas Stock If older month Gas Stock Updated..!!"; } if (!empty($updates)) { $this->drierMachineDetails_model->updateBatch($updates, 'id'); - $message3 ="Kindly Update the next month Gas Stock If older month Gas Stock Updated..!!"; + $message1 ="Warning..!! Kindly Update the next subsequent month Gas Stock If older month Gas Stock Updated..!!"; } if ($this->db->transStatus() === false) { diff --git a/app/Views/CoatingMachineDetail.php b/app/Views/CoatingMachineDetail.php index 87702061..9de6ddfe 100644 --- a/app/Views/CoatingMachineDetail.php +++ b/app/Views/CoatingMachineDetail.php @@ -200,6 +200,12 @@ + getFlashdata('success')): ?> +
+ getFlashdata('success'); ?> +
+ +