From c99566fd74cb7208af08ca28d05c1e981d9bfa66 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Thu, 5 Dec 2024 09:32:50 +0530 Subject: [PATCH] stock changes-1 vadivel J 04-12-2024 --- app/Controllers/StockController.php | 2 +- app/Views/CoatingMachineDetail.php | 8 +++++++- app/Views/bagStockDetails.php | 24 +++++++++++++++++++---- app/Views/dustAndRoughStockDetails.php | 20 +++++++++++++++---- app/Views/factoryDieselMachineDetails.php | 10 ---------- app/Views/resinStockDetails.php | 20 +++++++++++++++++-- 6 files changed, 62 insertions(+), 22 deletions(-) diff --git a/app/Controllers/StockController.php b/app/Controllers/StockController.php index 99ec8a48..b350f0f5 100644 --- a/app/Controllers/StockController.php +++ b/app/Controllers/StockController.php @@ -1460,7 +1460,7 @@ class StockController extends BaseController $data['powerConsumptionDetails'] = $this->getElectricConsumptionPivot($data['machineDetails'], $data['startDate'], $data['endDate']); if (!count($data['powerConsumptionDetails'])) { //insert empty data - $tempInsert = []; + $tempInsert = []; foreach ($monthData as $key => $value) { array_push($tempInsert, ['date' => $value['database'], 'machine_id' => $data['machineDetails'][0]['id']]); } diff --git a/app/Views/CoatingMachineDetail.php b/app/Views/CoatingMachineDetail.php index 9de6ddfe..d8185b2f 100644 --- a/app/Views/CoatingMachineDetail.php +++ b/app/Views/CoatingMachineDetail.php @@ -259,7 +259,13 @@ foreach ($coatingMachineDetails as $record) { ?> - + format('d-m-Y'); + if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';} + ?> + > format('d-m-Y'); diff --git a/app/Views/bagStockDetails.php b/app/Views/bagStockDetails.php index c7ab9691..996b2757 100644 --- a/app/Views/bagStockDetails.php +++ b/app/Views/bagStockDetails.php @@ -274,14 +274,22 @@ $bagStockDetails){ ?> - + format('d-m-Y'); + if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';} + ?> + > $bagStock){ ?> format('d-m-Y'); + $startDate = DateTime::createFromFormat('Y-m-d', $bagStock['date'])->format('d-m-Y'); ?> @@ -363,7 +371,15 @@ ?> $dateInMonth){ ?> - + format('d-m-Y'); + if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';} + ?> + > $bagMaterial){ ?> diff --git a/app/Views/dustAndRoughStockDetails.php b/app/Views/dustAndRoughStockDetails.php index 56d4335a..5997ca01 100644 --- a/app/Views/dustAndRoughStockDetails.php +++ b/app/Views/dustAndRoughStockDetails.php @@ -245,15 +245,21 @@ $dustAndRoughStockDetail){ ?> - + format('d-m-Y'); + if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';} + ?> + > + - + $dateInMonth){ ?> - + + > - - - - - - - - - -
$resinStockDetails){ ?> - + format('d-m-Y'); + if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';} + ?> + > $resinStock){ ?> $dateInMonth){ ?> - + format('d-m-Y'); + if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';} + ?> + > $resinMaterial){ ?>