stock module latest today vadivel J 27-01-2025
This commit is contained in:
parent
496834541a
commit
77b2dd19f1
@ -414,7 +414,7 @@ foreach ($period as $day) {
|
|||||||
<td class="celda_normal finalTP"
|
<td class="celda_normal finalTP"
|
||||||
data-id="<?=$totalPower[$groupedIndex]['date']?>"
|
data-id="<?=$totalPower[$groupedIndex]['date']?>"
|
||||||
|
|
||||||
oninput="purchaseTDStockChange(this)"
|
oninput="finalTPStockChange(this)"
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
|
|
||||||
<?= $totalPower[$groupedIndex]['final_reading'] ?? ' ' ?>
|
<?= $totalPower[$groupedIndex]['final_reading'] ?? ' ' ?>
|
||||||
@ -909,8 +909,7 @@ foreach ($period as $day) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(targetColumnIndex);
|
|
||||||
console.log(targetRow);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -963,7 +962,6 @@ foreach ($period as $day) {
|
|||||||
success: function(data) {
|
success: function(data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
console.log(data);
|
|
||||||
alert(data);
|
alert(data);
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
@ -999,7 +997,6 @@ foreach ($period as $day) {
|
|||||||
table.find('tbody tr').each(function(index) {
|
table.find('tbody tr').each(function(index) {
|
||||||
|
|
||||||
const rowCells = $(this).find('td');
|
const rowCells = $(this).find('td');
|
||||||
console.log(rowCells.length);
|
|
||||||
const date = rowCells.eq(0).text().trim();
|
const date = rowCells.eq(0).text().trim();
|
||||||
|
|
||||||
const formattedDate = `${date.split('-')[2]}-${date.split('-')[1]}-${date.split('-')[0]}`;
|
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)) {
|
if (new Date(otherDate) > new Date(date)) {
|
||||||
|
|
||||||
console.log(otherDate);
|
|
||||||
|
|
||||||
let dataId = `${otherDate} ${machine_id}`;
|
let dataId = `${otherDate} ${machine_id}`;
|
||||||
|
|
||||||
@ -1242,7 +1239,6 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
function updateTotalStockValue(date, finalTP){
|
function updateTotalStockValue(date, finalTP){
|
||||||
|
|
||||||
console.log("inside updateTotalStockValue");
|
|
||||||
|
|
||||||
const table = $('#powerStockDetailsTableId');
|
const table = $('#powerStockDetailsTableId');
|
||||||
const rows = [];
|
const rows = [];
|
||||||
@ -1258,8 +1254,6 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
if (new Date(otherDate) > new Date(date)) {
|
if (new Date(otherDate) > new Date(date)) {
|
||||||
|
|
||||||
console.log(date);
|
|
||||||
console.log(otherDate);
|
|
||||||
|
|
||||||
let dataId = `${otherDate}`;
|
let dataId = `${otherDate}`;
|
||||||
|
|
||||||
@ -1270,11 +1264,15 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
let totalReadingTP = validateInput(document.querySelector(`td.totalReadingTP[data-id="${dataId}"]`).innerText) ;
|
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 );
|
let totalUnitsTP = Number(totalReadingTP * 60 );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
document.querySelector(`td.finalTP[data-id="${dataId}"]`).innerText = finalTP == 0 ? " " : finalTP;
|
document.querySelector(`td.finalTP[data-id="${dataId}"]`).innerText = finalTP == 0 ? " " : finalTP;
|
||||||
document.querySelector(`td.totalReadingTP[data-id="${dataId}"]`).innerText = totalReadingTP == 0 ? " " : totalReadingTP ;
|
document.querySelector(`td.totalReadingTP[data-id="${dataId}"]`).innerText = totalReadingTP == 0 ? " " : totalReadingTP ;
|
||||||
document.querySelector(`td.totalUnitsTP[data-id="${dataId}"]`).innerText = totalUnitsTP == 0 ? " " : totalUnitsTP;
|
document.querySelector(`td.totalUnitsTP[data-id="${dataId}"]`).innerText = totalUnitsTP == 0 ? " " : totalUnitsTP;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user