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"
|
||||
data-id="<?=$totalPower[$groupedIndex]['date']?>"
|
||||
|
||||
oninput="purchaseTDStockChange(this)"
|
||||
oninput="finalTPStockChange(this)"
|
||||
contenteditable="true">
|
||||
|
||||
<?= $totalPower[$groupedIndex]['final_reading'] ?? ' ' ?>
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user