Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
3dfa93ad49
@ -471,6 +471,7 @@ $routes->match(['GET', 'POST'], 'coatingMachineDetails', 'StockController::loadV
|
|||||||
$routes->post('addNewCoatingMachineDetails', 'StockController::addNewCoatingMachineDetails');
|
$routes->post('addNewCoatingMachineDetails', 'StockController::addNewCoatingMachineDetails');
|
||||||
$routes->post('updateCoatingMachineDetails', 'StockController::updateCoatingMachineDetails');
|
$routes->post('updateCoatingMachineDetails', 'StockController::updateCoatingMachineDetails');
|
||||||
$routes->post('deleteBatchCardFile','StockController::deleteBatchCardFile');
|
$routes->post('deleteBatchCardFile','StockController::deleteBatchCardFile');
|
||||||
|
$routes->get('download-batchcard-zip','StockController::downloadBatchCardZip');
|
||||||
|
|
||||||
//drier machine details
|
//drier machine details
|
||||||
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'drierMachineDetails', 'StockController::drierMachineDetails');
|
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'drierMachineDetails', 'StockController::drierMachineDetails');
|
||||||
|
|||||||
@ -168,7 +168,8 @@ class StockController extends BaseController
|
|||||||
JSON_OBJECT(
|
JSON_OBJECT(
|
||||||
"client_given_name", t_batchcard_files.client_file_name,
|
"client_given_name", t_batchcard_files.client_file_name,
|
||||||
"filename", t_batchcard_files.filename,
|
"filename", t_batchcard_files.filename,
|
||||||
"batchCardId" , t_batchcard_files.id
|
"batchCardId" , t_batchcard_files.id,
|
||||||
|
"coating_id", t_batchcard_files.coating_id
|
||||||
)
|
)
|
||||||
) as batchcard_files')
|
) as batchcard_files')
|
||||||
->join('t_batchcard_files', 't_batchcard_files.coating_id = t_coatingMachineDetails.id', 'left')
|
->join('t_batchcard_files', 't_batchcard_files.coating_id = t_coatingMachineDetails.id', 'left')
|
||||||
@ -439,6 +440,59 @@ class StockController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function downloadBatchcardZip()
|
||||||
|
{
|
||||||
|
$coatingId = $this->request->getGet('coating_id');
|
||||||
|
$date = $this->request->getGet('date');
|
||||||
|
$batchCardFiles = $this->getBatchCardFiles($coatingId); // Fetch files from DB
|
||||||
|
|
||||||
|
if (empty($batchCardFiles)) {
|
||||||
|
return redirect()->back()->with('error', 'No batchcard files found.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$zipFileName = 'batchcard_files_' . $date . '.zip';
|
||||||
|
$zipFilePath = WRITEPATH . 'uploads/batchcard' . $zipFileName; // CI4 WRITEPATH safe directory
|
||||||
|
|
||||||
|
$zip = new \ZipArchive();
|
||||||
|
if ($zip->open($zipFilePath, \ZipArchive::CREATE | \ZipArchive::OVERWRITE) === true) {
|
||||||
|
foreach ($batchCardFiles as $file) {
|
||||||
|
$originalFilePath = WRITEPATH . 'uploads/batchcard/' . $file['filename']; // Actual stored file
|
||||||
|
$clientFileName = $file['client_file_name'] ?? $file['filename']; // Use client name if available
|
||||||
|
|
||||||
|
if (file_exists($originalFilePath)) {
|
||||||
|
$zip->addFile($originalFilePath, $clientFileName); // Rename inside ZIP
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$zip->close();
|
||||||
|
|
||||||
|
$response = $this->response->download($zipFilePath, null)->setFileName($zipFileName);
|
||||||
|
|
||||||
|
// Delete ZIP after response is sent
|
||||||
|
register_shutdown_function(function () use ($zipFilePath) {
|
||||||
|
if (file_exists($zipFilePath)) {
|
||||||
|
unlink($zipFilePath);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->back()->with('error', 'Failed to create ZIP file.');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Example function to get batchcard files from DB
|
||||||
|
private function getBatchCardFiles($coatingId)
|
||||||
|
{
|
||||||
|
$batchCardFiles = $this->db->table('t_batchcard_files')
|
||||||
|
->where('coating_id', $coatingId)
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
|
||||||
|
return $batchCardFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//incoming Silica Sand Details starts
|
//incoming Silica Sand Details starts
|
||||||
public function loadView_incomingSilicaSandDetails()
|
public function loadView_incomingSilicaSandDetails()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -356,6 +356,9 @@
|
|||||||
$summary = [] ;
|
$summary = [] ;
|
||||||
|
|
||||||
foreach ($coatingMachineDetails as $record) {
|
foreach ($coatingMachineDetails as $record) {
|
||||||
|
|
||||||
|
$batchCardFiles =json_decode($record['batchcard_files'],true);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr data-id="<?php echo $record['id']; ?>"
|
<tr data-id="<?php echo $record['id']; ?>"
|
||||||
<?php
|
<?php
|
||||||
@ -394,7 +397,10 @@
|
|||||||
<!-- td:eq(11) -->
|
<!-- td:eq(11) -->
|
||||||
<td class="celda_normal"><?php echo $record['perHourCoatingSandQTY'] ?? '' ?></td>
|
<td class="celda_normal"><?php echo $record['perHourCoatingSandQTY'] ?? '' ?></td>
|
||||||
<!-- td:eq(12) -->
|
<!-- td:eq(12) -->
|
||||||
|
<!-- edit and download option..!! -->
|
||||||
<td class="celda_normal" style="background-color:white;">
|
<td class="celda_normal" style="background-color:white;">
|
||||||
|
|
||||||
|
|
||||||
<a data-toggle="tooltip" class="edit-btn"
|
<a data-toggle="tooltip" class="edit-btn"
|
||||||
data-target="editCoatingMachineDetailModal" data-toggle="modal"
|
data-target="editCoatingMachineDetailModal" data-toggle="modal"
|
||||||
style="cursor:pointer;">
|
style="cursor:pointer;">
|
||||||
@ -403,6 +409,22 @@
|
|||||||
|
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
foreach ($batchCardFiles as $index => $files) {
|
||||||
|
if ($index === 0 && !empty($files['batchCardId']) && $files['coating_id'] == $record['id'])
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<a href="<?= base_url('download-batchcard-zip?coating_id='.$record['id'].'&date='.$date); ?>"
|
||||||
|
data-toggle="tooltip" title="Download Batch Card" >
|
||||||
|
<i class="fa fa-download"></i>
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<!-- td:eq(13) -->
|
<!-- td:eq(13) -->
|
||||||
<td style="display:none;"><?php echo $record['batchcard_files'] ?? ' ' ?></td>
|
<td style="display:none;"><?php echo $record['batchcard_files'] ?? ' ' ?></td>
|
||||||
|
|||||||
@ -221,6 +221,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* .fht-table td[contenteditable="true"] {
|
||||||
|
background-color: lightyellow;
|
||||||
|
color:rgb(13, 7, 7);
|
||||||
|
} */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -353,8 +359,8 @@
|
|||||||
<?php foreach($bagMaterials as $bagMaterial){ ?>
|
<?php foreach($bagMaterials as $bagMaterial){ ?>
|
||||||
<!-- this will loop till materials present -->
|
<!-- this will loop till materials present -->
|
||||||
<th class="celda_encabezado_general" style="display:none">Date</th>
|
<th class="celda_encabezado_general" style="display:none">Date</th>
|
||||||
<th class="celda_encabezado_general" style="display:none"> material</th>
|
<th class="celda_encabezado_general" style="display:none"> Material</th>
|
||||||
<th class="celda_encabezado_general" style="display:none"> customer</th>
|
<th class="celda_encabezado_general" style="display:none"> Customer</th>
|
||||||
<th class="celda_encabezado_general">Opening Stock</th>
|
<th class="celda_encabezado_general">Opening Stock</th>
|
||||||
<th class="celda_encabezado_general">Receipt</th>
|
<th class="celda_encabezado_general">Receipt</th>
|
||||||
<th class="celda_encabezado_general">Used</th>
|
<th class="celda_encabezado_general">Used</th>
|
||||||
@ -1036,4 +1042,42 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("keydown", function (event) {
|
||||||
|
|
||||||
|
if (event.key === "Enter") {
|
||||||
|
|
||||||
|
let activeElement = document.activeElement;
|
||||||
|
|
||||||
|
// Check if the focused element is inside a table
|
||||||
|
let cell = activeElement.closest("td, th");
|
||||||
|
let table = activeElement.closest("table");
|
||||||
|
|
||||||
|
if (table && cell) {
|
||||||
|
event.preventDefault(); // Prevent form submission
|
||||||
|
|
||||||
|
let columnIndex = cell.cellIndex; // Get the current column index
|
||||||
|
|
||||||
|
let currentRow = cell.parentElement; // Get the current row
|
||||||
|
|
||||||
|
let nextRow = currentRow.nextElementSibling; // Get the next row
|
||||||
|
|
||||||
|
|
||||||
|
// Move to the same column in the next row if available
|
||||||
|
if (nextRow) {
|
||||||
|
|
||||||
|
|
||||||
|
let nextCell = nextRow.cells[columnIndex];
|
||||||
|
|
||||||
|
if (nextCell) {
|
||||||
|
|
||||||
|
nextCell.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -1033,10 +1033,10 @@ foreach ($period as $day) {
|
|||||||
let closingReading = validateInput(document.querySelector(`td.closingReading[data-id="${dataId}"]`).innerText);
|
let closingReading = validateInput(document.querySelector(`td.closingReading[data-id="${dataId}"]`).innerText);
|
||||||
let consumption = validateInput(document.querySelector(`td.consumption[data-id="${dataId}"]`).innerText);
|
let consumption = validateInput(document.querySelector(`td.consumption[data-id="${dataId}"]`).innerText);
|
||||||
let runningHours = Math.abs(Number(closingReading) - Number(openingReading));
|
let runningHours = Math.abs(Number(closingReading) - Number(openingReading));
|
||||||
let mileage = consumption == 0 || runningHours == 0 ? 0 : (Number(consumption) / Number(runningHours)).toFixed(2) ;
|
let mileage = consumption == 0 || runningHours == 0 ? 0 : (Number(consumption) / Number(runningHours)) ;
|
||||||
|
|
||||||
document.querySelector(`td.runningHours[data-id="${dataId}"]`).innerText = (runningHours).toFixed(2);
|
document.querySelector(`td.runningHours[data-id="${dataId}"]`).innerText = parseFloat(runningHours).toFixed(2);
|
||||||
document.querySelector(`td.mileage[data-id="${dataId}"]`).innerText = mileage;
|
document.querySelector(`td.mileage[data-id="${dataId}"]`).innerText = parseFloat(mileage).toFixed(2);
|
||||||
|
|
||||||
|
|
||||||
updateStockValue(date,machine_id,closingReading)
|
updateStockValue(date,machine_id,closingReading)
|
||||||
@ -1058,10 +1058,10 @@ foreach ($period as $day) {
|
|||||||
let openingReading = validateInput(document.querySelector(`td.openingReading[data-id="${dataId}"]`).innerText);
|
let openingReading = validateInput(document.querySelector(`td.openingReading[data-id="${dataId}"]`).innerText);
|
||||||
let consumption = validateInput(document.querySelector(`td.consumption[data-id="${dataId}"]`).innerText);
|
let consumption = validateInput(document.querySelector(`td.consumption[data-id="${dataId}"]`).innerText);
|
||||||
let runningHours = Math.abs(Number(closingReading) - Number(openingReading));
|
let runningHours = Math.abs(Number(closingReading) - Number(openingReading));
|
||||||
let mileage = consumption == 0 || runningHours == 0 ? 0 : (Number(consumption) / Number(runningHours)).toFixed(2) ;
|
let mileage = consumption == 0 || runningHours == 0 ? 0 : Number(consumption) / Number(runningHours) ;
|
||||||
|
|
||||||
document.querySelector(`td.runningHours[data-id="${dataId}"]`).innerText = (runningHours).toFixed(2);
|
document.querySelector(`td.runningHours[data-id="${dataId}"]`).innerText = parseFloat(runningHours).toFixed(2);
|
||||||
document.querySelector(`td.mileage[data-id="${dataId}"]`).innerText = mileage;
|
document.querySelector(`td.mileage[data-id="${dataId}"]`).innerText = parseFloat(mileage).toFixed(2);
|
||||||
|
|
||||||
updateStockValue(date, machine_id, closingReading)
|
updateStockValue(date, machine_id, closingReading)
|
||||||
|
|
||||||
@ -1083,10 +1083,10 @@ foreach ($period as $day) {
|
|||||||
let openingReading = validateInput(document.querySelector(`td.openingReading[data-id="${dataId}"]`).innerText);
|
let openingReading = validateInput(document.querySelector(`td.openingReading[data-id="${dataId}"]`).innerText);
|
||||||
let consumption = validateInput(tdElement.innerText);
|
let consumption = validateInput(tdElement.innerText);
|
||||||
let runningHours = Math.abs(Number(closingReading) - Number(openingReading));
|
let runningHours = Math.abs(Number(closingReading) - Number(openingReading));
|
||||||
let mileage = consumption == 0 || runningHours == 0 ? 0 : (Number(consumption) / Number(runningHours)).toFixed(2) ;
|
let mileage = consumption == 0 || runningHours == 0 ? 0 : (Number(consumption) / Number(runningHours)) ;
|
||||||
|
|
||||||
document.querySelector(`td.runningHours[data-id="${dataId}"]`).innerText = (runningHours).toFixed(2);
|
document.querySelector(`td.runningHours[data-id="${dataId}"]`).innerText = parseFloat(runningHours).toFixed(2);
|
||||||
document.querySelector(`td.mileage[data-id="${dataId}"]`).innerText = mileage;
|
document.querySelector(`td.mileage[data-id="${dataId}"]`).innerText = parseFloat(mileage).toFixed(2);
|
||||||
|
|
||||||
updateStockValue(date, machine_id, closingReading)
|
updateStockValue(date, machine_id, closingReading)
|
||||||
|
|
||||||
@ -1119,7 +1119,7 @@ foreach ($period as $day) {
|
|||||||
)});
|
)});
|
||||||
|
|
||||||
|
|
||||||
document.querySelector(`td.fillingTD[data-id="${date}"]`).innerText = totalFillingDiesel;
|
document.querySelector(`td.fillingTD[data-id="${date}"]`).innerText = parseFloat(totalFillingDiesel).toFixed(2) ;
|
||||||
|
|
||||||
let openingTD = validateInput(document.querySelector(`td.openingTD[data-id="${date}"]`).innerText);
|
let openingTD = validateInput(document.querySelector(`td.openingTD[data-id="${date}"]`).innerText);
|
||||||
|
|
||||||
@ -1127,7 +1127,7 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
let balanceTD = (Number(openingTD) + Number(purchaseTD)) - Number(totalFillingDiesel) ;
|
let balanceTD = (Number(openingTD) + Number(purchaseTD)) - Number(totalFillingDiesel) ;
|
||||||
|
|
||||||
document.querySelector(`td.balanceTD[data-id="${date}"]`).innerText = balanceTD ;
|
document.querySelector(`td.balanceTD[data-id="${date}"]`).innerText = parseFloat(balanceTD).toFixed(2) ;
|
||||||
|
|
||||||
updateTotalStockValue(date, balanceTD) ;
|
updateTotalStockValue(date, balanceTD) ;
|
||||||
|
|
||||||
@ -1157,7 +1157,7 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
let balanceTD = (Number(openingTD) + Number(purchaseTD)) - Number(fillingTD) ;
|
let balanceTD = (Number(openingTD) + Number(purchaseTD)) - Number(fillingTD) ;
|
||||||
|
|
||||||
document.querySelector(`td.balanceTD[data-id="${dataId}"]`).innerText = balanceTD ;
|
document.querySelector(`td.balanceTD[data-id="${dataId}"]`).innerText = parseFloat(balanceTD).toFixed(2) ;
|
||||||
|
|
||||||
updateTotalStockValue(dataId , balanceTD)
|
updateTotalStockValue(dataId , balanceTD)
|
||||||
|
|
||||||
@ -1181,7 +1181,7 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
balanceTD = (Number(openingTD) + Number(purchaseTD)) - Number(fillingTD) ;
|
balanceTD = (Number(openingTD) + Number(purchaseTD)) - Number(fillingTD) ;
|
||||||
|
|
||||||
document.querySelector(`td.balanceTD[data-id="${dataId}"]`).innerText = balanceTD ;
|
document.querySelector(`td.balanceTD[data-id="${dataId}"]`).innerText = parseFloat(balanceTD).toFixed(2) ;
|
||||||
|
|
||||||
updateTotalStockValue(dataId, balanceTD) ;
|
updateTotalStockValue(dataId, balanceTD) ;
|
||||||
|
|
||||||
@ -1263,9 +1263,9 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
document.querySelector(`td.runningHours[data-id="${dataId}"]`).innerText = runningHours == 0 ? " " : (runningHours).toFixed(2) ;
|
document.querySelector(`td.runningHours[data-id="${dataId}"]`).innerText = runningHours == 0 ? " " : (runningHours).toFixed(2) ;
|
||||||
|
|
||||||
document.querySelector(`td.mileage[data-id="${dataId}"]`).innerText = mileage == 0 ? " " : mileage ;
|
document.querySelector(`td.mileage[data-id="${dataId}"]`).innerText = mileage == 0 ? " " : parseFloat(mileage).toFixed(2) ;
|
||||||
|
|
||||||
document.querySelector(`td.closingReading[data-id="${dataId}"]`).innerText = closingReading == 0 ? " " : (closingReading).toFixed(2) ;
|
document.querySelector(`td.closingReading[data-id="${dataId}"]`).innerText = closingReading == 0 ? " " : parseFloat(closingReading).toFixed(2) ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1297,7 +1297,7 @@ foreach ($period as $day) {
|
|||||||
let dataId = `${otherDate}`;
|
let dataId = `${otherDate}`;
|
||||||
|
|
||||||
|
|
||||||
document.querySelector(`td.openingTD[data-id="${dataId}"]`).innerText = balanceTD;
|
document.querySelector(`td.openingTD[data-id="${dataId}"]`).innerText = parseFloat(balanceTD).toFixed(2) ;
|
||||||
|
|
||||||
let openingTD = document.querySelector(`td.openingTD[data-id="${dataId}"]`).innerText;
|
let openingTD = document.querySelector(`td.openingTD[data-id="${dataId}"]`).innerText;
|
||||||
|
|
||||||
@ -1310,7 +1310,7 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
balanceTD = (Number(openingTD) + Number(purchaseTD)) - Number(fillingTD) ;
|
balanceTD = (Number(openingTD) + Number(purchaseTD)) - Number(fillingTD) ;
|
||||||
|
|
||||||
document.querySelector(`td.balanceTD[data-id="${dataId}"]`).innerText = balanceTD ;
|
document.querySelector(`td.balanceTD[data-id="${dataId}"]`).innerText = parseFloat(balanceTD).toFixed(2) ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1360,4 +1360,42 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("keydown", function (event) {
|
||||||
|
|
||||||
|
if (event.key === "Enter") {
|
||||||
|
|
||||||
|
let activeElement = document.activeElement;
|
||||||
|
|
||||||
|
// Check if the focused element is inside a table
|
||||||
|
let cell = activeElement.closest("td, th");
|
||||||
|
let table = activeElement.closest("table");
|
||||||
|
|
||||||
|
if (table && cell) {
|
||||||
|
event.preventDefault(); // Prevent form submission
|
||||||
|
|
||||||
|
let columnIndex = cell.cellIndex; // Get the current column index
|
||||||
|
|
||||||
|
let currentRow = cell.parentElement; // Get the current row
|
||||||
|
|
||||||
|
let nextRow = currentRow.nextElementSibling; // Get the next row
|
||||||
|
|
||||||
|
|
||||||
|
// Move to the same column in the next row if available
|
||||||
|
if (nextRow) {
|
||||||
|
|
||||||
|
|
||||||
|
let nextCell = nextRow.cells[columnIndex];
|
||||||
|
|
||||||
|
if (nextCell) {
|
||||||
|
|
||||||
|
nextCell.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -650,3 +650,41 @@
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("keydown", function (event) {
|
||||||
|
|
||||||
|
if (event.key === "Enter") {
|
||||||
|
|
||||||
|
let activeElement = document.activeElement;
|
||||||
|
|
||||||
|
// Check if the focused element is inside a table
|
||||||
|
let cell = activeElement.closest("td, th");
|
||||||
|
let table = activeElement.closest("table");
|
||||||
|
|
||||||
|
if (table && cell) {
|
||||||
|
event.preventDefault(); // Prevent form submission
|
||||||
|
|
||||||
|
let columnIndex = cell.cellIndex; // Get the current column index
|
||||||
|
|
||||||
|
let currentRow = cell.parentElement; // Get the current row
|
||||||
|
|
||||||
|
let nextRow = currentRow.nextElementSibling; // Get the next row
|
||||||
|
|
||||||
|
|
||||||
|
// Move to the same column in the next row if available
|
||||||
|
if (nextRow) {
|
||||||
|
|
||||||
|
|
||||||
|
let nextCell = nextRow.cells[columnIndex];
|
||||||
|
|
||||||
|
if (nextCell) {
|
||||||
|
|
||||||
|
nextCell.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -291,21 +291,18 @@
|
|||||||
|
|
||||||
<thead class="celda_encabezado_general" style="padding: 10px;">
|
<thead class="celda_encabezado_general" style="padding: 10px;">
|
||||||
|
|
||||||
<tr>
|
|
||||||
|
|
||||||
<th class="celda_encabezado_general" colspan="14">SEP- GAS CONSUMPTION-422 & 425 kg </th>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th class="celda_encabezado_general" rowspan="1" colspan="1">RIPL </th>
|
<th class="celda_encabezado_general" rowspan="1" colspan="1">RIPL </th>
|
||||||
<th class="celda_encabezado_general" colspan="6">Gas Stock </th>
|
<th class="celda_encabezado_general" colspan="6">Gas Stock </th>
|
||||||
<th class="celda_encabezado_general">10 Ton</th>
|
<th class="celda_encabezado_general">FBD 10 Ton Dryer</th>
|
||||||
<th class="celda_encabezado_general">Sand Dried</th>
|
<th class="celda_encabezado_general">Sand Dried</th>
|
||||||
<th class="celda_encabezado_general">Coating Machine</th>
|
<th class="celda_encabezado_general">Coating Machine</th>
|
||||||
<th class="celda_encabezado_general">Sand Coated</th>
|
<th class="celda_encabezado_general">Sand Coated</th>
|
||||||
<th class="celda_encabezado_general" colspan="2">Trp Machine </th>
|
<th class="celda_encabezado_general" colspan="2">TRP </th>
|
||||||
<th class="celda_encabezado_general">Sand TRP</th>
|
<th class="celda_encabezado_general">Sand TRP</th>
|
||||||
<th class="celda_encabezado_general">Rotary Drier </th>
|
<th class="celda_encabezado_general">Rotary Drier </th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -319,12 +316,12 @@
|
|||||||
<th class="celda_encabezado_general">Consumption </th>
|
<th class="celda_encabezado_general">Consumption </th>
|
||||||
<th class="celda_encabezado_general">Balance Stock</th>
|
<th class="celda_encabezado_general">Balance Stock</th>
|
||||||
<th class="celda_encabezado_general">Consumption </th>
|
<th class="celda_encabezado_general">Consumption </th>
|
||||||
<th class="celda_encabezado_general">ton </th>
|
<th class="celda_encabezado_general">Ton </th>
|
||||||
<th class="celda_encabezado_general">Consumption</th>
|
<th class="celda_encabezado_general">Consumption</th>
|
||||||
<th class="celda_encabezado_general">ton </th>
|
<th class="celda_encabezado_general">Ton </th>
|
||||||
<th class="celda_encabezado_general">Panel Consumption</th>
|
<th class="celda_encabezado_general">Panel Consumption</th>
|
||||||
<th class="celda_encabezado_general">Physical Consumption</th>
|
<th class="celda_encabezado_general">Physical Consumption</th>
|
||||||
<th class="celda_encabezado_general">ton </th>
|
<th class="celda_encabezado_general">Ton </th>
|
||||||
<th class="celda_encabezado_general">Consumption</th>
|
<th class="celda_encabezado_general">Consumption</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@ -514,11 +511,11 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th class="celda_encabezado_total" rowspan="1" colspan="1">RIPL </th>
|
<th class="celda_encabezado_total" rowspan="1" colspan="1">RIPL </th>
|
||||||
<th class="celda_encabezado_total" colspan="6">Gas Stock </th>
|
<th class="celda_encabezado_total" colspan="6">Gas Stock </th>
|
||||||
<th class="celda_encabezado_total">10 Ton</th>
|
<th class="celda_encabezado_total">FBD 10 Ton Dryer</th>
|
||||||
<th class="celda_encabezado_total">Sand Dried</th>
|
<th class="celda_encabezado_total">Sand Dried</th>
|
||||||
<th class="celda_encabezado_total">Coating Machine</th>
|
<th class="celda_encabezado_total">Coating Machine</th>
|
||||||
<th class="celda_encabezado_total">Sand Coated</th>
|
<th class="celda_encabezado_total">Sand Coated</th>
|
||||||
<th class="celda_encabezado_total" colspan="2">Trp Machine </th>
|
<th class="celda_encabezado_total" colspan="2">TRP </th>
|
||||||
<th class="celda_encabezado_total">Sand TRP</th>
|
<th class="celda_encabezado_total">Sand TRP</th>
|
||||||
<th class="celda_encabezado_total">Rotary Drier </th>
|
<th class="celda_encabezado_total">Rotary Drier </th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -1142,3 +1139,41 @@ function convertToDate(dateString) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("keydown", function (event) {
|
||||||
|
|
||||||
|
if (event.key === "Enter") {
|
||||||
|
|
||||||
|
let activeElement = document.activeElement;
|
||||||
|
|
||||||
|
// Check if the focused element is inside a table
|
||||||
|
let cell = activeElement.closest("td, th");
|
||||||
|
let table = activeElement.closest("table");
|
||||||
|
|
||||||
|
if (table && cell) {
|
||||||
|
event.preventDefault(); // Prevent form submission
|
||||||
|
|
||||||
|
let columnIndex = cell.cellIndex; // Get the current column index
|
||||||
|
|
||||||
|
let currentRow = cell.parentElement; // Get the current row
|
||||||
|
|
||||||
|
let nextRow = currentRow.nextElementSibling; // Get the next row
|
||||||
|
|
||||||
|
|
||||||
|
// Move to the same column in the next row if available
|
||||||
|
if (nextRow) {
|
||||||
|
|
||||||
|
|
||||||
|
let nextCell = nextRow.cells[columnIndex];
|
||||||
|
|
||||||
|
if (nextCell) {
|
||||||
|
|
||||||
|
nextCell.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
@ -28,6 +28,12 @@
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .fht-table td[contenteditable="true"] {
|
||||||
|
background-color: lightyellow;
|
||||||
|
color:rgb(13, 7, 7);
|
||||||
|
} */
|
||||||
|
|
||||||
|
|
||||||
.fht-table {
|
.fht-table {
|
||||||
border: 0 none;
|
border: 0 none;
|
||||||
height: auto;
|
height: auto;
|
||||||
@ -1756,3 +1762,42 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("keydown", function (event) {
|
||||||
|
|
||||||
|
if (event.key === "Enter") {
|
||||||
|
|
||||||
|
let activeElement = document.activeElement;
|
||||||
|
|
||||||
|
// Check if the focused element is inside a table
|
||||||
|
let cell = activeElement.closest("td, th");
|
||||||
|
let table = activeElement.closest("table");
|
||||||
|
|
||||||
|
if (table && cell) {
|
||||||
|
event.preventDefault(); // Prevent form submission
|
||||||
|
|
||||||
|
let columnIndex = cell.cellIndex; // Get the current column index
|
||||||
|
|
||||||
|
let currentRow = cell.parentElement; // Get the current row
|
||||||
|
|
||||||
|
let nextRow = currentRow.nextElementSibling; // Get the next row
|
||||||
|
|
||||||
|
|
||||||
|
// Move to the same column in the next row if available
|
||||||
|
if (nextRow) {
|
||||||
|
|
||||||
|
|
||||||
|
let nextCell = nextRow.cells[columnIndex];
|
||||||
|
|
||||||
|
if (nextCell) {
|
||||||
|
|
||||||
|
nextCell.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
@ -17,6 +17,11 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .fht-table td[contenteditable="true"] {
|
||||||
|
background-color: lightyellow;
|
||||||
|
color:rgb(13, 7, 7);
|
||||||
|
} */
|
||||||
|
|
||||||
.fht-table td:hover {
|
.fht-table td:hover {
|
||||||
background-color: #50bbd9;
|
background-color: #50bbd9;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
@ -1075,7 +1080,7 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
let totalUnits = parseFloat(closingUnits) - parseFloat(openingUnits) ;
|
let totalUnits = parseFloat(closingUnits) - parseFloat(openingUnits) ;
|
||||||
|
|
||||||
document.querySelector(`td.totalUnits[data-id="${dataId}"]`).innerText = (totalUnits).toFixed(2);
|
document.querySelector(`td.totalUnits[data-id="${dataId}"]`).innerText = parseFloat(totalUnits).toFixed(2);
|
||||||
|
|
||||||
|
|
||||||
updateStockValue(date,machine_id,closingUnits)
|
updateStockValue(date,machine_id,closingUnits)
|
||||||
@ -1098,7 +1103,7 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
let totalUnits = parseFloat(closingUnits) - parseFloat(openingUnits) ;
|
let totalUnits = parseFloat(closingUnits) - parseFloat(openingUnits) ;
|
||||||
|
|
||||||
document.querySelector(`td.totalUnits[data-id="${dataId}"]`).innerText = (totalUnits).toFixed(2);
|
document.querySelector(`td.totalUnits[data-id="${dataId}"]`).innerText = parseFloat(totalUnits).toFixed(2);
|
||||||
|
|
||||||
|
|
||||||
updateStockValue(date,machine_id,closingUnits)
|
updateStockValue(date,machine_id,closingUnits)
|
||||||
@ -1125,9 +1130,9 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
let totalUnitsTP = totalReadingTP * 60 ;
|
let totalUnitsTP = totalReadingTP * 60 ;
|
||||||
|
|
||||||
document.querySelector(`td.totalReadingTP[data-id="${dataId}"]`).innerText = (totalReadingTP).toFixed(2) ;
|
document.querySelector(`td.totalReadingTP[data-id="${dataId}"]`).innerText = parseFloat(totalReadingTP).toFixed(2) ;
|
||||||
|
|
||||||
document.querySelector(`td.totalUnitsTP[data-id="${dataId}"]`).innerText = (totalUnitsTP).toFixed(2) ;
|
document.querySelector(`td.totalUnitsTP[data-id="${dataId}"]`).innerText = parseFloat(totalUnitsTP).toFixed(2) ;
|
||||||
|
|
||||||
updateTotalStockValue(dataId , finalTP) ;
|
updateTotalStockValue(dataId , finalTP) ;
|
||||||
|
|
||||||
@ -1153,9 +1158,9 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
let totalUnitsTP = totalReadingTP * 60 ;
|
let totalUnitsTP = totalReadingTP * 60 ;
|
||||||
|
|
||||||
document.querySelector(`td.totalReadingTP[data-id="${dataId}"]`).innerText = (totalReadingTP).toFixed(2) ;
|
document.querySelector(`td.totalReadingTP[data-id="${dataId}"]`).innerText = parseFloat(totalReadingTP).toFixed(2) ;
|
||||||
|
|
||||||
document.querySelector(`td.totalUnitsTP[data-id="${dataId}"]`).innerText = (totalUnitsTP).toFixed(2) ;
|
document.querySelector(`td.totalUnitsTP[data-id="${dataId}"]`).innerText = parseFloat(totalUnitsTP).toFixed(2) ;
|
||||||
|
|
||||||
updateTotalStockValue(dataId , finalTP)
|
updateTotalStockValue(dataId , finalTP)
|
||||||
|
|
||||||
@ -1176,7 +1181,7 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
let mdTP = validateInput(tdElement.innerText);
|
let mdTP = validateInput(tdElement.innerText);
|
||||||
|
|
||||||
document.querySelector(`td.mfTP[data-id="${dataId}"]`).innerText = (mdTP * 60).toFixed(2) ;
|
document.querySelector(`td.mfTP[data-id="${dataId}"]`).innerText = parseFloat(mdTP * 60).toFixed(2) ;
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
@ -1236,7 +1241,7 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
let dataId = `${otherDate} ${machine_id}`;
|
let dataId = `${otherDate} ${machine_id}`;
|
||||||
|
|
||||||
document.querySelector(`td.openingUnits[data-id="${dataId}"]`).innerText = closingUnits == 0 ? " " : closingUnits ;
|
document.querySelector(`td.openingUnits[data-id="${dataId}"]`).innerText = closingUnits == 0 ? " " : parseFloat(closingUnits).toFixed(2) ;
|
||||||
|
|
||||||
let openingUnits = validateInput(document.querySelector(`td.openingUnits[data-id="${dataId}"]`).innerText);
|
let openingUnits = validateInput(document.querySelector(`td.openingUnits[data-id="${dataId}"]`).innerText);
|
||||||
|
|
||||||
@ -1244,7 +1249,7 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
closingUnits = Math.abs(Number(openingUnits) + Number(totalUnits));
|
closingUnits = Math.abs(Number(openingUnits) + Number(totalUnits));
|
||||||
|
|
||||||
document.querySelector(`td.closingUnits[data-id="${dataId}"]`).innerText = closingUnits == 0 ? " " : closingUnits ;
|
document.querySelector(`td.closingUnits[data-id="${dataId}"]`).innerText = closingUnits == 0 ? " " : parseFloat(closingUnits).toFixed(2) ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1275,7 +1280,7 @@ foreach ($period as $day) {
|
|||||||
let dataId = `${otherDate}`;
|
let dataId = `${otherDate}`;
|
||||||
|
|
||||||
|
|
||||||
document.querySelector(`td.openingTP[data-id="${dataId}"]`).innerText = finalTP == 0 ? " " : finalTP ;
|
document.querySelector(`td.openingTP[data-id="${dataId}"]`).innerText = finalTP == 0 ? " " : parseFloat(finalTP).toFixed(2) ;
|
||||||
|
|
||||||
let openingTP = validateInput(document.querySelector(`td.openingTP[data-id="${dataId}"]`).innerText) ;
|
let openingTP = validateInput(document.querySelector(`td.openingTP[data-id="${dataId}"]`).innerText) ;
|
||||||
|
|
||||||
@ -1290,9 +1295,9 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
document.querySelector(`td.finalTP[data-id="${dataId}"]`).innerText = finalTP == 0 ? " " : finalTP;
|
document.querySelector(`td.finalTP[data-id="${dataId}"]`).innerText = finalTP == 0 ? " " : parseFloat(finalTP).toFixed(2) ;
|
||||||
document.querySelector(`td.totalReadingTP[data-id="${dataId}"]`).innerText = totalReadingTP == 0 ? " " : totalReadingTP ;
|
document.querySelector(`td.totalReadingTP[data-id="${dataId}"]`).innerText = totalReadingTP == 0 ? " " : parseFloat(totalReadingTP).toFixed(2) ;
|
||||||
document.querySelector(`td.totalUnitsTP[data-id="${dataId}"]`).innerText = totalUnitsTP == 0 ? " " : totalUnitsTP;
|
document.querySelector(`td.totalUnitsTP[data-id="${dataId}"]`).innerText = totalUnitsTP == 0 ? " " : parseFloat(totalUnitsTP).toFixed(2) ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1344,4 +1349,39 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("keydown", function (event) {
|
||||||
|
|
||||||
|
if (event.key === "Enter") {
|
||||||
|
|
||||||
|
let activeElement = document.activeElement;
|
||||||
|
|
||||||
|
// Check if the focused element is inside a table
|
||||||
|
let cell = activeElement.closest("td, th");
|
||||||
|
let table = activeElement.closest("table");
|
||||||
|
|
||||||
|
if (table && cell) {
|
||||||
|
event.preventDefault(); // Prevent form submission
|
||||||
|
|
||||||
|
let columnIndex = cell.cellIndex; // Get the current column index
|
||||||
|
|
||||||
|
let currentRow = cell.parentElement; // Get the current row
|
||||||
|
|
||||||
|
let nextRow = currentRow.nextElementSibling; // Get the next row
|
||||||
|
|
||||||
|
// Move to the same column in the next row if available
|
||||||
|
if (nextRow) {
|
||||||
|
|
||||||
|
let nextCell = nextRow.cells[columnIndex];
|
||||||
|
|
||||||
|
if (nextCell) {
|
||||||
|
nextCell.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -21,6 +21,11 @@
|
|||||||
background-color: #50bbd9;
|
background-color: #50bbd9;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
.fht-table td[contenteditable="true"] {
|
||||||
|
background-color: lightyellow;
|
||||||
|
color:rgb(13, 7, 7);
|
||||||
|
} */
|
||||||
|
|
||||||
.fht-table {
|
.fht-table {
|
||||||
border: 0 none;
|
border: 0 none;
|
||||||
@ -953,4 +958,42 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("keydown", function (event) {
|
||||||
|
|
||||||
|
if (event.key === "Enter") {
|
||||||
|
|
||||||
|
let activeElement = document.activeElement;
|
||||||
|
|
||||||
|
// Check if the focused element is inside a table
|
||||||
|
let cell = activeElement.closest("td, th");
|
||||||
|
let table = activeElement.closest("table");
|
||||||
|
|
||||||
|
if (table && cell) {
|
||||||
|
event.preventDefault(); // Prevent form submission
|
||||||
|
|
||||||
|
let columnIndex = cell.cellIndex; // Get the current column index
|
||||||
|
|
||||||
|
let currentRow = cell.parentElement; // Get the current row
|
||||||
|
|
||||||
|
let nextRow = currentRow.nextElementSibling; // Get the next row
|
||||||
|
|
||||||
|
|
||||||
|
// Move to the same column in the next row if available
|
||||||
|
if (nextRow) {
|
||||||
|
|
||||||
|
|
||||||
|
let nextCell = nextRow.cells[columnIndex];
|
||||||
|
|
||||||
|
if (nextCell) {
|
||||||
|
|
||||||
|
nextCell.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -706,3 +706,43 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("keydown", function (event) {
|
||||||
|
|
||||||
|
if (event.key === "Enter") {
|
||||||
|
|
||||||
|
let activeElement = document.activeElement;
|
||||||
|
|
||||||
|
// Check if the focused element is inside a table
|
||||||
|
let cell = activeElement.closest("td, th");
|
||||||
|
let table = activeElement.closest("table");
|
||||||
|
|
||||||
|
if (table && cell) {
|
||||||
|
event.preventDefault(); // Prevent form submission
|
||||||
|
|
||||||
|
let columnIndex = cell.cellIndex; // Get the current column index
|
||||||
|
|
||||||
|
let currentRow = cell.parentElement; // Get the current row
|
||||||
|
|
||||||
|
let nextRow = currentRow.nextElementSibling; // Get the next row
|
||||||
|
|
||||||
|
|
||||||
|
// Move to the same column in the next row if available
|
||||||
|
if (nextRow) {
|
||||||
|
|
||||||
|
|
||||||
|
let nextCell = nextRow.cells[columnIndex];
|
||||||
|
|
||||||
|
if (nextCell) {
|
||||||
|
|
||||||
|
nextCell.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user