From 3e7a903cc010c583865dee78e7c8764b9cf88e0a Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Fri, 28 Mar 2025 17:38:58 +0530 Subject: [PATCH] stock module - 28-03-2025 --- app/Views/stock/CoatingMachineDetail.php | 1990 +++++++------- app/Views/stock/bagStockDetails.php | 1441 +++++------ app/Views/stock/dieselStockDetails.php | 1377 +++++----- app/Views/stock/drierMachineDetails.php | 1644 ++++++------ app/Views/stock/dustAndRoughStockDetails.php | 854 +++--- app/Views/stock/gasStockDetails.php | 1387 +++++----- app/Views/stock/incomingSilicaSandDetails.php | 2304 +++++++++-------- app/Views/stock/powerConsumptionDetails.php | 205 +- app/Views/stock/resinStockDetails.php | 171 +- app/Views/stock/trpProductionStockDetails.php | 171 +- app/Views/stock/trpSandUseStockDetails.php | 1020 ++++---- 11 files changed, 6557 insertions(+), 6007 deletions(-) diff --git a/app/Views/stock/CoatingMachineDetail.php b/app/Views/stock/CoatingMachineDetail.php index d1a6aee7..2305db33 100644 --- a/app/Views/stock/CoatingMachineDetail.php +++ b/app/Views/stock/CoatingMachineDetail.php @@ -17,7 +17,7 @@ input[type="date"]::-webkit-calendar-picker-indicator { - transform: scale(2.0); + transform: scale(2.0); cursor: pointer; } @@ -43,15 +43,17 @@ } .fht-table td:hover { - background-color: rgb(170, 222, 167); - color:rgb(2, 2, 2); - transform: scale(1.25); /* Increases size by 25% */ - transition: transform 0.5s ease-in-out; /* Smooth scaling effect */ + background-color: rgb(170, 222, 167); + color: rgb(2, 2, 2); + transform: scale(1.25); + /* Increases size by 25% */ + transition: transform 0.5s ease-in-out; + /* Smooth scaling effect */ } .fht-table tr:hover { - background-color: rgb(170, 222, 167); - color:rgb(2, 2, 2); + background-color: rgb(170, 222, 167); + color: rgb(2, 2, 2); } .fht-table { @@ -133,7 +135,8 @@ .celda_encabezado_general { - background-color:rgb(80, 187, 217); /* blue background */ + background-color: rgb(80, 187, 217); + /* blue background */ border: 1px solid #ccc; color: #ffffff; font-weight: bold; @@ -141,14 +144,18 @@ text-align: center; min-width: 120px; max-width: 120px; - white-space: normal; /* Allows text to wrap */ - word-wrap: break-word; /* Breaks long words if needed */ - text-align: center; /* Centers text for better alignment */ - max-width: 150px; /* Set a max width to control wrapping */ + white-space: normal; + /* Allows text to wrap */ + word-wrap: break-word; + /* Breaks long words if needed */ + text-align: center; + /* Centers text for better alignment */ + max-width: 150px; + /* Set a max width to control wrapping */ } .celda_encabezado_total { - background-color:#ffffff; + background-color: #ffffff; border: 1px solid white; color: #ffffff; font-weight: bold; @@ -208,27 +215,27 @@ .fht-table th:nth-child(1), - .fht-table th:nth-child(1) - { + .fht-table th:nth-child(1) { position: sticky; left: 0; top: 0; - background-color:rgb(80, 187, 217); /* blue background */ - z-index: 7!important; - border-right: 2px solid #ddd; + background-color: rgb(80, 187, 217); + /* blue background */ + z-index: 7 !important; + border-right: 2px solid #ddd; color: #ffffff; } - .fht-table td:nth-child(1) - { + .fht-table td:nth-child(1) { position: sticky; left: 0; - background-color:rgb(80, 187, 217); /* blue background */ + background-color: rgb(80, 187, 217); + /* blue background */ z-index: 2; - border-right: 2px solid #ddd; + border-right: 2px solid #ddd; color: #ffffff; - + } .table-responsive { @@ -240,39 +247,59 @@ } /* Adjust heights based on screen zoom */ - @media only screen and (min-height: 1400px) { /* Approximate Zoom < 100% */ - .table-responsive { max-height: 425px; } + @media only screen and (min-height: 1400px) { + + /* Approximate Zoom < 100% */ + .table-responsive { + max-height: 425px; + } } - @media only screen and (min-height: 1200px) { /* Approximate Zoom ~ 90% */ - .table-responsive { max-height: 500px; } + @media only screen and (min-height: 1200px) { + + /* Approximate Zoom ~ 90% */ + .table-responsive { + max-height: 500px; + } } - @media only screen and (min-height: 1000px) { /* Approximate Zoom ~ 80% */ - .table-responsive { max-height: 600px; } + @media only screen and (min-height: 1000px) { + + /* Approximate Zoom ~ 80% */ + .table-responsive { + max-height: 600px; + } } - @media only screen and (min-height: 800px) { /* Approximate Zoom ~ 75% */ - .table-responsive { max-height: 650px; } + @media only screen and (min-height: 800px) { + + /* Approximate Zoom ~ 75% */ + .table-responsive { + max-height: 650px; + } } .fht-table thead th { position: sticky; top: 0; - z-index: 5!important; + z-index: 5 !important; } tfoot tr { - background-color:rgb(235, 236, 203); + background-color: rgb(235, 236, 203); } - body[data-layout-mode = horizontal] .container-fluid{ + body[data-layout-mode=horizontal] .container-fluid { max-width: 100%; } - .card-body{ padding-bottom: 0;} - .card{ margin-bottom: 5px;} + .card-body { + padding-bottom: 0; + } + .card { + margin-bottom: 5px; + }
@@ -294,7 +321,7 @@
-
+
+ + + + + + + + +
- - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -414,11 +954,11 @@ if (!empty($coatingMachineDetails)) { - $summary = [] ; + $summary = []; foreach ($coatingMachineDetails as $record) { - $batchCardFiles =json_decode($record['batchcard_files'],true); + $batchCardFiles = json_decode($record['batchcard_files'], true); ?> format('d-m-Y'); ?> - + - + - + - + - + - + - + - + - + - + - + - + - - - - + - - - - - - - - - - - - - - - - - - - - - + if (!isset($summary['totalCoating'])) { + $summary['totalMachineRunningHrs'] = 0; + $summary['totalCoating'] = 0; + $summary['totalCoatingSandInKg'] = 0; + $summary['totalGasConsumption'] = 0; + $summary['perHourGasConsumption'] = 0; + $summary['perHourCoatingSandQTY'] = 0; + } + + + $summary['totalMachineRunningHrs'] += $record['machineRunningInHrs'] == "-" ? 0 : (float) $record['machineRunningInHrs']; + $summary['totalCoating'] += $record['totalCoating'] == "-" ? 0 : (float) $record['totalCoating']; + $summary['totalCoatingSandInKg'] += $record['totalCoatingSandInKg'] == "-" ? 0 : (float) $record['totalCoatingSandInKg']; + $summary['totalGasConsumption'] += $record['totalGasConsumption'] == "-" ? 0 : (float) $record['totalGasConsumption']; + $summary['perHourGasConsumption'] += $record['perHourGasConsumption'] == "-" ? 0 : (float) $record['perHourGasConsumption']; + $summary['perHourCoatingSandQTY'] += $record['perHourCoatingSandQTY'] == "-" ? 0 : (float) $record['perHourCoatingSandQTY']; + } ?> + + + + + + + + + + + + + + + + + - - -
DateShiftMachine On TimeMachine Off TimeMachine Running(hr)Customer NameGradeTotal CoatingTotal Coating Sand(kg)Total Gas ConsumptionHour GasHour QTY(kg)ActionDateShiftMachine On TimeMachine Off TimeMachine Running(hr)Customer NameGradeTotal CoatingTotal Coating Sand(kg)Total Gas ConsumptionHour GasHour QTY(kg)Action
+ + + - $files) { - if ($index === 0 && !empty($files['batchCardId']) && $files['coating_id'] == $record['id']) - { - ?> - + $files) { + if ($index === 0 && !empty($files['batchCardId']) && $files['coating_id'] == $record['id']) { + ?> + -
- Total - - - - - - (avg) (avg)
+ Total + - - - - - (avg) (avg)
-
- -
- No Coating Machine Details present in this month -
- + + + + +
-
- - - +
+ +
+ No Coating Machine Details present in this month +
+ + + + + + - + + - - - - - - - - @@ -1156,78 +1252,6 @@ - - @@ -1269,7 +1293,7 @@ $('#machineOffTimeHrId ').select2(); $('#editMachineOnTimeHrId ').select2(); $('#editMachineOffTimeHrId ').select2(); - $('#fromDateFilter ').select2(); + $('#fromDateFilter ').select2(); $('#toDateFilter ').select2(); }); @@ -1287,34 +1311,34 @@ // Get values from the row - var date = row.find('td:eq(0)').text().split('-'); + var date = row.find('td:eq(0)').text().split('-'); date = `${date[2]}-${date[1]}-${date[0]}`; - var shift = row.find('td:eq(1)').text(); - var machineOnTimeHr = row.find('td:eq(2)').text(); - var machineOffTimeHr = row.find('td:eq(3)').text(); - var machineRunningInHrs = row.find('td:eq(4)').text(); - var customerName = row.find('td:eq(5)').text(); - var grade = row.find('td:eq(6)').text(); - var totalCoating = row.find('td:eq(7)').text(); - var totalCoatingSandInKg = row.find('td:eq(8)').text(); - var totalGasConsumption = row.find('td:eq(9)').text(); + var shift = row.find('td:eq(1)').text(); + var machineOnTimeHr = row.find('td:eq(2)').text(); + var machineOffTimeHr = row.find('td:eq(3)').text(); + var machineRunningInHrs = row.find('td:eq(4)').text(); + var customerName = row.find('td:eq(5)').text(); + var grade = row.find('td:eq(6)').text(); + var totalCoating = row.find('td:eq(7)').text(); + var totalCoatingSandInKg = row.find('td:eq(8)').text(); + var totalGasConsumption = row.find('td:eq(9)').text(); var perHourGasConsumption = row.find('td:eq(10)').text(); var perHourCoatingSandQTY = row.find('td:eq(11)').text(); - var batchCards = row.find('td:eq(13)').text().trim(); + var batchCards = row.find('td:eq(13)').text().trim(); JSON.parse(batchCards).map(element => { - if(!element.client_given_name){ + if (!element.client_given_name) { console.log("filename null") return; } let fileCount = $('.editBatchFile').length; // Count existing batch files - if (fileCount >= 5) { - return; - } + if (fileCount >= 5) { + return; + } let string = `
@@ -1324,9 +1348,9 @@
`; - $('#editBatchCardRowId').append(string) + $('#editBatchCardRowId').append(string) }); - + // Fill the modal fields with the values @@ -1339,7 +1363,7 @@ $('#editShiftId').val(shift); $('#editMachineOnTimeHrId').val(machineOnTimeHr).change(); $('#editMachineOffTimeHrId').val(machineOffTimeHr).change(); - $('#editGradeId').val(grade); + $('#editGradeId').val(grade); $('#editTotalCoatingId').val(totalCoating); $('#editTotalCoatingSandId').val(totalCoatingSandInKg); $('#editTotalGasConsumptionId').val(totalGasConsumption); @@ -1357,13 +1381,11 @@ @@ -1558,7 +1580,7 @@ let machineOnTime12 = machineOnTimeHr; let machineOffTime12 = machineOffTimeHr; - if(machineOnTime12 == machineOffTime12){ + if (machineOnTime12 == machineOffTime12) { return `24.00`; } @@ -1605,117 +1627,117 @@ - - - - + + + + + + + + + + + - + \ No newline at end of file + + + diff --git a/app/Views/stock/bagStockDetails.php b/app/Views/stock/bagStockDetails.php index 0f69b107..f819e15e 100644 --- a/app/Views/stock/bagStockDetails.php +++ b/app/Views/stock/bagStockDetails.php @@ -14,11 +14,13 @@ } .grab { - cursor: grab; /* Default open-hand cursor */ + cursor: grab; + /* Default open-hand cursor */ } .grab:active { - cursor: grabbing; /* Closed-hand cursor when dragging */ + cursor: grabbing; + /* Closed-hand cursor when dragging */ } .fht-table td { @@ -26,15 +28,17 @@ } .fht-table td:hover { - background-color: rgb(170, 222, 167); - color:rgb(2, 2, 2); - transform: scale(1.25); /* Increases size by 25% */ - transition: transform 0.5s ease-in-out; /* Smooth scaling effect */ + background-color: rgb(170, 222, 167); + color: rgb(2, 2, 2); + transform: scale(1.25); + /* Increases size by 25% */ + transition: transform 0.5s ease-in-out; + /* Smooth scaling effect */ } .fht-table tr:hover { - background-color: rgb(170, 222, 167); - color:rgb(2, 2, 2); + background-color: rgb(170, 222, 167); + color: rgb(2, 2, 2); } .fht-table { @@ -166,14 +170,14 @@ } .celda_encabezado_total { - background-color:#ffffff !important; + 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;*/ /* */ @@ -187,12 +191,14 @@ .fht-table thead { position: sticky; top: 0; - z-index: 20; /* Ensure the entire header stays above table rows */ - background-color: #50bbd9; /* Header background color */ + z-index: 20; + /* Ensure the entire header stays above table rows */ + background-color: #50bbd9; + /* Header background color */ } - .dropdown-menu { - z-index :25 ; + .dropdown-menu { + z-index: 25; } @@ -201,14 +207,19 @@ .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 */ + 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; - white-space: normal; /* Allows text to wrap */ - word-wrap: break-word; /* Breaks long words if needed */ - text-align: center; /* Centers text for better alignment */ + 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 */ @@ -217,7 +228,8 @@ position: sticky; left: 0; background-color: #50bbd9; - z-index: 15; /* Ensures it stays above other cells */ + z-index: 15; + /* Ensures it stays above other cells */ border-right: 2px solid #ddd; color: #ffffff; } @@ -232,9 +244,9 @@ } - td{ - min-width: 100px; - max-width: 100px; + td { + min-width: 100px; + max-width: 100px; } @@ -245,45 +257,45 @@ tfoot tr { - background-color:rgb(235, 236, 203); + background-color: rgb(235, 236, 203); } - body[data-layout-mode = horizontal] .container-fluid{ + body[data-layout-mode=horizontal] .container-fluid { max-width: 100%; } - .card-body{ - padding-top : 0; + + .card-body { + padding-top: 0; padding-bottom: 0; } - .card{ margin-bottom: 5px;} - - - + .card { + margin-bottom: 5px; + } - modify('first day of this month')->format('Y-m-d'); - $endDate = $date->modify('last day of this month')->format('Y-m-d'); +$startDate = $date->modify('first day of this month')->format('Y-m-d'); +$endDate = $date->modify('last day of this month')->format('Y-m-d'); - $datesInMonth = []; +$datesInMonth = []; - $period = new DatePeriod( - new DateTime($startDate), - new DateInterval('P1D'), - (new DateTime($endDate))->modify('+1 day') - ); +$period = new DatePeriod( + new DateTime($startDate), + new DateInterval('P1D'), + (new DateTime($endDate))->modify('+1 day') +); - foreach ($period as $day) { - $datesInMonth[] = $day->format('Y-m-d'); - } +foreach ($period as $day) { + $datesInMonth[] = $day->format('Y-m-d'); +} - ?> +?>
@@ -317,486 +329,483 @@
-
-
+
" - class="form-control mt-2" - style="z-index:30;" readonly> -
+ class="form-control mt-2" + style="z-index:30;" readonly> +
- -
- + + - - - - - - - - - + + + title="Customize" + data-target="#customizeModalId" + data-toggle="modal"> + - - + + + + + + + + + + + + + + - - - -
-
- - +
+ +
- - + -
-
+
- - " > + + "> - + + + + + +
- + - - - - - + + + + - + - - + + - - + - - + + - - - - - - - - - - + + + + + + + + + + - + - + - $bagStockDetails){ + $summary = []; - ?> - $bagStockDetails) { - format('d-m-Y'); - if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';} ?> - > - $bagStock){ ?> - - format('d-m-Y'); - ?> - - - - - - - - - - - - - - - - - "-" , - 'receipt' => 0 , - 'used' => 0 , - 'balanceStock' => 0 , - ]; - } - - // Sum values for the material - - $summary[$materialCode]['opening'] = "-" ; - $summary[$materialCode]['receipt'] += is_numeric( $bagStock['receipt']) ? $bagStock['receipt'] : 0 ; - $summary[$materialCode]['used'] += is_numeric( $bagStock['used']) ? $bagStock['used'] : 0 ; - $summary[$materialCode]['balanceStock'] = is_numeric( $bagStock['balanceStock']) ? $bagStock['balanceStock'] : 0 ; - - - } ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - $dateInMonth){ ?> - format('d-m-Y'); - if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';} + $dateInMonthDmYFormat = DateTime::createFromFormat('Y-m-d', $bagStockDetails[0]['date'])->format('d-m-Y'); + if ($dateInMonthDmYFormat === $currentDate) { + echo 'style="background: #cef0ad;"'; + } + ?>> + $bagStock) { ?> + + format('d-m-Y'); + ?> + + - ?> - > - $bagMaterial){ ?> - - - - format('d-m-Y'); - ?> - - - - + - - - + data-id="" + oninput="receiptStockChange(this)" + contenteditable="true"> + + - + - - - - - - + "-", + 'receipt' => 0, + 'used' => 0, + 'balanceStock' => 0, + ]; + } + + // Sum values for the material + + $summary[$materialCode]['opening'] = "-"; + $summary[$materialCode]['receipt'] += is_numeric($bagStock['receipt']) ? $bagStock['receipt'] : 0; + $summary[$materialCode]['used'] += is_numeric($bagStock['used']) ? $bagStock['used'] : 0; + $summary[$materialCode]['balanceStock'] = is_numeric($bagStock['balanceStock']) ? $bagStock['balanceStock'] : 0; + } ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + $dateInMonth) { ?> + format('d-m-Y'); + if ($dateInMonthDmYFormat === $currentDate) { + echo 'style="background: #cef0ad;"'; + } + + ?>> + $bagMaterial) { ?> + + + + format('d-m-Y'); + ?> + + + + + + + + + + + + + + + + + + + + + + +
Material - + Material +
Customer Customer - + +
Date
Date Opening StockReceiptUsedBalance StockOpening StockReceiptUsedBalance Stock
- - - - - oninput="openingStockChange(this)" - contenteditable="true" - - - > - - - - - - -
- Total -
+ + - - + + - - oninput="openingStockChange(this)" - contenteditable="true" - + data-id=" " - > - - $previousMonthBagStockDetail) - { - if($previousMonthBagStockDetail['materialCode'] == $bagMaterial['MaterialCode']){ - echo $previousMonthBagStockDetail['balanceStock'] ; - break; - } - - } - ?> - + + oninput="openingStockChange(this)" + contenteditable="true" + > + + - $previousMonthBagStockDetail) - { - if($previousMonthBagStockDetail['materialCode'] == $bagMaterial['MaterialCode']){ - echo $previousMonthBagStockDetail['balanceStock'] ; - break; - } - - } - ?> + data-id=" "> +
+ Total +
+ + + + oninput="openingStockChange(this)" + contenteditable="true" + + > + + $previousMonthBagStockDetail) { + if ($previousMonthBagStockDetail['materialCode'] == $bagMaterial['MaterialCode']) { + echo $previousMonthBagStockDetail['balanceStock']; + break; + } + } + ?> + + + $previousMonthBagStockDetail) { + if ($previousMonthBagStockDetail['materialCode'] == $bagMaterial['MaterialCode']) { + echo $previousMonthBagStockDetail['balanceStock']; + break; + } + } + ?> +
@@ -813,65 +822,15 @@ -
- -
-
- - -
-
- - - - - -
-
- - -
-
-
- -
- - -/.modal --> - - - - - + + + \ No newline at end of file diff --git a/app/Views/stock/dieselStockDetails.php b/app/Views/stock/dieselStockDetails.php index 030c536e..1999e936 100644 --- a/app/Views/stock/dieselStockDetails.php +++ b/app/Views/stock/dieselStockDetails.php @@ -5,11 +5,13 @@ .grab { - cursor: grab; /* Default open-hand cursor */ + cursor: grab; + /* Default open-hand cursor */ } .grab:active { - cursor: grabbing; /* Closed-hand cursor when dragging */ + cursor: grabbing; + /* Closed-hand cursor when dragging */ } .fht-table, @@ -27,15 +29,17 @@ } .fht-table td:hover { - background-color: rgb(170, 222, 167); - color:rgb(2, 2, 2); - transform: scale(1.25); /* Increases size by 25% */ - transition: transform 0.5s ease-in-out; /* Smooth scaling effect */ + background-color: rgb(170, 222, 167); + color: rgb(2, 2, 2); + transform: scale(1.25); + /* Increases size by 25% */ + transition: transform 0.5s ease-in-out; + /* Smooth scaling effect */ } .fht-table tr:hover { - background-color: rgb(170, 222, 167); - color:rgb(2, 2, 2); + background-color: rgb(170, 222, 167); + color: rgb(2, 2, 2); } .fht-table { @@ -167,14 +171,14 @@ } .celda_encabezado_total { - background-color:#ffffff !important; + 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;*/ /* */ @@ -188,12 +192,14 @@ .fht-table thead { position: sticky; top: 0; - z-index: 20; /* Ensure the entire header stays above table rows */ - background-color: #50bbd9; /* Header background color */ + z-index: 20; + /* Ensure the entire header stays above table rows */ + background-color: #50bbd9; + /* Header background color */ } - .dropdown-menu { - z-index :25 ; + .dropdown-menu { + z-index: 25; } @@ -202,8 +208,10 @@ .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 */ + 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; @@ -215,7 +223,8 @@ position: sticky; left: 0; background-color: #50bbd9; - z-index: 15; /* Ensures it stays above other cells */ + z-index: 15; + /* Ensures it stays above other cells */ border-right: 2px solid #ddd; color: #ffffff; } @@ -230,28 +239,27 @@ } - td{ - min-width: 100px; - max-width: 100px; + td { + min-width: 100px; + max-width: 100px; } - tfoot tr{ - background-color:rgb(235, 236, 203); + tfoot tr { + background-color: rgb(235, 236, 203); } - body[data-layout-mode = horizontal] .container-fluid{ + body[data-layout-mode=horizontal] .container-fluid { max-width: 100%; } - .card-body{ - padding-top : 0; + + .card-body { + padding-top: 0; padding-bottom: 0; } - .card{ margin-bottom: 5px;} - - - - + .card { + margin-bottom: 5px; + } @@ -311,161 +319,209 @@ foreach ($period as $day) {
- +
-
- " - class="form-control mt-2" - style="z-index:30;" readonly> -
+
+ " + class="form-control mt-2" + style="z-index:30;" readonly> +
-
+
- - - - - - - - - - + - + if ($month == date('M-Y')) { + ?> + - - + - - - - -
+ + + + + + + + + + + + + +
- +
+ +
- - + -
-
+
- - " - class="form-control mt-2" > + + " + class="form-control mt-2"> +
+ +
+
@@ -477,9 +533,9 @@ foreach ($period as $day) { Machine - - Total Diesel - + + Total Diesel + @@ -493,11 +549,11 @@ foreach ($period as $day) { - Date - Opening - Purchase Diesel - Filling Diesel - Balance Stock + Date + Opening + Purchase Diesel + Filling Diesel + Balance Stock @@ -519,11 +575,11 @@ foreach ($period as $day) { $dieselStockDetails) { - + ?> > - format('d-m-Y'); - ?> + format('d-m-Y'); + ?> - - - + + + - - oninput="openingTDStockChange(this)" - contenteditable="true" - - - > + + + oninput="openingTDStockChange(this)" + contenteditable="true" + > - - + + oninput="purchaseTDStockChange(this)" + contenteditable="true"> - + - + - + - + - + - "> - if (!isset($summary['totalPurchaseDiesel'])) { - $summary['opening_diesel'] = '-' ; - $summary['totalPurchaseDiesel'] = 0 ; - $summary['totalFillingDiesel'] = 0 ; - $summary['balanceStock'] = 0 ; - } + - $summary['totalPurchaseDiesel'] += is_numeric($totalDiesel[$groupedDieselMachineStockDetailsIndex]['purchase_diesel'] ) ? $totalDiesel[$groupedDieselMachineStockDetailsIndex]['purchase_diesel'] : 0 ; - $summary['totalFillingDiesel'] += is_numeric($totalDiesel[$groupedDieselMachineStockDetailsIndex]['total_filling_diesel']) ? $totalDiesel[$groupedDieselMachineStockDetailsIndex]['total_filling_diesel'] : 0 ; - $summary['balanceStock'] = is_numeric($totalDiesel[$groupedDieselMachineStockDetailsIndex]['balance_stock']) ? $totalDiesel[$groupedDieselMachineStockDetailsIndex]['balance_stock'] : 0 ; - - ?> + + + - $dieselStock) { ?> + $dieselStock) { ?> @@ -614,7 +667,7 @@ foreach ($period as $day) { - + @@ -626,7 +679,7 @@ foreach ($period as $day) { oninput="openingReadingChange(this)" contenteditable="true" > - + @@ -661,8 +714,7 @@ foreach ($period as $day) { + data-id=" "> @@ -670,249 +722,230 @@ foreach ($period as $day) { - + - "-" , - 'closing_reading' => 0 , - 'filling_diesel' => 0 , - 'consumption' => 0 , - 'running_hours' => 0 , - 'mileage' => 0 , - ]; - } + // Initialize the material entry if it doesn't exist + if (!isset($summary["machineId_$machineId"])) { + $summary["machineId_$machineId"] = [ + 'opening_reading' => "-", + 'closing_reading' => 0, + 'filling_diesel' => 0, + 'consumption' => 0, + 'running_hours' => 0, + 'mileage' => 0, + ]; + } - // Sum values for the material - - $summary["machineId_$machineId"]['opening_reading'] = 0 ; - $summary["machineId_$machineId"]['closing_reading'] = is_numeric($dieselStock['closing_reading']) ? $dieselStock['closing_reading'] : 0 ; - $summary["machineId_$machineId"]['filling_diesel'] += is_numeric($dieselStock['filling_diesel']) ? $dieselStock['filling_diesel'] : 0 ; - $summary["machineId_$machineId"]['consumption'] += is_numeric($dieselStock['consumption']) ? $dieselStock['consumption'] : 0 ; - $summary["machineId_$machineId"]['running_hours'] += is_numeric($dieselStock['running_hours']) ? $dieselStock['running_hours'] : 0 ; + // Sum values for the material - if($summary["machineId_$machineId"]['running_hours'] > 0){ - $dieselMileage = round( - $summary["machineId_$machineId"]['consumption'] / $summary["machineId_$machineId"]['running_hours'], - 2 - ); - - }else{ - $dieselMileage = 0 ; - } + $summary["machineId_$machineId"]['opening_reading'] = 0; + $summary["machineId_$machineId"]['closing_reading'] = is_numeric($dieselStock['closing_reading']) ? $dieselStock['closing_reading'] : 0; + $summary["machineId_$machineId"]['filling_diesel'] += is_numeric($dieselStock['filling_diesel']) ? $dieselStock['filling_diesel'] : 0; + $summary["machineId_$machineId"]['consumption'] += is_numeric($dieselStock['consumption']) ? $dieselStock['consumption'] : 0; + $summary["machineId_$machineId"]['running_hours'] += is_numeric($dieselStock['running_hours']) ? $dieselStock['running_hours'] : 0; + + if ($summary["machineId_$machineId"]['running_hours'] > 0) { + $dieselMileage = round( + $summary["machineId_$machineId"]['consumption'] / $summary["machineId_$machineId"]['running_hours'], + 2 + ); + } else { + $dieselMileage = 0; + } - $summary["machineId_$machineId"]['mileage'] = is_numeric( $dieselMileage) ? $dieselMileage : 0 ; + $summary["machineId_$machineId"]['mileage'] = is_numeric($dieselMileage) ? $dieselMileage : 0; + } ?> - - - - - - } ?> - - - + + - - Total - + + Total + - - - - + + + + - + - - - - - - + + + + + + - + - - + + - - + - - $dateInMonth) { ?> - $dateInMonth) { ?> + format('d-m-Y'); + if ($dateInMonthDmYFormat === $currentDate) { + echo 'style="background: #cef0ad;"'; + } + ?>> + + format('d-m-Y'); + + ?> + + + + + + + + + oninput="openingTDStockChange(this)" + contenteditable="true" + + > + + + + + + + + + + + + + $dieselMachine) { + ?> + + + + + + + + + + + + + + + oninput="openingReadingChange(this)" + contenteditable="true" + + > format('d-m-Y'); - if ($dateInMonthDmYFormat === $currentDate) { - echo 'style="background: #cef0ad;"'; + foreach ($previousMonthDieselMachineStockDetails as $index => $previousMonthDieselMachineStockDetail) { + if ($previousMonthDieselMachineStockDetail['machine_id'] == $dieselMachine['id']) { + echo $previousMonthDieselMachineStockDetail['closing_reading']; + break; + } } - ?> > - - format('d-m-Y'); - - ?> - - - - - - - - - oninput="openingTDStockChange(this)" - contenteditable="true" - - - - > - - - - - - - - - - + ?> + + $dieselMachine) { - ?> - - - - - + foreach ($previousMonthDieselMachineStockDetails as $index => $previousMonthDieselMachineStockDetail) { + if ($previousMonthDieselMachineStockDetail['machine_id'] == $dieselMachine['id']) { + echo $previousMonthDieselMachineStockDetail['closing_reading']; + break; + } + } - - - + ?> + - - + - oninput="openingReadingChange(this)" - contenteditable="true" + - - - - - > - - $previousMonthDieselMachineStockDetail) - { - if($previousMonthDieselMachineStockDetail['machine_id'] == $dieselMachine['id']){ - echo $previousMonthDieselMachineStockDetail['closing_reading'] ; - break; - } - - } - ?> - - - - - $previousMonthDieselMachineStockDetail) - { - if($previousMonthDieselMachineStockDetail['machine_id'] == $dieselMachine['id']){ - echo $previousMonthDieselMachineStockDetail['closing_reading'] ; - break; - } - - } - - ?> - - - - - - - - - - - + - + + + - +
@@ -928,56 +961,10 @@ foreach ($period as $day) {
-
- -
- - - + + + + \ No newline at end of file diff --git a/app/Views/stock/drierMachineDetails.php b/app/Views/stock/drierMachineDetails.php index b516ec5b..3e2976ef 100644 --- a/app/Views/stock/drierMachineDetails.php +++ b/app/Views/stock/drierMachineDetails.php @@ -20,7 +20,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); input[type="date"]::-webkit-calendar-picker-indicator { - transform: scale(2.0); + transform: scale(2.0); cursor: pointer; } @@ -46,15 +46,17 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); } .fht-table td:hover { - background-color: rgb(170, 222, 167); - color:rgb(2, 2, 2); - transform: scale(1.25); /* Increases size by 25% */ - transition: transform 0.5s ease-in-out; /* Smooth scaling effect */ + background-color: rgb(170, 222, 167); + color: rgb(2, 2, 2); + transform: scale(1.25); + /* Increases size by 25% */ + transition: transform 0.5s ease-in-out; + /* Smooth scaling effect */ } .fht-table tr:hover { - background-color: rgb(170, 222, 167); - color:rgb(2, 2, 2); + background-color: rgb(170, 222, 167); + color: rgb(2, 2, 2); } .fht-table { @@ -136,7 +138,8 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); .celda_encabezado_general { - background-color:rgb(80, 187, 217); /* blue background */ + background-color: rgb(80, 187, 217); + /* blue background */ border: 1px solid #ccc; color: #ffffff; font-weight: bold; @@ -144,14 +147,18 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); text-align: center; min-width: 120px; max-width: 120px; - white-space: normal; /* Allows text to wrap */ - word-wrap: break-word; /* Breaks long words if needed */ - text-align: center; /* Centers text for better alignment */ - max-width: 150px; /* Set a max width to control wrapping */ + white-space: normal; + /* Allows text to wrap */ + word-wrap: break-word; + /* Breaks long words if needed */ + text-align: center; + /* Centers text for better alignment */ + max-width: 150px; + /* Set a max width to control wrapping */ } .celda_encabezado_total { - background-color:#ffffff; + background-color: #ffffff; border: 1px solid white; color: #ffffff; font-weight: bold; @@ -211,27 +218,27 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); .fht-table th:nth-child(1), - .fht-table th:nth-child(1) - { + .fht-table th:nth-child(1) { position: sticky; left: 0; top: 0; - background-color:rgb(80, 187, 217); /* blue background */ - z-index: 7!important; - border-right: 2px solid #ddd; + background-color: rgb(80, 187, 217); + /* blue background */ + z-index: 7 !important; + border-right: 2px solid #ddd; color: #ffffff; } - .fht-table td:nth-child(1) - { + .fht-table td:nth-child(1) { position: sticky; left: 0; - background-color:rgb(80, 187, 217); /* blue background */ + background-color: rgb(80, 187, 217); + /* blue background */ z-index: 2; - border-right: 2px solid #ddd; + border-right: 2px solid #ddd; color: #ffffff; - + } .table-responsive { @@ -246,22 +253,25 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); .fht-table thead th { position: sticky; top: 0; - z-index: 5!important; + z-index: 5 !important; } tfoot tr { - background-color:rgb(235, 236, 203); + background-color: rgb(235, 236, 203); } - body[data-layout-mode = horizontal] .container-fluid{ + body[data-layout-mode=horizontal] .container-fluid { max-width: 100%; } - .card-body{ - padding-top : 10px; + + .card-body { + padding-top: 10px; padding-bottom: 0; } - .card{ margin-bottom: 5px;} + .card { + margin-bottom: 5px; + }
@@ -281,7 +291,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
- +
@@ -309,69 +319,454 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
- +
-
+
- " + " class="form-control " - data-provide="datepicker" + data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1" readonly> - -
- - - -
- - - - - - - - - - - - - - - - - - - - -
+
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + + + + + + + + + + + @@ -380,212 +775,210 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); - - Date - Drier On Time - Drier Off Time - Running Hrs - Supplier Name - - Input Sand Qty (Metric Ton) - Input Sand Moisture(%) - Sand Dried Qty (Metric Ton) - Total Gas Consumption - Gas Per Ton - Qty Per Hrs (Metric Ton) - Moisture Loss Qty (Metric Ton) - Dust Qty (Metric Ton) - Customer Name + Date + Drier On Time + Drier Off Time + Running Hrs + Supplier Name + + Input Sand Qty (Metric Ton) + Input Sand Moisture(%) + Sand Dried Qty (Metric Ton) + Total Gas Consumption + Gas Per Ton + Qty Per Hrs (Metric Ton) + Moisture Loss Qty (Metric Ton) + Dust Qty (Metric Ton) + + Customer Name id - Action + Action - - - - - - - format('Y-m-d'); - $currentDate = date('Y-m-d'); - if ($date === $currentDate) { - echo 'style="background: #cef0ad;"'; - } - ?> - - format('d-m-Y'); - ?> - - > - - - - - - + + - - - - + - - - - + - - - + format('Y-m-d'); + $currentDate = date('Y-m-d'); + if ($date === $currentDate) { + echo 'style="background: #cef0ad;"'; + } + ?> - - - $value) { - if ($a['supplier_name'] == $value->SupplierID) { - echo $value->SupplierName; + format('d-m-Y'); + ?>> + + + + + + + + + + + + + + + + + + + + + + + + + + $value) { + if ($a['supplier_name'] == $value->SupplierID) { + echo $value->SupplierName; } - } ?> - + } ?> + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + - - - - - - - - - + + + + - - - - - - - - + + + + - - - - - + + + + - + + + + - - - - + + + + + + + + + + + + - - + + - - - - - - Total - + + + + + + Total + - - - + - - + - - - + + - - - - + + + + - +

-

No Drier machine details present for this month..!!

+

+

No Drier machine details present for this month..!!

+

- + @@ -607,395 +1000,8 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); - - - - - - - - - - - - - - - @@ -1013,58 +1019,68 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); @@ -1072,7 +1088,6 @@ $('#drierTable tbody').on('click', '.edit-btn', function() { - - + + + + + \ No newline at end of file diff --git a/app/Views/stock/dustAndRoughStockDetails.php b/app/Views/stock/dustAndRoughStockDetails.php index d3348f8d..331eb25e 100644 --- a/app/Views/stock/dustAndRoughStockDetails.php +++ b/app/Views/stock/dustAndRoughStockDetails.php @@ -18,11 +18,13 @@ } .grab { - cursor: grab; /* Default open-hand cursor */ + cursor: grab; + /* Default open-hand cursor */ } .grab:active { - cursor: grabbing; /* Closed-hand cursor when dragging */ + cursor: grabbing; + /* Closed-hand cursor when dragging */ } /* .fht-table td[contenteditable="true"] { @@ -31,15 +33,17 @@ } */ .fht-table td:hover { - background-color: rgb(170, 222, 167); - color:rgb(2, 2, 2); - transform: scale(1.25); /* Increases size by 25% */ - transition: transform 0.5s ease-in-out; /* Smooth scaling effect */ + background-color: rgb(170, 222, 167); + color: rgb(2, 2, 2); + transform: scale(1.25); + /* Increases size by 25% */ + transition: transform 0.5s ease-in-out; + /* Smooth scaling effect */ } .fht-table tr:hover { - background-color: rgb(170, 222, 167); - color:rgb(2, 2, 2); + background-color: rgb(170, 222, 167); + color: rgb(2, 2, 2); } .fht-table { @@ -239,20 +243,36 @@ } /* Adjust heights based on screen zoom */ - @media only screen and (min-height: 1400px) { /* Approximate Zoom < 100% */ - .table-responsive { max-height: 425px; } + @media only screen and (min-height: 1400px) { + + /* Approximate Zoom < 100% */ + .table-responsive { + max-height: 425px; + } } - @media only screen and (min-height: 1200px) { /* Approximate Zoom ~ 90% */ - .table-responsive { max-height: 500px; } + @media only screen and (min-height: 1200px) { + + /* Approximate Zoom ~ 90% */ + .table-responsive { + max-height: 500px; + } } - @media only screen and (min-height: 1000px) { /* Approximate Zoom ~ 80% */ - .table-responsive { max-height: 600px; } + @media only screen and (min-height: 1000px) { + + /* Approximate Zoom ~ 80% */ + .table-responsive { + max-height: 600px; + } } - @media only screen and (min-height: 800px) { /* Approximate Zoom ~ 75% */ - .table-responsive { max-height: 650px; } + @media only screen and (min-height: 800px) { + + /* Approximate Zoom ~ 75% */ + .table-responsive { + max-height: 650px; + } } td { @@ -261,23 +281,22 @@ } tfoot tr { - background-color:rgb(235, 236, 203); + background-color: rgb(235, 236, 203); } - body[data-layout-mode = horizontal] .container-fluid{ + body[data-layout-mode=horizontal] .container-fluid { max-width: 100%; } - .card-body{ - padding-top : 0; - padding-bottom : 0; + .card-body { + padding-top: 0; + padding-bottom: 0; } - .card{ margin-bottom: 5px;} - - - + .card { + margin-bottom: 5px; + } @@ -308,234 +327,304 @@ -
+
-
+
+ + +
- - -
-
-
+
+
-
+
- " + " class="form-control " - data-provide="datepicker" + data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1" readonly style="max-width: 175px;"> - -
+ +
-
+
- - - - + - - + - - + + - - - + + + + + + - - -
-
-
+ +
+
+ +
- + +