changes in stock module 07-03-2025

This commit is contained in:
vadivelJ96 2025-03-07 12:01:30 +05:30
parent 82e00e2b3a
commit 725c96a123
12 changed files with 435 additions and 753 deletions

View File

@ -146,7 +146,7 @@ class TrpProductionModel extends Model
$builder->join('t_trp_sand_use tsu', 'tsu.date = tpmd.date', 'left'); $builder->join('t_trp_sand_use tsu', 'tsu.date = tpmd.date', 'left');
// Subquery: Coating Machine Gas Consumption // Subquery: Coating Machine Gas Consumption
$subquery1 = $this->db->table('t_coatingMachineDetails') $subquery1 = $this->db->table('t_coatingmachinedetails')
->select('date, SUM(totalGasConsumption) AS totalGasConsumption') ->select('date, SUM(totalGasConsumption) AS totalGasConsumption')
->groupBy('date') ->groupBy('date')
->getCompiledSelect(false); // Convert Query Builder to raw SQL; ->getCompiledSelect(false); // Convert Query Builder to raw SQL;
@ -154,7 +154,7 @@ class TrpProductionModel extends Model
$builder->join("({$subquery1}) tcmd", 'tcmd.date = tpmd.date', 'left'); $builder->join("({$subquery1}) tcmd", 'tcmd.date = tpmd.date', 'left');
// Subquery: Drier Machine Gas Consumption // Subquery: Drier Machine Gas Consumption
$subquery2 = $this->db->table('t_drierMachineDetails') $subquery2 = $this->db->table('t_driermachinedetails')
->select('date, SUM(total_gas_consumption) AS totalGasConsumption') ->select('date, SUM(total_gas_consumption) AS totalGasConsumption')
->groupBy('date') ->groupBy('date')
->getCompiledSelect(false); // Convert Query Builder to raw SQL; ->getCompiledSelect(false); // Convert Query Builder to raw SQL;

View File

@ -235,6 +235,10 @@
z-index: 5!important; z-index: 5!important;
} }
tfoot tr {
background-color:rgb(235, 236, 203);
}
</style> </style>
<div class="content-page"> <div class="content-page">
@ -456,49 +460,26 @@
} ?> } ?>
<table id="coatingMachineStockDetailsTableSummaryId" class="fht-table table-hover table-bordered"> <tfoot>
<tr>
<thead > <td style="background-color:rgb(189, 9, 6); color:#ffff;">
<b> Total </b>
<th class="celda_encabezado_total" </td>
style="padding: 10px; background-color:#ffff;"> Date </th> <td class="celda_normal "> - </td>
<th class="celda_encabezado_total" >Shift</th> <td class="celda_normal "> - </td>
<th class="celda_encabezado_total" >Machine On Time</th> <td class="celda_normal "> - </td>
<th class="celda_encabezado_total" >Machine Off Time</th> <td class="celda_normal "> <?=$summary['totalMachineRunningHrs']?></td>
<th class="celda_encabezado_total" >Machine Running(hr)</th> <td class="celda_normal "> - </td>
<th class="celda_encabezado_total" >Customer Name </th> <td class="celda_normal "> - </td>
<th class="celda_encabezado_total" >Grade</th> <td class="celda_normal "><?=$summary['totalCoating']?></td>
<th class="celda_encabezado_total" >Total Coating</th> <td class="celda_normal "><?=$summary['totalCoatingSandInKg']?></td>
<th class="celda_encabezado_total" >Total Coating Sand(kg)</th> <td class="celda_normal "><?=$summary['totalGasConsumption']?></td>
<th class="celda_encabezado_total" >Total Gas Consumption</th> <td class="celda_normal "><?=number_format($summary['totalGasConsumption']/$summary['totalMachineRunningHrs'], 2)?> (avg)</td>
<th class="celda_encabezado_total" >Hour Gas</th> <td class="celda_normal "><?=number_format($summary['totalCoatingSandInKg']/$summary['totalMachineRunningHrs'], 2)?> (avg)</td>
<th class="celda_encabezado_total" >Hour QTY(kg)</th> </tr>
</thead> </tfoot>
<tbody>
<tr>
<td style="background-color:rgb(189, 9, 6); color:#ffff;">
<b> Total </b>
</td>
<td class="celda_normal "> - </td>
<td class="celda_normal "> - </td>
<td class="celda_normal "> - </td>
<td class="celda_normal "> <?=$summary['totalMachineRunningHrs']?></td>
<td class="celda_normal "> - </td>
<td class="celda_normal "> - </td>
<td class="celda_normal "><?=$summary['totalCoating']?></td>
<td class="celda_normal "><?=$summary['totalCoatingSandInKg']?></td>
<td class="celda_normal "><?=$summary['totalGasConsumption']?></td>
<td class="celda_normal "><?=number_format($summary['totalGasConsumption']/$summary['totalMachineRunningHrs'], 2)?> (avg)</td>
<td class="celda_normal "><?=number_format($summary['totalCoatingSandInKg']/$summary['totalMachineRunningHrs'], 2)?> (avg)</td>
</tr>
</tbody>
</table>
</div> </div>

View File

@ -235,6 +235,9 @@
} */ } */
tfoot tr {
background-color:rgb(235, 236, 203);
}
@ -419,7 +422,7 @@
</div> </div>
<!-- hidden fields --> <!-- hidden fields -->
<input type="hidden" name="month" id="month" value="<?php echo "$month" ?>" <input type="hidden" name="month" value="<?php echo "$month" ?>"
class="form-control mt-2" data-provide="datepicker" class="form-control mt-2" data-provide="datepicker"
data-date-format="M-yyyy" data-date-min-view-mode="1"> data-date-format="M-yyyy" data-date-min-view-mode="1">
@ -585,46 +588,28 @@
<?php } ?> <?php } ?>
<tfoot>
<tr>
<div class="table-responsive"> <td style="background-color:rgb(189, 9, 6); color:#ffff;">
<table id="bagStockDetailsTableSummaryId" class="fht-table table-striped"> <b> Total </b>
</td>
<thead > <?php foreach($summary as $each){
<th class="celda_encabezado_total">Total Sum</th> ?>
<?php foreach($summary as $each){ ?>
<th class="celda_encabezado_total">Opening Stock</th>
<th class="celda_encabezado_total">Receipt</th>
<th class="celda_encabezado_total">Used</th>
<th class="celda_encabezado_total">Balance Stock</th>
<?php } ?>
</thead>
<tbody>
<tr>
<td style="background-color:rgb(189, 9, 6); color:#ffff;">
<b> Total </b>
</td>
<?php foreach($summary as $each){
?>
<td class="celda_normal "><?=$each['opening']?></td> <td class="celda_normal "><?=$each['opening']?></td>
<td class="celda_normal "><?=$each['receipt']?></td> <td class="celda_normal "><?=$each['receipt']?></td>
<td class="celda_normal "><?=$each['used']?></td> <td class="celda_normal "><?=$each['used']?></td>
<td class="celda_normal "><?=$each['balanceStock']?></td> <td class="celda_normal "><?=$each['balanceStock']?></td>
<?php } ?> <?php } ?>
</tr> </tr>
</tfoot>
</tbody>
</table>
</div>
<!-- this else condition work if groupedBagStockDetails is empty and creating new records <!-- this else condition work if groupedBagStockDetails is empty and creating new records
with initial values 0 for entire month --> with initial values 0 for entire month -->
<?php } else { <?php } else {
@ -1283,3 +1268,16 @@
}); });
</script> </script>
<script>
$(document).ready(function () {
$('#month').datepicker({
format: "M-yyyy", // Format as "Jan-2025"
minViewMode: 1, // Month-Year Picker
autoclose: true,
todayHighlight: true
}).on('focus', function() {
$(this).datepicker('show'); // Ensure it opens on focus
});
});
</script>

View File

@ -226,8 +226,9 @@
max-width: 100px; max-width: 100px;
} }
tfoot tr{
background-color:rgb(235, 236, 203);
}
@ -683,67 +684,40 @@ foreach ($period as $day) {
} }
?> ?>
<div class="table-responsive"> <tfoot>
<table id="dieselStockDetailsTableSummaryId" class="fht-table table-striped"> <tr>
<thead > <td style="background-color:rgb(189, 9, 6); color:#ffff;">
<b> Total </b>
<th class="celda_encabezado_total" >Total Sum</th> </td>
<th class="celda_encabezado_total"> Opening</th>
<th class="celda_encabezado_total"> Purchase Diesel</th>
<th class="celda_encabezado_total"> Filling Diesel</th>
<th class="celda_encabezado_total"> Balance Stock</th>
<?php foreach($summary as $each){
if(is_array($each)){
?>
<th class="celda_encabezado_total">Opening Reading</th>
<th class="celda_encabezado_total">Closing Reading</th>
<th class="celda_encabezado_total">Filling Diesel</th>
<th class="celda_encabezado_total">Consumption</th>
<th class="celda_encabezado_total">Running Hours</th>
<th class="celda_encabezado_total">Mileage</th>
<?php }
} ?>
</thead>
<tbody>
<tr>
<td style="background-color:rgb(189, 9, 6); color:#ffff;">
<b> Total </b>
</td>
<td><?= $summary['opening_diesel'] ?></td> <td class="celda_normal "><?= $summary['opening_diesel'] ?></td>
<td><?= $summary['totalPurchaseDiesel'] ?></td> <td class="celda_normal "><?= $summary['totalPurchaseDiesel'] ?></td>
<td><?= $summary['totalFillingDiesel'] ?></td> <td class="celda_normal "><?= $summary['totalFillingDiesel'] ?></td>
<td><?= $summary['balanceStock'] ?></td> <td class="celda_normal "><?= $summary['balanceStock'] ?></td>
<?php foreach($summary as $each){ <?php foreach($summary as $each){
if(is_array($each)){ if(is_array($each)){
?> ?>
<td class="celda_normal "><?=$each['opening_reading']?> </td> <td class="celda_normal "><?=$each['opening_reading']?> </td>
<td class="celda_normal "><?=$each['closing_reading']?></td> <td class="celda_normal "><?=$each['closing_reading']?></td>
<td class="celda_normal "><?=$each['filling_diesel']?></td> <td class="celda_normal "><?=$each['filling_diesel']?></td>
<td class="celda_normal "><?=$each['consumption']?></td> <td class="celda_normal "><?=$each['consumption']?></td>
<td class="celda_normal "><?=$each['running_hours']?></td> <td class="celda_normal "><?=$each['running_hours']?></td>
<td class="celda_normal "><?=$each['mileage']?></td> <td class="celda_normal "><?=$each['mileage']?></td>
<?php <?php
} }
} }
?> ?>
</tr>
</tfoot>
</tr>
</tbody>
</table>
</div>
<!-- this else condition work if groupeddieselStockDetails is empty and creating new records <!-- this else condition work if groupeddieselStockDetails is empty and creating new records
with initial values 0 for entire month --> with initial values 0 for entire month -->

View File

@ -238,6 +238,10 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
z-index: 5!important; z-index: 5!important;
} }
tfoot tr {
background-color:rgb(235, 236, 203);
}
</style> </style>
<div class="content-page"> <div class="content-page">
<div class="content"> <div class="content">
@ -503,62 +507,29 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
</tbody> </tbody>
<?php } ?> <tfoot>
</table>
<?php if(!empty($drierDetails)){ ?>
<table id="drierTableSummaryId" class="fht-table ">
<thead >
<tr>
<th class="celda_encabezado_total"
style="padding:5px; border:#ffffff; background-color: #ffffff;">Date value</th>
<th class="celda_encabezado_total" >Drier On Time </th>
<th class="celda_encabezado_total" >Drier Off Time</th>
<th class="celda_encabezado_total" >Running Hrs</th>
<th class="celda_encabezado_total" >Supplier Name </th>
<th class="celda_encabezado_total" >input Sand Qty (Metric Ton)</th>
<th class="celda_encabezado_total" >inputp Sand Moisture(%)</th>
<th class="celda_encabezado_total" >Sand Dried Qty (Metric Ton)</th>
<th class="celda_encabezado_total" >Total Gas Consumption</th>
<th class="celda_encabezado_total" >Gas Per Ton</th>
<th class="celda_encabezado_total" >Qty Per Hrs (Metric Ton)</th>
<th class="celda_encabezado_total" >Moisture Loss Qty (Metric Ton)</th>
<th class="celda_encabezado_total" >Dust Qty (Metric Ton)</th>
</tr>
</thead>
<tbody>
<tr> <tr>
<td style="background-color:rgb(189, 9, 6); color:#ffff;"> <td style="background-color:rgb(189, 9, 6); color:#ffff;">
<b> Total </b> <b> Total </b>
</td> </td>
<td class="celda_normal ">-</td> <td class="celda_normal ">-</td>
<td class="celda_normal ">-</td> <td class="celda_normal ">-</td>
<td class="celda_normal "><?=$summary['drier_running_hours']?></td> <td class="celda_normal "><?=$summary['drier_running_hours']?></td>
<td class="celda_normal ">-</td> <td class="celda_normal ">-</td>
<td class="celda_normal "><?=$summary['input_sand_qty']?></td> <td class="celda_normal "><?=$summary['input_sand_qty']?></td>
<td class="celda_normal ">-</td> <td class="celda_normal ">-</td>
<td class="celda_normal "><?=$summary['sand_dried_qty']?></td> <td class="celda_normal "><?=$summary['sand_dried_qty']?></td>
<td class="celda_normal "><?=$summary['total_gas_consumption']?></td> <td class="celda_normal "><?=$summary['total_gas_consumption']?></td>
<td class="celda_normal "></td> <td class="celda_normal "></td>
<td class="celda_normal "></td> <td class="celda_normal "></td>
<td class="celda_normal "><?=$summary['moisture_loss_qty']?></td> <td class="celda_normal "><?=$summary['moisture_loss_qty']?></td>
<td class="celda_normal "><?=$summary['dust_qty']?></td> <td class="celda_normal "><?=$summary['dust_qty']?></td>
</tr> </tr>
</tfoot>
</tbody> <?php } ?>
</table> </table>
<?php } ?>
<?php if(empty($drierDetails)){ ?> <?php if(empty($drierDetails)){ ?>
<br><br> <br><br>

View File

@ -228,6 +228,10 @@
max-width: 150px; max-width: 150px;
} }
tfoot tr {
background-color:rgb(235, 236, 203);
}
</style> </style>
@ -273,10 +277,9 @@
data-date-format="M-yyyy" data-date-min-view-mode="1" readonly> data-date-format="M-yyyy" data-date-min-view-mode="1" readonly>
</div> </div>
<div class="form-group col-md-2"> <div class="form-group col-md-3">
<button type="submit" class="btn btn-success"> Change Month </button> <button type="submit" class="btn btn-success"> Change Month </button>
</div> </div>
<div class="col-md-1"></div>
<div class="col-6"> <div class="col-6">
<div class="dropdown float-right"> <div class="dropdown float-right">
<a href="#" class="dropdown-toggle arrow-none" data-toggle="dropdown" <a href="#" class="dropdown-toggle arrow-none" data-toggle="dropdown"
@ -378,9 +381,9 @@
<tfoot> <tfoot>
<tr> <tr>
<td style="background-color:rgb(189, 9, 6); color:#ffff;"> Total </td> <td style="background-color:rgb(189, 9, 6); color:#ffff;"> Total </td>
<td class="celda_normal "><?=$summary['finalRough']?></td> <td class="celda_normal "> <b> <?=$summary['finalRough']?> </b> </td>
<td class="celda_normal "><?=$summary['dust']?></td> <td class="celda_normal "> <b> <?=$summary['dust']?> </b> </td>
<td class="celda_normal "><?=$summary['total']?></td> <td class="celda_normal "> <b> <?=$summary['total']?> </b> </td>
</tr> </tr>
</tfoot> </tfoot>
@ -680,3 +683,18 @@
</script> </script>
<script>
$(document).ready(function () {
$('#month').datepicker({
format: "M-yyyy", // Format as "Jan-2025"
minViewMode: 1, // Month-Year Picker
autoclose: true,
todayHighlight: true,
orientation: "auto" // Adjusts automatically, or use "top" / "bottom"
}).on('focus', function() {
$(this).datepicker('show'); // Ensure it opens on focus
});
});
</script>

View File

@ -217,6 +217,9 @@
max-width: 100px; max-width: 100px;
} }
tfoot tr {
background-color:rgb(235, 236, 203);
}
@ -501,50 +504,8 @@
} ?> } ?>
<div class="table-responsive"> <tfoot>
<table id="gasStockDetailsTableSummaryId" class="fht-table table-striped"> <tr>
<thead class="celda_encabezado_total" style="padding: 10px;">
<tr>
<th class="celda_encabezado_total" rowspan="1" colspan="1">RIPL </th>
<th class="celda_encabezado_total" colspan="6">Gas Stock </th>
<th class="celda_encabezado_total">FBD 10 Ton Dryer</th>
<th class="celda_encabezado_total">Sand Dried</th>
<th class="celda_encabezado_total">Coating Machine</th>
<th class="celda_encabezado_total">Sand Coated</th>
<th class="celda_encabezado_total" colspan="2">TRP </th>
<th class="celda_encabezado_total">Sand TRP</th>
<th class="celda_encabezado_total">Rotary Drier </th>
</tr>
<tr>
<th class="celda_encabezado_total">Date </th>
<th class="celda_encabezado_total">Opening Stock</th>
<th class="celda_encabezado_total">Purchase(Bharath)</th>
<th class="celda_encabezado_total">Purchase(Indian)</th>
<th class="celda_encabezado_total">Total</th>
<th class="celda_encabezado_total">Consumption </th>
<th class="celda_encabezado_total">Balance Stock</th>
<th class="celda_encabezado_total">Consumption </th>
<th class="celda_encabezado_total">ton </th>
<th class="celda_encabezado_total">Consumption</th>
<th class="celda_encabezado_total">ton </th>
<th class="celda_encabezado_total">Panel Consumption</th>
<th class="celda_encabezado_total">Physical Consumption</th>
<th class="celda_encabezado_total">ton </th>
<th class="celda_encabezado_total">Consumption</th>
</tr>
</thead>
<tbody>
<tr>
<td style="background-color:rgb(189, 9, 6); color:#ffff;"> <td style="background-color:rgb(189, 9, 6); color:#ffff;">
<b> Total </b> <b> Total </b>
@ -568,12 +529,8 @@
</tr> </tr>
</tfoot>
</tbody>
</table>
</div>

View File

@ -226,6 +226,9 @@
z-index: 5!important; z-index: 5!important;
} }
tfoot tr {
background-color:rgb(235, 236, 203);
}
@ -669,45 +672,11 @@
} ?> } ?>
</tbody> </tbody>
</table>
<table id="incomingSilicaSandDetailsSummaryTable" class="fht-table table-striped " > <tfoot>
<thead>
<tr> <tr>
<th class="celda_encabezado_total" <td class="celda_normal" style="display: none;" > -</td>
style="padding: 10px; border:#ffffff; background-color:#ffffff !important;">S.NO </th>
<th class="celda_encabezado_total"
style="padding: 10px; border:#ffffff; background-color:#ffffff !important;">IGR No </th>
<th class="celda_encabezado_total" style="padding: 10px;">Invoice No</th>
<th class="celda_encabezado_total" style="padding: 10px;">Invoice Date</th>
<th class="celda_encabezado_total" style="padding: 10px;">Received Date</th>
<th class="celda_encabezado_total" style="padding: 10px; min-width : 300px; max-width:300px;">Supplier Name</th>
<th class="celda_encabezado_total" style="padding: 10px;">Grade </th>
<th class="celda_encabezado_total" style="padding: 10px; min-width : 200px; max-width:200px;">Grade Condition</th>
<th class="celda_encabezado_total" style="padding: 10px;">Vehicle No</th>
<th class="celda_encabezado_total" style="padding: 10px;">Qty</th>
<th class="celda_encabezado_total" style="padding: 10px;">Lab Report</th>
<th class="celda_encabezado_total" style="padding: 10px;">AFS Spec</th>
<th class="celda_encabezado_total" style="padding: 10px;">AFS Actual</th>
<th class="celda_encabezado_total" style="padding: 10px;">Plus 20 loss%</th>
<th class="celda_encabezado_total" style="padding: 10px;">Plus 30 Loss %</th>
<th class="celda_encabezado_total" style="padding: 10px;">Moisture % Spec</th>
<th class="celda_encabezado_total" style="padding: 10px;">Moisture Actual</th>
<th class="celda_encabezado_total" style="padding: 10px;">Moisture Loss</th>
<th class="celda_encabezado_total" style="padding: 10px;">Moisture loss Qty</th>
<th class="celda_encabezado_total" style="padding: 10px;">Sieve Loss Qty</th>
<th class="celda_encabezado_total" style="padding: 10px;">Salable Qty</th>
</tr>
</thead>
<tbody>
<tr>
<td class="celda_normal" > -</td>
<td class="celda_normal" style="background-color:rgb(189, 9, 6); color:#fff ;"> <h5 style="color:#fff;"> Total </h5> </td> <td class="celda_normal" style="background-color:rgb(189, 9, 6); color:#fff ;"> <h5 style="color:#fff;"> Total </h5> </td>
@ -718,6 +687,7 @@
<td class="celda_normal" > -</td> <td class="celda_normal" > -</td>
<td class="celda_normal" > -</td> <td class="celda_normal" > -</td>
<td class="celda_normal" > -</td> <td class="celda_normal" > -</td>
<td class="celda_normal" > -</td>
<td class="celda_normal" ><?=$summary['Qty']?></td> <td class="celda_normal" ><?=$summary['Qty']?></td>
@ -735,10 +705,8 @@
</tr> </tr>
</tfoot>
</tbody>
</table> </table>
<br> <br>

View File

@ -235,6 +235,12 @@
min-width: 100px; min-width: 100px;
max-width: 100px; max-width: 100px;
} }
tfoot tr {
background-color:rgb(235, 236, 203);
}
</style> </style>
@ -685,71 +691,37 @@ foreach ($period as $day) {
} }
?> ?>
<div class="table-responsive"> <tfoot>
<table id="powerStockDetailsTableSummaryId" class="fht-table table-striped"> <tr>
<thead> <td style="background-color:rgb(189, 9, 6); color:#ffff;">
<b> Total </b>
</td>
<tr> <td class="celda_normal "><?= $summary['openingReading'] ?></td>
<th class="celda_encabezado_total" colspan="1">Date </th> <td class="celda_normal "><?= $summary['finalReading'] ?></td>
<th class="celda_encabezado_total">Opening Reading </th> <td class="celda_normal "><?= $summary['totalReading'] ?></td>
<th class="celda_encabezado_total">Final Reading</th> <td class="celda_normal "><?= $summary['totalUnits'] ?></td>
<th class="celda_encabezado_total">Total Reading</th> <td class="celda_normal "><?= $summary['averagePf'] ?></td>
<th class="celda_encabezado_total">Total Units </th> <td class="celda_normal "><?= $summary['presentPf'] ?></td>
<th class="celda_encabezado_total">Average PF</th> <td class="celda_normal "><?= $summary['md'] ?></td>
<th class="celda_encabezado_total">Present PF</th> <td class="celda_normal "><?= $summary['mf'] ?></td>
<th class="celda_encabezado_total">MD </th>
<th class="celda_encabezado_total">MF *60</th>
<?php foreach ($electricMachines as $powerMachine) { ?> <?php foreach ($summary as $each) {
<!-- this will loop till machines present --> if (is_array($each)) {
<th class="celda_encabezado_total" style="display:none">Date</th> ?>
<th class="celda_encabezado_total" style="display:none"> Machine Id</th>
<th class="celda_encabezado_total">Opening Units</th>
<th class="celda_encabezado_total">Final Units</th>
<th class="celda_encabezado_total">Total Units</th>
<?php } ?>
</tr> <td class="celda_normal "><?= $each['opening_units'] ?> </td>
<td class="celda_normal "><?= $each['closing_units'] ?></td>
<td class="celda_normal "><?= $each['total_units'] ?></td>
</thead> <?php
<tbody>
<tr>
<td style="background-color:rgb(189, 9, 6); color:#ffff;">
<b> Total </b>
</td>
<td><?= $summary['openingReading'] ?></td>
<td><?= $summary['finalReading'] ?></td>
<td><?= $summary['totalReading'] ?></td>
<td><?= $summary['totalUnits'] ?></td>
<td><?= $summary['averagePf'] ?></td>
<td><?= $summary['presentPf'] ?></td>
<td><?= $summary['md'] ?></td>
<td><?= $summary['mf'] ?></td>
<?php foreach ($summary as $each) {
if (is_array($each)) {
?>
<td class="celda_normal "><?= $each['opening_units'] ?> </td>
<td class="celda_normal "><?= $each['closing_units'] ?></td>
<td class="celda_normal "><?= $each['total_units'] ?></td>
<?php
}
} }
?> }
?>
</tr> </tr>
</tfoot>
</tbody>
</table>
</div>
<!-- this else condition work if groupedpowerStockDetails is empty and creating new records <!-- this else condition work if groupedpowerStockDetails is empty and creating new records
with initial values 0 for entire month --> with initial values 0 for entire month -->
@ -862,6 +834,8 @@ foreach ($period as $day) {
<?php } ?> <?php } ?>
data-id="<?= $dateInMonth ?> <?= $powerMachine['id'] ?>"> data-id="<?= $dateInMonth ?> <?= $powerMachine['id'] ?>">
<?php <?php
foreach($previousMonthPowerConsumptionStockDetails as $index => $previousMonthPowerConsumptionStockDetail) foreach($previousMonthPowerConsumptionStockDetails as $index => $previousMonthPowerConsumptionStockDetail)
{ {

View File

@ -235,6 +235,10 @@
min-width: 100px; min-width: 100px;
max-width: 100px; max-width: 100px;
} }
tfoot tr {
background-color:rgb(235, 236, 203);
}
</style> </style>
@ -569,44 +573,27 @@ foreach ($period as $day) {
<?php } ?> <?php } ?>
<div class="table-responsive"> <tfoot>
<table id="resinStockDetailsTableSummaryId" class="fht-table table-striped"> <tr>
<thead> <td style="background-color:rgb(189, 9, 6); color:#ffff;">
<th class="celda_encabezado_total">Total Sum</th> <b> Total </b>
<?php foreach ($summary as $each) { ?> </td>
<th class="celda_encabezado_total">Opening Stock</th>
<th class="celda_encabezado_total">Receipt</th>
<th class="celda_encabezado_total">Used</th>
<th class="celda_encabezado_total">Balance Stock</th>
<?php } ?>
</thead>
<tbody> <?php foreach ($summary as $each) { ?>
<tr>
<td style="background-color:rgb(189, 9, 6); color:#ffff;">
<b> Total </b>
</td>
<?php foreach ($summary as $each) { ?>
<td class="celda_normal "><?= $each['opening'] ?></td> <td class="celda_normal "><?= $each['opening'] ?></td>
<td class="celda_normal "><?= $each['receipt'] ?></td> <td class="celda_normal "><?= $each['receipt'] ?></td>
<td class="celda_normal "><?= $each['used'] ?></td> <td class="celda_normal "><?= $each['used'] ?></td>
<td class="celda_normal "><?= $each['balanceStock'] ?></td> <td class="celda_normal "><?= $each['balanceStock'] ?></td>
<?php } ?> <?php } ?>
</tr> </tr>
</tfoot>
</tbody>
</table>
</div>
<!-- this else condition work if groupedBagStockDetails is empty and creating new records <!-- this else condition work if groupedBagStockDetails is empty and creating new records
with initial values 0 for entire month --> with initial values 0 for entire month -->
<?php } else { ?> <?php } else { ?>

View File

@ -230,6 +230,10 @@
min-height: 200px; min-height: 200px;
} }
tfoot tr {
background-color:rgb(235, 236, 203);
}
</style> </style>
@ -1004,421 +1008,274 @@ $timeOtions[] = "12:00 AM";
<table id="trpProductionStockSummaryTableId" class="fht-table table-striped"> <tfoot>
<thead class="celda_encabezado_general" style="padding: 10px;">
<tr>
<!-- th:eq(0) -->
<th class="celda_encabezado_total" rowspan="2">Date </th>
<!-- th:eq(1) -->
<th class="celda_encabezado_total" rowspan="2">Opening Time </th>
<!-- th:eq(2) -->
<th class="celda_encabezado_total" rowspan="2">Closing Time </th>
<!-- th:eq(3) -->
<th class="celda_encabezado_total" rowspan="2">Total Hours </th>
<!-- th:eq(4) -->
<th class="celda_encabezado_total" rowspan="2">Cold Start </th>
<!-- th:eq(5) -->
<th class="celda_encabezado_total" rowspan="2">Break Down Hours </th>
<!-- th:eq(6) -->
<th class="celda_encabezado_total" rowspan="2">Burner Firing Hours </th>
<!-- th:eq(7) -->
<th class="celda_encabezado_total" rowspan="2">Sand Feeding Hours </th>
<!-- th:eq(8) -->
<th class="celda_encabezado_total" colspan="2">Gas Receipt </th>
<!-- th:eq(9) -->
<th class="celda_encabezado_total" rowspan="2">Physical Gas Consumption </th>
<!-- th:eq(10) -->
<th class="celda_encabezado_total" rowspan="2">Drier Gas Consumption </th>
<!-- th:eq(11) -->
<th class="celda_encabezado_total" rowspan="2">Coating Gas Consumption </th>
<!-- th:eq(12) -->
<th class="celda_encabezado_total" rowspan="2">TRP plus Drier Gas Consumption </th>
<!-- th:eq(13) -->
<th class="celda_encabezado_total" rowspan="2">TRP Physical Gas Per Ton </th>
<!-- th:eq(14) -->
<th class="celda_encabezado_total" rowspan="2">Panel Gas Consumption </th>
<!-- th:eq(15) -->
<th class="celda_encabezado_total" rowspan="2">Panel Gas Per Ton </th>
<!-- th:eq(16) -->
<?php if(count($wcsSupplierList)>0){?>
<th class="celda_encabezado_total" colspan="<?=count($wcsSupplierList)?>">Incoming Sand/ Lump details </th>
<?php } ?>
<!-- th:eq(17) -->
<th class="celda_encabezado_total" colspan="3">ED details </th>
<!-- th:eq(18) -->
<th class="celda_encabezado_total" colspan="2">TRP Sand </th>
<th class="celda_encabezado_total" rowspan="2">Coating </th>
<!-- th:eq(19) -->
<?php if(count($crsClientList)>0){?>
<th class="celda_encabezado_total" colspan="<?=count($crsClientList)?>">Usage </th>
<?php } ?>
<!-- th:eq(20) -->
<th class="celda_encabezado_total" colspan="2">Water </th>
<!-- th:eq(21) -->
<th class="celda_encabezado_total" rowspan="2">EB Reading </th>
<!-- th:eq(22) -->
<th class="celda_encabezado_total" rowspan="2">EB Unit Per Ton </th>
<!-- th:eq(23) -->
<th class="celda_encabezado_total" colspan="4">Working Persons </th>
<!-- th:eq(24) -->
<th class="celda_encabezado_total" colspan="2"> Maintanence Details </th>
<!-- th:eq(25) -->
<th class="celda_encabezado_total" rowspan="2">Description </th>
<!-- th:eq(26) -->
<th class="celda_encabezado_total" rowspan="2">MS Seperation </th>
<!-- th:eq(27) -->
<th class="celda_encabezado_total" rowspan="2">ED Waste </th>
<!-- th:eq(28) -->
<th class="celda_encabezado_total" rowspan="2">Cooler Bags </th>
<!-- th:eq(29) -->
<th class="celda_encabezado_total" rowspan="2">ED +20 Waste </th>
<!-- th:eq(30) -->
<th class="celda_encabezado_total" rowspan="2">Cyclone Waste </th>
</tr>
<tr>
<!-- th:eq(0) -->
<th class="celda_encabezado_total" style="z-index:11;">BG</th>
<!-- th:eq(1) -->
<th class="celda_encabezado_total">PG </th>
<?php foreach($wcsSupplierList as $supplier){ ?>
<th class="celda_encabezado_total"><?=$supplier?> </th>
<?php } ?>
<!-- th:eq(10) -->
<th class="celda_encabezado_total">Running Hours </th>
<!-- th:eq(11) -->
<th class="celda_encabezado_total">Production </th>
<!-- th:eq(12) -->
<th class="celda_encabezado_total">Usage </th>
<!-- th:eq(13) -->
<th class="celda_encabezado_total">Production </th>
<!-- th:eq(14) -->
<th class="celda_encabezado_total">Production Per Hour </th>
<!-- th:eq(15) -->
<!-- th:eq(16) -->
<?php foreach($crsClientList as $client){ ?>
<th class="celda_encabezado_total"><?=$client?> </th>
<?php } ?>
<!-- th:eq(21) -->
<th class="celda_encabezado_total">Receipt </th>
<!-- th:eq(22) -->
<th class="celda_encabezado_total">Consumption </th>
<!-- th:eq(23) -->
<th class="celda_encabezado_total">Engineers </th>
<!-- th:eq(24) -->
<th class="celda_encabezado_total">Supervisors</th>
<!-- th:eq(25) -->
<th class="celda_encabezado_total">Operators </th>
<!-- th:eq(26) -->
<th class="celda_encabezado_total">Roller Drivers </th>
<!-- th:eq(27) -->
<th class="celda_encabezado_total">Nature Of Maintenance </th>
<!-- th:eq(28) -->
<th class="celda_encabezado_total">Location </th>
</tr>
</thead>
<tbody style="background-color: #fff;">
<tr> <tr>
<!-- Total --> <!-- Total -->
<!-- td:eq(0) --> <!-- td:eq(0) -->
<td style="background-color:rgb(189, 9, 6); color:#ffff;"> <td style="background-color:rgb(189, 9, 6); color:#ffff;">
<b> Total </b> <b> Total </b>
</td> </td>
<!-- openingTime --> <!-- openingTime -->
<!-- td:eq(1) --> <!-- td:eq(1) -->
<td class="celda_normal"> <td class="celda_normal">
</td> </td>
<!-- closingTime --> <!-- closingTime -->
<!-- td:eq(2) --> <!-- td:eq(2) -->
<td class="celda_normal"> <td class="celda_normal">
</td> </td>
<!-- totalHours --> <!-- totalHours -->
<!-- td:eq(3) --> <!-- td:eq(3) -->
<td class="celda_normal "> <td class="celda_normal ">
<?= $summary['totalHours'] ?> <?= $summary['totalHours'] ?>
</td> </td>
<!-- coldStart --> <!-- coldStart -->
<!-- td:eq(4) --> <!-- td:eq(4) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['coldStart']?> <?=$summary['coldStart']?>
</td> </td>
<!-- breakdownHours --> <!-- breakdownHours -->
<!-- td:eq(5) --> <!-- td:eq(5) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['breakdownHours']?> <?=$summary['breakdownHours']?>
</td> </td>
<!-- burnerFiringHours --> <!-- burnerFiringHours -->
<!-- td:eq(6) --> <!-- td:eq(6) -->
<td class="celda_normal "> <td class="celda_normal ">
<?= $summary['burnerFiringHours'] ?> <?= $summary['burnerFiringHours'] ?>
</td> </td>
<!-- sandFeedingHours --> <!-- sandFeedingHours -->
<!-- td:eq(7) --> <!-- td:eq(7) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['sandFeedingHours'] ?> <?=$summary['sandFeedingHours'] ?>
</td> </td>
<!-- gasReceiptBg --> <!-- gasReceiptBg -->
<!-- td:eq(8) --> <!-- td:eq(8) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['gasReceiptBg'] ?> <?=$summary['gasReceiptBg'] ?>
</td> </td>
<!-- gasReceiptPg --> <!-- gasReceiptPg -->
<!-- td:eq(9) --> <!-- td:eq(9) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['gasReceiptPg'] ?> <?=$summary['gasReceiptPg'] ?>
</td> </td>
<!-- physicalGasConsumption --> <!-- physicalGasConsumption -->
<!-- td:eq(10) --> <!-- td:eq(10) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['physicalGasConsumption']?> <?=$summary['physicalGasConsumption']?>
</td> </td>
<!-- drierGasConsumption --> <!-- drierGasConsumption -->
<!-- td:eq(11) --> <!-- td:eq(11) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['drierGasConsumption']?> <?=$summary['drierGasConsumption']?>
</td> </td>
<!-- coatingGasConsumption --> <!-- coatingGasConsumption -->
<!-- td:eq(12) --> <!-- td:eq(12) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['coatingGasConsumption'] ?> <?=$summary['coatingGasConsumption'] ?>
</td> </td>
<!-- trpPlusDrierGasConsumption --> <!-- trpPlusDrierGasConsumption -->
<!-- td:eq(13) --> <!-- td:eq(13) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['trpPlusDrierGasConsumption']?> <?=$summary['trpPlusDrierGasConsumption']?>
</td> </td>
<!-- trpPhysicalGasPerTon --> <!-- trpPhysicalGasPerTon -->
<!-- td:eq(14) --> <!-- td:eq(14) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['trpPhysicalGasPerTon']?> <?=$summary['trpPhysicalGasPerTon']?>
</td> </td>
<!-- panelGasConsumption --> <!-- panelGasConsumption -->
<!-- td:eq(15) --> <!-- td:eq(15) -->
<td class="celda_normal"> <td class="celda_normal">
<?= $summary['panelGasConsumption'] ?> <?= $summary['panelGasConsumption'] ?>
</td> </td>
<!-- panelGasPerTon --> <!-- panelGasPerTon -->
<!-- td:eq(16) --> <!-- td:eq(16) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['panelGasPerTon']?> <?=$summary['panelGasPerTon']?>
</td> </td>
<?php <?php
foreach($wcsSupplierList as $supplier){ ?> foreach($wcsSupplierList as $supplier){ ?>
<td class="celda_normal"> <td class="celda_normal">
<?=$summary[$supplier]?> <?=$summary[$supplier]?>
</td> </td>
<?php } ?> <?php } ?>
<!-- edRunningHours --> <!-- edRunningHours -->
<!-- td:eq(24) --> <!-- td:eq(24) -->
<td class="celda_normal"> <td class="celda_normal">
<?= $summary['edRunningHours']?> <?= $summary['edRunningHours']?>
</td> </td>
<!-- edProduction --> <!-- edProduction -->
<!-- td:eq(25) --> <!-- td:eq(25) -->
<td class="celda_normal"> <td class="celda_normal">
<?= $summary['edProduction'] ?> <?= $summary['edProduction'] ?>
</td> </td>
<!-- edUsage --> <!-- edUsage -->
<!-- td:eq(26) --> <!-- td:eq(26) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['edUsage'] ?> <?=$summary['edUsage'] ?>
</td> </td>
<!-- trpProduction --> <!-- trpProduction -->
<!-- td:eq(27) --> <!-- td:eq(27) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['trpProduction'] ?> <?=$summary['trpProduction'] ?>
</td> </td>
<!-- trpProductionPerHour --> <!-- trpProductionPerHour -->
<!-- td:eq(28) --> <!-- td:eq(28) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['trpProductionPerHour'] ?> <?=$summary['trpProductionPerHour'] ?>
</td> </td>
<!-- coating --> <!-- coating -->
<!-- td:eq(29) --> <!-- td:eq(29) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['coating'] ?> <?=$summary['coating'] ?>
</td> </td>
<?php <?php
foreach($crsClientList as $client){ ?> foreach($crsClientList as $client){ ?>
<td class="celda_normal"> <td class="celda_normal">
<?=$summary[$client]?> <?=$summary[$client]?>
</td> </td>
<?php } ?> <?php } ?>
<!-- waterReceipt --> <!-- waterReceipt -->
<!-- td:eq(35) --> <!-- td:eq(35) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['waterReceipt'] ?> <?=$summary['waterReceipt'] ?>
</td> </td>
<!-- waterConsumption --> <!-- waterConsumption -->
<!-- td:eq(36) --> <!-- td:eq(36) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['waterConsumption'] ?> <?=$summary['waterConsumption'] ?>
</td> </td>
<!-- ebReading --> <!-- ebReading -->
<!-- td:eq(37) --> <!-- td:eq(37) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['ebReading'] ?> <?=$summary['ebReading'] ?>
</td> </td>
<!-- ebReadingPerUnitTon --> <!-- ebReadingPerUnitTon -->
<!-- td:eq(38) --> <!-- td:eq(38) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['ebReadingPerUnitTon'] ?> <?=$summary['ebReadingPerUnitTon'] ?>
</td> </td>
<!-- workingPersonEngineers --> <!-- workingPersonEngineers -->
<!-- td:eq(39) --> <!-- td:eq(39) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['workingPersonEngineers'] ?> <?=$summary['workingPersonEngineers'] ?>
</td> </td>
<!-- workingPersonSupervisiors --> <!-- workingPersonSupervisiors -->
<!-- td:eq(40) --> <!-- td:eq(40) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['workingPersonSupervisiors'] ?> <?=$summary['workingPersonSupervisiors'] ?>
</td> </td>
<!-- workingPersonOperators --> <!-- workingPersonOperators -->
<!-- td:eq(41) --> <!-- td:eq(41) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['workingPersonOperators'] ?> <?=$summary['workingPersonOperators'] ?>
</td> </td>
<!-- rollerDrivers --> <!-- rollerDrivers -->
<!-- td:eq(42) --> <!-- td:eq(42) -->
<td class="celda_normal"> <td class="celda_normal">
<?=" " ?> <?=" " ?>
</td> </td>
<!-- natureOfMaintenance --> <!-- natureOfMaintenance -->
<!-- td:eq(43) --> <!-- td:eq(43) -->
<td class="celda_normal"> <td class="celda_normal">
<?=" " ?> <?=" " ?>
</td> </td>
<!-- location --> <!-- location -->
<!-- td:eq(44) --> <!-- td:eq(44) -->
<td class="celda_normal location"> <td class="celda_normal location">
<?=" "?> <?=" "?>
</td> </td>
<!-- description --> <!-- description -->
<!-- td:eq(45) --> <!-- td:eq(45) -->
<td class="celda_normal description"> <td class="celda_normal description">
<?=" " ?> <?=" " ?>
</td> </td>
<!-- msSeperation --> <!-- msSeperation -->
<!-- td:eq(46) --> <!-- td:eq(46) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['msSeperation'] ?> <?=$summary['msSeperation'] ?>
</td> </td>
<!-- edWaste --> <!-- edWaste -->
<!-- td:eq(47) --> <!-- td:eq(47) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['edWaste'] ?> <?=$summary['edWaste'] ?>
</td> </td>
<!-- coolerBags --> <!-- coolerBags -->
<!-- td:eq(48) --> <!-- td:eq(48) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['coolerBags'] ?> <?=$summary['coolerBags'] ?>
</td> </td>
<!-- edPlus20Waste --> <!-- edPlus20Waste -->
<!-- td:eq(49) --> <!-- td:eq(49) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['edPlus20Waste'] ?> <?=$summary['edPlus20Waste'] ?>
</td> </td>
<!--cycloneWaste --> <!--cycloneWaste -->
<!-- td:eq(50) --> <!-- td:eq(50) -->
<td class="celda_normal"> <td class="celda_normal">
<?=$summary['cycloneWaste'] ?> <?=$summary['cycloneWaste'] ?>
</td> </td>
</tr> </tr>
</tfoot>
</tbody>
</table>
<br><br><br> <br><br><br>

View File

@ -222,6 +222,11 @@
min-width: 150px; min-width: 150px;
max-width: 150px; max-width: 150px;
} }
tfoot tr {
background-color:rgb(235, 236, 203);
}
</style> </style>
@ -378,38 +383,30 @@
} ?> } ?>
<div class="table-responsive" > <tfoot>
<table id="trpSandUseStockDetailsTableSummaryId" class="fht-table table-striped"> <tr class="total_row">
<thead > <td style="background-color:rgb(189, 9, 6); color:#ffff;">
<th class="celda_encabezado_total" >Total </th> <b> Total </b>
<th class="celda_encabezado_total" >Rough Kgs </th> </td>
<th class="celda_encabezado_total" >Fine Kgs </th>
<th class="celda_encabezado_total" >Total Kgs </th>
</thead>
<tbody> <td class="celda_normal "><b><?=$summary['rough_kgs']?></b></td>
<td class="celda_normal "><b><?=$summary['fine_kgs']?></b></td>
<tr> <td class="celda_normal "><b><?=$summary['total_kgs']?></b></td>
<td class="celda_normal "> </td>
<td style="background-color:rgb(189, 9, 6); color:#ffff;"> </tr>
<b> Total </b>
</td>
</tfoot>
<td class="celda_normal "><?=$summary['rough_kgs']?></td>
<td class="celda_normal "><?=$summary['fine_kgs']?></td>
<td class="celda_normal "><?=$summary['total_kgs']?></td>
</tr>
</tbody>
</table>
</div> </div>
<?php }else{ <?php }else{
$date = DateTime::createFromFormat('M-Y', $month); $date = DateTime::createFromFormat('M-Y', $month);