From 77b2dd19f16c1fea09bb4439c19134bcd3ae515c Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Mon, 27 Jan 2025 16:53:04 +0530 Subject: [PATCH] stock module latest today vadivel J 27-01-2025 --- app/Views/powerConsumptionDetails.php | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/app/Views/powerConsumptionDetails.php b/app/Views/powerConsumptionDetails.php index 5b8faea9..a54f9705 100644 --- a/app/Views/powerConsumptionDetails.php +++ b/app/Views/powerConsumptionDetails.php @@ -414,7 +414,7 @@ foreach ($period as $day) { @@ -909,8 +909,7 @@ foreach ($period as $day) { return; } - console.log(targetColumnIndex); - console.log(targetRow); + @@ -963,7 +962,6 @@ foreach ($period as $day) { success: function(data) { if (data) { $('#loader').hide(); - console.log(data); alert(data); window.location.reload(); } @@ -999,7 +997,6 @@ foreach ($period as $day) { table.find('tbody tr').each(function(index) { const rowCells = $(this).find('td'); - console.log(rowCells.length); const date = rowCells.eq(0).text().trim(); const formattedDate = `${date.split('-')[2]}-${date.split('-')[1]}-${date.split('-')[0]}`; @@ -1218,7 +1215,7 @@ foreach ($period as $day) { if (new Date(otherDate) > new Date(date)) { - console.log(otherDate); + let dataId = `${otherDate} ${machine_id}`; @@ -1242,7 +1239,6 @@ foreach ($period as $day) { function updateTotalStockValue(date, finalTP){ - console.log("inside updateTotalStockValue"); const table = $('#powerStockDetailsTableId'); const rows = []; @@ -1258,9 +1254,7 @@ foreach ($period as $day) { if (new Date(otherDate) > new Date(date)) { - console.log(date); - console.log(otherDate); - + let dataId = `${otherDate}`; @@ -1270,9 +1264,13 @@ foreach ($period as $day) { let totalReadingTP = validateInput(document.querySelector(`td.totalReadingTP[data-id="${dataId}"]`).innerText) ; - let finalTp = openingTP + totalReadingTP ; + + finalTP = Number(openingTP) + Number(totalReadingTP) ; + + let totalUnitsTP = Number(totalReadingTP * 60 ); + document.querySelector(`td.finalTP[data-id="${dataId}"]`).innerText = finalTP == 0 ? " " : finalTP;