stock module latest today vadivel J 10-1-2025
This commit is contained in:
parent
6f6a12d301
commit
fa4cda1196
1031
api_test.http
1031
api_test.http
File diff suppressed because it is too large
Load Diff
@ -1294,10 +1294,12 @@ class StockController extends BaseController
|
|||||||
|
|
||||||
$month = $formattedDate;
|
$month = $formattedDate;
|
||||||
} else {
|
} else {
|
||||||
$month = new DateTime('2024-11-01');
|
|
||||||
$month = $month->format('Y-m');
|
|
||||||
|
|
||||||
// $month = date('Y-m');
|
// $month = new DateTime('2024-10-01');
|
||||||
|
// $month = $month->format('Y-m');
|
||||||
|
|
||||||
|
$month = date('Y-m');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = [];
|
$data = [];
|
||||||
@ -1309,13 +1311,25 @@ class StockController extends BaseController
|
|||||||
$startDate = "$month-01";
|
$startDate = "$month-01";
|
||||||
$endDate = date("Y-m-t", strtotime($startDate));
|
$endDate = date("Y-m-t", strtotime($startDate));
|
||||||
|
|
||||||
|
$trpProductionMaintenanceData = $this->TrpProductionMaintenance_model
|
||||||
|
->where('date >=', $startDate)
|
||||||
|
->where('date <=', $endDate)
|
||||||
|
->find();
|
||||||
|
|
||||||
|
if(empty($trpProductionMaintenanceData)){
|
||||||
|
|
||||||
|
$inserts = [];
|
||||||
|
|
||||||
|
$inserts = $this->generateDummyData($startDate, $endDate);
|
||||||
|
|
||||||
|
$data['trpProductionMaintenanceData'] = $this->updateTrpProductionDetails($inserts);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$data['trpProductionDetails'] = $this->TrpProduction_model->trpProductionDetails($startDate,$endDate);
|
$data['trpProductionDetails'] = $this->TrpProduction_model->trpProductionDetails($startDate,$endDate);
|
||||||
|
|
||||||
if(!empty($data['trpProductionDetails'])){
|
|
||||||
// $data['trpProductionDetails'] = $this->supplierArrangement($data['trpProductionDetails']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// dd($data['trpProductionDetails']);
|
// dd($data['trpProductionDetails']);
|
||||||
|
|
||||||
@ -1328,68 +1342,33 @@ class StockController extends BaseController
|
|||||||
|
|
||||||
$data['month'] = $formattedDate;
|
$data['month'] = $formattedDate;
|
||||||
|
|
||||||
return $this->response->setJSON($data);
|
|
||||||
|
|
||||||
// return $this->loadViews("trpProductionStockDetails", $this->global, $data, NULL);
|
return $this->loadViews("trpProductionStockDetails", $this->global, $data, NULL);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function supplierArrangement($dataArray)
|
|
||||||
{
|
|
||||||
|
|
||||||
foreach ($dataArray as $key => $data) {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$reclamationSuppliers = explode(',', $data['reclamationSuppliers']);
|
public function updateTrpProductionDetails($inserts) {
|
||||||
$TotalRsQuantities = explode(',', $data['TotalRsQuantities']);
|
|
||||||
|
|
||||||
$wasteCoreSuppliers = explode(',', $data['wasteCoreSuppliers']);
|
|
||||||
$TotalQuantities = explode(',', $data['TotalQuantities']);
|
|
||||||
|
|
||||||
$result = [];
|
|
||||||
|
|
||||||
|
|
||||||
$data['reclamationSuppliers'] = $this->mapSuppliersToQuantities($reclamationSuppliers, $TotalRsQuantities);
|
|
||||||
|
|
||||||
$data['wasteCoreSuppliers'] = $this->mapSuppliersToQuantities($wasteCoreSuppliers, $TotalQuantities);
|
|
||||||
|
|
||||||
unset($data['TotalRsQuantities'], $data['TotalQuantities']);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return $data;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private function mapSuppliersToQuantities($suppliers, $quantities)
|
|
||||||
{
|
|
||||||
$result = [];
|
|
||||||
|
|
||||||
foreach ($suppliers as $index => $supplier) {
|
|
||||||
$result[$supplier] = $quantities[$index];
|
|
||||||
}
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function updateTrpProductionDetails() {
|
|
||||||
|
|
||||||
$postData = $this->request->getPost();
|
$postData = $this->request->getPost();
|
||||||
|
|
||||||
$updateTrpProductionDetails = json_decode($postData['updateTrpProductionDetails'], true);
|
$postData = $this->request->getJSON(true); // Converts JSON to an associative array
|
||||||
|
|
||||||
|
if(empty($postData)){
|
||||||
|
if(empty($inserts)){
|
||||||
|
return $this->response->setJSON(['error' => 'No data found to update']);
|
||||||
|
}else{
|
||||||
|
$postData['updateTrpProductionDetails'] = $inserts;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$updateTrpProductionDetails = $postData['updateTrpProductionDetails'];
|
||||||
|
|
||||||
$updateProduction = [];
|
$updateProduction = [];
|
||||||
$updateMaintanence = [];
|
$updateMaintanence = [];
|
||||||
@ -1520,6 +1499,66 @@ class StockController extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function generateDummyData($startDate, $endDate)
|
||||||
|
{
|
||||||
|
$datesInMonth = [];
|
||||||
|
$inserts = [];
|
||||||
|
|
||||||
|
$period = new DatePeriod(
|
||||||
|
new DateTime($startDate),
|
||||||
|
new DateInterval('P1D'),
|
||||||
|
(new DateTime($endDate))->modify('+1 day')
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($period as $day) {
|
||||||
|
$datesInMonth[] = $day->format('Y-m-d');
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($datesInMonth as $datesInMonthIndex => $dateInMonth) {
|
||||||
|
|
||||||
|
$inserts[] = [
|
||||||
|
'Date' => $dateInMonth,
|
||||||
|
'openingTime' => '00:00',
|
||||||
|
'closingTime' => '00:00',
|
||||||
|
'totalHours' => '00:00',
|
||||||
|
'coldStart' => '00:00',
|
||||||
|
'breakdownHours' => '00:00',
|
||||||
|
'burnerFiringHours' => '00:00',
|
||||||
|
'sandFeedingHours' => '00:00',
|
||||||
|
'workingPersonEngineers' => 0,
|
||||||
|
'workingPersonSupervisiors' => 0,
|
||||||
|
'workingPersonOperators' => 0,
|
||||||
|
'rollerDrivers' => 0,
|
||||||
|
'natureOfMaintenance' => '',
|
||||||
|
'location' => '',
|
||||||
|
'description' => '',
|
||||||
|
'gasReceiptBg' => 0,
|
||||||
|
'gasReceiptPg' => 0,
|
||||||
|
'physicalGasConsumption' => 0,
|
||||||
|
'trpPlusDrierGasConsumption' => 0,
|
||||||
|
'trpPhysicalGasPerTon' => 0,
|
||||||
|
'panelGasConsumption' => 0,
|
||||||
|
'panelGasPerTon' => 0,
|
||||||
|
'edRunningHours' => 0,
|
||||||
|
'edProduction' => 0,
|
||||||
|
'edUsage' => 0,
|
||||||
|
'trpProduction' => 0,
|
||||||
|
'trpProductionPerHour' => 0,
|
||||||
|
'waterReceipt' => 0,
|
||||||
|
'waterConsumption' => 0,
|
||||||
|
'ebReading' => 0,
|
||||||
|
'ebReadingPerUnitTon' => 0,
|
||||||
|
'msSeperation' => 0,
|
||||||
|
'edWaste' => 0,
|
||||||
|
'coolerBags' => 0,
|
||||||
|
'edPlus20Waste' => 0,
|
||||||
|
'cycloneWaste' => 0
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $inserts;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -54,6 +54,9 @@ class TrpProductionModel extends Model
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Subquery definition
|
// Subquery definition
|
||||||
$subquery = $this->db->table('t_materialmaster')
|
$subquery = $this->db->table('t_materialmaster')
|
||||||
->select('materialCode')
|
->select('materialCode')
|
||||||
@ -119,12 +122,10 @@ class TrpProductionModel extends Model
|
|||||||
|
|
||||||
tsu.total_kgs as coating,
|
tsu.total_kgs as coating,
|
||||||
|
|
||||||
invItems.client_name as coreReclamationSupplier,
|
invItems.*,
|
||||||
invItems.TotalRsQuantity,
|
|
||||||
|
|
||||||
|
|
||||||
tigrd.SupplierName as wasteCoreSupplier,
|
tigrdot.*
|
||||||
tigrd.TotalQuantityAsPerInvoice
|
|
||||||
|
|
||||||
|
|
||||||
FROM
|
FROM
|
||||||
@ -144,27 +145,38 @@ class TrpProductionModel extends Model
|
|||||||
|
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
(
|
(
|
||||||
Select
|
SELECT
|
||||||
clients.client_name,
|
invItems.item_date_added,
|
||||||
invItems.item_date_added,
|
SUM(CASE WHEN clients.client_name = 'ASHOK LEYLAND LIMITED (FOUNDRY DIVISION-SRIPERUMBUDUR)' THEN invItems.item_quantity ELSE 0 END) AS
|
||||||
SUM(invItems.item_quantity) AS TotalRsQuantity
|
`ALs_crs`,
|
||||||
|
SUM(CASE WHEN clients.client_name = 'NEMAK ALUMINIUM CASTING INDIA PVT LTD' THEN invItems.item_quantity ELSE 0 END) AS
|
||||||
|
`Nemak_crs`,
|
||||||
|
SUM(CASE WHEN clients.client_name = 'MADRAS ENGINEERING INDUSTRIES PRIVATE LIMITED' THEN invItems.item_quantity ELSE 0 END) AS
|
||||||
|
`ME_crs`,
|
||||||
|
SUM(CASE WHEN clients.client_name = 'BRAKES INDIA PRIVATE LIMITED' THEN invItems.item_quantity ELSE 0 END) AS
|
||||||
|
`BI_crs`,
|
||||||
|
SUM(CASE WHEN clients.client_name = 'KARMEN INTERNATIONAL PVT LTD' THEN invItems.item_quantity ELSE 0 END) AS
|
||||||
|
`Karmen_crs`
|
||||||
|
|
||||||
from ip_invoice_items invItems
|
|
||||||
|
|
||||||
-- All joins to get client name thats it
|
FROM
|
||||||
LEFT JOIN
|
ip_invoice_items invItems
|
||||||
ip_invoices inv
|
LEFT JOIN
|
||||||
ON inv.invoice_id = invItems.invoice_id
|
ip_invoices inv ON inv.invoice_id = invItems.invoice_id
|
||||||
|
LEFT JOIN
|
||||||
|
ip_clients clients ON clients.client_id = inv.client_id
|
||||||
|
WHERE
|
||||||
|
invItems.item_name = 'Core Sand Reclaimed'
|
||||||
|
|
||||||
LEFT JOIN
|
AND
|
||||||
ip_clients clients
|
invItems.item_date_added >= '$startDate'
|
||||||
ON clients.client_id = inv.client_id
|
|
||||||
|
|
||||||
-- getting core reclamation sand
|
AND
|
||||||
Where invItems.item_name = 'Core Sand Reclaimed'
|
invItems.item_date_added <= '$endDate'
|
||||||
|
|
||||||
|
GROUP BY
|
||||||
|
invItems.item_date_added
|
||||||
|
|
||||||
-- grouping Client who provides reclamation sand on a particular date with 1 or more invoices
|
|
||||||
Group By invItems.item_date_added , clients.client_name
|
|
||||||
|
|
||||||
) invItems
|
) invItems
|
||||||
ON invItems.item_date_added = tpmd.date
|
ON invItems.item_date_added = tpmd.date
|
||||||
@ -173,8 +185,25 @@ class TrpProductionModel extends Model
|
|||||||
|
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
(
|
(
|
||||||
Select tigrd.CreatedDate ,tigrd.MaterialCode , tigrd.IGRNo , ts.SupplierName,
|
|
||||||
SUM(QuantityAsPerInvoice) AS TotalQuantityAsPerInvoice
|
Select
|
||||||
|
|
||||||
|
tigrd.CreatedDate ,
|
||||||
|
|
||||||
|
SUM(CASE WHEN ts.SupplierName = 'ASHOK LEYLAND LIMITED FOUNDRY DIVN - SPU' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS
|
||||||
|
`ALs_wcs`,
|
||||||
|
SUM(CASE WHEN ts.SupplierName = 'ASHOK LEYLAND LIMITED FOUNDRY DIVN - ENU' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS
|
||||||
|
`ALe_wcs`,
|
||||||
|
SUM(CASE WHEN ts.SupplierName = 'MADRAS ENGINEERING INDUSTRIES PRIVATE LIMITED' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS
|
||||||
|
`ME_wcs`,
|
||||||
|
SUM(CASE WHEN ts.SupplierName = 'SIDDHARTH INDUSTRIES' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS
|
||||||
|
`SI_wcs`,
|
||||||
|
SUM(CASE WHEN ts.SupplierName = 'Caparo Engineering India Limited' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS
|
||||||
|
`caparo_wcs`,
|
||||||
|
SUM(CASE WHEN ts.SupplierName = 'NEMAK ALUMINIUM CASTING INDIA PVT LTD' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS
|
||||||
|
`Nemak_wcs`,
|
||||||
|
SUM(CASE WHEN ts.SupplierName = 'DR AXION INDIA PRIVATE LIMITED' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS
|
||||||
|
`DR_wcs`
|
||||||
|
|
||||||
from t_igr_details tigrd
|
from t_igr_details tigrd
|
||||||
|
|
||||||
@ -192,13 +221,21 @@ class TrpProductionModel extends Model
|
|||||||
ON tpom.SupplierID = ts.SupplierID
|
ON tpom.SupplierID = ts.SupplierID
|
||||||
|
|
||||||
-- getting waste core sands using three distinct material codes
|
-- getting waste core sands using three distinct material codes
|
||||||
Where tigrd.MaterialCode IN ($materialCodesString)
|
Where
|
||||||
|
tigrd.MaterialCode IN ($materialCodesString)
|
||||||
|
|
||||||
|
AND
|
||||||
|
tigrd.CreatedDate >= '$startDate'
|
||||||
|
|
||||||
|
AND
|
||||||
|
tigrd.CreatedDate <= '$endDate'
|
||||||
|
|
||||||
-- grouping supplier who provides waste core on a particular date with 1 or more IGRS
|
-- grouping supplier who provides waste core on a particular date with 1 or more IGRS
|
||||||
Group By Date(tigrd.CreatedDate) , ts.SupplierName
|
Group By Date(tigrd.CreatedDate)
|
||||||
|
|
||||||
) tigrd
|
) tigrdot
|
||||||
ON DATE(tigrd.CreatedDate) = tpmd.date
|
|
||||||
|
ON DATE(tigrdot.CreatedDate) = tpmd.date
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -214,89 +251,6 @@ class TrpProductionModel extends Model
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// "SELECT
|
|
||||||
// tpmd.date,
|
|
||||||
// tpmd.openingTime,
|
|
||||||
// tpmd.closingTime,
|
|
||||||
// tpmd.totalHours,
|
|
||||||
// tpmd.coldStart,
|
|
||||||
// tpmd.breakdownHours,
|
|
||||||
// tpmd.burnerFiringHours,
|
|
||||||
// tpmd.sandFeedingHours,
|
|
||||||
// tpmd.workingPersonEngineers,
|
|
||||||
// tpmd.workingPersonSupervisiors,
|
|
||||||
// tpmd.workingPersonOperators,
|
|
||||||
// tpmd.rollerDrivers,
|
|
||||||
// tpmd.natureOfMaintenance,
|
|
||||||
// tpmd.location,
|
|
||||||
// tpmd.description,
|
|
||||||
|
|
||||||
// tpd.gasReceiptBg,
|
|
||||||
// tpd.gasReceiptPg,
|
|
||||||
// tpd.physicalGasConsumption,
|
|
||||||
// tpd.trpPlusDrierGasConsumption,
|
|
||||||
// tpd.trpPhysicalGasPerTon,
|
|
||||||
// tpd.panelGasConsumption,
|
|
||||||
// tpd.panelGasPerTon,
|
|
||||||
// tpd.edRunningHours,
|
|
||||||
// tpd.edProduction,
|
|
||||||
// tpd.edUsage,
|
|
||||||
// tpd.trpProduction,
|
|
||||||
// tpd.trpProductionPerHour,
|
|
||||||
// tpd.waterReceipt,
|
|
||||||
// tpd.waterConsumption,
|
|
||||||
// tpd.ebReading,
|
|
||||||
// tpd.ebReadingPerUnitTon,
|
|
||||||
|
|
||||||
// tpwd.msSeperation,
|
|
||||||
// tpwd.edWaste,
|
|
||||||
// tpwd.coolerBags,
|
|
||||||
// tpwd.edPlus20Waste,
|
|
||||||
// tpwd.cycloneWaste,
|
|
||||||
|
|
||||||
// tcmd.totalGasConsumption AS coatingGasConsumption,
|
|
||||||
// tdmd.total_gas_consumption AS drierGasConsumption,
|
|
||||||
// tsu.total_kgs AS coating,
|
|
||||||
|
|
||||||
// -- Aggregated values for Reclaimed Sand
|
|
||||||
// (SELECT GROUP_CONCAT(CONCAT(clients.client_name, ':', invItems.item_quantity) SEPARATOR '; ')
|
|
||||||
// FROM ip_invoice_items invItems
|
|
||||||
// LEFT JOIN ip_invoices inv ON inv.invoice_id = invItems.invoice_id
|
|
||||||
// LEFT JOIN ip_clients clients ON clients.client_id = inv.client_id
|
|
||||||
// WHERE invItems.item_name = 'Core Sand Reclaimed' AND invItems.item_date_added = tpmd.date
|
|
||||||
// ) AS reclaimedSandDetails,
|
|
||||||
|
|
||||||
// -- Aggregated values for Waste Core
|
|
||||||
// (SELECT GROUP_CONCAT(CONCAT(ts.SupplierName, ':', tigrd.QuantityAsPerInvoice) SEPARATOR '; ')
|
|
||||||
// FROM t_igr_details tigrd
|
|
||||||
// LEFT JOIN t_igr_master tigm ON tigm.IGRNo = tigrd.IGRNo
|
|
||||||
// LEFT JOIN t_purchaseorder_master tpom ON tpom.PONO = tigm.PONO
|
|
||||||
// LEFT JOIN t_supplierdetailsn ts ON tpom.SupplierID = ts.SupplierID
|
|
||||||
// WHERE tigrd.MaterialCode IN ($materialCodesString) AND DATE(tigrd.CreatedDate) = tpmd.date
|
|
||||||
// ) AS wasteCoreDetails
|
|
||||||
|
|
||||||
// FROM
|
|
||||||
// t_trpProductionMaintenanceDetails tpmd
|
|
||||||
// JOIN
|
|
||||||
// t_trpProductionDetails tpd ON tpd.date = tpmd.date
|
|
||||||
// JOIN
|
|
||||||
// t_trpProductionWasteDetails tpwd ON tpwd.date = tpmd.date
|
|
||||||
// LEFT JOIN
|
|
||||||
// t_coatingMachineDetails tcmd ON tcmd.date = tpmd.date
|
|
||||||
// LEFT JOIN
|
|
||||||
// t_drierMachineDetails tdmd ON tdmd.date = tpmd.date
|
|
||||||
// LEFT JOIN
|
|
||||||
// t_trp_sand_use tsu ON tsu.date = tpmd.date
|
|
||||||
|
|
||||||
// WHERE
|
|
||||||
// tpmd.date >= ?
|
|
||||||
// AND
|
|
||||||
// tpmd.date <= ?
|
|
||||||
|
|
||||||
// ORDER BY
|
|
||||||
// tpmd.date ASC;
|
|
||||||
// "
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -254,7 +254,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
|
|
||||||
<form action="<?= base_url('resinStockDetails'); ?>" method="post">
|
<form action="<?= base_url('trpProductionDetails'); ?>" method="post">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
@ -424,39 +424,22 @@
|
|||||||
|
|
||||||
<tbody style="background-color: #fff;" >
|
<tbody style="background-color: #fff;" >
|
||||||
|
|
||||||
<?php if(!empty($trpProductionStockDetails))
|
|
||||||
{ ?>
|
|
||||||
|
|
||||||
|
<?php if(!empty($trpProductionDetails))
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php foreach($trpProductionDetails as $trpProductionDetailIndex => $trpProductionDetail)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- this else condition work if groupedBagStockDetails is empty and creating new records
|
|
||||||
with initial values 0 for entire month -->
|
|
||||||
<?php } else { ?>
|
|
||||||
|
|
||||||
|
|
||||||
<?php foreach($datesInMonth as $datesInMonthIndex => $dateInMonth)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr id="<?= $dateInMonth ?>"
|
<tr id="<?= $trpProductionDetail['date'] ?>"
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$currentDate = date('d-m-Y');
|
$currentDate = date('d-m-Y');
|
||||||
$dateInMonthDmYFormat= DateTime::createFromFormat('Y-m-d', $dateInMonth)->format('d-m-Y');
|
$dateInMonthDmYFormat= DateTime::createFromFormat('Y-m-d', $trpProductionDetail['date'])->format('d-m-Y');
|
||||||
if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';}
|
if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -465,14 +448,14 @@
|
|||||||
<!-- date -->
|
<!-- date -->
|
||||||
<!-- td:eq(0) -->
|
<!-- td:eq(0) -->
|
||||||
<td class="celda_normal trpProductionStock date"
|
<td class="celda_normal trpProductionStock date"
|
||||||
data-id="<?= $dateInMonth ?> date">
|
data-id="<?= $trpProductionDetail['date'] ?> date">
|
||||||
<?= $dateInMonthDmYFormat ?>
|
<?= $dateInMonthDmYFormat ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- openingTime -->
|
<!-- openingTime -->
|
||||||
<!-- td:eq(1) -->
|
<!-- td:eq(1) -->
|
||||||
<td class="celda_normal trpProductionStock openingTime"
|
<td class="celda_normal trpProductionStock openingTime"
|
||||||
data-id="<?= $dateInMonth ?> openingTime" >
|
data-id="<?= $trpProductionDetail['date'] ?> openingTime" >
|
||||||
|
|
||||||
<select class="timeDropdown trp_on_time" style="width: 150px;"
|
<select class="timeDropdown trp_on_time" style="width: 150px;"
|
||||||
>
|
>
|
||||||
@ -480,7 +463,9 @@
|
|||||||
foreach($timeOptions as $timeOption)
|
foreach($timeOptions as $timeOption)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<option value="<?= $timeOption ?>">
|
<option value="<?= $timeOption ?>"
|
||||||
|
<?php if($timeOption == $trpProductionDetail['openingTime']) echo "selected"; ?>
|
||||||
|
>
|
||||||
<?= $timeOption ?>
|
<?= $timeOption ?>
|
||||||
</option>
|
</option>
|
||||||
|
|
||||||
@ -493,7 +478,7 @@
|
|||||||
<!-- closingTime -->
|
<!-- closingTime -->
|
||||||
<!-- td:eq(2) -->
|
<!-- td:eq(2) -->
|
||||||
<td class="celda_normal trpProductionStock closingTime"
|
<td class="celda_normal trpProductionStock closingTime"
|
||||||
data-id="<?= $dateInMonth ?> closingTime" >
|
data-id="<?= $trpProductionDetail['date'] ?> closingTime" >
|
||||||
|
|
||||||
<select class="timeDropdown trp_off_time" style="width: 150px;"
|
<select class="timeDropdown trp_off_time" style="width: 150px;"
|
||||||
>
|
>
|
||||||
@ -501,7 +486,9 @@
|
|||||||
foreach($timeOptions as $timeOption)
|
foreach($timeOptions as $timeOption)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<option value="<?= $timeOption ?>">
|
<option value="<?= $timeOption ?>"
|
||||||
|
<?php if($timeOption == $trpProductionDetail['closingTime']) echo "selected"; ?>
|
||||||
|
>
|
||||||
<?= $timeOption ?>
|
<?= $timeOption ?>
|
||||||
</option>
|
</option>
|
||||||
|
|
||||||
@ -514,8 +501,8 @@
|
|||||||
<!-- totalHours -->
|
<!-- totalHours -->
|
||||||
<!-- td:eq(3) -->
|
<!-- td:eq(3) -->
|
||||||
<td class="celda_normal trpProductionStock totalHours"
|
<td class="celda_normal trpProductionStock totalHours"
|
||||||
data-id="<?= $dateInMonth ?> totalHours">
|
data-id="<?= $trpProductionDetail['date'] ?> totalHours">
|
||||||
0
|
<?= $trpProductionDetail['totalHours'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- coldStart -->
|
<!-- coldStart -->
|
||||||
@ -524,7 +511,7 @@
|
|||||||
data-id=""
|
data-id=""
|
||||||
oninput="trpStockChange(this)"
|
oninput="trpStockChange(this)"
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['coldStart'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- breakdownHours -->
|
<!-- breakdownHours -->
|
||||||
@ -533,21 +520,21 @@
|
|||||||
data-id=""
|
data-id=""
|
||||||
oninput="trpStockChange(this)"
|
oninput="trpStockChange(this)"
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['breakdownHours'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- burnerFiringHours -->
|
<!-- burnerFiringHours -->
|
||||||
<!-- td:eq(6) -->
|
<!-- td:eq(6) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['burnerFiringHours'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- sandFeedingHours -->
|
<!-- sandFeedingHours -->
|
||||||
<!-- td:eq(7) -->
|
<!-- td:eq(7) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['sandFeedingHours'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- gasReceiptBg -->
|
<!-- gasReceiptBg -->
|
||||||
@ -555,7 +542,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['gasReceiptBg'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- gasReceiptPg -->
|
<!-- gasReceiptPg -->
|
||||||
@ -563,7 +550,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['gasReceiptPg'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
@ -574,7 +561,7 @@
|
|||||||
data-id=""
|
data-id=""
|
||||||
oninput="trpStockChange(this)"
|
oninput="trpStockChange(this)"
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['physicalGasConsumption'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
@ -583,14 +570,14 @@
|
|||||||
<!-- td:eq(11) -->
|
<!-- td:eq(11) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['drierGasConsumption'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- coatingGasConsumption -->
|
<!-- coatingGasConsumption -->
|
||||||
<!-- td:eq(12) -->
|
<!-- td:eq(12) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['coatingGasConsumption'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
@ -598,14 +585,14 @@
|
|||||||
<!-- td:eq(13) -->
|
<!-- td:eq(13) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['trpPlusDrierGasConsumption'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- trpPhysicalGasPerTon -->
|
<!-- trpPhysicalGasPerTon -->
|
||||||
<!-- td:eq(14) -->
|
<!-- td:eq(14) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?php $trpPhysicalGasPerTon = $trpProductionDetail['trpPhysicalGasPerTon'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
@ -615,28 +602,28 @@
|
|||||||
data-id=""
|
data-id=""
|
||||||
oninput="trpStockChange(this)"
|
oninput="trpStockChange(this)"
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['panelGasConsumption'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- panelGasPerTon -->
|
<!-- panelGasPerTon -->
|
||||||
<!-- td:eq(16) -->
|
<!-- td:eq(16) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['panelGasPerTon'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- AL(S) -->
|
<!-- AL(S) -->
|
||||||
<!-- td:eq(17) -->
|
<!-- td:eq(17) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['ALs_wcs'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- AL(E) -->
|
<!-- AL(E) -->
|
||||||
<!-- td:eq(18) -->
|
<!-- td:eq(18) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['ALe_wcs'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- ME -->
|
<!-- ME -->
|
||||||
@ -644,21 +631,21 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['ME_wcs'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- SI -->
|
<!-- SI -->
|
||||||
<!-- td:eq(20) -->
|
<!-- td:eq(20) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['SI_wcs'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Caparo -->
|
<!-- Caparo -->
|
||||||
<!-- td:eq(21) -->
|
<!-- td:eq(21) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<? $trpProductionDetail['caparo_wcs'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
@ -666,14 +653,14 @@
|
|||||||
<!-- td:eq(22) -->
|
<!-- td:eq(22) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['Nemak_wcs'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- DR -->
|
<!-- DR -->
|
||||||
<!-- td:eq(23) -->
|
<!-- td:eq(23) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['DR_wcs'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- edRunningHours -->
|
<!-- edRunningHours -->
|
||||||
@ -681,7 +668,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['edRunningHours'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
@ -691,7 +678,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['edProduction'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- edUsage -->
|
<!-- edUsage -->
|
||||||
@ -699,7 +686,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['edUsage'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- trpProduction -->
|
<!-- trpProduction -->
|
||||||
@ -708,56 +695,56 @@
|
|||||||
data-id=""
|
data-id=""
|
||||||
oninput="trpStockChange(this)"
|
oninput="trpStockChange(this)"
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['trpProduction'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- trpProductionPerHour -->
|
<!-- trpProductionPerHour -->
|
||||||
<!-- td:eq(28) -->
|
<!-- td:eq(28) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['trpProductionPerHour'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- coating -->
|
<!-- coating -->
|
||||||
<!-- td:eq(29) -->
|
<!-- td:eq(29) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['coating'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Hindhuja -->
|
<!-- Hindhuja -->
|
||||||
<!-- td:eq(30) -->
|
<!-- td:eq(30) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<? $trpProductionDetail['Als_crs'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Nemak -->
|
<!-- Nemak -->
|
||||||
<!-- td:eq(31) -->
|
<!-- td:eq(31) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['Nemak_crs'] ?>
|
||||||
</td>
|
</td>
|
||||||
<!-- ME -->
|
<!-- ME -->
|
||||||
<!-- td:eq(32) -->
|
<!-- td:eq(32) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<? $trpProductionDetail['ME_crs'] ?>
|
||||||
</td>
|
</td>
|
||||||
<!-- BI -->
|
<!-- BI -->
|
||||||
<!-- td:eq(33) -->
|
<!-- td:eq(33) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<? $trpProductionDetail['BI_crs'] ?>
|
||||||
</td>
|
</td>
|
||||||
<!-- Karmen -->
|
<!-- Karmen -->
|
||||||
<!-- td:eq(34) -->
|
<!-- td:eq(34) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<? $trpProductionDetail['Karmen_crs'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- waterReceipt -->
|
<!-- waterReceipt -->
|
||||||
@ -765,7 +752,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['waterReceipt'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- waterConsumption -->
|
<!-- waterConsumption -->
|
||||||
@ -773,7 +760,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['waterConsumption'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- ebReading -->
|
<!-- ebReading -->
|
||||||
@ -781,14 +768,14 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['ebReading'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- ebReadingPerUnitTon -->
|
<!-- ebReadingPerUnitTon -->
|
||||||
<!-- td:eq(38) -->
|
<!-- td:eq(38) -->
|
||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id="">
|
data-id="">
|
||||||
0
|
<?= $trpProductionDetail['ebReadingPerUnitTon'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
@ -797,7 +784,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['workingPersonEngineers'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- workingPersonSupervisiors -->
|
<!-- workingPersonSupervisiors -->
|
||||||
@ -805,7 +792,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['workingPersonSupervisiors'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- workingPersonOperators -->
|
<!-- workingPersonOperators -->
|
||||||
@ -813,7 +800,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['workingPersonOperators'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- rollerDrivers -->
|
<!-- rollerDrivers -->
|
||||||
@ -821,7 +808,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['rollerDrivers'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- natureOfMaintenance -->
|
<!-- natureOfMaintenance -->
|
||||||
@ -829,7 +816,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['natureOfMaintenance'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- location -->
|
<!-- location -->
|
||||||
@ -837,7 +824,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['location'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- description -->
|
<!-- description -->
|
||||||
@ -845,7 +832,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['description'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
@ -854,7 +841,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['msSeperation'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- edWaste -->
|
<!-- edWaste -->
|
||||||
@ -862,7 +849,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['edWaste'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- coolerBags -->
|
<!-- coolerBags -->
|
||||||
@ -870,7 +857,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['coolerBags'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- edPlus20Waste -->
|
<!-- edPlus20Waste -->
|
||||||
@ -878,7 +865,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['edPlus20Waste'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!--cycloneWaste -->
|
<!--cycloneWaste -->
|
||||||
@ -886,7 +873,7 @@
|
|||||||
<td class="celda_normal trpProductionStock"
|
<td class="celda_normal trpProductionStock"
|
||||||
data-id=""
|
data-id=""
|
||||||
contenteditable="true">
|
contenteditable="true">
|
||||||
0
|
<?= $trpProductionDetail['cycloneWaste'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
@ -957,6 +944,31 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- JAVASCRIPT CODE -->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function navigateToResin() {
|
function navigateToResin() {
|
||||||
$('.close').click();
|
$('.close').click();
|
||||||
@ -1095,13 +1107,13 @@
|
|||||||
in a single row **/
|
in a single row **/
|
||||||
for (let i = 1; i < rowCells.length; i += 7) {
|
for (let i = 1; i < rowCells.length; i += 7) {
|
||||||
const rowData = {
|
const rowData = {
|
||||||
date: rowCells.eq(i).text().trim(),
|
date: rowCells.eq(i).text().trim() ?? 0,
|
||||||
materialCode: rowCells.eq(i+1).text().trim(),
|
materialCode: rowCells.eq(i+1).text().trim() ?? 0,
|
||||||
customer: rowCells.eq(i+2).text().trim(),
|
customer: rowCells.eq(i+2).text().trim() ?? 0,
|
||||||
opening: rowCells.eq(i+3).text().trim(),
|
opening: rowCells.eq(i+3).text().trim() ?? 0,
|
||||||
receipt: rowCells.eq(i+4).text().trim(),
|
receipt: rowCells.eq(i+4).text().trim() ?? 0,
|
||||||
used: rowCells.eq(i+5).text().trim(),
|
used: rowCells.eq(i+5).text().trim() ?? 0,
|
||||||
balanceStock: rowCells.eq(i + 6).text().trim()
|
balanceStock: rowCells.eq(i + 6).text().trim() ?? 0
|
||||||
};
|
};
|
||||||
|
|
||||||
rows.push(rowData);
|
rows.push(rowData);
|
||||||
@ -1116,6 +1128,72 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
function calculateSandFeedingHours(totalHours,coldStart,breakdownHours){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let [totalHoursF, coldStartF, breakdownHoursF] = [totalHours, coldStart, breakdownHours].map((time) => {
|
||||||
|
if (time === "" || time == null) return "0.00";
|
||||||
|
if (typeof time === "number") return time.toFixed(2);
|
||||||
|
if (!time.includes(".")) return `${time}.00`;
|
||||||
|
return time;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
let sandFeedingHours = 0;
|
||||||
|
|
||||||
|
let totalHoursInt = milliSecondsFormat((totalHours));
|
||||||
|
let coldStartInt = milliSecondsFormat(coldStart);
|
||||||
|
let breakdownHoursInt = milliSecondsFormat(breakdownHours);
|
||||||
|
|
||||||
|
let burnerFiringHoursInt = totalHoursInt - breakdownHoursInt ;
|
||||||
|
|
||||||
|
sandFeedingHours = milliSecondsToHourMinuteFormat(burnerFiringHoursInt - coldStartInt);
|
||||||
|
|
||||||
|
burnerFiringHours = milliSecondsToHourMinuteFormat(burnerFiringHoursInt);
|
||||||
|
|
||||||
|
return [sandFeedingHours,burnerFiringHours];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function milliSecondsFormat(givenCustomHourMinuteFormat){
|
||||||
|
|
||||||
|
let hoursInMilliSeconds = givenCustomHourMinuteFormat.split(".")[0] * 60 * 60 * 1000;
|
||||||
|
|
||||||
|
let minutesInMilliseconds = givenCustomHourMinuteFormat.split(".")[1] * 60 * 1000;
|
||||||
|
|
||||||
|
totalMilliSeconds = hoursInMilliSeconds + minutesInMilliseconds;
|
||||||
|
|
||||||
|
return totalMilliSeconds;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function milliSecondsDifference(a,b){
|
||||||
|
|
||||||
|
return a > b ? a - b : b - a ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function milliSecondsToHourMinuteFormat(givenMilliSeconds){
|
||||||
|
|
||||||
|
const hours = parseInt(givenMilliSeconds / (1000 * 60 * 60));
|
||||||
|
|
||||||
|
const hoursInMilliSeconds = hours * 60 * 60 * 1000;
|
||||||
|
|
||||||
|
const minutesInMilliseconds = givenMilliSeconds - hoursInMilliSeconds;
|
||||||
|
|
||||||
|
const minutes = parseInt(minutesInMilliseconds / (1000 * 60));
|
||||||
|
|
||||||
|
const totalHours = hours +"."+ minutes;
|
||||||
|
|
||||||
|
return totalHours;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function trpStockChange(tdElement) {
|
function trpStockChange(tdElement) {
|
||||||
|
|
||||||
|
|
||||||
@ -1156,7 +1234,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
let result = sandFeedingHours(totalHours,coldStart,breakdownHours,burnerFiringHours);
|
let result = calculateSandFeedingHours(totalHours,coldStart,breakdownHours,burnerFiringHours);
|
||||||
|
|
||||||
sandFeedingHours = result[0];
|
sandFeedingHours = result[0];
|
||||||
|
|
||||||
@ -1290,74 +1368,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
function sandFeedingHours(totalHours,coldStart,breakdownHours){
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let [totalHoursF, coldStartF, breakdownHoursF] = [totalHours, coldStart, breakdownHours].map((time) => {
|
|
||||||
if (time === "" || time == null) return "0.00";
|
|
||||||
if (typeof time === "number") return time.toFixed(2);
|
|
||||||
if (!time.includes(".")) return `${time}.00`;
|
|
||||||
return time;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
let sandFeedingHours = 0;
|
|
||||||
|
|
||||||
let totalHoursInt = milliSecondsFormat((totalHours));
|
|
||||||
let coldStartInt = milliSecondsFormat(coldStart);
|
|
||||||
let breakdownHoursInt = milliSecondsFormat(breakdownHours);
|
|
||||||
|
|
||||||
let burnerFiringHoursInt = totalHoursInt - breakdownHoursInt ;
|
|
||||||
|
|
||||||
sandFeedingHours = milliSecondsToHourMinuteFormat(burnerFiringHoursInt - coldStartInt);
|
|
||||||
|
|
||||||
burnerFiringHours = milliSecondsToHourMinuteFormat(burnerFiringHoursInt);
|
|
||||||
|
|
||||||
return [sandFeedingHours,burnerFiringHours];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function milliSecondsFormat(givenCustomHourMinuteFormat){
|
|
||||||
|
|
||||||
let hoursInMilliSeconds = givenCustomHourMinuteFormat.split(".")[0] * 60 * 60 * 1000;
|
|
||||||
|
|
||||||
let minutesInMilliseconds = givenCustomHourMinuteFormat.split(".")[1] * 60 * 1000;
|
|
||||||
|
|
||||||
totalMilliSeconds = hoursInMilliSeconds + minutesInMilliseconds;
|
|
||||||
|
|
||||||
return totalMilliSeconds;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function milliSecondsDifference(a,b){
|
|
||||||
|
|
||||||
return a > b ? a - b : b - a ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function milliSecondsToHourMinuteFormat(givenMilliSeconds){
|
|
||||||
|
|
||||||
const hours = parseInt(givenMilliSeconds / (1000 * 60 * 60));
|
|
||||||
|
|
||||||
const hoursInMilliSeconds = hours * 60 * 60 * 1000;
|
|
||||||
|
|
||||||
const minutesInMilliseconds = givenMilliSeconds - hoursInMilliSeconds;
|
|
||||||
|
|
||||||
const minutes = parseInt(minutesInMilliseconds / (1000 * 60));
|
|
||||||
|
|
||||||
const totalHours = hours +"."+ minutes;
|
|
||||||
|
|
||||||
return totalHours;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user