@@ -223,6 +270,18 @@
+
+
@@ -277,17 +336,17 @@
data-id="= $dustAndRoughStockDetail['date'] ?>"
oninput="finalRoughStockChange(this)"
contenteditable="true"
- >= $dustAndRoughStockDetail['finalRough'] ?>
+ >= $dustAndRoughStockDetail['finalRough'] ?? ' ' ?>
= $dustAndRoughStockDetail['dust'] ?> |
+ >= $dustAndRoughStockDetail['dust'] ?? ' ' ?>
= $dustAndRoughStockDetail['total'] ?> |
+ >= $dustAndRoughStockDetail['total'] ?? ' ' ?>
@@ -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="= $dateInMonth ?>"
oninput="finalRoughStockChange(this)"
contenteditable="true"
- >= 0 ?>
+ >= ' ' ?>
= 0 ?> |
+ >= ' ' ?>
= 0 ?> |
+ >= ' ' ?>
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) {
| = $resinStock['materialCode'] ?>
+ class="materialCode">
+ = $resinStock['materialCode'] ?? ' ' ?>
|
- = $resinStock['customer'] ?>
+ = $resinStock['customer'] ?? ' ' ?>
|
oninput="openingStockChange(this)"
contenteditable="true"
- >= $resinStock['opening'] ?>
+ >= $resinStock['opening'] ?? ' ' ?>
|
- = $resinStock['receipt'] ?>
+ = $resinStock['receipt'] ?? ' ' ?>
|
= $resinStock['used'] ?>
+ contenteditable="true">= $resinStock['used'] ?? ' ' ?>
|
- = $resinStock['balanceStock'] ?>
+ = $resinStock['balanceStock'] ?? ' ' ?>
|
@@ -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"
- >= $previousMonthResinStockDetails[$resinMaterialIndex]['balanceStock'] ?? '-' ?>
+ >= $previousMonthResinStockDetails[$resinMaterialIndex]['balanceStock'] ?? ' ' ?>
- |
+ contenteditable="true"> = ' ' ?>
- |
+ contenteditable="true"> = ' ' ?>
= $previousMonthResinStockDetails[$resinMaterialIndex]['balanceStock'] ?? '-' ?> |
+ data-id="= $dateInMonth ?> = $resinMaterial['MaterialCode'] ?>">= $previousMonthResinStockDetails[$resinMaterialIndex]['balanceStock'] ?? ' ' ?>
@@ -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 @@
-
+
| Trp Sand To Use Coating Sand |
@@ -281,26 +325,26 @@
data-id="= $trpSandUseStockDetail['date'] ?>"
oninput="roughStockChange(this)"
contenteditable="true"
- >= $trpSandUseStockDetail['rough_kgs'] ?>
+ >= $trpSandUseStockDetail['rough_kgs'] ?? " " ?>
= $trpSandUseStockDetail['fine_kgs'] ?> |
+ >= $trpSandUseStockDetail['fine_kgs'] ?? " " ?>
= $trpSandUseStockDetail['total_kgs'] ?> |
+ >= $trpSandUseStockDetail['total_kgs'] ?? " " ?>
= $trpSandUseStockDetail['customer_name'] ?> |
+ >= $trpSandUseStockDetail['customer_name'] ?? " " ?>
= $trpSandUseStockDetail['id'] ?> |
+ >= $trpSandUseStockDetail['id'] ?? " " ?>
@@ -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'] ;
- } ?>
+
+ } ?>
- | Total |
- Rough Kgs |
- Fine Kgs |
- Total Kgs |
+ Total |
+ Rough Kgs |
+ Fine Kgs |
+ Total Kgs |
@@ -394,31 +439,31 @@
data-id="= $dateInMonth ?>"
oninput="roughStockChange(this)"
contenteditable="true"
- >= 0 ?>
+ >= " " ?>
= 0 ?> |
+ >= " " ?>
= 0 ?> |
+ >= " " ?>
= " " ?> |
+ >= " " ?>
= " " ?> |
+ >= " " ?>
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;
+
+ }
+
+
+
+
|