From 93cdd3aa32aaf97801b4a5375ed3b91c3c8a2309 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Thu, 6 Feb 2025 12:17:43 +0530 Subject: [PATCH 1/6] stock module latest today vadivel J 06-02-2025 --- app/Controllers/StockController.php | 71 +++++++++++++++++++++---- app/Models/Rawmaterialdetails_model.php | 26 ++++----- 2 files changed, 71 insertions(+), 26 deletions(-) diff --git a/app/Controllers/StockController.php b/app/Controllers/StockController.php index a864263f..9ee79d98 100644 --- a/app/Controllers/StockController.php +++ b/app/Controllers/StockController.php @@ -624,6 +624,47 @@ class StockController extends BaseController // Bag Stock details starts + + + //custom filterMaterialCode given by user + + //two types of custom filter + + //1) fliter for no data present in db - active and is active is not a concern ..!!(for current month) + // + adding new material in packing material category is not a concern ..!! + // - deleting existing material in packing material category is not a concern ..!! + + //fetch all active material in bag stock then , + // i) if no custom filter option given , all active material code going to be present in filterMaterialCode . + // ii)if custom filter option given , what are all the materials active is going to be filtered among given filterMaterialCode.. + + + //----------------1st part finished----// + + + //2) filter for data present in db -- active and is active is a concern ..!! + // + adding new material category in packing material is a concern ..!! + // - deleting existing material category in packing material is a concern ..!! + + //for second case if already material present in db but deleted in material master means + // i) we need to show the deleted one too for that month . + // ii)check If they add another material in packing material for current month, + // we need to put dummy entry(empty string) and show that as well. + + //wild scenario if user wants to add an new material and its entry in previous month + //i) Hard code database entry after consultation can be entertained..!! + + //-------------- 2nd part finished -----// + + + // Action + + + + + + + public function loadView_bagStockDetails() { @@ -634,15 +675,16 @@ class StockController extends BaseController $formattedDate = $date->format('Y-m'); - $month = $formattedDate; + $month = $formattedDate; - //filterMaterialCode + + $filterMaterialCode = $this->request->getPost('filterMaterialCode'); + $filterMaterialCode = $this->request->getPost('filterMaterialCode'); } else { $month = date('Y-m'); - $filterMaterialCode = ['601529']; } $data = []; @@ -672,7 +714,13 @@ class StockController extends BaseController $startDate = "$month-01"; $endDate = date("Y-m-t", strtotime($startDate)); - $data['bagStockDetails'] = $this->bagStockDetails_model->getBagStockForGivenMonth($startDate , $endDate ,$filterMaterialCode); + $data['bagStockDetails'] = $this->bagStockDetails_model + ->where('date >=', $startDate) + ->where('date <=', $endDate) + ->groupBy(['materialCode', 'date']) + ->orderBy('date', 'asc') + ->orderBy('materialCode', 'asc') + ->findAll(); // Initialize an empty array to hold the grouped data $data['groupedBagStockDetails'] = []; @@ -717,15 +765,20 @@ class StockController extends BaseController // if not get all the material codes from the raw material details table if (!empty($data['groupedBagStockDetails'])) { + $result = $groupedByDate[$date]; - $bagMaterials = $this->rawmaterialdetails_model->getSelectedBagMaterialCode($filterMaterialCode); + $distinctMaterialCodes = []; + + foreach ($result as $index => $eachResult) { + $distinctMaterialCodes[] = $result[$index]['materialCode']; + } + + $bagMaterials = $this->rawmaterialdetails_model->getSelectedBagMaterialCode($distinctMaterialCodes); + } else { - $bagMaterials = $this->rawmaterialdetails_model->getAllBagMaterialCode($filterMaterialCode); + $bagMaterials = $this->rawmaterialdetails_model->getAllBagMaterialCode(); } - - - // getting customer for creating table headers // checking already existing stock if yes then get customer from the existing stock diff --git a/app/Models/Rawmaterialdetails_model.php b/app/Models/Rawmaterialdetails_model.php index b118ac55..105489f7 100755 --- a/app/Models/Rawmaterialdetails_model.php +++ b/app/Models/Rawmaterialdetails_model.php @@ -164,35 +164,27 @@ class Rawmaterialdetails_model extends Model return array_column($materialResults, 'MaterialCode'); } - function getAllBagMaterialCode($filterMaterialCode) + function getAllBagMaterialCode() { + //when no data present for current month we are showing only active materials with filter option $builder = $this->db->table('t_materialmaster') ->select('MaterialCode, MaterialName') ->where('Category', 'Packing Material') - ->where('IsActive', 1); - - - if (!empty($filterMaterialCode)) { - $builder->whereIn('MaterialCode', $filterMaterialCode); - } - - $builder->orderBy('MaterialCode', 'asc'); + ->where('IsActive', 1) + ->orderBy('MaterialCode', 'asc'); $query = $builder->get(); return $query->getResultArray(); } - function getSelectedBagMaterialCode($filterMaterialCode) + function getSelectedBagMaterialCode($distinctMaterialCodes) { + //when data present with whether material is active or not we have to show them with filter option $builder = $this->db->table('t_materialmaster') ->select('MaterialCode, MaterialName') - ->where('Category', 'Packing Material'); - - if (!empty($filterMaterialCode)) { - $builder->whereIn('MaterialCode', $filterMaterialCode); - } - - $builder->orderBy('MaterialCode', 'asc'); + ->where('Category', 'Packing Material') + ->whereIn('MaterialCode', $distinctMaterialCodes) + ->orderBy('MaterialCode', 'asc'); $query = $builder->get(); return $query->getResultArray(); } From 3b69e053bdec38c2ff0da5caee338075898671c0 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Thu, 6 Feb 2025 13:45:45 +0530 Subject: [PATCH 2/6] stock module latest today vadivel J 06-02-2025 --- app/Views/bagStockDetails.php | 15 ++++++--------- app/Views/resinStockDetails.php | 1 + 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/app/Views/bagStockDetails.php b/app/Views/bagStockDetails.php index 697be538..437f9ac3 100644 --- a/app/Views/bagStockDetails.php +++ b/app/Views/bagStockDetails.php @@ -507,7 +507,9 @@ - + $dateInMonth){ ?> @@ -775,6 +771,7 @@ $('#loader').hide(); console.log(data); alert(data); + window.location.reload(); } }, diff --git a/app/Views/resinStockDetails.php b/app/Views/resinStockDetails.php index 3f19bb07..a8112538 100644 --- a/app/Views/resinStockDetails.php +++ b/app/Views/resinStockDetails.php @@ -730,6 +730,7 @@ foreach ($period as $day) { $('#loader').hide(); console.log(data); alert(data); + window.location.reload(); } }, From ffa8a700e18bb2f0c78a5703dc68483adb20d392 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Thu, 6 Feb 2025 14:35:25 +0530 Subject: [PATCH 3/6] Logo change : GWM --- app/Views/driverListing.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Views/driverListing.php b/app/Views/driverListing.php index 2fc60246..f6cb32c8 100755 --- a/app/Views/driverListing.php +++ b/app/Views/driverListing.php @@ -63,8 +63,8 @@     - -     + +     From 3c45042672e8e93b9b29cb9cb06d3295b3e3bd0c Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Thu, 6 Feb 2025 17:28:25 +0530 Subject: [PATCH 4/6] stock module latest today vadivel J 06-02-2025 --- app/Controllers/StockController.php | 148 ++++++++++++++++++++---- app/Views/CoatingMachineDetail.php | 6 +- app/Views/bagStockDetails.php | 10 +- app/Views/dieselStockDetails.php | 10 +- app/Views/drierMachineDetails.php | 8 +- app/Views/dustAndRoughStockDetails.php | 10 +- app/Views/incomingSilicaSandDetails.php | 12 +- app/Views/powerConsumptionDetails.php | 10 +- app/Views/resinStockDetails.php | 10 +- app/Views/trpProductionStockDetails.php | 13 ++- app/Views/trpSandUseStockDetails.php | 13 ++- 11 files changed, 179 insertions(+), 71 deletions(-) diff --git a/app/Controllers/StockController.php b/app/Controllers/StockController.php index 9ee79d98..36356168 100644 --- a/app/Controllers/StockController.php +++ b/app/Controllers/StockController.php @@ -130,19 +130,33 @@ class StockController extends BaseController { if ($this->request->getMethod() === 'POST') { + $month = $this->request->getPost('month'); $date = DateTime::createFromFormat('M-Y', $month); $formattedDate = $date->format('Y-m'); - $month = $formattedDate; + $month = $formattedDate; + + $session = session (); + + $session->set('stock_month',$month); + } else { - $filteredMonth = $this->request->getGet('month'); - $month = $filteredMonth ?? date('Y-m'); + $session = session(); + + $month = $session->get('stock_month'); + + if (empty($month)) { + $month = date('Y-m'); // Default to the current month + } + } + $data['month'] = $month ; + $this->global['pageTitle'] = 'Coating Machine Details '; @@ -181,8 +195,6 @@ class StockController extends BaseController $message3 = ''; $postData = $this->request->getPost(); - $month = $this->request->getGet('month'); - $month = DateTime::createFromFormat('M-Y', $month)->format('Y-m'); $date = $postData['date']; $shift = $postData['shift']; @@ -265,7 +277,7 @@ class StockController extends BaseController // Set flashdata for success message - return redirect()->to("/coatingMachineDetails?month=$month") + return redirect()->to("/coatingMachineDetails") ->with('success', $message1 . " " . $message2 . " " . $message3); } catch (\Exception $error) { $this->db->transRollback(); @@ -284,8 +296,7 @@ class StockController extends BaseController $message3 = ''; $putData = $this->request->getPost(); - $month = $this->request->getGet('month'); - $month = DateTime::createFromFormat('M-Y', $month)->format('Y-m'); + $id = $putData['editCoatingMachineDetailId']; @@ -361,7 +372,7 @@ class StockController extends BaseController // Set flashdata for success message - return redirect()->to("/coatingMachineDetails?month=$month") + return redirect()->to("/coatingMachineDetails") ->with('success', $message1 . " " . $message2 . " " . $message3); } else { throw new \Exception('Failed to update Coating machine details.'); @@ -443,10 +454,23 @@ class StockController extends BaseController $formattedDate = $date->format('Y-m'); $month = $formattedDate; + + $session = session (); + + $session->set('stock_month',$month); + + } else { $remark = $this->request->getVar('remark'); - $month = date('Y-m'); + $session = session(); + + $month = $session->get('stock_month'); + + if (empty($month)) { + $month = date('Y-m'); // Default to the current month + } + } $data['month'] = $month; @@ -677,14 +701,21 @@ class StockController extends BaseController $month = $formattedDate; + $session = session (); + $session->set('stock_month',$month); - $filterMaterialCode = $this->request->getPost('filterMaterialCode'); - - $filterMaterialCode = $this->request->getPost('filterMaterialCode'); } else { - $month = date('Y-m'); + + $session = session(); + + $month = $session->get('stock_month'); + + if (empty($month)) { + $month = date('Y-m'); // Default to the current month + } + } $data = []; @@ -879,8 +910,19 @@ class StockController extends BaseController $formattedDate = $date->format('Y-m'); $month = $formattedDate; + + $session = session (); + + $session->set('stock_month',$month); + } else { - $month = date('Y-m'); + $session = session(); + + $month = $session->get('stock_month'); + + if (empty($month)) { + $month = date('Y-m'); // Default to the current month + } } $data = []; @@ -975,8 +1017,19 @@ class StockController extends BaseController $formattedDate = $date->format('Y-m'); $month = $formattedDate; + + $session = session (); + + $session->set('stock_month',$month); + } else { - $month = date('Y-m'); + $session = session(); + + $month = $session->get('stock_month'); + + if (empty($month)) { + $month = date('Y-m'); // Default to the current month + } } $data = []; @@ -1175,8 +1228,19 @@ class StockController extends BaseController $formattedDate = $date->format('Y-m'); $month = $formattedDate; + + $session = session (); + + $session->set('stock_month',$month); + } else { - $month = date('Y-m'); + $session = session(); + + $month = $session->get('stock_month'); + + if (empty($month)) { + $month = date('Y-m'); // Default to the current month + } } $data = []; @@ -1446,7 +1510,13 @@ class StockController extends BaseController $month = $formattedDate; } else { - $month = date('Y-m'); + $session = session(); + + $month = $session->get('stock_month'); + + if (empty($month)) { + $month = date('Y-m'); // Default to the current month + } } $data = []; @@ -1543,12 +1613,21 @@ class StockController extends BaseController $formattedDate = $date->format('Y-m'); $month = $formattedDate; + + $session = session (); + + $session->set('stock_month',$month); + + } else { - // $month = new DateTime('2024-10-01'); - // $month = $month->format('Y-m'); + $session = session(); - $month = date('Y-m'); + $month = $session->get('stock_month'); + + if (empty($month)) { + $month = date('Y-m'); // Default to the current month + } } @@ -2061,11 +2140,21 @@ class StockController extends BaseController $formattedDate = $date->format('Y-m'); $month = $formattedDate; + + $session = session (); + + $session->set('stock_month',$month); + + } else { - // $month = '2024-12'; + $session = session(); - $month = date('Y-m'); + $month = $session->get('stock_month'); + + if (empty($month)) { + $month = date('Y-m'); // Default to the current month + } } $data = []; @@ -2336,11 +2425,20 @@ class StockController extends BaseController $formattedDate = $date->format('Y-m'); $month = $formattedDate; + + $session = session (); + + $session->set('stock_month',$month); + } else { - // $month = '2025-02'; + $session = session(); - $month = date('Y-m'); + $month = $session->get('stock_month'); + + if (empty($month)) { + $month = date('Y-m'); // Default to the current month + } } $data = []; diff --git a/app/Views/CoatingMachineDetail.php b/app/Views/CoatingMachineDetail.php index 6e356d93..901088a8 100644 --- a/app/Views/CoatingMachineDetail.php +++ b/app/Views/CoatingMachineDetail.php @@ -32,7 +32,7 @@ } .fht-table td:hover { - background-color: #00a65a; + background-color: #50bbd9; color: #ffffff; } @@ -1493,6 +1493,10 @@ let machineOnTime12 = machineOnTimeHr; let machineOffTime12 = machineOffTimeHr; + if(machineOnTime12 == machineOffTime12){ + return `24.00`; + } + let machineOnTime24 = convertTo24Hr(machineOnTime12); let machineOffTime24 = convertTo24Hr(machineOffTime12); diff --git a/app/Views/bagStockDetails.php b/app/Views/bagStockDetails.php index 437f9ac3..7954f9fa 100644 --- a/app/Views/bagStockDetails.php +++ b/app/Views/bagStockDetails.php @@ -18,7 +18,7 @@ } .fht-table td:hover { - background-color: #00a65a; + background-color: #50bbd9; color: #ffffff; } @@ -140,7 +140,7 @@ .celda_encabezado_general { - background-color: #00a65a; + background-color: #50bbd9; border: 1px solid #ccc; color: #ffffff; font-weight: bold; @@ -171,7 +171,7 @@ position: sticky; top: 0; z-index: 20; /* Ensure the entire header stays above table rows */ - background-color: #00a65a; /* Header background color */ + background-color: #50bbd9; /* Header background color */ } .dropdown-menu { @@ -185,7 +185,7 @@ position: sticky; top: 0; z-index: 11; /* Higher than table rows but lower than first column */ - background-color: #00a65a; /* Green background */ + background-color: #50bbd9; /* Green background */ color: #ffffff; border: 1px solid #ddd; padding: 10px; @@ -196,7 +196,7 @@ .fht-table td:nth-child(1) { position: sticky; left: 0; - background-color: #00a65a; + background-color: #50bbd9; z-index: 15; /* Ensures it stays above other cells */ border-right: 2px solid #ddd; color: #ffffff; diff --git a/app/Views/dieselStockDetails.php b/app/Views/dieselStockDetails.php index fc107457..002fc9e8 100644 --- a/app/Views/dieselStockDetails.php +++ b/app/Views/dieselStockDetails.php @@ -18,7 +18,7 @@ } .fht-table td:hover { - background-color: #00a65a; + background-color: #50bbd9; color: #ffffff; } @@ -142,7 +142,7 @@ .celda_encabezado_general { - background-color: #00a65a; + background-color: #50bbd9; border: 1px solid #ccc; color: #ffffff; font-weight: bold; @@ -173,7 +173,7 @@ position: sticky; top: 0; z-index: 20; /* Ensure the entire header stays above table rows */ - background-color: #00a65a; /* Header background color */ + background-color: #50bbd9; /* Header background color */ } .dropdown-menu { @@ -187,7 +187,7 @@ position: sticky; top: 0; z-index: 11; /* Higher than table rows but lower than first column */ - background-color: #00a65a; /* Green background */ + background-color: #50bbd9; /* Green background */ color: #ffffff; border: 1px solid #ddd; padding: 10px; @@ -198,7 +198,7 @@ .fht-table td:nth-child(1) { position: sticky; left: 0; - background-color: #00a65a; + background-color: #50bbd9; z-index: 15; /* Ensures it stays above other cells */ border-right: 2px solid #ddd; color: #ffffff; diff --git a/app/Views/drierMachineDetails.php b/app/Views/drierMachineDetails.php index 1468c6ed..dd0ef391 100644 --- a/app/Views/drierMachineDetails.php +++ b/app/Views/drierMachineDetails.php @@ -23,7 +23,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); } .fht-table td:hover { - background-color: #00a65a; + background-color: #50bbd9; color: #ffffff; } @@ -107,7 +107,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); th.celda_encabezado_general { - background-color: #00a65a; + background-color: #50bbd9; border: 1px solid #ccc; color: #ffffff; font-weight: bold; @@ -188,7 +188,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); .celda_encabezado_general { - background-color: #00a65a; + background-color: #50bbd9; border: 1px solid #ccc; color: #ffffff; font-weight: bold; @@ -218,7 +218,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); position: sticky; top: 0; z-index: 20; /* Ensure the entire header stays above table rows */ - background-color: #00a65a; /* Header background color */ + background-color: #50bbd9; /* Header background color */ } .dropdown-menu { diff --git a/app/Views/dustAndRoughStockDetails.php b/app/Views/dustAndRoughStockDetails.php index 9fbd1d66..333b025a 100644 --- a/app/Views/dustAndRoughStockDetails.php +++ b/app/Views/dustAndRoughStockDetails.php @@ -18,7 +18,7 @@ } .fht-table td:hover { - background-color: #00a65a; + background-color: #50bbd9; color: #ffffff; } @@ -144,7 +144,7 @@ .celda_encabezado_general { - background-color: #00a65a; + background-color: #50bbd9; border: 1px solid #ccc; color: #ffffff; font-weight: bold; @@ -175,7 +175,7 @@ position: sticky; top: 0; z-index: 20; /* Ensure the entire header stays above table rows */ - background-color: #00a65a; /* Header background color */ + background-color: #50bbd9; /* Header background color */ } .dropdown-menu { @@ -189,7 +189,7 @@ position: sticky; top: 0; z-index: 11; /* Higher than table rows but lower than first column */ - background-color: #00a65a; /* Green background */ + background-color: #50bbd9; /* Green background */ color: #ffffff; border: 1px solid #ddd; padding: 10px; @@ -200,7 +200,7 @@ .fht-table td:nth-child(1) { position: sticky; left: 0; - background-color: #00a65a; + background-color: #50bbd9; z-index: 15; /* Ensures it stays above other cells */ border-right: 2px solid #ddd; color: #ffffff; diff --git a/app/Views/incomingSilicaSandDetails.php b/app/Views/incomingSilicaSandDetails.php index 6a0a95e3..c536ff4e 100644 --- a/app/Views/incomingSilicaSandDetails.php +++ b/app/Views/incomingSilicaSandDetails.php @@ -24,7 +24,7 @@ } .fht-table td:hover { - background-color: #00a65a; + background-color: #50bbd9; color: #ffffff; } @@ -107,7 +107,7 @@ .celda_encabezado_general { - background-color: #00a65a; + background-color: #50bbd9; border: 1px solid #ccc; color: #ffffff; font-weight: bold; @@ -187,7 +187,7 @@ position: sticky; left: 0; top: 0; - background-color: #00a65a; + background-color: #50bbd9; z-index: 7!important; border-right: 2px solid #ddd; color: #ffffff; @@ -198,7 +198,7 @@ { position: sticky; left: 0; - background-color: #00a65a; + background-color: #50bbd9; z-index: 2; border-right: 2px solid #ddd; color: #ffffff; @@ -565,12 +565,12 @@ - + - + diff --git a/app/Views/powerConsumptionDetails.php b/app/Views/powerConsumptionDetails.php index 607ed077..3306d3ad 100644 --- a/app/Views/powerConsumptionDetails.php +++ b/app/Views/powerConsumptionDetails.php @@ -18,7 +18,7 @@ } .fht-table td:hover { - background-color: #00a65a; + background-color: #50bbd9; color: #ffffff; } @@ -142,7 +142,7 @@ .celda_encabezado_general { - background-color: #00a65a; + background-color: #50bbd9; border: 1px solid #ccc; color: #ffffff; font-weight: bold; @@ -173,7 +173,7 @@ position: sticky; top: 0; z-index: 20; /* Ensure the entire header stays above table rows */ - background-color: #00a65a; /* Header background color */ + background-color: #50bbd9; /* Header background color */ } .dropdown-menu { @@ -187,7 +187,7 @@ position: sticky; top: 0; z-index: 11; /* Higher than table rows but lower than first column */ - background-color: #00a65a; /* Green background */ + background-color: #50bbd9; /* Green background */ color: #ffffff; border: 1px solid #ddd; padding: 10px; @@ -198,7 +198,7 @@ .fht-table td:nth-child(1) { position: sticky; left: 0; - background-color: #00a65a; + background-color: #50bbd9; z-index: 15; /* Ensures it stays above other cells */ border-right: 2px solid #ddd; color: #ffffff; diff --git a/app/Views/resinStockDetails.php b/app/Views/resinStockDetails.php index a8112538..6f31e9fe 100644 --- a/app/Views/resinStockDetails.php +++ b/app/Views/resinStockDetails.php @@ -18,7 +18,7 @@ } .fht-table td:hover { - background-color: #00a65a; + background-color: #50bbd9; color: #ffffff; } @@ -141,7 +141,7 @@ .celda_encabezado_general { - background-color: #00a65a; + background-color: #50bbd9; border: 1px solid #ccc; color: #ffffff; font-weight: bold; @@ -172,7 +172,7 @@ position: sticky; top: 0; z-index: 20; /* Ensure the entire header stays above table rows */ - background-color: #00a65a; /* Header background color */ + background-color: #50bbd9; /* Header background color */ } .dropdown-menu { @@ -186,7 +186,7 @@ position: sticky; top: 0; z-index: 11; /* Higher than table rows but lower than first column */ - background-color: #00a65a; /* Green background */ + background-color: #50bbd9; /* Green background */ color: #ffffff; border: 1px solid #ddd; padding: 10px; @@ -197,7 +197,7 @@ .fht-table td:nth-child(1) { position: sticky; left: 0; - background-color: #00a65a; + background-color: #50bbd9; z-index: 15; /* Ensures it stays above other cells */ border-right: 2px solid #ddd; color: #ffffff; diff --git a/app/Views/trpProductionStockDetails.php b/app/Views/trpProductionStockDetails.php index be6192cc..41ea3197 100644 --- a/app/Views/trpProductionStockDetails.php +++ b/app/Views/trpProductionStockDetails.php @@ -18,7 +18,7 @@ } .fht-table td:hover { - background-color: #00a65a; + background-color: #50bbd9; color: #ffffff; } @@ -143,7 +143,7 @@ .celda_encabezado_general { - background-color: #00a65a; + background-color: #50bbd9; border: 1px solid #ccc; color: #ffffff; font-weight: bold; @@ -175,7 +175,7 @@ top: 0; z-index: 20; /* Ensure the entire header stays above table rows */ - background-color: #00a65a; + background-color: #50bbd9; /* Header background color */ } @@ -191,11 +191,14 @@ top: 0; z-index: 11; /* Higher than table rows but lower than first column */ - background-color: #00a65a; + background-color: #50bbd9; /* Green background */ color: #ffffff; border: 1px solid #ddd; padding: 10px; + white-space: normal; /* Allows text to wrap */ + word-wrap: break-word; /* Breaks long words if needed */ + text-align: center; /* Centers text for better alignment */ } /* Sticky First Column */ @@ -203,7 +206,7 @@ .fht-table td:nth-child(1) { position: sticky; left: 0; - background-color: #00a65a; + background-color: #50bbd9; z-index: 15; /* Ensures it stays above other cells */ border-right: 2px solid #ddd; diff --git a/app/Views/trpSandUseStockDetails.php b/app/Views/trpSandUseStockDetails.php index 2df367eb..247d7dbe 100644 --- a/app/Views/trpSandUseStockDetails.php +++ b/app/Views/trpSandUseStockDetails.php @@ -18,7 +18,7 @@ } .fht-table td:hover { - background-color: #00a65a; + background-color: #50bbd9; color: #ffffff; } @@ -143,7 +143,7 @@ .celda_encabezado_general { - background-color: #00a65a; + background-color: #50bbd9; border: 1px solid #ccc; color: #ffffff; font-weight: bold; @@ -174,7 +174,7 @@ position: sticky; top: 0; z-index: 20; /* Ensure the entire header stays above table rows */ - background-color: #00a65a; /* Header background color */ + background-color: #50bbd9; /* Header background color */ } .dropdown-menu { @@ -188,10 +188,13 @@ position: sticky; top: 0; z-index: 11; /* Higher than table rows but lower than first column */ - background-color: #00a65a; /* Green background */ + background-color: #50bbd9; /* Green background */ color: #ffffff; border: 1px solid #ddd; padding: 10px; + white-space: normal; /* Allows text to wrap */ + word-wrap: break-word; /* Breaks long words if needed */ + text-align: center; /* Centers text for better alignment */ } /* Sticky First Column */ @@ -199,7 +202,7 @@ .fht-table td:nth-child(1) { position: sticky; left: 0; - background-color: #00a65a; + background-color: #50bbd9; z-index: 15; /* Ensures it stays above other cells */ border-right: 2px solid #ddd; color: #ffffff; From 254a6c0b5157e242d377e54415112a4228434895 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Fri, 7 Feb 2025 10:50:38 +0530 Subject: [PATCH 5/6] stock module latest today vadivel J 07-02-2025 --- app/Views/CoatingMachineDetail.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/Views/CoatingMachineDetail.php b/app/Views/CoatingMachineDetail.php index 901088a8..8ee561ec 100644 --- a/app/Views/CoatingMachineDetail.php +++ b/app/Views/CoatingMachineDetail.php @@ -16,6 +16,17 @@ } + input[type="date"]::-webkit-calendar-picker-indicator { + transform: scale(2.0); + cursor: pointer; + } + + input[type="date"] { + cursor: pointer; + } + + + .fht-table, .fht-table thead, From 337736dd6a2063aa587a2c45ef6572bd05a4cf45 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Fri, 7 Feb 2025 11:35:09 +0530 Subject: [PATCH 6/6] stock module latest today vadivel J 07-02-2025 --- app/Controllers/StockController.php | 22 ++-- .../{ => stock}/CoatingMachineDetail.php | 2 +- app/Views/{ => stock}/bagStockDetails.php | 8 +- app/Views/{ => stock}/dieselStockDetails.php | 8 +- app/Views/{ => stock}/drierMachineDetails.php | 6 +- .../{ => stock}/dustAndRoughStockDetails.php | 8 +- app/Views/{ => stock}/gasStockDetails.php | 103 ++++++++++++++---- .../{ => stock}/incomingSilicaSandDetails.php | 9 +- .../{ => stock}/powerConsumptionDetails.php | 8 +- app/Views/{ => stock}/resinStockDetails.php | 8 +- .../{ => stock}/trpProductionStockDetails.php | 8 +- .../{ => stock}/trpSandUseStockDetails.php | 8 +- 12 files changed, 135 insertions(+), 63 deletions(-) rename app/Views/{ => stock}/CoatingMachineDetail.php (99%) rename app/Views/{ => stock}/bagStockDetails.php (99%) rename app/Views/{ => stock}/dieselStockDetails.php (99%) rename app/Views/{ => stock}/drierMachineDetails.php (99%) rename app/Views/{ => stock}/dustAndRoughStockDetails.php (99%) rename app/Views/{ => stock}/gasStockDetails.php (95%) rename app/Views/{ => stock}/incomingSilicaSandDetails.php (99%) rename app/Views/{ => stock}/powerConsumptionDetails.php (99%) rename app/Views/{ => stock}/resinStockDetails.php (99%) rename app/Views/{ => stock}/trpProductionStockDetails.php (99%) rename app/Views/{ => stock}/trpSandUseStockDetails.php (99%) diff --git a/app/Controllers/StockController.php b/app/Controllers/StockController.php index 36356168..3dc91d30 100644 --- a/app/Controllers/StockController.php +++ b/app/Controllers/StockController.php @@ -185,7 +185,7 @@ class StockController extends BaseController $data['month'] = $formattedDate; - return $this->loadViews("CoatingMachineDetail", $this->global, $data, NULL); + return $this->loadViews("stock/CoatingMachineDetail", $this->global, $data, NULL); } public function addNewCoatingMachineDetails() @@ -513,7 +513,7 @@ class StockController extends BaseController $data['remark'] = $remark; - return $this->loadViews("incomingSilicaSandDetails", $this->global, $data, NULL); + return $this->loadViews("stock/incomingSilicaSandDetails", $this->global, $data, NULL); } public function updateIncomingSilicaSandDetails() @@ -836,7 +836,7 @@ class StockController extends BaseController $data['month'] = $formattedDate; - return $this->loadViews("bagStockDetails", $this->global, $data, NULL); + return $this->loadViews("stock/bagStockDetails", $this->global, $data, NULL); } public function updateBagStockDetails() @@ -945,7 +945,7 @@ class StockController extends BaseController $data['month'] = $formattedDate; - return $this->loadViews("dustAndRoughStockDetails", $this->global, $data, NULL); + return $this->loadViews("stock/dustAndRoughStockDetails", $this->global, $data, NULL); } public function updateDustAndRoughStockDetails() @@ -1149,7 +1149,7 @@ class StockController extends BaseController $data['month'] = $formattedDate; - return $this->loadViews("resinStockDetails", $this->global, $data, NULL); + return $this->loadViews("stock/resinStockDetails", $this->global, $data, NULL); } public function updateResinStockDetails() @@ -1306,7 +1306,7 @@ class StockController extends BaseController $data['month'] = DateTime::createFromFormat('Y-m', $month)->format('M-Y'); - return $this->loadViews("gasStockDetails", $this->global, $data, NULL); + return $this->loadViews("stock/gasStockDetails", $this->global, $data, NULL); } public function updateGasStockDetails() @@ -1539,7 +1539,7 @@ class StockController extends BaseController $data['month'] = $formattedDate; - return $this->loadViews("trpSandUseStockDetails", $this->global, $data, NULL); + return $this->loadViews("stock/trpSandUseStockDetails", $this->global, $data, NULL); } @@ -1677,7 +1677,7 @@ class StockController extends BaseController // return $this->response->setJSON($data); - return $this->loadViews("trpProductionStockDetails", $this->global, $data, NULL); + return $this->loadViews("stock/trpProductionStockDetails", $this->global, $data, NULL); @@ -1988,7 +1988,7 @@ class StockController extends BaseController $data['datefordropdown'] = $currentMonth; $this->global['pageTitle'] = 'Drier Details'; - $this->loadViews("drierMachineDetails", $this->global, $data, NULL); + $this->loadViews("stock/drierMachineDetails", $this->global, $data, NULL); } @@ -2288,7 +2288,7 @@ class StockController extends BaseController // return $this->response->setJSON(['status' =>'success' ,'message' => $data['electricMachines']]); - return $this->loadViews("powerConsumptionDetails", $this->global, $data, NULL); + return $this->loadViews("stock/powerConsumptionDetails", $this->global, $data, NULL); } @@ -2578,7 +2578,7 @@ class StockController extends BaseController // return $this->response->setJSON(['status' =>'success' ,'message' => $data['dieselMachines']]); - return $this->loadViews("dieselStockDetails", $this->global, $data, NULL); + return $this->loadViews("stock/dieselStockDetails", $this->global, $data, NULL); diff --git a/app/Views/CoatingMachineDetail.php b/app/Views/stock/CoatingMachineDetail.php similarity index 99% rename from app/Views/CoatingMachineDetail.php rename to app/Views/stock/CoatingMachineDetail.php index 8ee561ec..f9e667b6 100644 --- a/app/Views/CoatingMachineDetail.php +++ b/app/Views/stock/CoatingMachineDetail.php @@ -226,7 +226,7 @@ .table-responsive { overflow-y: auto; - max-height: 450px; + max-height: 500px; } .fht-table thead th { diff --git a/app/Views/bagStockDetails.php b/app/Views/stock/bagStockDetails.php similarity index 99% rename from app/Views/bagStockDetails.php rename to app/Views/stock/bagStockDetails.php index 7954f9fa..37ded70e 100644 --- a/app/Views/bagStockDetails.php +++ b/app/Views/stock/bagStockDetails.php @@ -206,7 +206,7 @@ .table-responsive { overflow-x: auto; overflow-y: auto; - max-height: 450px; /* Adjust as needed */ + max-height: 500px; /* Adjust as needed */ position: relative; } @@ -597,9 +597,11 @@ +
+
-
- +
+
diff --git a/app/Views/dieselStockDetails.php b/app/Views/stock/dieselStockDetails.php similarity index 99% rename from app/Views/dieselStockDetails.php rename to app/Views/stock/dieselStockDetails.php index 002fc9e8..5723bb21 100644 --- a/app/Views/dieselStockDetails.php +++ b/app/Views/stock/dieselStockDetails.php @@ -208,7 +208,7 @@ .table-responsive { overflow-x: auto; overflow-y: auto; - max-height: 450px; /* Adjust as needed */ + max-height: 500px; /* Adjust as needed */ position: relative; } @@ -759,9 +759,11 @@ foreach ($period as $day) {
+
+
-
- +
+
diff --git a/app/Views/drierMachineDetails.php b/app/Views/stock/drierMachineDetails.php similarity index 99% rename from app/Views/drierMachineDetails.php rename to app/Views/stock/drierMachineDetails.php index dd0ef391..c3832415 100644 --- a/app/Views/drierMachineDetails.php +++ b/app/Views/stock/drierMachineDetails.php @@ -259,7 +259,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); .table-responsive { overflow-x: auto; overflow-y: auto; - max-height: 450px; /* Adjust as needed */ + max-height: 500px; /* Adjust as needed */ position: relative; } @@ -604,8 +604,8 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
-
- +
+
diff --git a/app/Views/dustAndRoughStockDetails.php b/app/Views/stock/dustAndRoughStockDetails.php similarity index 99% rename from app/Views/dustAndRoughStockDetails.php rename to app/Views/stock/dustAndRoughStockDetails.php index 333b025a..5f643495 100644 --- a/app/Views/dustAndRoughStockDetails.php +++ b/app/Views/stock/dustAndRoughStockDetails.php @@ -210,7 +210,7 @@ .table-responsive { overflow-x: auto; overflow-y: auto; - max-height: 450px; /* Adjust as needed */ + max-height: 500px; /* Adjust as needed */ position: relative; } @@ -459,9 +459,11 @@
+
+
-
- +
+
diff --git a/app/Views/gasStockDetails.php b/app/Views/stock/gasStockDetails.php similarity index 95% rename from app/Views/gasStockDetails.php rename to app/Views/stock/gasStockDetails.php index c5fe15ab..cb2accc2 100644 --- a/app/Views/gasStockDetails.php +++ b/app/Views/stock/gasStockDetails.php @@ -18,7 +18,7 @@ } .fht-table td:hover { - background-color: #00a65a; + background-color: #50bbd9; color: #ffffff; } @@ -99,15 +99,6 @@ width: 100%; } - - .celda_encabezado_general { - background-color: #00a65a; - border: 1px solid #ccc; - color: #ffffff; - font-weight: bold; - padding: 6px 10px;; - text-align: center; - } ._Separador { @@ -122,13 +113,7 @@ width: 4px; } - .celda_normal { - /*background-color: #fff;*/ - /* */ - text-align: center; - border: 1px solid #ccc; - padding: 2px 4px; - } + /*style excel*/ .excel_cell { @@ -156,17 +141,84 @@ height: 20px; } - #gasStockDetailsTableId th:nth-child(1), - #gasStockDetailsTableId td:nth-child(1) - { + .celda_encabezado_general { + background-color: #50bbd9; + border: 1px solid #ccc; + color: #ffffff; + font-weight: bold; + padding: 6px 10px; + text-align: center; + } + + .celda_encabezado_total { + background-color:#ffffff !important; + border: 1px solid #ffffff; + color: #ffffff !important; + font-weight: bold; + padding: 6px 10px; + text-align: center; + } + + .celda_normal { + /*background-color: #fff;*/ + /* */ + text-align: center; + border: 1px solid #ccc; + padding: 10px 6px; + } + + + /* Make entire thead sticky */ + .fht-table thead { + position: sticky; + top: 0; + z-index: 20; /* Ensure the entire header stays above table rows */ + background-color: #50bbd9; /* Header background color */ + } + + .dropdown-menu { + z-index :25 ; + } + + + + /* Ensure each in thead stays sticky */ + .fht-table thead th { + position: sticky; + top: 0; + z-index: 11; /* Higher than table rows but lower than first column */ + background-color: #50bbd9; /* Green background */ + color: #ffffff; + border: 1px solid #ddd; + padding: 10px; + } + + /* Sticky First Column */ + .fht-table th:nth-child(1), + .fht-table td:nth-child(1) { position: sticky; left: 0; - background-color: #00a65a; - z-index: 2; + background-color: #50bbd9; + z-index: 15; /* Ensures it stays above other cells */ border-right: 2px solid #ddd; color: #ffffff; } + /* Table Wrapper for Scrolling */ + .table-responsive { + overflow-x: auto; + overflow-y: auto; + max-height: 500px; /* Adjust as needed */ + position: relative; + } + + td{ + min-width: 100px; + max-width: 100px; + } + + +
@@ -440,10 +492,13 @@
+
+ +
-
- +
+
diff --git a/app/Views/incomingSilicaSandDetails.php b/app/Views/stock/incomingSilicaSandDetails.php similarity index 99% rename from app/Views/incomingSilicaSandDetails.php rename to app/Views/stock/incomingSilicaSandDetails.php index c536ff4e..0526be34 100644 --- a/app/Views/incomingSilicaSandDetails.php +++ b/app/Views/stock/incomingSilicaSandDetails.php @@ -115,6 +115,7 @@ text-align: center; min-width: 120px; max-width: 120px; + } .celda_encabezado_total { @@ -206,7 +207,7 @@ .table-responsive { overflow-y: auto; - max-height: 450px; + max-height: 500px; } .fht-table thead th { @@ -742,9 +743,11 @@ +
+
-
- +
+
diff --git a/app/Views/powerConsumptionDetails.php b/app/Views/stock/powerConsumptionDetails.php similarity index 99% rename from app/Views/powerConsumptionDetails.php rename to app/Views/stock/powerConsumptionDetails.php index 3306d3ad..c4967b95 100644 --- a/app/Views/powerConsumptionDetails.php +++ b/app/Views/stock/powerConsumptionDetails.php @@ -208,7 +208,7 @@ .table-responsive { overflow-x: auto; overflow-y: auto; - max-height: 450px; /* Adjust as needed */ + max-height: 500px; /* Adjust as needed */ position: relative; } @@ -814,9 +814,11 @@ foreach ($period as $day) {
+
+
-
- +
+
diff --git a/app/Views/resinStockDetails.php b/app/Views/stock/resinStockDetails.php similarity index 99% rename from app/Views/resinStockDetails.php rename to app/Views/stock/resinStockDetails.php index 6f31e9fe..da4ea4dd 100644 --- a/app/Views/resinStockDetails.php +++ b/app/Views/stock/resinStockDetails.php @@ -207,7 +207,7 @@ .table-responsive { overflow-x: auto; overflow-y: auto; - max-height: 450px; /* Adjust as needed */ + max-height: 500px; /* Adjust as needed */ position: relative; } @@ -564,9 +564,11 @@ foreach ($period as $day) {
+
+
-
- +
+
diff --git a/app/Views/trpProductionStockDetails.php b/app/Views/stock/trpProductionStockDetails.php similarity index 99% rename from app/Views/trpProductionStockDetails.php rename to app/Views/stock/trpProductionStockDetails.php index 41ea3197..8ce8c37c 100644 --- a/app/Views/trpProductionStockDetails.php +++ b/app/Views/stock/trpProductionStockDetails.php @@ -217,7 +217,7 @@ .table-responsive { overflow-x: auto; overflow-y: auto; - max-height: 450px; + max-height: 500px; /* Adjust as needed */ position: relative; } @@ -1518,9 +1518,11 @@ $timeOtions[] = "12:00 AM"; +
+
-
- +
+
diff --git a/app/Views/trpSandUseStockDetails.php b/app/Views/stock/trpSandUseStockDetails.php similarity index 99% rename from app/Views/trpSandUseStockDetails.php rename to app/Views/stock/trpSandUseStockDetails.php index 247d7dbe..dd204086 100644 --- a/app/Views/trpSandUseStockDetails.php +++ b/app/Views/stock/trpSandUseStockDetails.php @@ -212,7 +212,7 @@ .table-responsive { overflow-x: auto; overflow-y: auto; - max-height: 450px; /* Adjust as needed */ + max-height: 500px; /* Adjust as needed */ position: relative; } @@ -491,9 +491,11 @@
+
+
-
- +
+