diff --git a/app/Views/stock/bagStockDetails.php b/app/Views/stock/bagStockDetails.php index 84815e86..b1b523d5 100644 --- a/app/Views/stock/bagStockDetails.php +++ b/app/Views/stock/bagStockDetails.php @@ -1411,6 +1411,13 @@ foreach ($period as $day) { let dropdown = document.getElementById("customizeHeader"); let selectedOption = dropdown.options[dropdown.selectedIndex]; + let containerId = `${selectedOption.value}_container` + let alreadyPresent = document.getElementById(containerId); + + if(alreadyPresent){ + return ; + } + if (selectedOption.value !== "") { let materialCode = selectedOption.value; let materialName = selectedOption.text; diff --git a/app/Views/stock/dieselStockDetails.php b/app/Views/stock/dieselStockDetails.php index 868f18aa..d9754477 100644 --- a/app/Views/stock/dieselStockDetails.php +++ b/app/Views/stock/dieselStockDetails.php @@ -1890,6 +1890,13 @@ foreach ($period as $day) { let dropdown = document.getElementById("customizeHeader"); let selectedOption = dropdown.options[dropdown.selectedIndex]; + let containerId = `${selectedOption.value}_container` + let alreadyPresent = document.getElementById(containerId); + + if(alreadyPresent){ + return ; + } + if (selectedOption.value !== "") { let machineId = selectedOption.value; let materialName = selectedOption.text; diff --git a/app/Views/stock/gasStockDetails.php b/app/Views/stock/gasStockDetails.php index 337a91b8..4b04b017 100644 --- a/app/Views/stock/gasStockDetails.php +++ b/app/Views/stock/gasStockDetails.php @@ -686,7 +686,7 @@