stock module latest today vadivel J 05-03-2025
This commit is contained in:
parent
11211bf9b2
commit
51acc08412
@ -521,5 +521,7 @@ $routes->post('updateTrpSandUseStockDetails', 'StockController::updateTrpSandUse
|
|||||||
//trp production stock details
|
//trp production stock details
|
||||||
$routes->match(['GET', 'POST'], 'trpProductionDetails', 'StockController::trpProductionDetails');
|
$routes->match(['GET', 'POST'], 'trpProductionDetails', 'StockController::trpProductionDetails');
|
||||||
$routes->post('updateTrpProductionDetails', 'StockController::updateTrpProductionDetails');
|
$routes->post('updateTrpProductionDetails', 'StockController::updateTrpProductionDetails');
|
||||||
|
//trp abstract
|
||||||
|
$routes->post('updateAbstractDetails','StockController::updateAbstractDetails');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@ use CodeIgniter\Model;
|
|||||||
class FactoryMachineModel extends Model
|
class FactoryMachineModel extends Model
|
||||||
{
|
{
|
||||||
// The table associated with this model
|
// The table associated with this model
|
||||||
protected $table = 't_factoryMachineMaster';
|
protected $table = 't_factorymachinemaster';
|
||||||
|
|
||||||
// Primary key of the table
|
// Primary key of the table
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
@ -41,7 +41,7 @@ class FactoryMachineModel extends Model
|
|||||||
|
|
||||||
public function checkMachineName($machineId,$machineName){
|
public function checkMachineName($machineId,$machineName){
|
||||||
|
|
||||||
$builder = $this->db->table('t_factoryMachineMaster');
|
$builder = $this->db->table('t_factorymachinemaster');
|
||||||
|
|
||||||
if(!empty($machineId)){
|
if(!empty($machineId)){
|
||||||
$builder = $builder->where('id !=' , $machineId);
|
$builder = $builder->where('id !=' , $machineId);
|
||||||
@ -64,7 +64,7 @@ class FactoryMachineModel extends Model
|
|||||||
|
|
||||||
public function getAllActiveElectricMachines(){
|
public function getAllActiveElectricMachines(){
|
||||||
|
|
||||||
$result = $this->db->table('t_factoryMachineMaster')
|
$result = $this->db->table('t_factorymachinemaster')
|
||||||
->where('is_active', 1)
|
->where('is_active', 1)
|
||||||
->where('energy_type', 'electric')
|
->where('energy_type', 'electric')
|
||||||
->orderBy('id', 'asc')
|
->orderBy('id', 'asc')
|
||||||
@ -77,7 +77,7 @@ class FactoryMachineModel extends Model
|
|||||||
|
|
||||||
public function getSelectedElectricMachines($distinctMachineId){
|
public function getSelectedElectricMachines($distinctMachineId){
|
||||||
|
|
||||||
$result = $this->db->table('t_factoryMachineMaster')
|
$result = $this->db->table('t_factorymachinemaster')
|
||||||
->whereIn('id', $distinctMachineId)
|
->whereIn('id', $distinctMachineId)
|
||||||
->orderBy('id', 'asc')
|
->orderBy('id', 'asc')
|
||||||
->get()
|
->get()
|
||||||
@ -89,7 +89,7 @@ class FactoryMachineModel extends Model
|
|||||||
|
|
||||||
public function getAllActiveDieselMachines(){
|
public function getAllActiveDieselMachines(){
|
||||||
|
|
||||||
$result = $this->db->table('t_factoryMachineMaster')
|
$result = $this->db->table('t_factorymachinemaster')
|
||||||
->where('is_active', 1)
|
->where('is_active', 1)
|
||||||
->where('energy_type', 'diesel')
|
->where('energy_type', 'diesel')
|
||||||
->orderBy('id', 'asc')
|
->orderBy('id', 'asc')
|
||||||
@ -102,7 +102,7 @@ class FactoryMachineModel extends Model
|
|||||||
|
|
||||||
public function getSelectedDieselMachines($distinctMachineId){
|
public function getSelectedDieselMachines($distinctMachineId){
|
||||||
|
|
||||||
$result = $this->db->table('t_factoryMachineMaster')
|
$result = $this->db->table('t_factorymachinemaster')
|
||||||
->whereIn('id', $distinctMachineId)
|
->whereIn('id', $distinctMachineId)
|
||||||
->orderBy('id', 'asc')
|
->orderBy('id', 'asc')
|
||||||
->get()
|
->get()
|
||||||
|
|||||||
@ -6,7 +6,7 @@ use CodeIgniter\Model;
|
|||||||
|
|
||||||
class FactoryVehicleDieselDetailsModel extends Model
|
class FactoryVehicleDieselDetailsModel extends Model
|
||||||
{
|
{
|
||||||
protected $table = 't_factoryVehicleDieselDetails';
|
protected $table = 't_factoryvehicledieseldetails';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
|
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
|
|||||||
@ -6,7 +6,7 @@ use CodeIgniter\Model;
|
|||||||
|
|
||||||
class FactoryVehicleDieselStockSummaryModel extends Model
|
class FactoryVehicleDieselStockSummaryModel extends Model
|
||||||
{
|
{
|
||||||
protected $table = 't_factoryVehicleDieselStockSummary';
|
protected $table = 't_factoryvehicledieselstocksummary';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
|
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
|
|||||||
@ -6,7 +6,7 @@ use CodeIgniter\Model;
|
|||||||
|
|
||||||
class PowerConsumptionDetails extends Model
|
class PowerConsumptionDetails extends Model
|
||||||
{
|
{
|
||||||
protected $table = 't_powerConsumptionDetails';
|
protected $table = 't_powerconsumptiondetails';
|
||||||
protected $primaryKey = 'id';
|
protected $primaryKey = 'id';
|
||||||
|
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
|
|||||||
@ -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' ,'waste core') //328 - is for waste core in config master
|
->where('Category' ,'328')
|
||||||
->get()
|
->get()
|
||||||
->getResultArray();
|
->getResultArray();
|
||||||
|
|
||||||
|
|||||||
@ -666,7 +666,7 @@
|
|||||||
|
|
||||||
<!-- grade -->
|
<!-- grade -->
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="gradeId">grade</label>
|
<label for="gradeId">Grade</label>
|
||||||
<span class="badge mandatory">*</span>
|
<span class="badge mandatory">*</span>
|
||||||
<input type="text" class="form-control" id="gradeId" name="grade" value=""
|
<input type="text" class="form-control" id="gradeId" name="grade" value=""
|
||||||
required>
|
required>
|
||||||
@ -888,7 +888,7 @@
|
|||||||
|
|
||||||
<!-- grade -->
|
<!-- grade -->
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="editGradeId">grade</label>
|
<label for="editGradeId">Grade</label>
|
||||||
<span class="badge mandatory">*</span>
|
<span class="badge mandatory">*</span>
|
||||||
<input type="text" class="form-control" id="editGradeId" name="grade" value=""
|
<input type="text" class="form-control" id="editGradeId" name="grade" value=""
|
||||||
required>
|
required>
|
||||||
|
|||||||
@ -354,19 +354,14 @@
|
|||||||
><?= $dustAndRoughStockDetail['total'] ?? ' ' ?></td>
|
><?= $dustAndRoughStockDetail['total'] ?? ' ' ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<div class="table-responsive" style="width: 700px;">
|
<?php
|
||||||
|
|
||||||
|
//before closing inner loop
|
||||||
|
|
||||||
|
if (!isset($summary['finalRough'])) {
|
||||||
|
$summary['finalRough'] = 0 ;
|
||||||
<?php
|
$summary['dust'] = 0 ;
|
||||||
|
$summary['total'] = 0 ;
|
||||||
//before closing inner loop
|
|
||||||
|
|
||||||
if (!isset($summary['finalRough'])) {
|
|
||||||
$summary['finalRough'] = 0 ;
|
|
||||||
$summary['dust'] = 0 ;
|
|
||||||
$summary['total'] = 0 ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -374,33 +369,19 @@
|
|||||||
$summary['dust'] += $dustAndRoughStockDetail['dust'] == "-" ? 0 : (float) $dustAndRoughStockDetail['dust'] ;
|
$summary['dust'] += $dustAndRoughStockDetail['dust'] == "-" ? 0 : (float) $dustAndRoughStockDetail['dust'] ;
|
||||||
$summary['total'] += $dustAndRoughStockDetail['total'] == "-" ? 0 : (float) $dustAndRoughStockDetail['total'] ;
|
$summary['total'] += $dustAndRoughStockDetail['total'] == "-" ? 0 : (float) $dustAndRoughStockDetail['total'] ;
|
||||||
|
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<table id="dustAndRoughStockDetailsTableSummaryId" class="fht-table table-striped">
|
|
||||||
|
|
||||||
<thead >
|
<tfoot>
|
||||||
<th class="celda_encabezado_total" >Total </th>
|
<tr>
|
||||||
<th class="celda_encabezado_total" >Final Rough </th>
|
<td style="background-color:rgb(189, 9, 6); color:#ffff;"> Total </td>
|
||||||
<th class="celda_encabezado_total" >Dust </th>
|
<td class="celda_normal "><?=$summary['finalRough']?></td>
|
||||||
<th class="celda_encabezado_total" >Total </th>
|
<td class="celda_normal "><?=$summary['dust']?></td>
|
||||||
</thead>
|
<td class="celda_normal "><?=$summary['total']?></td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
|
|
||||||
<td style="background-color:rgb(189, 9, 6); color:#ffff;">
|
|
||||||
<b> Total </b>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="celda_normal "><?=$summary['finalRough']?></td>
|
|
||||||
<td class="celda_normal "><?=$summary['dust']?></td>
|
|
||||||
<td class="celda_normal "><?=$summary['total']?></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php }else{
|
<?php }else{
|
||||||
|
|
||||||
|
|||||||
@ -1826,8 +1826,7 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Ensure <td> elements are editable (optional) 456
|
|
||||||
$("#basicDetailsTableId td, #meshTableId td, #incomingSilicaSandDetailsTable td").attr("contenteditable", "true");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1477,395 +1477,311 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(!empty($trpAbstract)){
|
|
||||||
|
|
||||||
foreach($trpAbstract as $index => $trpAbstractEach){
|
|
||||||
|
|
||||||
$particulars = $trpAbstractEach['particulars'];
|
if(!empty($trpAbstract)){
|
||||||
|
|
||||||
switch ($particulars) {
|
|
||||||
case "Incoming Raw Sand Details": ?>
|
|
||||||
|
|
||||||
<!-- Incoming Raw Sand Details -->
|
|
||||||
<tr>
|
|
||||||
<!-- particulars -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['particulars']; ?> </td>
|
|
||||||
<!-- running hours no need -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- per hour no need -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- opening stock be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['opening_stock']; ?> </td>
|
|
||||||
<!-- receipt total of all incoming waste core sand-->
|
|
||||||
<td class="celda_normal"> <?= $totalWcsReceived ?> </td>
|
|
||||||
<!-- Total fe -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['opening_stock'] + $totalWcsReceived ?> </td>
|
|
||||||
<!-- consumption fe-->
|
|
||||||
<td class="celda_normal"> <?= $summary['edProduction']?> </td>
|
|
||||||
<!-- closing stock fe -->
|
|
||||||
<td class="celda_normal"> <?= ( $trpAbstractEach['opening_stock'] + $totalWcsReceived ) - $summary['edProduction'] ?> </td>
|
|
||||||
<!-- physical stock be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['physical_stock']; ?> </td>
|
|
||||||
<!-- remarks be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['remarks']; ?> </td>
|
|
||||||
</tr>
|
|
||||||
<?php break;
|
|
||||||
case "ED Details": ?>
|
|
||||||
|
|
||||||
<!-- ED Details -->
|
|
||||||
<tr>
|
|
||||||
<!-- particulars be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['particulars']; ?> </td>
|
|
||||||
<!-- running hours fe -->
|
|
||||||
<td class="celda_normal"><?= $summary['edRunningHours'] ?> </td>
|
|
||||||
<!-- per hour fe -->
|
|
||||||
<td class="celda_normal"> <?= number_format( $summary['edProduction'] / ($summary['edRunningHours'] == 0 ? 1 : $summary['edRunningHours']) ,2) ?> </td>
|
|
||||||
<!-- opening stock be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['opening_stock']; ?> </td>
|
|
||||||
<!-- receipt fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['edProduction']; ?> </td>
|
|
||||||
<!-- Total fe -->
|
|
||||||
<td class="celda_normal"><?= $trpAbstractEach['opening_stock'] + $summary['edProduction']?> </td>
|
|
||||||
<!-- consumption fe-->
|
|
||||||
<td class="celda_normal">
|
|
||||||
<?= $summary['edUsage'] + ($summary['coolerBags'] * 1250 ) + ($summary['cycloneWaste'] * 1250 )
|
|
||||||
+ ( $summary['edWaste'] * 1250 )
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
<!-- closing stock fe -->
|
|
||||||
<td class="celda_normal"> <?=
|
|
||||||
($trpAbstractEach['opening_stock'] + $summary['edProduction'])
|
|
||||||
-
|
|
||||||
($summary['edUsage'] + ($summary['coolerBags'] * 1250 ) + ($summary['cycloneWaste'] * 1250 )
|
|
||||||
+ ( $summary['edWaste'] * 1250 ) )?> </td>
|
|
||||||
<!-- physical stock be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['physical_stock']; ?> </td>
|
|
||||||
<!-- remarks be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['remarks']; ?> </td>
|
|
||||||
</tr>
|
|
||||||
<?php break;
|
|
||||||
case "TRP Total Sand": ?>
|
|
||||||
|
|
||||||
<!-- TRP Total Sand -->
|
|
||||||
<tr>
|
|
||||||
<!-- particulars be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['particulars']; ?> </td>
|
|
||||||
<!-- running hours fe -->
|
|
||||||
<td class="celda_normal"><?= $summary['sandFeedingHours']; ?> </td>
|
|
||||||
<!-- per hour fe -->
|
|
||||||
<td class="celda_normal"> <?= $summary['trpProductionPerHour']; ?> </td>
|
|
||||||
<!-- opening stock be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['opening_stock']; ?> </td>
|
|
||||||
<!-- receipt fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['trpProduction'];?> </td>
|
|
||||||
<!-- Total fe -->
|
|
||||||
<td class="celda_normal"><?= $trpAbstractEach['opening_stock'] + $summary['trpProduction'] ?> </td>
|
|
||||||
<!-- consumption fe-->
|
|
||||||
<td class="celda_normal"><?= $totalCrsReceived ?>
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<!-- closing stock fe -->
|
|
||||||
<td class="celda_normal"><?= ($trpAbstractEach['opening_stock'] + $summary['trpProduction']) - $totalCrsReceived ?> </td>
|
|
||||||
<!-- physical stock be -->
|
|
||||||
<td class="celda_normal"><?= $trpAbstractEach['physical_stock']; ?> </td>
|
|
||||||
<!-- remarks be -->
|
|
||||||
<td class="celda_normal"><?= $trpAbstractEach['remarks']; ?> </td>
|
|
||||||
</tr>
|
|
||||||
<?php break;
|
|
||||||
case "TRP Phy Gas Consumption": ?>
|
|
||||||
|
|
||||||
<!-- Trp Phy Gas Consumption -->
|
|
||||||
<tr>
|
|
||||||
<!-- particulars be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['particulars']; ?> </td>
|
|
||||||
<!-- running hours fe -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- per hour fe -->
|
|
||||||
<td class="celda_normal"><?= number_format(($summary['trpPlusDrierGasConsumption']) / ( ( $summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction'] )/1000), 2, '.', '') ?></td>
|
|
||||||
<!-- opening stock be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['opening_stock']; ?> </td>
|
|
||||||
<!-- receipt fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['gasReceiptBg'] + $summary['gasReceiptPg'] ?> </td>
|
|
||||||
<!-- Total fe -->
|
|
||||||
<td class="celda_normal"><?= $trpAbstractEach['opening_stock'] + ($summary['gasReceiptBg'] + $summary['gasReceiptPg']) ?> </td>
|
|
||||||
<!-- consumption fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['physicalGasConsumption'] ?></td>
|
|
||||||
<!-- closing stock fe -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['opening_stock'] + ($summary['gasReceiptBg'] + $summary['gasReceiptPg']) - $summary['physicalGasConsumption'] ?></td>
|
|
||||||
<!-- physical stock be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['physical_stock']; ?> </td>
|
|
||||||
<!-- remarks be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['remarks']; ?> </td>
|
|
||||||
</tr>
|
|
||||||
<?php break;
|
|
||||||
case "TRP Panel Gas Consumption": ?>
|
|
||||||
|
|
||||||
<!-- Trp Panel Gas Consumption -->
|
|
||||||
<tr>
|
|
||||||
<!-- particulars be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['particulars']; ?> </td>
|
|
||||||
<!-- running hours fe -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- per hour fe -->
|
|
||||||
<td class="celda_normal"><?= number_format(($summary['panelGasConsumption']) / ( ( $summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction'] )/1000) ,2) ?> </td>
|
|
||||||
<!-- opening stock be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['opening_stock']; ?> </td>
|
|
||||||
<!-- receipt fe-->
|
|
||||||
<td class="celda_normal"><?=$summary['gasReceiptBg'] + $summary['gasReceiptPg'];?> </td>
|
|
||||||
<!-- Total fe -->
|
|
||||||
<td class="celda_normal"><?= $trpAbstractEach['opening_stock'] + ($summary['gasReceiptBg'] + $summary['gasReceiptPg']) ?> </td>
|
|
||||||
<!-- consumption fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['panelGasConsumption']?> </td>
|
|
||||||
<!-- closing stock fe -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['opening_stock'] + ($summary['gasReceiptBg'] + $summary['gasReceiptPg']) - $summary['panelGasConsumption'] ?> </td>
|
|
||||||
<!-- physical stock be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['physical_stock']; ?> </td>
|
|
||||||
<!-- remarks be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['remarks']; ?> </td>
|
|
||||||
</tr>
|
|
||||||
<?php break;
|
|
||||||
case "Water Consumption": ?>
|
|
||||||
|
|
||||||
<!-- Water Consumption -->
|
|
||||||
<tr>
|
|
||||||
<!-- particulars be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['particulars']; ?> </td>
|
|
||||||
<!-- running hours fe -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- per hour fe -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- opening stock be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['opening_stock']; ?> </td>
|
|
||||||
<!-- receipt fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['waterReceipt']; ?> </td>
|
|
||||||
<!-- Total fe -->
|
|
||||||
<td class="celda_normal"><?= $trpAbstractEach['opening_stock'] + $summary['waterReceipt'] ?></td>
|
|
||||||
<!-- consumption fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['waterConsumption'] ?> </td>
|
|
||||||
<!-- closing stock fe -->
|
|
||||||
<td class="celda_normal"><?= ($trpAbstractEach['opening_stock'] + $summary['waterReceipt']) - $summary['waterConsumption'] ?> </td>
|
|
||||||
<!-- physical stock be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['physical_stock']; ?> </td>
|
|
||||||
<!-- remarks be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['remarks']; ?> </td>
|
|
||||||
</tr>
|
|
||||||
<?php break;
|
|
||||||
case "Power Consumption": ?>
|
|
||||||
|
|
||||||
<!-- Power Consumption -->
|
|
||||||
<tr>
|
|
||||||
<!-- particulars be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['particulars']; ?> </td>
|
|
||||||
<!-- running hours fe -->
|
|
||||||
<td class="celda_normal"><?= $summary['ebReadingPerUnitTon'] ?> </td>
|
|
||||||
<!-- per hour fe -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- opening stock be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['opening_stock']; ?> </td>
|
|
||||||
<!-- receipt fe-->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- Total fe -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- consumption fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['ebReading'] ?> </td>
|
|
||||||
<!-- closing stock fe -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- physical stock be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['physical_stock']; ?> </td>
|
|
||||||
<!-- remarks be -->
|
|
||||||
<td class="celda_normal"> <?= $trpAbstractEach['remarks']; ?> </td>
|
|
||||||
</tr>
|
|
||||||
<?php break;
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
$abstractForCurrentMonth=[
|
||||||
}
|
[
|
||||||
}else{ ?>
|
'absDate' => $trpAbstract["Incoming Raw Sand Details"]['date'] ,
|
||||||
|
'absParticulars' => "Incoming Raw Sand Details",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => "",
|
||||||
|
'absOpeningStock'=> (int)$trpAbstract["Incoming Raw Sand Details"]['opening_stock'],
|
||||||
|
'absReceipt' => $totalWcsReceived,
|
||||||
|
'absTotal' => (int)$trpAbstract["Incoming Raw Sand Details"]['opening_stock'] + $totalWcsReceived,
|
||||||
|
'absConsumption' => $summary['edProduction'],
|
||||||
|
'absClosingStock' => ((int)$trpAbstract["Incoming Raw Sand Details"]['opening_stock'] + $totalWcsReceived) - $summary['edProduction'],
|
||||||
|
'absPhysicalStock' => (int)$trpAbstract["Incoming Raw Sand Details"]['physical_stock'],
|
||||||
|
'absRemarks' => $trpAbstract["Incoming Raw Sand Details"]['remarks'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'absDate' => $trpAbstract["ED Details"]['date'] ,
|
||||||
|
'absParticulars' => "ED Details",
|
||||||
|
'absRunningHrs' => $summary['edRunningHours'],
|
||||||
|
'absPerHour' => number_format( $summary['edProduction'] / ($summary['edRunningHours'] == 0 ? 1 : $summary['edRunningHours']) ,2),
|
||||||
|
'absOpeningStock'=> (int)$trpAbstract["ED Details"]['opening_stock'],
|
||||||
|
'absReceipt' => $summary['edProduction'],
|
||||||
|
'absTotal' => (int)$trpAbstract["ED Details"]['opening_stock'] + $summary['edProduction'],
|
||||||
|
'absConsumption' => $summary['edUsage'] + ($summary['coolerBags'] * 1250 ) + ($summary['cycloneWaste'] * 1250 ) + ( $summary['edWaste'] * 1250 ),
|
||||||
|
'absClosingStock' => (int)$trpAbstract["ED Details"]['opening_stock'] + $summary['edProduction'] - ($summary['edUsage'] + ($summary['coolerBags'] * 1250 ) + ($summary['cycloneWaste'] * 1250 ) + ( $summary['edWaste'] * 1250 ) ),
|
||||||
|
'absPhysicalStock' =>(int)$trpAbstract["ED Details"]['physical_stock'],
|
||||||
|
'absRemarks' => $trpAbstract["ED Details"]['remarks'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'absDate' => $trpAbstract["TRP Total Sand"]['date'] ,
|
||||||
|
'absParticulars' => "TRP Total Sand",
|
||||||
|
'absRunningHrs' => $summary['sandFeedingHours'],
|
||||||
|
'absPerHour' => $summary['trpProductionPerHour'],
|
||||||
|
'absOpeningStock'=> (int)$trpAbstract["TRP Total Sand"]['opening_stock'],
|
||||||
|
'absReceipt' =>$summary['trpProduction'],
|
||||||
|
'absTotal' =>(int)$trpAbstract["TRP Total Sand"]['opening_stock'] + $summary['trpProduction'],
|
||||||
|
'absConsumption' =>$totalCrsReceived,
|
||||||
|
'absClosingStock' =>(int)$trpAbstract["TRP Total Sand"]['opening_stock'] + $summary['trpProduction'] - $totalCrsReceived,
|
||||||
|
'absPhysicalStock' =>(int)$trpAbstract["TRP Total Sand"]['physical_stock'],
|
||||||
|
'absRemarks' => $trpAbstract["TRP Total Sand"]['remarks'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'absDate' => $trpAbstract["Trp Physical Gas Consumption"]['date'] ,
|
||||||
|
'absParticulars' => "Trp Physical Gas Consumption",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => number_format(($summary['trpPlusDrierGasConsumption']) / ( ( $summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction'] )/1000), 2, '.', ''),
|
||||||
|
'absOpeningStock'=>(int)$trpAbstract["Trp Physical Gas Consumption"]['opening_stock'],
|
||||||
|
'absReceipt' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absTotal' => (int)$trpAbstract["Trp Physical Gas Consumption"]['opening_stock'] + $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absConsumption' => $summary['physicalGasConsumption'],
|
||||||
|
'absClosingStock' => (int)$trpAbstract["Trp Physical Gas Consumption"]['opening_stock'] + $summary['gasReceiptBg'] + $summary['gasReceiptPg'] - $summary['physicalGasConsumption'],
|
||||||
|
'absPhysicalStock' =>(int)$trpAbstract["Trp Physical Gas Consumption"]['physical_stock'],
|
||||||
|
'absRemarks' => $trpAbstract["Trp Physical Gas Consumption"]['remarks'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'absDate' => $trpAbstract["Trp Panel Gas Consumption"]['date'] ,
|
||||||
|
'absParticulars' => "Trp Panel Gas Consumption",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => number_format(($summary['panelGasConsumption']) / ( ( $summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction'] )/1000) ,2),
|
||||||
|
'absOpeningStock'=>(int)$trpAbstract["Trp Panel Gas Consumption"]['opening_stock'],
|
||||||
|
'absReceipt' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absTotal' => (int)$trpAbstract["Trp Panel Gas Consumption"]['opening_stock'] + $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absConsumption' => $summary['panelGasConsumption'],
|
||||||
|
'absClosingStock' => (int)$trpAbstract["Trp Panel Gas Consumption"]['opening_stock'] + $summary['gasReceiptBg'] + $summary['gasReceiptPg'] - $summary['panelGasConsumption'],
|
||||||
|
'absPhysicalStock' =>(int)$trpAbstract["Trp Panel Gas Consumption"]['physical_stock'],
|
||||||
|
'absRemarks' => $trpAbstract["Trp Panel Gas Consumption"]['remarks'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'absDate' => $trpAbstract["Water Consumption"]['date'] ,
|
||||||
|
'absParticulars' => "Water Consumption",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => "",
|
||||||
|
'absOpeningStock'=>(int)$trpAbstract["Water Consumption"]['opening_stock'],
|
||||||
|
'absReceipt' =>$summary['waterReceipt'],
|
||||||
|
'absTotal' =>(int)$trpAbstract["Water Consumption"]['opening_stock'] + $summary['waterReceipt'],
|
||||||
|
'absConsumption' => $summary['waterConsumption'],
|
||||||
|
'absClosingStock' =>(int)$trpAbstract["Water Consumption"]['opening_stock'] + $summary['waterReceipt'] - $summary['waterConsumption'],
|
||||||
|
'absPhysicalStock' =>(int)$trpAbstract["Water Consumption"]['physical_stock'],
|
||||||
|
'absRemarks' => $trpAbstract["Water Consumption"]['remarks'],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'absDate' => $trpAbstract["Power Consumption"]['date'] ,
|
||||||
|
'absParticulars' => "Power Consumption",
|
||||||
|
'absRunningHrs' =>$summary['ebReadingPerUnitTon'],
|
||||||
|
'absPerHour' => "",
|
||||||
|
'absOpeningStock'=>(int)$trpAbstract["Power Consumption"]['opening_stock'],
|
||||||
|
'absReceipt' =>'',
|
||||||
|
'absTotal' =>'',
|
||||||
|
'absConsumption' => $summary['ebReading'],
|
||||||
|
'absClosingStock' =>'',
|
||||||
|
'absPhysicalStock' =>(int)$trpAbstract["Power Consumption"]['physical_stock'],
|
||||||
|
'absRemarks' => $trpAbstract["Power Consumption"]['remarks'],
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php foreach($abstractForCurrentMonth as $abstract)
|
||||||
|
{
|
||||||
|
|
||||||
|
$absDate = DateTime::createFromFormat('M-Y', $month)->format('Y-m');
|
||||||
|
$absDate = "$absDate-01";
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<!-- particulars -->
|
||||||
|
<td class="celda_normal absParticulars"><?=$abstract['absParticulars'] ?> </td>
|
||||||
|
|
||||||
|
<!-- running hours no need -->
|
||||||
|
<td class="celda_normal absRunningHrs"><?=$abstract['absRunningHrs']?></td>
|
||||||
|
|
||||||
|
<!-- per hour no need -->
|
||||||
|
<td class="celda_normal absPerHour"><?=$abstract['absPerHour']?></td>
|
||||||
|
|
||||||
|
<!-- opening stock be -->
|
||||||
|
<td class="celda_normal absOpeningStock"
|
||||||
|
oninput="absOpeningStockChange(this)"
|
||||||
|
contenteditable="true"><?=$abstract['absOpeningStock']?></td>
|
||||||
|
|
||||||
|
<!-- receipt total of all incoming waste core sand-->
|
||||||
|
<td class="celda_normal absReceipt"><?=$abstract['absReceipt']?> </td>
|
||||||
|
|
||||||
|
<!-- Total fe -->
|
||||||
|
<td class="celda_normal absTotal"><?=$abstract['absTotal']?></td>
|
||||||
|
|
||||||
|
<!-- consumption fe-->
|
||||||
|
<td class="celda_normal absConsumption"><?=$abstract['absConsumption']?></td>
|
||||||
|
|
||||||
|
<!-- closing stock fe -->
|
||||||
|
<td class="celda_normal absClosingStock"><?=$abstract['absClosingStock']?> </td>
|
||||||
|
|
||||||
|
<!-- physical stock be -->
|
||||||
|
<td class="celda_normal absPhysicalStock"
|
||||||
|
contenteditable="true"> <?=$abstract['absPhysicalStock']?> </td>
|
||||||
|
|
||||||
|
<!-- remarks be -->
|
||||||
|
<td class="celda_normal absRemarks"
|
||||||
|
contenteditable="true"> <?=$abstract['absRemarks']?> </td>
|
||||||
|
|
||||||
|
<!-- absDate -->
|
||||||
|
<td class="absDate" style="display:none"> <?= $absDate; ?> </td>
|
||||||
|
|
||||||
<!-- Incoming Raw Sand Details -->
|
|
||||||
<tr>
|
|
||||||
<!-- particulars -->
|
|
||||||
<td class="celda_normal">Incoming Raw Sand Details</td>
|
|
||||||
<!-- running hours no need -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- per hour no need -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- opening stock be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- receipt total of all incoming waste core sand-->
|
|
||||||
<td class="celda_normal"> <?= $totalWcsReceived ?> </td>
|
|
||||||
<!-- Total fe -->
|
|
||||||
<td class="celda_normal"> <?= $totalWcsReceived ?> </td>
|
|
||||||
<!-- consumption fe-->
|
|
||||||
<td class="celda_normal"> <?= $summary['edProduction']?> </td>
|
|
||||||
<!-- closing stock fe -->
|
|
||||||
<td class="celda_normal"> <?= ( $totalWcsReceived ) - $summary['edProduction'] ?> </td>
|
|
||||||
<!-- physical stock be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- remarks be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<!-- ED Details -->
|
<?php } ?>
|
||||||
<tr>
|
|
||||||
<!-- particulars be -->
|
|
||||||
<td class="celda_normal">ED Details</td>
|
|
||||||
<!-- running hours fe -->
|
<?php }else{
|
||||||
<td class="celda_normal"><?= $summary['edRunningHours'] ?> </td>
|
|
||||||
<!-- per hour fe -->
|
$abstractForCurrentMonth=[
|
||||||
<td class="celda_normal"> <?= number_format( $summary['edProduction'] / ($summary['edRunningHours'] == 0 ? 1 : $summary['edRunningHours']) ,2) ?> </td>
|
[
|
||||||
<!-- opening stock be -->
|
|
||||||
<td class="celda_normal"> </td>
|
'absParticulars' => "Incoming Raw Sand Details",
|
||||||
<!-- receipt fe-->
|
'absRunningHrs' => "",
|
||||||
<td class="celda_normal"><?= $summary['edProduction']; ?> </td>
|
'absPerHour' => "",
|
||||||
<!-- Total fe -->
|
'absOpeningStock'=>'',
|
||||||
<td class="celda_normal"><?= $summary['edProduction']?> </td>
|
'absReceipt' => $totalWcsReceived,
|
||||||
<!-- consumption fe-->
|
'absTotal' => $totalWcsReceived,
|
||||||
<td class="celda_normal">
|
'absConsumption' => $summary['edProduction'],
|
||||||
<?= $summary['edUsage'] + ($summary['coolerBags'] * 1250 ) + ($summary['cycloneWaste'] * 1250 )
|
'absClosingStock' =>( $totalWcsReceived ) - $summary['edProduction'],
|
||||||
+ ( $summary['edWaste'] * 1250 )
|
'absPhysicalStock' =>'',
|
||||||
?>
|
'absRemarks' =>'',
|
||||||
</td>
|
],
|
||||||
<!-- closing stock fe -->
|
[
|
||||||
<td class="celda_normal"> <?=
|
|
||||||
($summary['edProduction'])
|
'absParticulars' => "ED Details",
|
||||||
-
|
'absRunningHrs' => $summary['edRunningHours'],
|
||||||
($summary['edUsage'] + ($summary['coolerBags'] * 1250 ) + ($summary['cycloneWaste'] * 1250 )
|
'absPerHour' => number_format( $summary['edProduction'] / ($summary['edRunningHours'] == 0 ? 1 : $summary['edRunningHours']) ,2),
|
||||||
+ ( $summary['edWaste'] * 1250 ) )?> </td>
|
'absOpeningStock'=>'',
|
||||||
<!-- physical stock be -->
|
'absReceipt' => $summary['edProduction'],
|
||||||
<td class="celda_normal"> </td>
|
'absTotal' => $summary['edProduction'],
|
||||||
<!-- remarks be -->
|
'absConsumption' => $summary['edUsage'] + ($summary['coolerBags'] * 1250 ) + ($summary['cycloneWaste'] * 1250 ) + ( $summary['edWaste'] * 1250 ),
|
||||||
<td class="celda_normal"> </td>
|
'absClosingStock' => $summary['edProduction'] - $summary['edUsage'] + ($summary['coolerBags'] * 1250 ) + ($summary['cycloneWaste'] * 1250 ) + ( $summary['edWaste'] * 1250 ),
|
||||||
|
'absPhysicalStock' =>'',
|
||||||
|
'absRemarks' =>'',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
|
||||||
|
'absParticulars' => "TRP Total Sand",
|
||||||
|
'absRunningHrs' => $summary['sandFeedingHours'],
|
||||||
|
'absPerHour' => $summary['trpProductionPerHour'],
|
||||||
|
'absOpeningStock'=>'',
|
||||||
|
'absReceipt' =>$summary['trpProduction'],
|
||||||
|
'absTotal' =>$summary['trpProduction'],
|
||||||
|
'absConsumption' =>$totalCrsReceived,
|
||||||
|
'absClosingStock' =>$summary['trpProduction'] - $totalCrsReceived,
|
||||||
|
'absPhysicalStock' =>'',
|
||||||
|
'absRemarks' =>'',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
|
||||||
|
'absParticulars' => "Trp Physical Gas Consumption",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => number_format(($summary['trpPlusDrierGasConsumption']) / ( ( $summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction'] )/1000), 2, '.', ''),
|
||||||
|
'absOpeningStock'=>'',
|
||||||
|
'absReceipt' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absTotal' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absConsumption' => $summary['physicalGasConsumption'],
|
||||||
|
'absClosingStock' =>($summary['gasReceiptBg'] + $summary['gasReceiptPg']) - $summary['physicalGasConsumption'],
|
||||||
|
'absPhysicalStock' =>'',
|
||||||
|
'absRemarks' =>'',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
|
||||||
|
'absParticulars' => "Trp Panel Gas Consumption",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => number_format(($summary['panelGasConsumption']) / ( ( $summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction'] )/1000) ,2),
|
||||||
|
'absOpeningStock'=>'',
|
||||||
|
'absReceipt' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absTotal' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
|
'absConsumption' => $summary['panelGasConsumption'],
|
||||||
|
'absClosingStock' =>($summary['gasReceiptBg'] + $summary['gasReceiptPg']) - $summary['panelGasConsumption'],
|
||||||
|
'absPhysicalStock' =>'',
|
||||||
|
'absRemarks' =>'',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
|
||||||
|
'absParticulars' => "Water Consumption",
|
||||||
|
'absRunningHrs' => "",
|
||||||
|
'absPerHour' => "",
|
||||||
|
'absOpeningStock'=>'',
|
||||||
|
'absReceipt' =>$summary['waterReceipt'],
|
||||||
|
'absTotal' =>$summary['waterReceipt'],
|
||||||
|
'absConsumption' =>$summary['waterReceipt'] - $summary['waterConsumption'],
|
||||||
|
'absClosingStock' =>'',
|
||||||
|
'absPhysicalStock' =>'',
|
||||||
|
'absRemarks' =>'',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
|
||||||
|
'absParticulars' => "Power Consumption",
|
||||||
|
'absRunningHrs' =>$summary['ebReadingPerUnitTon'],
|
||||||
|
'absPerHour' => "",
|
||||||
|
'absOpeningStock'=>'',
|
||||||
|
'absReceipt' =>'',
|
||||||
|
'absTotal' =>'',
|
||||||
|
'absConsumption' => $summary['ebReading'],
|
||||||
|
'absClosingStock' =>'',
|
||||||
|
'absPhysicalStock' =>'',
|
||||||
|
'absRemarks' =>'',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
<?php foreach($abstractForCurrentMonth as $abstract)
|
||||||
|
{
|
||||||
|
|
||||||
|
$absDate = DateTime::createFromFormat('M-Y', $month)->format('Y-m');
|
||||||
|
$absDate = "$absDate-01";
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<!-- particulars -->
|
||||||
|
<td class="celda_normal absParticulars"><?=$abstract['absParticulars']?></td>
|
||||||
|
|
||||||
|
<!-- running hours no need -->
|
||||||
|
<td class="celda_normal absRunningHrs"><?=$abstract['absRunningHrs']?></td>
|
||||||
|
|
||||||
|
<!-- per hour no need -->
|
||||||
|
<td class="celda_normal absPerHour"><?=$abstract['absPerHour']?></td>
|
||||||
|
|
||||||
|
<!-- opening stock be -->
|
||||||
|
<td class="celda_normal absOpeningStock"
|
||||||
|
oninput="absOpeningStockChange(this)"
|
||||||
|
contenteditable="true"><?=$abstract['absOpeningStock']?></td>
|
||||||
|
|
||||||
|
<!-- receipt total of all incoming waste core sand-->
|
||||||
|
<td class="celda_normal absReceipt"><?=$abstract['absReceipt']?> </td>
|
||||||
|
|
||||||
|
<!-- Total fe -->
|
||||||
|
<td class="celda_normal absTotal"><?=$abstract['absTotal']?></td>
|
||||||
|
|
||||||
|
<!-- consumption fe-->
|
||||||
|
<td class="celda_normal absConsumption"><?=$abstract['absConsumption']?></td>
|
||||||
|
|
||||||
|
<!-- closing stock fe -->
|
||||||
|
<td class="celda_normal absClosingStock"><?=$abstract['absClosingStock']?> </td>
|
||||||
|
|
||||||
|
<!-- physical stock be -->
|
||||||
|
<td class="celda_normal absPhysicalStock"
|
||||||
|
contenteditable="true"> <?=$abstract['absPhysicalStock']?> </td>
|
||||||
|
|
||||||
|
<!-- remarks be -->
|
||||||
|
<td class="celda_normal absRemarks"
|
||||||
|
contenteditable="true"> <?=$abstract['absRemarks']?> </td>
|
||||||
|
|
||||||
|
<!-- absDate -->
|
||||||
|
<td class="absDate" style="display:none"> <?= $absDate; ?> </td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
<!-- TRP Total Sand -->
|
|
||||||
<tr>
|
|
||||||
<!-- particulars be -->
|
|
||||||
<td class="celda_normal">TRP Total Sand</td>
|
|
||||||
<!-- running hours fe -->
|
|
||||||
<td class="celda_normal"><?= $summary['sandFeedingHours']; ?> </td>
|
|
||||||
<!-- per hour fe -->
|
|
||||||
<td class="celda_normal"> <?= $summary['trpProductionPerHour']; ?> </td>
|
|
||||||
<!-- opening stock be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- receipt fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['trpProduction'];?> </td>
|
|
||||||
<!-- Total fe -->
|
|
||||||
<td class="celda_normal"><?= $summary['trpProduction'] ?> </td>
|
|
||||||
<!-- consumption fe-->
|
|
||||||
<td class="celda_normal"><?= $totalCrsReceived ?> </td>
|
|
||||||
<!-- closing stock fe -->
|
|
||||||
<td class="celda_normal"><?= ( $summary['trpProduction']) - $totalCrsReceived ?> </td>
|
|
||||||
<!-- physical stock be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- remarks be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Trp Physical Gas Consumption -->
|
|
||||||
<tr>
|
|
||||||
<!-- particulars be -->
|
|
||||||
<td class="celda_normal">Trp Physical Gas Consumption</td>
|
|
||||||
<!-- running hours fe -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- per hour fe -->
|
|
||||||
<td class="celda_normal"><?= number_format(($summary['trpPlusDrierGasConsumption']) / ( ( $summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction'] )/1000), 2, '.', '') ?></td>
|
|
||||||
<!-- opening stock be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- receipt fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['gasReceiptBg'] + $summary['gasReceiptPg'] ?> </td>
|
|
||||||
<!-- Total fe -->
|
|
||||||
<td class="celda_normal"><?= ($summary['gasReceiptBg'] + $summary['gasReceiptPg']) ?> </td>
|
|
||||||
<!-- consumption fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['physicalGasConsumption'] ?> </td>
|
|
||||||
<!-- closing stock fe -->
|
|
||||||
<td class="celda_normal"> <?=($summary['gasReceiptBg'] + $summary['gasReceiptPg']) - $summary['physicalGasConsumption'] ?> </td>
|
|
||||||
<!-- physical stock be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- remarks be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Trp Panel Gas Consumption -->
|
|
||||||
<tr>
|
|
||||||
<!-- particulars be -->
|
|
||||||
<td class="celda_normal">Trp Panel Gas Consumption</td>
|
|
||||||
<!-- running hours fe -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- per hour fe -->
|
|
||||||
<td class="celda_normal"><?= number_format(($summary['panelGasConsumption']) / ( ( $summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction'] )/1000) ,2) ?> </td>
|
|
||||||
<!-- opening stock be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- receipt fe-->
|
|
||||||
<td class="celda_normal"><?=$summary['gasReceiptBg'] + $summary['gasReceiptPg'];?> </td>
|
|
||||||
<!-- Total fe -->
|
|
||||||
<td class="celda_normal"><?= ($summary['gasReceiptBg'] + $summary['gasReceiptPg']) ?> </td>
|
|
||||||
<!-- consumption fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['panelGasConsumption']?> </td>
|
|
||||||
<!-- closing stock fe -->
|
|
||||||
<td class="celda_normal"> <?= ($summary['gasReceiptBg'] + $summary['gasReceiptPg']) - $summary['panelGasConsumption'] ?> </td>
|
|
||||||
<!-- physical stock be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- remarks be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Water Consumption -->
|
|
||||||
<tr>
|
|
||||||
<!-- particulars be -->
|
|
||||||
<td class="celda_normal">Water Consumption</td>
|
|
||||||
<!-- running hours fe -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- per hour fe -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- opening stock be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- receipt fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['waterReceipt']; ?> </td>
|
|
||||||
<!-- Total fe -->
|
|
||||||
<td class="celda_normal"><?= $summary['waterReceipt'] ?></td>
|
|
||||||
<!-- consumption fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['waterConsumption'] ?> </td>
|
|
||||||
<!-- closing stock fe -->
|
|
||||||
<td class="celda_normal"><?= ( $summary['waterReceipt']) - $summary['waterConsumption'] ?> </td>
|
|
||||||
<!-- physical stock be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- remarks be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Power Consumption -->
|
|
||||||
<tr>
|
|
||||||
<!-- particulars be -->
|
|
||||||
<td class="celda_normal">Power Consumption</td>
|
|
||||||
<!-- running hours fe -->
|
|
||||||
<td class="celda_normal"><?= $summary['ebReadingPerUnitTon'] ?> </td>
|
|
||||||
<!-- per hour fe -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- opening stock be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- receipt fe-->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- Total fe -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- consumption fe-->
|
|
||||||
<td class="celda_normal"><?= $summary['ebReading'] ?> </td>
|
|
||||||
<!-- closing stock fe -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- physical stock be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
<!-- remarks be -->
|
|
||||||
<td class="celda_normal"> </td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php }
|
<?php }
|
||||||
|
|
||||||
@ -1877,6 +1793,12 @@ $timeOtions[] = "12:00 AM";
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 text-center">
|
||||||
|
<input type="button" class="btn btn-success px-4" id="abstractSaveId" value="save">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1939,7 +1861,7 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
//table to json function
|
//table to json function
|
||||||
|
|
||||||
var updateTrpProductionDetails = tableToJson();
|
var updateTrpProductionDetails = tableToJsonTrp();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1981,7 +1903,7 @@ $timeOtions[] = "12:00 AM";
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function tableToJson() {
|
function tableToJsonTrp() {
|
||||||
const table = $('#trpProductionStockDetailsTableId');
|
const table = $('#trpProductionStockDetailsTableId');
|
||||||
const rows = [];
|
const rows = [];
|
||||||
|
|
||||||
@ -2333,6 +2255,110 @@ $timeOtions[] = "12:00 AM";
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function absOpeningStockChange(element) {
|
||||||
|
let row = $(element).closest('tr'); // Get the current row
|
||||||
|
|
||||||
|
let openingStockTd = row.find('td.absOpeningStock').text().trim()??'';
|
||||||
|
let receiptTd = row.find('td.absReceipt').text().trim()??'';
|
||||||
|
let consumptionTd = row.find('td.absConsumption').text().trim()??'';
|
||||||
|
|
||||||
|
// Convert to numbers for calculations
|
||||||
|
let openingStock = validateInput(openingStockTd) || 0;
|
||||||
|
let receipt = validateInput(receiptTd) || 0;
|
||||||
|
let consumption = validateInput(consumptionTd) || 0;
|
||||||
|
|
||||||
|
// Calculate values
|
||||||
|
let totalStock = parseFloat(openingStock) + parseFloat(receipt);
|
||||||
|
let closingStock = parseFloat(totalStock) - parseFloat(consumption);
|
||||||
|
|
||||||
|
// Update the table cells
|
||||||
|
row.find('td.absTotal').text(parseFloat(totalStock).toFixed(2));
|
||||||
|
row.find('td.absClosingStock').text(parseFloat(closingStock).toFixed(2));
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$('#abstractSaveId').click(function() {
|
||||||
|
|
||||||
|
//table to json function
|
||||||
|
|
||||||
|
var updateAbstractDetails = tableToJsonAbstract();
|
||||||
|
|
||||||
|
|
||||||
|
alert('Updation may take a while, And we appreciate your patience..!!');
|
||||||
|
|
||||||
|
$('#loader').show();
|
||||||
|
$.ajax({
|
||||||
|
data: {
|
||||||
|
updateAbstractDetails
|
||||||
|
},
|
||||||
|
type: "POST",
|
||||||
|
url: "<?php echo base_url();?>updateAbstractDetails",
|
||||||
|
|
||||||
|
success: function(data) {
|
||||||
|
if (data) {
|
||||||
|
$('#loader').hide();
|
||||||
|
console.log(data);
|
||||||
|
alert(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
|
||||||
|
alert("An error occurred while processing the request. Please try again.");
|
||||||
|
console.error("Error Code:", xhr.status);
|
||||||
|
console.error("Error Message:", error);
|
||||||
|
console.error("Response Text:", xhr.responseText);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
$('#loader').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function tableToJsonAbstract (){
|
||||||
|
|
||||||
|
const table = $("#abstractTableId");
|
||||||
|
const rows = [];
|
||||||
|
|
||||||
|
//this table to json is customized for bagstock not for all
|
||||||
|
|
||||||
|
table.find('tbody tr').each(function() {
|
||||||
|
|
||||||
|
|
||||||
|
const rowData = {
|
||||||
|
|
||||||
|
particulars :$(this).find(`td.absParticulars`).text().trim(),
|
||||||
|
opening_stock :$(this).find(`td.absOpeningStock`).text() ,
|
||||||
|
physical_stock :$(this).find(`td.absPhysicalStock`).text() ,
|
||||||
|
remarks :$(this).find(`td.absRemarks`).text(),
|
||||||
|
date :$(this).find(`td.absDate`).text()
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
rows.push(rowData);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
return JSON.stringify(rows, null, 2);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user