diff --git a/app/Views/bagStockDetails.php b/app/Views/bagStockDetails.php index 06a27484..ae0a1a0a 100644 --- a/app/Views/bagStockDetails.php +++ b/app/Views/bagStockDetails.php @@ -97,29 +97,7 @@ padding-bottom: 8px; padding-top: 8px; width: 100%; - } - - - .celda_encabezado_general { - background-color: #00a65a; - border: 1px solid #ccc; - color: #ffffff; - font-weight: bold; - padding: 6px 10px;; - text-align: center; - } - - - .celda_encabezado_total { - background-color:#ffffff; - border: 1px solid #ccc; - color: #ffffff; - font-weight: bold; - padding: 6px 10px; - ; - text-align: center; - } - + } ._Separador { background-color: #fff; @@ -133,14 +111,6 @@ width: 4px; } - .celda_normal { - /*background-color: #fff;*/ - /* */ - text-align: center; - border: 1px solid #ccc; - padding: 2px 4px; - } - /*style excel*/ .excel_cell { border: 1px solid #CCC; @@ -167,37 +137,82 @@ height: 20px; } - #bagStockDetailsTableId th:nth-child(1), - #bagStockDetailsTableId td:nth-child(1) { - position: sticky; - left: 0; + + + .celda_encabezado_general { background-color: #00a65a; - z-index: 2; - border-right: 2px solid #ddd; + 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; + } - #bagStockDetailsTableSummaryId th:nth-child(1), - #bagStockDetailsTableSummaryId td:nth-child(1) { + + /* Make entire thead sticky */ + .fht-table thead { + position: sticky; + top: 0; + z-index: 20; /* Ensure the entire header stays above table rows */ + background-color: #00a65a; /* 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: #00a65a; /* 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; + z-index: 15; /* Ensures it stays above other cells */ border-right: 2px solid #ddd; color: #ffffff; } - - + /* Table Wrapper for Scrolling */ .table-responsive { - overflow-y: auto; + overflow-x: auto; + overflow-y: auto; + max-height: 450px; /* Adjust as needed */ + position: relative; } - .fht-table thead th { - top: 0; - z-index: 5!important; + td{ + min-width: 100px; + max-width: 100px; } @@ -395,7 +410,7 @@ contenteditable="true" - > + > - + - + - + @@ -461,7 +476,7 @@ Receipt Used Balance Stock - + @@ -540,20 +555,20 @@ contenteditable="true" - > + > - + contenteditable="true"> - + oninput="usedStockChange(this)" contenteditable="true"> + > @@ -812,7 +827,7 @@ let currentBalanceStock = (Number(openingStock) + Number(receiptStock)) - Number(usedStock); - document.querySelector(`td.balanceStock[data-id="${dataId}"]`).innerText=currentBalanceStock; + document.querySelector(`td.balanceStock[data-id="${dataId}"]`).innerText = currentBalanceStock == 0 ? " " : currentBalanceStock; updateStockValue( date,materialCode,currentBalanceStock ) @@ -839,7 +854,7 @@ let currentBalanceStock = (Number(openingStock) + Number(receiptStock)) - Number(usedStock); - document.querySelector(`td.balanceStock[data-id="${dataId}"]`).innerText=currentBalanceStock; + document.querySelector(`td.balanceStock[data-id="${dataId}"]`).innerText = ccurrentBalanceStock == 0 ? " " : currentBalanceStock ; updateStockValue( date,materialCode,currentBalanceStock ) @@ -869,7 +884,7 @@ let currentBalanceStock = ( Number(openingStock) + Number(receiptStock) ) - Number(usedStock); - document.querySelector(`td.balanceStock[data-id="${dataId}"]`).innerText=currentBalanceStock; + document.querySelector(`td.balanceStock[data-id="${dataId}"]`).innerText = currentBalanceStock == 0 ? " " : currentBalanceStock ; updateStockValue( date,materialCode,currentBalanceStock ) @@ -901,7 +916,7 @@ let dataId = `${otherDate} ${materialCode}`; - document.querySelector(`td.openingStock[data-id="${dataId}"]`).innerText=currentBalanceStock; + document.querySelector(`td.openingStock[data-id="${dataId}"]`).innerText = currentBalanceStock == 0 ? " " : currentBalanceStock; let usedStock = validateInput(document.querySelector(`td.usedStock[data-id="${dataId}"]`).innerText); @@ -909,10 +924,8 @@ currentBalanceStock = (Number(currentBalanceStock) + Number(receiptStock)) - Number(usedStock); - document.querySelector(`td.balanceStock[data-id="${dataId}"]`).innerText=currentBalanceStock; + document.querySelector(`td.balanceStock[data-id="${dataId}"]`).innerText = currentBalanceStock == 0 ? " " : currentBalanceStock; - // console.log( 'other date' , new Date(otherDate)); - // console.log('new balance stock' , currentBalanceStock) } }) diff --git a/app/Views/dieselStockDetails.php b/app/Views/dieselStockDetails.php index 9632fba0..d04ba620 100644 --- a/app/Views/dieselStockDetails.php +++ b/app/Views/dieselStockDetails.php @@ -100,25 +100,6 @@ } - .celda_encabezado_general { - background-color: #00a65a; - 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; - } - - ._Separador { background-color: #fff; height: 12px; @@ -131,13 +112,7 @@ width: 4px; } - .celda_normal { - /*background-color: #fff;*/ - /* */ - text-align: center; - border: 1px solid #ccc; - padding: 10px 6px; - } + /*style excel*/ .excel_cell { @@ -166,54 +141,81 @@ } -/* Make entire thead sticky */ -.fht-table thead { - position: sticky; - top: 0; - z-index: 20; /* Ensure the entire header stays above table rows */ - background-color: #00a65a; /* Header background color */ -} + .celda_encabezado_general { + background-color: #00a65a; + border: 1px solid #ccc; + color: #ffffff; + font-weight: bold; + padding: 6px 10px; + text-align: center; + } -.dropdown-menu { - z-index :25 ; -} + .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: #00a65a; /* 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: #00a65a; /* Green background */ - color: #ffffff; - border: 1px solid #ddd; - padding: 10px; -} + /* 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: #00a65a; /* 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: 15; /* Ensures it stays above other cells */ - border-right: 2px solid #ddd; - color: #ffffff; -} + /* Sticky First Column */ + .fht-table th:nth-child(1), + .fht-table td:nth-child(1) { + position: sticky; + left: 0; + background-color: #00a65a; + 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: 450px; /* Adjust as needed */ - position: relative; -} + /* Table Wrapper for Scrolling */ + .table-responsive { + overflow-x: auto; + overflow-y: auto; + max-height: 450px; /* Adjust as needed */ + position: relative; + } -td{ - min-width: 100px; - max-width: 100px; -} + td{ + min-width: 100px; + max-width: 100px; + } diff --git a/app/Views/drierMachineDetails.php b/app/Views/drierMachineDetails.php index eccfebc6..f555dd8b 100644 --- a/app/Views/drierMachineDetails.php +++ b/app/Views/drierMachineDetails.php @@ -885,6 +885,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); $('#loader').hide(); alert(data); + window.location.reload(); } diff --git a/app/Views/dustAndRoughStockDetails.php b/app/Views/dustAndRoughStockDetails.php index 395ac55e..9fbd1d66 100644 --- a/app/Views/dustAndRoughStockDetails.php +++ b/app/Views/dustAndRoughStockDetails.php @@ -98,17 +98,7 @@ padding-top: 8px; width: 100%; } - - - .celda_encabezado_general { - background-color: #00a65a; - border: 1px solid #ccc; - color: #ffffff; - font-weight: bold; - padding: 6px 10px;; - text-align: center; - } - + ._Separador { background-color: #fff; @@ -122,13 +112,7 @@ width: 4px; } - .celda_normal { - /*background-color: #fff;*/ - /* */ - text-align: center; - border: 1px solid #ccc; - padding: 2px 4px; - } + /*style excel*/ .excel_cell { @@ -156,18 +140,11 @@ height: 20px; } - #dustAndRoughStockDetailsTableId th:nth-child(1), - #dustAndRoughStockDetailsTableId td:nth-child(1) { - position: sticky; - left: 0; - background-color: #00a65a; - z-index: 2; - border-right: 2px solid #ddd; - color: #ffffff; - } + - .celda_encabezado_total { - background-color:#ffffff; + + .celda_encabezado_general { + background-color: #00a65a; border: 1px solid #ccc; color: #ffffff; font-weight: bold; @@ -175,9 +152,79 @@ text-align: center; } - .modal { - padding-right: 30% ! important; + .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: #00a65a; /* 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: #00a65a; /* 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: 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: 450px; /* Adjust as needed */ + position: relative; + } + + td{ + min-width: 150px; + max-width: 150px; + } + + + + + + +
@@ -223,6 +270,18 @@
+
+
+ +
@@ -277,17 +336,17 @@ data-id="" oninput="finalRoughStockChange(this)" contenteditable="true" - > + > + > + >
@@ -308,7 +367,7 @@ $summary['finalRough'] += $dustAndRoughStockDetail['finalRough'] == "-" ? 0 : (float) $dustAndRoughStockDetail['finalRough'] ; $summary['dust'] += $dustAndRoughStockDetail['dust'] == "-" ? 0 : (float) $dustAndRoughStockDetail['dust'] ; - $summary['total'] += $dustAndRoughStockDetail['total'] == "-" ? 0 :(float) $dustAndRoughStockDetail['total'] ; + $summary['total'] += $dustAndRoughStockDetail['total'] == "-" ? 0 : (float) $dustAndRoughStockDetail['total'] ; } ?> @@ -377,17 +436,17 @@ data-id="" oninput="finalRoughStockChange(this)" contenteditable="true" - > + > + > + > char.charCodeAt(0))[0] == 10) { + return 0; + } + + // Validate against the regex + const isValid = /^-?\d*\.?\d*$/.test(input); + if (!isValid) { + alert('Invalid input! Please enter a valid number.'); + return 0; + } + + return input; + } + + + + + + diff --git a/app/Views/resinStockDetails.php b/app/Views/resinStockDetails.php index 9a2da2d6..71e07a48 100644 --- a/app/Views/resinStockDetails.php +++ b/app/Views/resinStockDetails.php @@ -100,26 +100,6 @@ } - .celda_encabezado_general { - background-color: #00a65a; - border: 1px solid #ccc; - color: #ffffff; - font-weight: bold; - padding: 6px 10px; - ; - text-align: center; - } - - .celda_encabezado_total { - background-color:#ffffff; - border: 1px solid #ccc; - color: #ffffff; - font-weight: bold; - padding: 6px 10px; - ; - text-align: center; - } - ._Separador { background-color: #fff; @@ -133,14 +113,6 @@ width: 4px; } - .celda_normal { - /*background-color: #fff;*/ - /* */ - text-align: center; - border: 1px solid #ccc; - padding: 2px 4px; - } - /*style excel*/ .excel_cell { border: 1px solid #CCC; @@ -167,36 +139,81 @@ height: 20px; } - #resinStockDetailsTableId th:nth-child(1), - #resinStockDetailsTableId td:nth-child(1) { - position: sticky; - left: 0; + + .celda_encabezado_general { background-color: #00a65a; - z-index: 2; - border-right: 2px solid #ddd; + 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; + } - #resinStockDetailsTableSummaryId th:nth-child(1), - #resinStockDetailsTableSummaryId td:nth-child(1) { + + /* Make entire thead sticky */ + .fht-table thead { position: sticky; - left: 0; - background-color: #00a65a; - z-index: 2; - border-right: 2px solid #ddd; - color: #ffffff; + top: 0; + z-index: 20; /* Ensure the entire header stays above table rows */ + background-color: #00a65a; /* Header background color */ } - .table-responsive { - overflow-y: auto; + .dropdown-menu { + z-index :25 ; } + + + /* Ensure each in thead stays sticky */ .fht-table thead th { position: sticky; top: 0; - z-index: 5!important; + z-index: 11; /* Higher than table rows but lower than first column */ + background-color: #00a65a; /* 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: 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: 450px; /* Adjust as needed */ + position: relative; + } + + td{ + min-width: 100px; + max-width: 100px; } @@ -365,13 +382,14 @@ foreach ($period as $day) { + class="materialCode"> + - + oninput="openingStockChange(this)" contenteditable="true" - > + > - + + contenteditable="true"> - + @@ -421,10 +439,10 @@ foreach ($period as $day) { // Sum values for the material ; - $summary[$materialCode]['opening'] = "-" ; - $summary[$materialCode]['receipt'] += $resinStock['receipt'] == '-' ? 0 :$resinStock['receipt'] ; - $summary[$materialCode]['used'] += $resinStock['used'] == '-' ? 0 :$resinStock['used'] ; - $summary[$materialCode]['balanceStock'] = $resinStock['balanceStock'] == '-' ? 0 :$resinStock['balanceStock'] ; + $summary[$materialCode]['opening'] = "-" ; + $summary[$materialCode]['receipt'] += is_numeric($resinStock['receipt']) ? $resinStock['receipt'] : 0; + $summary[$materialCode]['used'] += is_numeric($resinStock['used']) ? $resinStock['used'] : 0; + $summary[$materialCode]['balanceStock'] = is_numeric($resinStock['balanceStock']) ? $resinStock['balanceStock'] : 0; } ?> @@ -522,20 +540,20 @@ foreach ($period as $day) { oninput="openingStockChange(this)" contenteditable="true" - > + > - + contenteditable="true"> - + contenteditable="true"> + data-id=" "> @@ -816,9 +834,9 @@ foreach ($period as $day) { try { let dataId = tdElement.getAttribute('data-id'); let [date, materialCode] = tdElement.getAttribute('data-id').split(' '); - let openingStock = document.querySelector(`td.openingStock[data-id="${dataId}"]`).innerText; - let receiptStock = document.querySelector(`td.receiptStock[data-id="${dataId}"]`).innerText; - let usedStock = tdElement.innerText; + let openingStock = validateInput(document.querySelector(`td.openingStock[data-id="${dataId}"]`).innerText); + let receiptStock = validateInput(document.querySelector(`td.receiptStock[data-id="${dataId}"]`).innerText); + let usedStock = validateInput(tdElement.innerText); let currentBalanceStock = (Number(openingStock) + Number(receiptStock)) - Number(usedStock); document.querySelector(`td.balanceStock[data-id="${dataId}"]`).innerText = currentBalanceStock; @@ -876,7 +894,7 @@ foreach ($period as $day) { let dataId = `${otherDate} ${materialCode}`; - document.querySelector(`td.openingStock[data-id="${dataId}"]`).innerText = currentBalanceStock; + document.querySelector(`td.openingStock[data-id="${dataId}"]`).innerText = currentBalanceStock == 0 ? " " : currentBalanceStock; let usedStock = validateInput(document.querySelector(`td.usedStock[data-id="${dataId}"]`).innerText); @@ -884,8 +902,7 @@ foreach ($period as $day) { currentBalanceStock = (Number(currentBalanceStock) + Number(receiptStock)) - Number(usedStock); - document.querySelector(`td.balanceStock[data-id="${dataId}"]`).innerText = currentBalanceStock; - + document.querySelector(`td.balanceStock[data-id="${dataId}"]`).innerText = currentBalanceStock == 0 ? " " : currentBalanceStock; } }) diff --git a/app/Views/trpSandUseStockDetails.php b/app/Views/trpSandUseStockDetails.php index f80b7894..7f60fcc4 100644 --- a/app/Views/trpSandUseStockDetails.php +++ b/app/Views/trpSandUseStockDetails.php @@ -98,16 +98,6 @@ padding-top: 8px; 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 +112,7 @@ width: 4px; } - .celda_normal { - /*background-color: #fff;*/ - /* */ - text-align: center; - border: 1px solid #ccc; - padding: 2px 4px; - } + /*style excel*/ .excel_cell { @@ -156,18 +140,10 @@ height: 20px; } - #trpSandUseStockDetailsTableId th:nth-child(1), - #trpSandUseStockDetailsTableId td:nth-child(1) { - position: sticky; - left: 0; - background-color: #00a65a; - z-index: 2; - border-right: 2px solid #ddd; - color: #ffffff; - } - .celda_encabezado_total { - background-color:#ffffff; + + .celda_encabezado_general { + background-color: #00a65a; border: 1px solid #ccc; color: #ffffff; font-weight: bold; @@ -175,9 +151,77 @@ text-align: center; } - .modal { - padding-right: 30% ! important; + .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: #00a65a; /* 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: #00a65a; /* 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: 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: 450px; /* Adjust as needed */ + position: relative; + } + + td{ + min-width: 150px; + max-width: 150px; + } + + + + + @@ -234,7 +278,7 @@
- + @@ -281,26 +325,26 @@ data-id="" oninput="roughStockChange(this)" contenteditable="true" - > + > + > + > + > + > @@ -318,17 +362,18 @@ $summary['rough_kgs'] += $trpSandUseStockDetail['rough_kgs'] == "-" ? 0 : (float) $trpSandUseStockDetail['rough_kgs'] ; $summary['fine_kgs'] += $trpSandUseStockDetail['fine_kgs'] == "-" ? 0 : (float) $trpSandUseStockDetail['fine_kgs'] ; $summary['total_kgs'] += $trpSandUseStockDetail['total_kgs'] == "-" ? 0 :(float) $trpSandUseStockDetail['total_kgs'] ; - } ?> + + } ?>
Trp Sand To Use Coating Sand
- - - - + + + + @@ -394,31 +439,31 @@ data-id="" oninput="roughStockChange(this)" contenteditable="true" - > + > + > + > + > + > char.charCodeAt(0))[0] == 10) { + return 0; + } + + // Validate against the regex + const isValid = /^-?\d*\.?\d*$/.test(input); + if (!isValid) { + alert('Invalid input! Please enter a valid number.'); + return 0; + } + + return input; + + } + + + +
Total Rough Kgs Fine Kgs Total Kgs Total Rough Kgs Fine Kgs Total Kgs