stock code merged : ps
This commit is contained in:
commit
93083e234a
@ -1717,12 +1717,14 @@ class StockController extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$data['trpProductionDetails'] = $this->TrpProduction_model->trpProductionDetails($startDate,$endDate);
|
$result = $this->TrpProduction_model->trpProductionDetails($startDate,$endDate);
|
||||||
|
|
||||||
|
$data['trpProductionDetails'] = $result[0] ;
|
||||||
|
|
||||||
// dd($data['trpProductionDetails']);
|
$data['crsClientList'] = $result[1] ;
|
||||||
|
|
||||||
|
$data['wcsSupplierList'] = $result[2] ;
|
||||||
|
|
||||||
// dd($this->db->getLastQuery());
|
|
||||||
|
|
||||||
|
|
||||||
$date = DateTime::createFromFormat('Y-m', $month);
|
$date = DateTime::createFromFormat('Y-m', $month);
|
||||||
@ -1737,8 +1739,6 @@ class StockController extends BaseController
|
|||||||
|
|
||||||
return $this->loadViews("stock/trpProductionStockDetails", $this->global, $data, NULL);
|
return $this->loadViews("stock/trpProductionStockDetails", $this->global, $data, NULL);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,7 @@ class TrpProductionModel extends Model
|
|||||||
// Subquery definition
|
// Subquery definition
|
||||||
$subquery = $this->db->table('t_materialmaster')
|
$subquery = $this->db->table('t_materialmaster')
|
||||||
->select('materialCode')
|
->select('materialCode')
|
||||||
->where('Category = 328')
|
->where('Category' ,'waste core') //328 - is for waste core in config master
|
||||||
->get()
|
->get()
|
||||||
->getResultArray();
|
->getResultArray();
|
||||||
|
|
||||||
@ -78,57 +78,65 @@ class TrpProductionModel extends Model
|
|||||||
$builder = $this->db->table('t_trpProductionMaintenanceDetails tpmd');
|
$builder = $this->db->table('t_trpProductionMaintenanceDetails tpmd');
|
||||||
|
|
||||||
// Select required columns
|
// Select required columns
|
||||||
$builder->select([
|
$builder->select(
|
||||||
'tpmd.date',
|
'tpmd.date,
|
||||||
'tpmd.openingTime',
|
tpmd.openingTime,
|
||||||
'tpmd.closingTime',
|
tpmd.closingTime,
|
||||||
'tpmd.totalHours',
|
tpmd.totalHours,
|
||||||
'tpmd.coldStart',
|
tpmd.coldStart,
|
||||||
'tpmd.breakdownHours',
|
tpmd.breakdownHours,
|
||||||
'tpmd.burnerFiringHours',
|
tpmd.burnerFiringHours,
|
||||||
'tpmd.sandFeedingHours',
|
tpmd.sandFeedingHours,
|
||||||
'tpmd.workingPersonEngineers',
|
tpd.gasReceiptBg,
|
||||||
'tpmd.workingPersonSupervisiors',
|
tpd.gasReceiptPg,
|
||||||
'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',
|
|
||||||
|
|
||||||
// Aggregated gas consumption
|
|
||||||
'IFNULL(tcmd.totalGasConsumption, 0) AS coatingGasConsumption',
|
|
||||||
'IFNULL(tdmd.totalGasConsumption, 0) AS drierGasConsumption',
|
|
||||||
|
|
||||||
'tsu.total_kgs AS coating' ,
|
|
||||||
|
|
||||||
'tigrdot.*',
|
|
||||||
'invItems.*'
|
|
||||||
|
|
||||||
|
|
||||||
]);
|
tpd.physicalGasConsumption,
|
||||||
|
IFNULL(tdmd.totalGasConsumption, 0) AS drierGasConsumption,
|
||||||
|
IFNULL(tcmd.totalGasConsumption, 0) AS coatingGasConsumption,
|
||||||
|
tpd.trpPlusDrierGasConsumption,
|
||||||
|
tpd.trpPhysicalGasPerTon,
|
||||||
|
tpd.panelGasConsumption,
|
||||||
|
tpd.panelGasPerTon,
|
||||||
|
|
||||||
|
tigrdot.* ,
|
||||||
|
|
||||||
|
tpd.edRunningHours,
|
||||||
|
tpd.edProduction,
|
||||||
|
tpd.edUsage,
|
||||||
|
|
||||||
|
tpd.trpProduction,
|
||||||
|
tpd.trpProductionPerHour,
|
||||||
|
|
||||||
|
tsu.total_kgs AS coating,
|
||||||
|
invItems.* ,
|
||||||
|
|
||||||
|
tpd.waterReceipt,
|
||||||
|
tpd.waterConsumption,
|
||||||
|
tpd.ebReading,
|
||||||
|
tpd.ebReadingPerUnitTon,
|
||||||
|
|
||||||
|
|
||||||
|
tpmd.workingPersonEngineers,
|
||||||
|
tpmd.workingPersonSupervisiors,
|
||||||
|
tpmd.workingPersonOperators,
|
||||||
|
tpmd.rollerDrivers,
|
||||||
|
tpmd.natureOfMaintenance,
|
||||||
|
tpmd.location,
|
||||||
|
tpmd.description,
|
||||||
|
|
||||||
|
tpwd.msSeperation,
|
||||||
|
tpwd.edWaste,
|
||||||
|
tpwd.coolerBags,
|
||||||
|
tpwd.edPlus20Waste,
|
||||||
|
tpwd.cycloneWaste,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Join with other tables
|
// Join with other tables
|
||||||
$builder->join('t_trpProductionDetails tpd', 'tpd.date = tpmd.date', 'inner');
|
$builder->join('t_trpProductionDetails tpd', 'tpd.date = tpmd.date', 'inner');
|
||||||
@ -170,26 +178,27 @@ class TrpProductionModel extends Model
|
|||||||
$crsClientList = array_column($crsClientList, 'client_name');
|
$crsClientList = array_column($crsClientList, 'client_name');
|
||||||
|
|
||||||
// Initialize an empty array for dynamic SQL conditions
|
// Initialize an empty array for dynamic SQL conditions
|
||||||
$caseStatements = [];
|
$caseStatementsCrs = [];
|
||||||
|
|
||||||
// Loop through the client list and build dynamic SUM(CASE WHEN...)
|
// Loop through the client list and build dynamic SUM(CASE WHEN...)
|
||||||
foreach ($crsClientList as $client) {
|
foreach ($crsClientList as $index => $client) {
|
||||||
// Escape column name (remove spaces and special characters)
|
|
||||||
$safeClient = str_replace(' ', '_', $client);
|
$crsClientList[$index] = $client."_crs";
|
||||||
|
$clientCrs = $client."_crs";
|
||||||
|
|
||||||
// Add the condition to the array
|
// Add the condition to the array
|
||||||
$caseStatements[] = "SUM(CASE WHEN clients.client_name = " . $this->db->escape($client) . " THEN invItems.item_quantity ELSE 0 END) AS `$safeClient`";
|
$caseStatementsCrs[] = "SUM(CASE WHEN clients.client_name = " . $this->db->escape($client) . " THEN invItems.item_quantity ELSE 0 END) AS `$clientCrs`";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert array to a comma-separated string
|
// Convert array to a comma-separated string
|
||||||
$caseSQL = implode(', ', $caseStatements);
|
$caseSQLCrs = implode(', ', $caseStatementsCrs);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$subquery3 = $this->db->table('ip_invoice_items invItems')
|
$subquery3 = $this->db->table('ip_invoice_items invItems')
|
||||||
->select([
|
->select([
|
||||||
'invItems.item_date_added',
|
'invItems.item_date_added',
|
||||||
$caseSQL
|
$caseSQLCrs
|
||||||
])
|
])
|
||||||
->join('ip_invoices inv', 'inv.invoice_id = invItems.invoice_id', 'left')
|
->join('ip_invoices inv', 'inv.invoice_id = invItems.invoice_id', 'left')
|
||||||
->join('ip_clients clients', 'clients.client_id = inv.client_id', 'left')
|
->join('ip_clients clients', 'clients.client_id = inv.client_id', 'left')
|
||||||
@ -212,17 +221,44 @@ class TrpProductionModel extends Model
|
|||||||
$materialCodes = ! empty($materialCodes) ? $materialCodes : ['600374','600422','600434'];
|
$materialCodes = ! empty($materialCodes) ? $materialCodes : ['600374','600422','600434'];
|
||||||
|
|
||||||
|
|
||||||
|
$wcsSupplierList = $this->db->table('t_igr_details tigrd')
|
||||||
|
->distinct()
|
||||||
|
->select('ts.SupplierName as supplierName')
|
||||||
|
->join('t_igr_master tigm', 'tigm.IGRNo = tigrd.IGRNo', 'left')
|
||||||
|
->join('t_purchaseorder_master tpom', 'tpom.PONO = tigm.PONO', 'left')
|
||||||
|
->join('t_supplierdetailsn ts', 'tpom.SupplierID = ts.SupplierID', 'left')
|
||||||
|
->whereIn('tigrd.MaterialCode', $materialCodes)
|
||||||
|
->where('tigrd.CreatedDate >=', $startDate)
|
||||||
|
->where('tigrd.CreatedDate <=', $endDate)
|
||||||
|
->groupBy('DATE(tigrd.CreatedDate)')
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
|
||||||
|
|
||||||
|
$wcsSupplierList = array_column($wcsSupplierList, 'supplierName');
|
||||||
|
|
||||||
|
// Initialize an empty array for dynamic SQL conditions
|
||||||
|
$caseStatementsWcs = [];
|
||||||
|
|
||||||
|
// Loop through the client list and build dynamic SUM(CASE WHEN...)
|
||||||
|
foreach ($wcsSupplierList as $index => $supplier) {
|
||||||
|
|
||||||
|
$wcsSupplierList[$index] = $supplier."_wcs";
|
||||||
|
$supplierWcs = $supplier."_wcs";
|
||||||
|
|
||||||
|
// Add the condition to the array
|
||||||
|
$caseStatementsWcs[] = "SUM(CASE WHEN ts.SupplierName = " . $this->db->escape($supplier) . " THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS `$supplierWcs` ";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert array to a comma-separated string
|
||||||
|
$caseSQLWcs = implode(', ', $caseStatementsWcs);
|
||||||
|
|
||||||
|
|
||||||
// Subquery: Waste Core Sand Suppliers
|
// Subquery: Waste Core Sand Suppliers
|
||||||
$subquery4 = $this->db->table('t_igr_details tigrd')
|
$subquery4 = $this->db->table('t_igr_details tigrd')
|
||||||
->select([
|
->select([
|
||||||
'DATE(tigrd.CreatedDate) AS CreatedDate', // Convert CreatedDate to DATE format
|
'DATE(tigrd.CreatedDate) AS CreatedDate', // Convert CreatedDate to DATE format
|
||||||
"SUM(CASE WHEN ts.SupplierName = 'Ashok leyland limited foundry divn-SPU' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS ALs_wcs",
|
$caseSQLWcs
|
||||||
"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"
|
|
||||||
])
|
])
|
||||||
->join('t_igr_master tigm', 'tigm.IGRNo = tigrd.IGRNo', 'left')
|
->join('t_igr_master tigm', 'tigm.IGRNo = tigrd.IGRNo', 'left')
|
||||||
->join('t_purchaseorder_master tpom', 'tpom.PONO = tigm.PONO', 'left')
|
->join('t_purchaseorder_master tpom', 'tpom.PONO = tigm.PONO', 'left')
|
||||||
@ -254,7 +290,7 @@ class TrpProductionModel extends Model
|
|||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
$result = $query->getResultArray();
|
$result = $query->getResultArray();
|
||||||
|
|
||||||
return $result;
|
return [$result,$crsClientList,$wcsSupplierList];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -191,7 +191,7 @@
|
|||||||
background-color: #50bbd9; /* Green background */
|
background-color: #50bbd9; /* Green background */
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
padding: 10px;
|
padding: 1px;
|
||||||
white-space: normal; /* Allows text to wrap */
|
white-space: normal; /* Allows text to wrap */
|
||||||
word-wrap: break-word; /* Breaks long words if needed */
|
word-wrap: break-word; /* Breaks long words if needed */
|
||||||
text-align: center; /* Centers text for better alignment */
|
text-align: center; /* Centers text for better alignment */
|
||||||
@ -221,11 +221,15 @@
|
|||||||
max-width: 100px;
|
max-width: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.location{
|
||||||
|
min-width:200px;
|
||||||
|
min-height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.description{
|
||||||
|
min-width:400px;
|
||||||
|
min-height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -380,13 +384,25 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<!-- th:eq(15) -->
|
<!-- th:eq(15) -->
|
||||||
<th class="celda_encabezado_general" rowspan="2">Panel Gas Per Ton </th>
|
<th class="celda_encabezado_general" rowspan="2">Panel Gas Per Ton </th>
|
||||||
<!-- th:eq(16) -->
|
<!-- th:eq(16) -->
|
||||||
<th class="celda_encabezado_general" colspan="7">Incoming Sand/ Lump details </th>
|
|
||||||
|
<?php if(count($wcsSupplierList)>0){?>
|
||||||
|
<th class="celda_encabezado_general" colspan="<?=count($wcsSupplierList)?>">Incoming Sand/ Lump details </th>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<!-- th:eq(17) -->
|
<!-- th:eq(17) -->
|
||||||
<th class="celda_encabezado_general" colspan="3">ED details </th>
|
<th class="celda_encabezado_general" colspan="3">ED details </th>
|
||||||
<!-- th:eq(18) -->
|
<!-- th:eq(18) -->
|
||||||
<th class="celda_encabezado_general" colspan="2">TRP Sand </th>
|
<th class="celda_encabezado_general" colspan="2">TRP Sand </th>
|
||||||
|
|
||||||
|
<th class="celda_encabezado_general" rowspan="2">Coating </th>
|
||||||
|
|
||||||
<!-- th:eq(19) -->
|
<!-- th:eq(19) -->
|
||||||
<th class="celda_encabezado_general" colspan="6">Usage </th>
|
|
||||||
|
<?php if(count($crsClientList)>0){?>
|
||||||
|
<th class="celda_encabezado_general" colspan="<?=count($crsClientList)?>">Usage </th>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
<!-- th:eq(20) -->
|
<!-- th:eq(20) -->
|
||||||
<th class="celda_encabezado_general" colspan="2">Water </th>
|
<th class="celda_encabezado_general" colspan="2">Water </th>
|
||||||
<!-- th:eq(21) -->
|
<!-- th:eq(21) -->
|
||||||
@ -409,7 +425,6 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<th class="celda_encabezado_general" rowspan="2">ED +20 Waste </th>
|
<th class="celda_encabezado_general" rowspan="2">ED +20 Waste </th>
|
||||||
<!-- th:eq(30) -->
|
<!-- th:eq(30) -->
|
||||||
<th class="celda_encabezado_general" rowspan="2">Cyclone Waste </th>
|
<th class="celda_encabezado_general" rowspan="2">Cyclone Waste </th>
|
||||||
<!-- th:eq(31) -->
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -420,20 +435,16 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<th class="celda_encabezado_general" style="z-index:11;">BG</th>
|
<th class="celda_encabezado_general" style="z-index:11;">BG</th>
|
||||||
<!-- th:eq(1) -->
|
<!-- th:eq(1) -->
|
||||||
<th class="celda_encabezado_general">PG </th>
|
<th class="celda_encabezado_general">PG </th>
|
||||||
<!-- th:eq(2) -->
|
|
||||||
<th class="celda_encabezado_general">AL(S) </th>
|
<!-- dynamic loop wcs-->
|
||||||
<!-- th:eq(3) -->
|
|
||||||
<th class="celda_encabezado_general">AL(E) </th>
|
<?php foreach($wcsSupplierList as $supplier){ ?>
|
||||||
<!-- th:eq(4) -->
|
|
||||||
<th class="celda_encabezado_general">ME </th>
|
<th class="celda_encabezado_general"><?=$supplier?> </th>
|
||||||
<!-- th:eq(6) -->
|
|
||||||
<th class="celda_encabezado_general">SI </th>
|
<?php } ?>
|
||||||
<!-- th:eq(7) -->
|
|
||||||
<th class="celda_encabezado_general">caparo </th>
|
|
||||||
<!-- th:eq(8) -->
|
|
||||||
<th class="celda_encabezado_general">Nemak </th>
|
|
||||||
<!-- th:eq(9) -->
|
|
||||||
<th class="celda_encabezado_general">DR</th>
|
|
||||||
<!-- th:eq(10) -->
|
<!-- th:eq(10) -->
|
||||||
<th class="celda_encabezado_general">Running Hours </th>
|
<th class="celda_encabezado_general">Running Hours </th>
|
||||||
<!-- th:eq(11) -->
|
<!-- th:eq(11) -->
|
||||||
@ -445,17 +456,16 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<!-- th:eq(14) -->
|
<!-- th:eq(14) -->
|
||||||
<th class="celda_encabezado_general">Production Per Hour </th>
|
<th class="celda_encabezado_general">Production Per Hour </th>
|
||||||
<!-- th:eq(15) -->
|
<!-- th:eq(15) -->
|
||||||
<th class="celda_encabezado_general">Coating </th>
|
|
||||||
<!-- th:eq(16) -->
|
|
||||||
<th class="celda_encabezado_general">Hindhuja </th>
|
<!-- dynamic loop crs -->
|
||||||
<!-- th:eq(17) -->
|
|
||||||
<th class="celda_encabezado_general">Nemak</th>
|
<?php foreach($crsClientList as $client){ ?>
|
||||||
<!-- th:eq(18) -->
|
|
||||||
<th class="celda_encabezado_general">ME </th>
|
<th class="celda_encabezado_general"><?=$client?> </th>
|
||||||
<!-- th:eq(19) -->
|
|
||||||
<th class="celda_encabezado_general">BI </th>
|
<?php } ?>
|
||||||
<!-- th:eq(20) -->
|
|
||||||
<th class="celda_encabezado_general">Karmen </th>
|
|
||||||
<!-- th:eq(21) -->
|
<!-- th:eq(21) -->
|
||||||
<th class="celda_encabezado_general">Receipt </th>
|
<th class="celda_encabezado_general">Receipt </th>
|
||||||
<!-- th:eq(22) -->
|
<!-- th:eq(22) -->
|
||||||
@ -485,7 +495,7 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
<?php if (!empty($trpProductionDetails)) {
|
<?php if (!empty($trpProductionDetails)) {
|
||||||
|
|
||||||
dd(array_keys($trpProductionDetails[0]));
|
// dd(array_keys($trpProductionDetails[0]));
|
||||||
// dd($trpProductionDetails);
|
// dd($trpProductionDetails);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -667,56 +677,18 @@ $timeOtions[] = "12:00 AM";
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
<!-- AL(S) -->
|
<!-- loop for wcs supplier list -->
|
||||||
|
|
||||||
|
<?php foreach($wcsSupplierList as $supplier){ ?>
|
||||||
|
|
||||||
<!-- td:eq(17) -->
|
<!-- td:eq(17) -->
|
||||||
<td class="celda_normal trpProductionStock ALs_wcs"
|
<td class="celda_normal trpProductionStock <?=$supplier?>"
|
||||||
data-id="<?= $trpProductionDetail['date'] ?> ALs_wcs">
|
data-id="<?= $trpProductionDetail['date'] ?> <?=$supplier?>">
|
||||||
<?= $trpProductionDetail['ALs_wcs'] == 0 ? " " : $trpProductionDetail['ALs_wcs'] ?>
|
<?= $trpProductionDetail[$supplier] == 0 ? " " : $trpProductionDetail[$supplier] ?>
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- AL(E) -->
|
|
||||||
<!-- td:eq(18) -->
|
|
||||||
<td class="celda_normal trpProductionStock ALe_wcs"
|
|
||||||
data-id="<?= $trpProductionDetail['date'] ?> ALe_wcs">
|
|
||||||
<?= $trpProductionDetail['ALe_wcs'] == 0 ? " " : $trpProductionDetail['ALe_wcs'] ?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- ME -->
|
|
||||||
<!-- td:eq(19) -->
|
|
||||||
<td class="celda_normal trpProductionStock ME_wcs"
|
|
||||||
data-id="<?= $trpProductionDetail['date'] ?> ME_wcs"
|
|
||||||
contenteditable="true">
|
|
||||||
<?= $trpProductionDetail['ME_wcs'] == 0 ? " " : $trpProductionDetail['ME_wcs'] ?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- SI -->
|
|
||||||
<!-- td:eq(20) -->
|
|
||||||
<td class="celda_normal trpProductionStock SI_wcs"
|
|
||||||
data-id="<?= $trpProductionDetail['date'] ?> SI_wcs">
|
|
||||||
<?= $trpProductionDetail['SI_wcs'] == 0 ? " " : $trpProductionDetail['SI_wcs'] ?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- Caparo -->
|
|
||||||
<!-- td:eq(21) -->
|
|
||||||
<td class="celda_normal trpProductionStock caparo_wcs"
|
|
||||||
data-id="<?= $trpProductionDetail['date'] ?> caparo_wcs">
|
|
||||||
<?= $trpProductionDetail['caparo_wcs'] == 0 ? " " : $trpProductionDetail['caparo_wcs'] ?>
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
<!-- Nemak -->
|
<?php } ?>
|
||||||
<!-- td:eq(22) -->
|
|
||||||
<td class="celda_normal trpProductionStock Nemak_wcs"
|
|
||||||
data-id="<?= $trpProductionDetail['date'] ?> Nemak_wcs">
|
|
||||||
<?= $trpProductionDetail['Nemak_wcs'] == 0 ? " " : $trpProductionDetail['Nemak_wcs'] ?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- DR -->
|
|
||||||
<!-- td:eq(23) -->
|
|
||||||
<td class="celda_normal trpProductionStock DR_wcs"
|
|
||||||
data-id="<?= $trpProductionDetail['date'] ?> DR_wcs">
|
|
||||||
<?= $trpProductionDetail['DR_wcs'] == 0 ? " " : $trpProductionDetail['DR_wcs'] ?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- edRunningHours -->
|
<!-- edRunningHours -->
|
||||||
<!-- td:eq(24) -->
|
<!-- td:eq(24) -->
|
||||||
@ -767,40 +739,22 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<?= $trpProductionDetail['coating'] == 0 ? " " : $trpProductionDetail['coating'] ?>
|
<?= $trpProductionDetail['coating'] == 0 ? " " : $trpProductionDetail['coating'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Hindhuja -->
|
|
||||||
<!-- td:eq(30) -->
|
<!-- loop for crs client ..!! -->
|
||||||
<td class="celda_normal trpProductionStock ALs_crs"
|
|
||||||
data-id="<?= $trpProductionDetail['date'] ?> ALs_crs">
|
|
||||||
<?= $trpProductionDetail['ALs_crs'] == 0 ? " " : $trpProductionDetail['ALs_crs'] ?>
|
<?php foreach($crsClientList as $client){ ?>
|
||||||
|
|
||||||
|
<!-- td:eq(17) -->
|
||||||
|
<td class="celda_normal trpProductionStock <?=$client?>"
|
||||||
|
data-id="<?= $trpProductionDetail['date'] ?> <?=$client?>">
|
||||||
|
<?= $trpProductionDetail[$client] == 0 ? " " : $trpProductionDetail[$client] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Nemak -->
|
|
||||||
<!-- td:eq(31) -->
|
<?php } ?>
|
||||||
<td class="celda_normal trpProductionStock Nemak_crs"
|
|
||||||
data-id="<?= $trpProductionDetail['date'] ?> Nemak_crs">
|
|
||||||
<?= $trpProductionDetail['Nemak_crs'] == 0 ? " " : $trpProductionDetail['Nemak_crs'] ?>
|
|
||||||
</td>
|
|
||||||
<!-- ME -->
|
|
||||||
<!-- td:eq(32) -->
|
|
||||||
<td class="celda_normal trpProductionStock ME_crs"
|
|
||||||
data-id="<?= $trpProductionDetail['date'] ?> ME_crs"
|
|
||||||
contenteditable="true">
|
|
||||||
<?= $trpProductionDetail['ME_crs'] == 0 ? " " : $trpProductionDetail['ME_crs'] ?>
|
|
||||||
</td>
|
|
||||||
<!-- BI -->
|
|
||||||
<!-- td:eq(33) -->
|
|
||||||
<td class="celda_normal trpProductionStock BI_crs"
|
|
||||||
data-id="<?= $trpProductionDetail['date'] ?> BI_crs"
|
|
||||||
contenteditable="true">
|
|
||||||
<?= $trpProductionDetail['BI_crs'] == 0 ? " " : $trpProductionDetail['BI_crs'] ?>
|
|
||||||
</td>
|
|
||||||
<!-- Karmen -->
|
|
||||||
<!-- td:eq(34) -->
|
|
||||||
<td class="celda_normal trpProductionStock Karmen_crs"
|
|
||||||
data-id="<?= $trpProductionDetail['date'] ?> Karmen_crs"
|
|
||||||
contenteditable="true">
|
|
||||||
<?= $trpProductionDetail['Karmen_crs'] == 0 ? " " : $trpProductionDetail['Karmen_crs'] ?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- waterReceipt -->
|
<!-- waterReceipt -->
|
||||||
<!-- td:eq(35) -->
|
<!-- td:eq(35) -->
|
||||||
@ -942,8 +896,11 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
$eachDate = $trpProductionDetail['date']; // Unique identifier
|
$eachDate = $trpProductionDetail['date']; // Unique identifier
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Initialize the date entry if it doesn't exist
|
// Initialize the date entry if it doesn't exist
|
||||||
if (!isset($summary['totalHours'])) {
|
if (!isset($summary['totalHours'])) {
|
||||||
|
|
||||||
$summary = [
|
$summary = [
|
||||||
'totalHours' => 0,
|
'totalHours' => 0,
|
||||||
'coldStart' => 0,
|
'coldStart' => 0,
|
||||||
@ -959,24 +916,12 @@ $timeOtions[] = "12:00 AM";
|
|||||||
'trpPhysicalGasPerTon' => 0,
|
'trpPhysicalGasPerTon' => 0,
|
||||||
'panelGasConsumption' => 0,
|
'panelGasConsumption' => 0,
|
||||||
'panelGasPerTon' => 0,
|
'panelGasPerTon' => 0,
|
||||||
'ALs_wcs' => 0,
|
|
||||||
'ALe_wcs' => 0,
|
|
||||||
'ME_wcs' => 0,
|
|
||||||
'SI_wcs' => 0,
|
|
||||||
'caparo_wcs' => 0,
|
|
||||||
'Nemak_wcs' => 0,
|
|
||||||
'DR_wcs' => 0,
|
|
||||||
'edRunningHours' => 0,
|
'edRunningHours' => 0,
|
||||||
'edProduction' => 0,
|
'edProduction' => 0,
|
||||||
'edUsage' => 0,
|
'edUsage' => 0,
|
||||||
'trpProduction' => 0,
|
'trpProduction' => 0,
|
||||||
'trpProductionPerHour' => 0,
|
'trpProductionPerHour' => 0,
|
||||||
'coating' => 0,
|
'coating' => 0,
|
||||||
'ALs_crs' => 0,
|
|
||||||
'Nemak_crs' => 0,
|
|
||||||
'ME_crs' => 0,
|
|
||||||
'BI_crs' => 0,
|
|
||||||
'Karmen_crs' => 0,
|
|
||||||
'waterReceipt' => 0,
|
'waterReceipt' => 0,
|
||||||
'waterConsumption' => 0,
|
'waterConsumption' => 0,
|
||||||
'ebReading' => 0,
|
'ebReading' => 0,
|
||||||
@ -991,6 +936,15 @@ $timeOtions[] = "12:00 AM";
|
|||||||
'cycloneWaste' => 0
|
'cycloneWaste' => 0
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
foreach($crsClientList as $client){
|
||||||
|
$summary[$client] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($wcsSupplierList as $supplier){
|
||||||
|
$summary[$supplier] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sum values for the material
|
// Sum values for the material
|
||||||
@ -1009,24 +963,22 @@ $timeOtions[] = "12:00 AM";
|
|||||||
$summary['trpPhysicalGasPerTon'] += is_numeric($trpProductionDetail['trpPhysicalGasPerTon']) ? $trpProductionDetail['trpPhysicalGasPerTon'] : 0;
|
$summary['trpPhysicalGasPerTon'] += is_numeric($trpProductionDetail['trpPhysicalGasPerTon']) ? $trpProductionDetail['trpPhysicalGasPerTon'] : 0;
|
||||||
$summary['panelGasConsumption'] += is_numeric($trpProductionDetail['panelGasConsumption']) ? $trpProductionDetail['panelGasConsumption'] : 0;
|
$summary['panelGasConsumption'] += is_numeric($trpProductionDetail['panelGasConsumption']) ? $trpProductionDetail['panelGasConsumption'] : 0;
|
||||||
$summary['panelGasPerTon'] += is_numeric($trpProductionDetail['panelGasPerTon']) ? $trpProductionDetail['panelGasPerTon'] : 0;
|
$summary['panelGasPerTon'] += is_numeric($trpProductionDetail['panelGasPerTon']) ? $trpProductionDetail['panelGasPerTon'] : 0;
|
||||||
$summary['ALs_wcs'] += is_numeric($trpProductionDetail['ALs_wcs']) ? $trpProductionDetail['ALs_wcs'] : 0;
|
|
||||||
$summary['ALe_wcs'] += is_numeric($trpProductionDetail['ALe_wcs']) ? $trpProductionDetail['ALe_wcs'] : 0;
|
foreach($wcsSupplierList as $supplier){
|
||||||
$summary['ME_wcs'] += is_numeric($trpProductionDetail['ME_wcs']) ? $trpProductionDetail['ME_wcs'] : 0;
|
$summary[$supplier] += is_numeric($trpProductionDetail[$supplier]) ? $trpProductionDetail[$supplier] : 0;
|
||||||
$summary['SI_wcs'] += is_numeric($trpProductionDetail['SI_wcs']) ? $trpProductionDetail['SI_wcs'] : 0;
|
}
|
||||||
$summary['caparo_wcs'] += is_numeric($trpProductionDetail['caparo_wcs']) ? $trpProductionDetail['caparo_wcs'] : 0;
|
|
||||||
$summary['Nemak_wcs'] += is_numeric($trpProductionDetail['Nemak_wcs']) ? $trpProductionDetail['Nemak_wcs'] : 0;
|
|
||||||
$summary['DR_wcs'] += is_numeric($trpProductionDetail['DR_wcs']) ? $trpProductionDetail['DR_wcs'] : 0;
|
|
||||||
$summary['edRunningHours'] += is_numeric($trpProductionDetail['edRunningHours']) ? $trpProductionDetail['edRunningHours'] : 0;
|
$summary['edRunningHours'] += is_numeric($trpProductionDetail['edRunningHours']) ? $trpProductionDetail['edRunningHours'] : 0;
|
||||||
$summary['edProduction'] += is_numeric($trpProductionDetail['edProduction']) ? $trpProductionDetail['edProduction'] : 0;
|
$summary['edProduction'] += is_numeric($trpProductionDetail['edProduction']) ? $trpProductionDetail['edProduction'] : 0;
|
||||||
$summary['edUsage'] += is_numeric($trpProductionDetail['edUsage']) ? $trpProductionDetail['edUsage'] : 0;
|
$summary['edUsage'] += is_numeric($trpProductionDetail['edUsage']) ? $trpProductionDetail['edUsage'] : 0;
|
||||||
$summary['trpProduction'] += is_numeric($trpProductionDetail['trpProduction']) ? $trpProductionDetail['trpProduction'] : 0;
|
$summary['trpProduction'] += is_numeric($trpProductionDetail['trpProduction']) ? $trpProductionDetail['trpProduction'] : 0;
|
||||||
$summary['trpProductionPerHour'] += is_numeric($trpProductionDetail['trpProductionPerHour']) ? $trpProductionDetail['trpProductionPerHour'] : 0;
|
$summary['trpProductionPerHour'] += is_numeric($trpProductionDetail['trpProductionPerHour']) ? $trpProductionDetail['trpProductionPerHour'] : 0;
|
||||||
$summary['coating'] += is_numeric($trpProductionDetail['coating']) ? $trpProductionDetail['coating'] : 0;
|
$summary['coating'] += is_numeric($trpProductionDetail['coating']) ? $trpProductionDetail['coating'] : 0;
|
||||||
$summary['ALs_crs'] += is_numeric($trpProductionDetail['ALs_crs']) ? $trpProductionDetail['ALs_crs'] : 0;
|
|
||||||
$summary['Nemak_crs'] += is_numeric($trpProductionDetail['Nemak_crs']) ? $trpProductionDetail['Nemak_crs'] : 0;
|
foreach($crsClientList as $client){
|
||||||
$summary['ME_crs'] += is_numeric($trpProductionDetail['ME_crs']) ? $trpProductionDetail['ME_crs'] : 0;
|
$summary[$client] += is_numeric($trpProductionDetail[$client]) ? $trpProductionDetail[$client] : 0;
|
||||||
$summary['BI_crs'] += is_numeric($trpProductionDetail['BI_crs']) ? $trpProductionDetail['BI_crs'] : 0;
|
}
|
||||||
$summary['Karmen_crs'] += is_numeric($trpProductionDetail['Karmen_crs']) ? $trpProductionDetail['Karmen_crs'] : 0;
|
|
||||||
$summary['waterReceipt'] += is_numeric($trpProductionDetail['waterReceipt']) ? $trpProductionDetail['waterReceipt'] : 0;
|
$summary['waterReceipt'] += is_numeric($trpProductionDetail['waterReceipt']) ? $trpProductionDetail['waterReceipt'] : 0;
|
||||||
$summary['waterConsumption'] += is_numeric($trpProductionDetail['waterConsumption']) ? $trpProductionDetail['waterConsumption'] : 0;
|
$summary['waterConsumption'] += is_numeric($trpProductionDetail['waterConsumption']) ? $trpProductionDetail['waterConsumption'] : 0;
|
||||||
$summary['ebReading'] += is_numeric($trpProductionDetail['ebReading']) ? $trpProductionDetail['ebReading'] : 0;
|
$summary['ebReading'] += is_numeric($trpProductionDetail['ebReading']) ? $trpProductionDetail['ebReading'] : 0;
|
||||||
@ -1081,14 +1033,26 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<th class="celda_encabezado_total" rowspan="2">Panel Gas Consumption </th>
|
<th class="celda_encabezado_total" rowspan="2">Panel Gas Consumption </th>
|
||||||
<!-- th:eq(15) -->
|
<!-- th:eq(15) -->
|
||||||
<th class="celda_encabezado_total" rowspan="2">Panel Gas Per Ton </th>
|
<th class="celda_encabezado_total" rowspan="2">Panel Gas Per Ton </th>
|
||||||
|
|
||||||
<!-- th:eq(16) -->
|
<!-- th:eq(16) -->
|
||||||
<th class="celda_encabezado_total" colspan="7">Incoming Sand/ Lump details </th>
|
|
||||||
|
<?php if(count($wcsSupplierList)>0){?>
|
||||||
|
<th class="celda_encabezado_total" colspan="<?=count($wcsSupplierList)?>">Incoming Sand/ Lump details </th>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<!-- th:eq(17) -->
|
<!-- th:eq(17) -->
|
||||||
<th class="celda_encabezado_total" colspan="3">ED details </th>
|
<th class="celda_encabezado_total" colspan="3">ED details </th>
|
||||||
<!-- th:eq(18) -->
|
<!-- th:eq(18) -->
|
||||||
<th class="celda_encabezado_total" colspan="2">TRP Sand </th>
|
<th class="celda_encabezado_total" colspan="2">TRP Sand </th>
|
||||||
|
|
||||||
|
<th class="celda_encabezado_total" rowspan="2">Coating </th>
|
||||||
|
|
||||||
<!-- th:eq(19) -->
|
<!-- th:eq(19) -->
|
||||||
<th class="celda_encabezado_total" colspan="6">Usage </th>
|
|
||||||
|
<?php if(count($crsClientList)>0){?>
|
||||||
|
<th class="celda_encabezado_total" colspan="<?=count($crsClientList)?>">Usage </th>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<!-- th:eq(20) -->
|
<!-- th:eq(20) -->
|
||||||
<th class="celda_encabezado_total" colspan="2">Water </th>
|
<th class="celda_encabezado_total" colspan="2">Water </th>
|
||||||
<!-- th:eq(21) -->
|
<!-- th:eq(21) -->
|
||||||
@ -1111,7 +1075,7 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<th class="celda_encabezado_total" rowspan="2">ED +20 Waste </th>
|
<th class="celda_encabezado_total" rowspan="2">ED +20 Waste </th>
|
||||||
<!-- th:eq(30) -->
|
<!-- th:eq(30) -->
|
||||||
<th class="celda_encabezado_total" rowspan="2">Cyclone Waste </th>
|
<th class="celda_encabezado_total" rowspan="2">Cyclone Waste </th>
|
||||||
<!-- th:eq(31) -->
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -1122,20 +1086,13 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<th class="celda_encabezado_total" style="z-index:11;">BG</th>
|
<th class="celda_encabezado_total" style="z-index:11;">BG</th>
|
||||||
<!-- th:eq(1) -->
|
<!-- th:eq(1) -->
|
||||||
<th class="celda_encabezado_total">PG </th>
|
<th class="celda_encabezado_total">PG </th>
|
||||||
<!-- th:eq(2) -->
|
|
||||||
<th class="celda_encabezado_total">AL(S) </th>
|
<?php foreach($wcsSupplierList as $supplier){ ?>
|
||||||
<!-- th:eq(3) -->
|
|
||||||
<th class="celda_encabezado_total">AL(E) </th>
|
<th class="celda_encabezado_total"><?=$supplier?> </th>
|
||||||
<!-- th:eq(4) -->
|
|
||||||
<th class="celda_encabezado_total">ME </th>
|
<?php } ?>
|
||||||
<!-- th:eq(6) -->
|
|
||||||
<th class="celda_encabezado_total">SI </th>
|
|
||||||
<!-- th:eq(7) -->
|
|
||||||
<th class="celda_encabezado_total">caparo </th>
|
|
||||||
<!-- th:eq(8) -->
|
|
||||||
<th class="celda_encabezado_total">Nemak </th>
|
|
||||||
<!-- th:eq(9) -->
|
|
||||||
<th class="celda_encabezado_total">DR</th>
|
|
||||||
<!-- th:eq(10) -->
|
<!-- th:eq(10) -->
|
||||||
<th class="celda_encabezado_total">Running Hours </th>
|
<th class="celda_encabezado_total">Running Hours </th>
|
||||||
<!-- th:eq(11) -->
|
<!-- th:eq(11) -->
|
||||||
@ -1147,17 +1104,16 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<!-- th:eq(14) -->
|
<!-- th:eq(14) -->
|
||||||
<th class="celda_encabezado_total">Production Per Hour </th>
|
<th class="celda_encabezado_total">Production Per Hour </th>
|
||||||
<!-- th:eq(15) -->
|
<!-- th:eq(15) -->
|
||||||
<th class="celda_encabezado_total">Coating </th>
|
|
||||||
<!-- th:eq(16) -->
|
<!-- th:eq(16) -->
|
||||||
<th class="celda_encabezado_total">Hindhuja </th>
|
|
||||||
<!-- th:eq(17) -->
|
<?php foreach($crsClientList as $client){ ?>
|
||||||
<th class="celda_encabezado_total">Nemak</th>
|
|
||||||
<!-- th:eq(18) -->
|
<th class="celda_encabezado_total"><?=$client?> </th>
|
||||||
<th class="celda_encabezado_total">ME </th>
|
|
||||||
<!-- th:eq(19) -->
|
<?php } ?>
|
||||||
<th class="celda_encabezado_total">BI </th>
|
|
||||||
<!-- th:eq(20) -->
|
|
||||||
<th class="celda_encabezado_total">Karmen </th>
|
|
||||||
<!-- th:eq(21) -->
|
<!-- th:eq(21) -->
|
||||||
<th class="celda_encabezado_total">Receipt </th>
|
<th class="celda_encabezado_total">Receipt </th>
|
||||||
<!-- th:eq(22) -->
|
<!-- th:eq(22) -->
|
||||||
@ -1296,48 +1252,14 @@ $timeOtions[] = "12:00 AM";
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
<!-- AL(S) -->
|
|
||||||
<!-- td:eq(17) -->
|
|
||||||
<td class="celda_normal">
|
|
||||||
<?= $summary['ALs_wcs']?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- AL(E) -->
|
<?php
|
||||||
<!-- td:eq(18) -->
|
foreach($wcsSupplierList as $supplier){ ?>
|
||||||
<td class="celda_normal">
|
<td class="celda_normal">
|
||||||
<?=$summary['ALe_wcs']?>
|
<?=$summary[$supplier]?>
|
||||||
</td>
|
</td>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<!-- ME -->
|
|
||||||
<!-- td:eq(19) -->
|
|
||||||
<td class="celda_normal">
|
|
||||||
<?=$summary['ME_wcs'] ?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- SI -->
|
|
||||||
<!-- td:eq(20) -->
|
|
||||||
<td class="celda_normal">
|
|
||||||
<?= $summary['SI_wcs']?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- Caparo -->
|
|
||||||
<!-- td:eq(21) -->
|
|
||||||
<td class="celda_normal">
|
|
||||||
<?=$summary['caparo_wcs']?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Nemak -->
|
|
||||||
<!-- td:eq(22) -->
|
|
||||||
<td class="celda_normal">
|
|
||||||
<?= $summary['Nemak_wcs']?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- DR -->
|
|
||||||
<!-- td:eq(23) -->
|
|
||||||
<td class="celda_normal">
|
|
||||||
<?= $summary['DR_wcs']?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- edRunningHours -->
|
<!-- edRunningHours -->
|
||||||
<!-- td:eq(24) -->
|
<!-- td:eq(24) -->
|
||||||
@ -1377,32 +1299,14 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<?=$summary['coating'] ?>
|
<?=$summary['coating'] ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Hindhuja -->
|
|
||||||
<!-- td:eq(30) -->
|
|
||||||
<td class="celda_normal">
|
|
||||||
<?= $summary['ALs_crs'] ?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<!-- Nemak -->
|
<?php
|
||||||
<!-- td:eq(31) -->
|
foreach($crsClientList as $client){ ?>
|
||||||
<td class="celda_normal">
|
<td class="celda_normal">
|
||||||
<?=$summary['Nemak_crs'] ?>
|
<?=$summary[$client]?>
|
||||||
</td>
|
|
||||||
<!-- ME -->
|
|
||||||
<!-- td:eq(32) -->
|
|
||||||
<td class="celda_normal">
|
|
||||||
<?=$summary['ME_crs'] ?>
|
|
||||||
</td>
|
|
||||||
<!-- BI -->
|
|
||||||
<!-- td:eq(33) -->
|
|
||||||
<td class="celda_normal">
|
|
||||||
<?=$summary['BI_crs'] ?>
|
|
||||||
</td>
|
|
||||||
<!-- Karmen -->
|
|
||||||
<!-- td:eq(34) -->
|
|
||||||
<td class="celda_normal">
|
|
||||||
<?=$summary['Karmen_crs'] ?>
|
|
||||||
</td>
|
</td>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
<!-- waterReceipt -->
|
<!-- waterReceipt -->
|
||||||
<!-- td:eq(35) -->
|
<!-- td:eq(35) -->
|
||||||
@ -1461,13 +1365,13 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
<!-- location -->
|
<!-- location -->
|
||||||
<!-- td:eq(44) -->
|
<!-- td:eq(44) -->
|
||||||
<td class="celda_normal">
|
<td class="celda_normal location">
|
||||||
<?=" "?>
|
<?=" "?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- description -->
|
<!-- description -->
|
||||||
<!-- td:eq(45) -->
|
<!-- td:eq(45) -->
|
||||||
<td class="celda_normal">
|
<td class="celda_normal description">
|
||||||
<?=" " ?>
|
<?=" " ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@ -1657,39 +1561,39 @@ $timeOtions[] = "12:00 AM";
|
|||||||
Date : rowCells.eq(0).text().trim() ,
|
Date : rowCells.eq(0).text().trim() ,
|
||||||
openingTime : openingTime ,
|
openingTime : openingTime ,
|
||||||
closingTime : closingTime ,
|
closingTime : closingTime ,
|
||||||
totalHours : rowCells.eq(3).text().trim() ,
|
totalHours : $(this).find(`td[data-id='${dateInYmD} totalHours']`),
|
||||||
coldStart : rowCells.eq(4).text().trim() ,
|
coldStart : $(this).find(`td[data-id='${dateInYmD} coldStart']`) ,
|
||||||
breakdownHours : rowCells.eq(5).text().trim() ,
|
breakdownHours : $(this).find(`td[data-id='${dateInYmD} breakdownHours']`) ,
|
||||||
burnerFiringHours : rowCells.eq(6).text().trim() ,
|
burnerFiringHours : $(this).find(`td[data-id='${dateInYmD} burnerFiringHours']`) ,
|
||||||
sandFeedingHours : rowCells.eq(7).text().trim() ,
|
sandFeedingHours : $(this).find(`td[data-id='${dateInYmD} sandFeedingHours']`) ,
|
||||||
gasReceiptBg : rowCells.eq(8).text().trim() ,
|
gasReceiptBg : $(this).find(`td[data-id='${dateInYmD} gasReceiptBg']`) ,
|
||||||
gasReceiptPg : rowCells.eq(9).text().trim() ,
|
gasReceiptPg : $(this).find(`td[data-id='${dateInYmD} gasReceiptPg']`) ,
|
||||||
physicalGasConsumption : rowCells.eq(10).text().trim() ,
|
physicalGasConsumption : $(this).find(`td[data-id='${dateInYmD} physicalGasConsumption']`) ,
|
||||||
trpPlusDrierGasConsumption : rowCells.eq(13).text().trim() ,
|
trpPlusDrierGasConsumption : $(this).find(`td[data-id='${dateInYmD} trpPlusDrierGasConsumption']`) ,
|
||||||
trpPhysicalGasPerTon : rowCells.eq(14).text().trim() ,
|
trpPhysicalGasPerTon : $(this).find(`td[data-id='${dateInYmD} trpPhysicalGasPerTon']`) ,
|
||||||
panelGasConsumption : rowCells.eq(15).text().trim() ,
|
panelGasConsumption : $(this).find(`td[data-id='${dateInYmD} panelGasConsumption']`) ,
|
||||||
panelGasPerTon : rowCells.eq(16).text().trim() ,
|
panelGasPerTon : $(this).find(`td[data-id='${dateInYmD} panelGasPerTon']`) ,
|
||||||
edRunningHours : rowCells.eq(24).text().trim() ,
|
edRunningHours : $(this).find(`td[data-id='${dateInYmD} edRunningHours']`) ,
|
||||||
edProduction : rowCells.eq(25).text().trim() ,
|
edProduction : $(this).find(`td[data-id='${dateInYmD} edProduction']`) ,
|
||||||
edUsage : rowCells.eq(26).text().trim() ,
|
edUsage : $(this).find(`td[data-id='${dateInYmD} edUsage']`) ,
|
||||||
waterConsumption : rowCells.eq(26).text().trim() ,
|
waterConsumption : $(this).find(`td[data-id='${dateInYmD} waterConsumption']`) ,
|
||||||
trpProduction : rowCells.eq(27).text().trim() ,
|
trpProduction : $(this).find(`td[data-id='${dateInYmD} trpProduction']`) ,
|
||||||
trpProductionPerHour : rowCells.eq(28).text().trim() ,
|
trpProductionPerHour : $(this).find(`td[data-id='${dateInYmD} trpProductionPerHour']`) ,
|
||||||
waterReceipt : rowCells.eq(35).text().trim() ,
|
waterReceipt : $(this).find(`td[data-id='${dateInYmD} waterReceipt']`) ,
|
||||||
ebReading : rowCells.eq(37).text().trim() ,
|
ebReading : $(this).find(`td[data-id='${dateInYmD} ebReading']`) ,
|
||||||
ebReadingPerUnitTon : rowCells.eq(38).text().trim() ,
|
ebReadingPerUnitTon : $(this).find(`td[data-id='${dateInYmD} ebReadingPerUnitTon']`) ,
|
||||||
workingPersonEngineers : rowCells.eq(39).text().trim() ,
|
workingPersonEngineers : $(this).find(`td[data-id='${dateInYmD} workingPersonEngineers']`) ,
|
||||||
workingPersonSupervisiors : rowCells.eq(40).text().trim() ,
|
workingPersonSupervisiors : $(this).find(`td[data-id='${dateInYmD} workingPersonSupervisiors']`) ,
|
||||||
workingPersonOperators : rowCells.eq(41).text().trim() ,
|
workingPersonOperators : $(this).find(`td[data-id='${dateInYmD} workingPersonOperators']`) ,
|
||||||
rollerDrivers : rowCells.eq(42).text().trim() ,
|
rollerDrivers : $(this).find(`td[data-id='${dateInYmD} rollerDrivers']`) ,
|
||||||
natureOfMaintenance : rowCells.eq(43).text().trim() ,
|
natureOfMaintenance : $(this).find(`td[data-id='${dateInYmD} natureOfMaintenance']`) ,
|
||||||
location : rowCells.eq(44).text().trim() ,
|
location : $(this).find(`td[data-id='${dateInYmD} location']`) ,
|
||||||
description : rowCells.eq(45).text().trim() ,
|
description : $(this).find(`td[data-id='${dateInYmD} description']`) ,
|
||||||
msSeperation : rowCells.eq(46).text().trim() ,
|
msSeperation : $(this).find(`td[data-id='${dateInYmD} msSeperation']`) ,
|
||||||
edWaste : rowCells.eq(47).text().trim() ,
|
edWaste : $(this).find(`td[data-id='${dateInYmD} edWaste']`) ,
|
||||||
coolerBags : rowCells.eq(48).text().trim() ,
|
coolerBags : $(this).find(`td[data-id='${dateInYmD} coolerBags']`) ,
|
||||||
edPlus20Waste : rowCells.eq(49).text().trim() ,
|
edPlus20Waste : $(this).find(`td[data-id='${dateInYmD} edPlus20Waste']`) ,
|
||||||
cycloneWaste : rowCells.eq(50).text().trim()
|
cycloneWaste : $(this).find(`td[data-id='${dateInYmD} cycloneWaste']`) ,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -1778,35 +1682,54 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
let tr = $(tdElement).closest('tr');
|
let tr = $(tdElement).closest('tr');
|
||||||
|
|
||||||
|
let date = tr.find('td:eq(0)').text().trim() ;
|
||||||
|
|
||||||
let totalHours = validateInput(tr.find('td:eq(3)').text().trim()) ?? 0;
|
date = `${date.split('-')[2]}-${date.split('-')[1]}-${date.split('-')[0]}`;
|
||||||
let coldStart = validateInput(tr.find('td:eq(4)').text().trim()) ?? 0;
|
|
||||||
let breakdownHours = validateInput(tr.find('td:eq(5)').text().trim()) ?? 0;
|
let totalHours = validateInput(document.querySelector(`td.totalHours[data-id="${date} totalHours"]`).innerText) ?? 0;
|
||||||
let burnerFiringHours = tr.find('td:eq(6)').text().trim() ?? 0;
|
|
||||||
let sandFeedingHours = tr.find('td:eq(7)').text().trim() ?? 0;
|
let coldStart = validateInput(document.querySelector(`td.coldStart[data-id="${date} coldStart"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let breakdownHours = validateInput(document.querySelector(`td.breakdownHours[data-id="${date} breakdownHours"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let burnerFiringHours = validateInput(document.querySelector(`td.burnerFiringHours[data-id="${date} burnerFiringHours"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let sandFeedingHours = validateInput(document.querySelector(`td.sandFeedingHours[data-id="${date} sandFeedingHours"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
|
||||||
let gasReceiptBg = tr.find('td:eq(8)').text().trim() ?? 0;
|
let gasReceiptBg = validateInput(document.querySelector(`td.gasReceiptBg[data-id="${date} gasReceiptBg"]`).innerText) ?? 0;
|
||||||
let gasReceiptPg = tr.find('td:eq(9)').text().trim() ?? 0;
|
|
||||||
let physicalGasConsumption = validateInput(tr.find('td:eq(10)').text().trim()) ?? 0;
|
|
||||||
let drierGasConsumption = validateInput(tr.find('td:eq(11)').text().trim()) ?? 0;
|
|
||||||
let coatingGasConsumption = validateInput(tr.find('td:eq(12)').text().trim()) ?? 0;
|
|
||||||
let trpPlusDrierGasConsumption = tr.find('td:eq(13)').text().trim() ?? 0;
|
|
||||||
let trpPhysicalGasPerTon = tr.find('td:eq(14)').text().trim() ?? 0;
|
|
||||||
let panelGasConsumption = (tr.find('td:eq(15)').text().trim()) ?? 0;
|
|
||||||
let panelGasPerTon = tr.find('td:eq(16)').text().trim() ?? 0;
|
|
||||||
|
|
||||||
let edRunningHours = tr.find('td:eq(24)').text().trim() ?? 0;
|
let gasReceiptPg = validateInput(document.querySelector(`td.gasReceiptPg[data-id="${date} gasReceiptPg"]`).innerText) ?? 0;
|
||||||
let edProduction = tr.find('td:eq(25)').text().trim() ?? 0;
|
|
||||||
let edUsage = tr.find('td:eq(26)').text().trim() ?? 0;
|
|
||||||
let trpProduction = validateInput(tr.find('td:eq(27)').text().trim()) ?? 0;
|
|
||||||
let trpProductionPerHour = tr.find('td:eq(28)').text().trim() ?? 0;
|
|
||||||
let coating = tr.find('td:eq(29)').text().trim() ?? 0;
|
|
||||||
|
|
||||||
let ebReading = tr.find('td:eq(37)').text().trim() ?? 0;
|
let physicalGasConsumption = validateInput(document.querySelector(`td.physicalGasConsumption[data-id="${date} physicalGasConsumption"]`).innerText) ?? 0;
|
||||||
let ebReadingPerUnitTon = tr.find('td:eq(38)').text().trim() ?? 0;
|
|
||||||
|
|
||||||
|
let drierGasConsumption = validateInput(document.querySelector(`td.drierGasConsumption[data-id="${date} drierGasConsumption"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let coatingGasConsumption = validateInput(document.querySelector(`td.coatingGasConsumption[data-id="${date} coatingGasConsumption"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let trpPlusDrierGasConsumption = validateInput(document.querySelector(`td.trpPlusDrierGasConsumption[data-id="${date} trpPlusDrierGasConsumption"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let trpPhysicalGasPerTon = validateInput(document.querySelector(`td.trpPhysicalGasPerTon[data-id="${date} trpPhysicalGasPerTon"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let panelGasConsumption = validateInput(document.querySelector(`td.panelGasConsumption[data-id="${date} panelGasConsumption"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let panelGasPerTon = validateInput(document.querySelector(`td.panelGasPerTon[data-id="${date} panelGasPerTon"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let edRunningHours = validateInput(document.querySelector(`td.edRunningHours[data-id="${date} edRunningHours"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let edProduction = validateInput(document.querySelector(`td.edProduction[data-id="${date} edProduction"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let edUsage = validateInput(document.querySelector(`td.edUsage[data-id="${date} edUsage"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let trpProduction = validateInput(document.querySelector(`td.trpProduction[data-id="${date} trpProduction"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let trpProductionPerHour = validateInput(document.querySelector(`td.trpProductionPerHour[data-id="${date} trpProductionPerHour"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let coating = validateInput(document.querySelector(`td.coating[data-id="${date} coating"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let ebReading = validateInput(document.querySelector(`td.ebReading[data-id="${date} ebReading"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
let ebReadingPerUnitTon = validateInput(document.querySelector(`td.ebReadingPerUnitTon[data-id="${date} ebReadingPerUnitTon"]`).innerText) ?? 0;
|
||||||
|
|
||||||
|
|
||||||
let result = calculateSandFeedingHours(totalHours, coldStart, breakdownHours, burnerFiringHours);
|
let result = calculateSandFeedingHours(totalHours, coldStart, breakdownHours, burnerFiringHours);
|
||||||
@ -1830,19 +1753,22 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
// Final updation of value into td
|
// Final updation of value into td
|
||||||
|
|
||||||
tr.find('td:eq(7)').text(Number.isNaN(sandFeedingHours) ? " " : sandFeedingHours);
|
document.querySelector(`td.sandFeedingHours[data-id="${date} sandFeedingHours"]`).innerText = isFinite(sandFeedingHours) ? sandFeedingHours : " ";
|
||||||
|
|
||||||
tr.find('td:eq(6)').text(Number.isNaN(burnerFiringHours) ? " " : burnerFiringHours);
|
document.querySelector(`td.burnerFiringHours[data-id="${date} burnerFiringHours"]`).innerText = isFinite(burnerFiringHours) ? burnerFiringHours : " ";
|
||||||
|
|
||||||
tr.find('td:eq(13)').text(Number.isNaN(trpPlusDrierGasConsumption) ? " " : (trpPlusDrierGasConsumption).toFixed(2));
|
document.querySelector(`td.trpPlusDrierGasConsumption[data-id="${date} trpPlusDrierGasConsumption"]`).innerText = isFinite(trpPlusDrierGasConsumption) ? trpPlusDrierGasConsumption : " ";
|
||||||
|
|
||||||
tr.find('td:eq(14)').text(Number.isNaN(trpPhysicalGasPerTon) ? " " : (trpPhysicalGasPerTon).toFixed(2));
|
document.querySelector(`td.trpPhysicalGasPerTon[data-id="${date} trpPhysicalGasPerTon"]`).innerText = isFinite(trpPhysicalGasPerTon) ? (trpPhysicalGasPerTon).toFixed(2) : " ";
|
||||||
|
|
||||||
tr.find('td:eq(16)').text(Number.isNaN(panelGasPerTon) ? " " : (panelGasPerTon.toFixed(2)));
|
document.querySelector(`td.sandFeedingHours[data-id="${date} sandFeedingHours"]`).innerText = isFinite(sandFeedingHours) ? sandFeedingHours : " ";
|
||||||
|
|
||||||
tr.find('td:eq(28)').text(Number.isNaN(trpProductionPerHour) ? " " : (trpProductionPerHour).toFixed(2));
|
document.querySelector(`td.panelGasPerTon[data-id="${date} panelGasPerTon"]`).innerText = isFinite(panelGasPerTon) ? (panelGasPerTon).toFixed(2) : " ";
|
||||||
|
|
||||||
|
document.querySelector(`td.trpProductionPerHour[data-id="${date} trpProductionPerHour"]`).innerText = isFinite(trpProductionPerHour) ? trpProductionPerHour : " ";
|
||||||
|
|
||||||
|
document.querySelector(`td.ebReadingPerUnitTon[data-id="${date} ebReadingPerUnitTon"]`).innerText = isFinite(ebReadingPerUnitTon) ? (ebReadingPerUnitTon).toFixed(2) : " ";
|
||||||
|
|
||||||
tr.find('td:eq(38)').text(Number.isNaN(ebReadingPerUnitTon) ? " " : (ebReadingPerUnitTon).toFixed(2));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1870,6 +1796,9 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
|
|
||||||
var tr = $(this).closest('tr');
|
var tr = $(this).closest('tr');
|
||||||
|
let date = tr.find('td:eq(0)').text().trim() ;
|
||||||
|
|
||||||
|
date = `${date.split('-')[2]}-${date.split('-')[1]}-${date.split('-')[0]}`;
|
||||||
|
|
||||||
var trpOnTime = tr.find('.trp_on_time').val();
|
var trpOnTime = tr.find('.trp_on_time').val();
|
||||||
var trpOffTime = tr.find('.trp_off_time').val();
|
var trpOffTime = tr.find('.trp_off_time').val();
|
||||||
@ -1898,7 +1827,7 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
const totalHours = hours + "." + minutes;
|
const totalHours = hours + "." + minutes;
|
||||||
|
|
||||||
tr.find('td:eq(3)').text(totalHours);
|
document.querySelector(`td.totalHours[data-id="${date} totalHours"]`).innerText = totalHours;
|
||||||
|
|
||||||
|
|
||||||
trpStockChange(this);
|
trpStockChange(this);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user