stock changes 07-04-2025
This commit is contained in:
parent
0289595c86
commit
cb73af8897
@ -1203,9 +1203,13 @@ class Inwardgateregister_model extends Model
|
|||||||
|
|
||||||
public function findIgrDetailsForIncomingSilicaSand($materialCodes, $month, $remark)
|
public function findIgrDetailsForIncomingSilicaSand($materialCodes, $month, $remark)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$month = new \DateTime($month . "-01"); // Create DateTime for the first day of the month
|
||||||
|
|
||||||
|
|
||||||
$builder = $this->db->table('t_igr_details');
|
$builder = $this->db->table('t_igr_details');
|
||||||
|
|
||||||
// 1. Select the necessary columns
|
|
||||||
$builder->select(
|
$builder->select(
|
||||||
't_igr_details.IGRNO,
|
't_igr_details.IGRNO,
|
||||||
t_igr_details.MaterialCode,
|
t_igr_details.MaterialCode,
|
||||||
@ -1218,14 +1222,17 @@ class Inwardgateregister_model extends Model
|
|||||||
t_igr_details.QuantityAsPerInvoice as Qty,
|
t_igr_details.QuantityAsPerInvoice as Qty,
|
||||||
issd.*'
|
issd.*'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// 2. Apply the most selective WHERE clause(s) first - in this case, the date range
|
$builder->join('t_igr_master igrMast', 'igrMast.IGRNO = t_igr_details.IGRNO');
|
||||||
$nowIST = new \DateTime('now', new \DateTimeZone('Asia/Kolkata'));
|
$builder->join('t_incomingsilicasanddetails issd', 'issd.igrNo_fk = t_igr_details.IGRNO AND issd.materialCode = t_igr_details.MaterialCode', 'left');
|
||||||
|
$builder->join('t_materialmaster materialMaster', 'materialMaster.MaterialCode = t_igr_details.MaterialCode');
|
||||||
|
$builder->join('t_configdetails cd', 'cd.key = materialMaster.Category', 'left');
|
||||||
|
$builder->join('t_purchaseorder_master poMaster', 'poMaster.PONO = igrMast.PONO', 'left');
|
||||||
|
$builder->join('t_supplierdetailsn supplierDetails', 'supplierDetails.SupplierID = poMaster.SupplierID', 'left');
|
||||||
|
|
||||||
$builder->where('Date(t_igr_details.CreatedDate) >=', $nowIST->format('Y-m-01 00:00:00'));
|
$builder->where('Date(t_igr_details.CreatedDate) >=', $month->format('Y-m-01 00:00:00'));
|
||||||
$builder->where('Date(t_igr_details.CreatedDate) <=', $nowIST->format('Y-m-t 23:59:59'));
|
$builder->where('Date(t_igr_details.CreatedDate) <=', $month->format('Y-m-t 23:59:59'));
|
||||||
|
|
||||||
// 3. Apply other WHERE clause conditions
|
|
||||||
$builder->whereIn('t_igr_details.MaterialCode', $materialCodes);
|
$builder->whereIn('t_igr_details.MaterialCode', $materialCodes);
|
||||||
$builder->where('t_igr_details.QuantityAsPerInvoice <>', 0);
|
$builder->where('t_igr_details.QuantityAsPerInvoice <>', 0);
|
||||||
|
|
||||||
@ -1234,25 +1241,15 @@ class Inwardgateregister_model extends Model
|
|||||||
$builder->where('issd.remark', $remark);
|
$builder->where('issd.remark', $remark);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. Apply JOIN clauses
|
|
||||||
$builder->join('t_igr_master igrMast', 'igrMast.IGRNO = t_igr_details.IGRNO');
|
|
||||||
$builder->join('t_incomingsilicasanddetails issd', 'issd.igrNo_fk = t_igr_details.IGRNO AND issd.materialCode = t_igr_details.MaterialCode', 'left');
|
|
||||||
$builder->join('t_materialmaster materialMaster', 'materialMaster.MaterialCode = t_igr_details.MaterialCode');
|
|
||||||
$builder->join('t_configdetails cd', 'cd.key = materialMaster.Category', 'left');
|
|
||||||
$builder->join('t_purchaseorder_master poMaster', 'poMaster.PONO = igrMast.PONO', 'left');
|
|
||||||
$builder->join('t_supplierdetailsn supplierDetails', 'supplierDetails.SupplierID = poMaster.SupplierID', 'left');
|
|
||||||
|
|
||||||
// 5. Apply GROUP BY clause
|
|
||||||
$builder->groupBy('t_igr_details.IGRNO, t_igr_details.MaterialCode');
|
$builder->groupBy('t_igr_details.IGRNO, t_igr_details.MaterialCode');
|
||||||
|
|
||||||
// 6. Apply ORDER BY clause
|
|
||||||
$builder->orderBy('t_igr_details.CreatedDate', 'asc ');
|
$builder->orderBy('t_igr_details.CreatedDate', 'asc ');
|
||||||
|
|
||||||
// 7. Get the query results
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|
||||||
|
|
||||||
return $query->getResultArray();
|
return $query->getResultArray();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getHistoryDetailsforEmail($igr)
|
public function getHistoryDetailsforEmail($igr)
|
||||||
|
|||||||
@ -373,13 +373,13 @@
|
|||||||
|
|
||||||
<input type="text" id="searchInput" placeholder="Search..."
|
<input type="text" id="searchInput" placeholder="Search..."
|
||||||
class="mt-2"
|
class="mt-2"
|
||||||
style="padding: 8px;margin-bottom: 10px;width: 250px;border: 1px solid #ccc;
|
style="padding: 8px;margin-bottom: 10px;width: 250px;border: 2px solid rgb(123, 11, 214);
|
||||||
border-radius: 5px;margin-right:15px;">
|
border-radius: 5px;margin-right:15px;">
|
||||||
|
|
||||||
|
|
||||||
<i class="fa fa-table btn-lg mt-2"
|
<i class="fa fa-table btn-lg mt-2"
|
||||||
title="Date Range Filter"
|
title="Date Range Filter"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(95, 102, 105)"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#filterModalId">
|
data-target="#filterModalId">
|
||||||
|
|
||||||
@ -387,13 +387,13 @@
|
|||||||
|
|
||||||
<i class="fa fa-download btn-lg mt-2"
|
<i class="fa fa-download btn-lg mt-2"
|
||||||
title="Excel Download"
|
title="Excel Download"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color: #0b7cba"
|
||||||
id="coatingMachineDetailsExport">
|
id="coatingMachineDetailsExport">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
<i class="fe-maximize noti-icon btn-lg mt-2"
|
<i class="fe-maximize noti-icon btn-lg mt-2"
|
||||||
title="Full Screen"
|
title="Full Screen"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(230, 184, 35)"
|
||||||
onclick="toggleDivFullscreen()">
|
onclick="toggleDivFullscreen()">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
@ -402,7 +402,7 @@
|
|||||||
title="Add Entry"
|
title="Add Entry"
|
||||||
data-target="#coatingMachineDetailModal"
|
data-target="#coatingMachineDetailModal"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
style="font-size: x-large; cursor:pointer;">
|
style="font-size: x-large; cursor:pointer; color:rgb(31, 132, 3)" >
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|
||||||
@ -438,11 +438,19 @@
|
|||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
|
<?php $calendarStartDate = DateTime::createFromFormat('M-Y', $month)->modify('first day of this month')->format('Y-m-d'); ?>
|
||||||
|
<?php $calendarEndDate = DateTime::createFromFormat('M-Y', $month)->modify('last day of this month')->format('Y-m-d'); ?>
|
||||||
|
<?php $calendarCurrentDate = DateTime::createFromFormat('M-Y', $month)->format('Y-m-d'); ?>
|
||||||
|
|
||||||
<!-- date -->
|
<!-- date -->
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="dateId">Date</label>
|
<label for="dateId">Date</label>
|
||||||
<span class="badge mandatory">*</span>
|
<span class="badge mandatory">*</span>
|
||||||
<input type="date" class="form-control" id="dateId" name="date" value="" required>
|
<input type="date" class="form-control" id="dateId" name="date"
|
||||||
|
value="<?=$calendarCurrentDate?>"
|
||||||
|
min="<?= $calendarStartDate ?>"
|
||||||
|
max="<?= $calendarEndDate ?>"
|
||||||
|
required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- shift -->
|
<!-- shift -->
|
||||||
|
|||||||
@ -349,7 +349,7 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
<input type="text" id="searchInput" placeholder="Search..."
|
<input type="text" id="searchInput" placeholder="Search..."
|
||||||
class="mt-2"
|
class="mt-2"
|
||||||
style="padding: 8px;margin-bottom: 10px;width: 250px;border: 1px solid #ccc;
|
style=" padding: 8px;margin-bottom: 10px;width: 250px;border: 2px solid rgb(123, 11, 214);
|
||||||
border-radius: 5px;margin-right:15px;">
|
border-radius: 5px;margin-right:15px;">
|
||||||
|
|
||||||
|
|
||||||
@ -358,7 +358,7 @@ foreach ($period as $day) {
|
|||||||
if ($month == date('M-Y')) {
|
if ($month == date('M-Y')) {
|
||||||
?>
|
?>
|
||||||
<i class="fa fa-cog btn-lg mt-2"
|
<i class="fa fa-cog btn-lg mt-2"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(95, 102, 105)"
|
||||||
title="Customize"
|
title="Customize"
|
||||||
data-target="#customizeModalId"
|
data-target="#customizeModalId"
|
||||||
data-toggle="modal">
|
data-toggle="modal">
|
||||||
@ -373,25 +373,25 @@ foreach ($period as $day) {
|
|||||||
title="Navigation"
|
title="Navigation"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#bs-example-modal-lg"
|
data-target="#bs-example-modal-lg"
|
||||||
style="font-size: x-large; cursor:pointer;">
|
style="font-size: x-large; cursor:pointer; color: #bd0906">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
<i class="fa fa-download btn-lg mt-2"
|
<i class="fa fa-download btn-lg mt-2"
|
||||||
title="Excel Download"
|
title="Excel Download"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color: #0b7cba"
|
||||||
id="bagStockExport">
|
id="bagStockExport">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
<i class="fe-maximize noti-icon btn-lg mt-2"
|
<i class="fe-maximize noti-icon btn-lg mt-2"
|
||||||
title="Full Screen"
|
title="Full Screen"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(230, 184, 35)"
|
||||||
onclick="toggleDivFullscreen()">
|
onclick="toggleDivFullscreen()">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|
||||||
<i class="fas fa-save btn-lg mt-2"
|
<i class="fas fa-save btn-lg mt-2"
|
||||||
title="Save"
|
title="Save"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(31, 132, 3)"
|
||||||
id="saveId">
|
id="saveId">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|||||||
@ -337,8 +337,8 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
<input type="text" id="searchInput" placeholder="Search..."
|
<input type="text" id="searchInput" placeholder="Search..."
|
||||||
class="mt-2"
|
class="mt-2"
|
||||||
style="padding: 8px;margin-bottom: 10px;width: 250px;border: 1px solid #ccc;
|
style=" padding: 8px;margin-bottom: 10px;width: 250px;border: 2px solid rgb(123, 11, 214);
|
||||||
border-radius: 5px;margin-right:15px;">
|
border-radius: 5px;margin-right:15px;">
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -346,7 +346,7 @@ foreach ($period as $day) {
|
|||||||
if ($month == date('M-Y')) {
|
if ($month == date('M-Y')) {
|
||||||
?>
|
?>
|
||||||
<i class="fa fa-cog btn-lg mt-2"
|
<i class="fa fa-cog btn-lg mt-2"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(95, 102, 105)"
|
||||||
title="Customize"
|
title="Customize"
|
||||||
data-target="#customizeModalId"
|
data-target="#customizeModalId"
|
||||||
data-toggle="modal">
|
data-toggle="modal">
|
||||||
@ -361,25 +361,26 @@ foreach ($period as $day) {
|
|||||||
title="Navigation"
|
title="Navigation"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#bs-example-modal-lg"
|
data-target="#bs-example-modal-lg"
|
||||||
style="font-size: x-large; cursor:pointer;">
|
style="font-size: x-large; cursor:pointer; color: #bd0906">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|
||||||
<i class="fa fa-download btn-lg mt-2"
|
<i class="fa fa-download btn-lg mt-2"
|
||||||
title="Excel Download"
|
title="Excel Download"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color: #0b7cba"
|
||||||
id="dieselMachineStockDetailsExport ">
|
id="bagStockExport">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
<i class="fe-maximize noti-icon btn-lg mt-2"
|
<i class="fe-maximize noti-icon btn-lg mt-2"
|
||||||
title="Full Screen"
|
title="Full Screen"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(230, 184, 35)"
|
||||||
onclick="toggleDivFullscreen()">
|
onclick="toggleDivFullscreen()">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|
||||||
<i class="fas fa-save btn-lg mt-2"
|
<i class="fas fa-save btn-lg mt-2"
|
||||||
title="Save"
|
title="Save"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(31, 132, 3)"
|
||||||
id="saveId">
|
id="saveId">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|||||||
@ -339,13 +339,13 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
|
|
||||||
<input type="text" id="searchInput" placeholder="Search..."
|
<input type="text" id="searchInput" placeholder="Search..."
|
||||||
class="mt-2"
|
class="mt-2"
|
||||||
style="padding: 8px;margin-bottom: 10px;width: 250px;border: 1px solid #ccc;
|
style="padding: 8px;margin-bottom: 10px;width: 250px;border: 2px solid rgb(123, 11, 214);
|
||||||
border-radius: 5px;margin-right:15px;">
|
border-radius: 5px;margin-right:15px; ">
|
||||||
|
|
||||||
|
|
||||||
<i class="fa fa-table btn-lg mt-2"
|
<i class="fa fa-table btn-lg mt-2"
|
||||||
title="Date Range Filter"
|
title="Date Range Filter"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(95, 102, 105)"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#filterModalId">
|
data-target="#filterModalId">
|
||||||
|
|
||||||
@ -353,13 +353,13 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
|
|
||||||
<i class="fa fa-download btn-lg mt-2"
|
<i class="fa fa-download btn-lg mt-2"
|
||||||
title="Excel Download"
|
title="Excel Download"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color: #0b7cba"
|
||||||
id="drierMachineDetailsExport">
|
id="drierMachineDetailsExport">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
<i class="fe-maximize noti-icon btn-lg mt-2"
|
<i class="fe-maximize noti-icon btn-lg mt-2"
|
||||||
title="Full Screen"
|
title="Full Screen"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(230, 184, 35)"
|
||||||
onclick="toggleDivFullscreen()">
|
onclick="toggleDivFullscreen()">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
title="Add Entry"
|
title="Add Entry"
|
||||||
data-target="#additionalEntriesModalId"
|
data-target="#additionalEntriesModalId"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
style="font-size: x-large; cursor:pointer;">
|
style="font-size: x-large; cursor:pointer; color:rgb(31, 132, 3)">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|
||||||
@ -466,10 +466,12 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
<!--first row -->
|
<!--first row -->
|
||||||
<?php $calendarStartDate = DateTime::createFromFormat('M-Y', $datefordropdown)->modify('first day of this month')->format('Y-m-d'); ?>
|
<?php $calendarStartDate = DateTime::createFromFormat('M-Y', $datefordropdown)->modify('first day of this month')->format('Y-m-d'); ?>
|
||||||
<?php $calendarEndDate = DateTime::createFromFormat('M-Y', $datefordropdown)->modify('last day of this month')->format('Y-m-d'); ?>
|
<?php $calendarEndDate = DateTime::createFromFormat('M-Y', $datefordropdown)->modify('last day of this month')->format('Y-m-d'); ?>
|
||||||
|
<?php $calendarCurrentDate = DateTime::createFromFormat('M-Y', $datefordropdown)->format('Y-m-d'); ?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form" for="additionalEntryDateId">Date</label>
|
<label class="form" for="additionalEntryDateId">Date</label>
|
||||||
<input type="date" class="form-control" id="additionalEntryDateId" name="date" value="<?= $calendarStartDate ?>"
|
<input type="date" class="form-control" id="additionalEntryDateId" name="date" value="<?= $calendarCurrentDate ?>"
|
||||||
min="<?= $calendarStartDate ?>" max="<?= $calendarEndDate ?>" required>
|
min="<?= $calendarStartDate ?>" max="<?= $calendarEndDate ?>" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|||||||
@ -359,13 +359,13 @@
|
|||||||
|
|
||||||
<input type="text" id="searchInput" placeholder="Search..."
|
<input type="text" id="searchInput" placeholder="Search..."
|
||||||
class="mt-2"
|
class="mt-2"
|
||||||
style="padding: 8px;margin-bottom: 10px;width: 150px;border: 1px solid #ccc;
|
style="padding: 8px;margin-bottom: 10px;width: 150px;border: 2px solid rgb(123, 11, 214);
|
||||||
border-radius: 5px;margin-right:15px;">
|
border-radius: 5px;margin-right:15px;">
|
||||||
|
|
||||||
|
|
||||||
<i class="fa fa-table btn-lg mt-2"
|
<i class="fa fa-table btn-lg mt-2"
|
||||||
title="Date Range Filter"
|
title="Date Range Filter"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(95, 102, 105)"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#filterModalId">
|
data-target="#filterModalId">
|
||||||
|
|
||||||
@ -373,20 +373,20 @@
|
|||||||
|
|
||||||
<i class="fa fa-download btn-lg mt-2"
|
<i class="fa fa-download btn-lg mt-2"
|
||||||
title="Excel Download"
|
title="Excel Download"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color: #0b7cba"
|
||||||
id="dustAndRoughStockExport">
|
id="dustAndRoughStockExport">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
<i class="fe-maximize noti-icon btn-lg mt-2"
|
<i class="fe-maximize noti-icon btn-lg mt-2"
|
||||||
title="Full Screen"
|
title="Full Screen"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(230, 184, 35)"
|
||||||
onclick="toggleDivFullscreen()">
|
onclick="toggleDivFullscreen()">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|
||||||
<i class="fa fa-save btn-lg mt-2"
|
<i class="fa fa-save btn-lg mt-2"
|
||||||
title="Save"
|
title="Save"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(31, 132, 3)"
|
||||||
id="saveId">
|
id="saveId">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|||||||
@ -335,13 +335,13 @@
|
|||||||
|
|
||||||
<input type="text" id="searchInput" placeholder="Search..."
|
<input type="text" id="searchInput" placeholder="Search..."
|
||||||
class="mt-2"
|
class="mt-2"
|
||||||
style="padding: 8px;margin-bottom: 10px;width: 250px;border: 1px solid #ccc;
|
style="padding: 8px;margin-bottom: 10px;width: 250px; border: 2px solid rgb(123, 11, 214);
|
||||||
border-radius: 5px;margin-right:15px;">
|
border-radius: 5px;margin-right:15px;">
|
||||||
|
|
||||||
|
|
||||||
<i class="fa fa-table btn-lg mt-2"
|
<i class="fa fa-table btn-lg mt-2"
|
||||||
title="Date Range Filter"
|
title="Date Range Filter"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(95, 102, 105);"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#filterModalId">
|
data-target="#filterModalId">
|
||||||
|
|
||||||
@ -349,20 +349,20 @@
|
|||||||
|
|
||||||
<i class="fa fa-download btn-lg mt-2"
|
<i class="fa fa-download btn-lg mt-2"
|
||||||
title="Excel Download"
|
title="Excel Download"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color: #0b7cba;"
|
||||||
id="gasStockDetailsExport">
|
id="gasStockDetailsExport">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
<i class="fe-maximize noti-icon btn-lg mt-2"
|
<i class="fe-maximize noti-icon btn-lg mt-2"
|
||||||
title="Full Screen"
|
title="Full Screen"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(230, 184, 35)"
|
||||||
onclick="toggleDivFullscreen()">
|
onclick="toggleDivFullscreen()">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|
||||||
<i class="fa fa-save btn-lg mt-2"
|
<i class="fa fa-save btn-lg mt-2"
|
||||||
title="Save"
|
title="Save"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(31, 132, 3)"
|
||||||
id="saveId">
|
id="saveId">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|||||||
@ -340,27 +340,27 @@
|
|||||||
|
|
||||||
<input type="text" id="searchInput" placeholder="Search..."
|
<input type="text" id="searchInput" placeholder="Search..."
|
||||||
class="mt-2"
|
class="mt-2"
|
||||||
style="padding: 8px;margin-bottom: 10px;width: 250px;border: 1px solid #ccc;
|
style="padding: 8px;margin-bottom: 10px;width: 250px; border: 2px solid rgb(123, 11, 214);
|
||||||
border-radius: 5px;margin-right:15px;">
|
border-radius: 5px;margin-right:15px;">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<i class="fa fa-download btn-lg mt-2"
|
<i class="fa fa-download btn-lg mt-2"
|
||||||
title="Excel Download"
|
title="Excel Download"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color: #0b7cba"
|
||||||
id="incomingSilicaSandDetailsExport">
|
id="incomingSilicaSandDetailsExport">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
<i class="fe-maximize noti-icon btn-lg mt-2"
|
<i class="fe-maximize noti-icon btn-lg mt-2"
|
||||||
title="Full Screen"
|
title="Full Screen"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(230, 184, 35)"
|
||||||
onclick="toggleDivFullscreen()">
|
onclick="toggleDivFullscreen()">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|
||||||
<i class="fas fa-save btn-lg mt-2"
|
<i class="fas fa-save btn-lg mt-2"
|
||||||
title="Save"
|
title="Save"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(31, 132, 3)"
|
||||||
id="saveId">
|
id="saveId">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
@ -1577,11 +1577,16 @@
|
|||||||
|
|
||||||
if (i === 0 || i === 1) {
|
if (i === 0 || i === 1) {
|
||||||
newPlus20Loss += Number(result[i]['WEIGH OF SAND']);
|
newPlus20Loss += Number(result[i]['WEIGH OF SAND']);
|
||||||
|
|
||||||
|
|
||||||
|
newSieveLossQty = (parseFloat(qty) * newPlus20Loss) / 100;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i === 0 || i === 1 || i === 2) {
|
if (i === 0 || i === 1 || i === 2) {
|
||||||
newPlus30Loss += Number(result[i]['WEIGH OF SAND']);
|
newPlus30Loss += Number(result[i]['WEIGH OF SAND']);
|
||||||
newSieveLossQty = (parseFloat(qty) * newPlus20Loss) / 100;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
totalWeighOfSand += Number(result[i]['WEIGH OF SAND']);
|
totalWeighOfSand += Number(result[i]['WEIGH OF SAND']);
|
||||||
|
|||||||
@ -213,7 +213,7 @@
|
|||||||
background-color: #50bbd9;
|
background-color: #50bbd9;
|
||||||
/* Green background */
|
/* Green background */
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
border: 2px solid ;
|
border: 2px solid;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -262,10 +262,10 @@
|
|||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#powerStockDetailsTableId { /* Replace with your table's actual ID or selector */
|
#powerStockDetailsTableId {
|
||||||
border-collapse: collapse;
|
/* Replace with your table's actual ID or selector */
|
||||||
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
@ -344,8 +344,8 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
<input type="text" id="searchInput" placeholder="Search..."
|
<input type="text" id="searchInput" placeholder="Search..."
|
||||||
class="mt-2"
|
class="mt-2"
|
||||||
style="padding: 8px;margin-bottom: 10px;width: 250px;border: 1px solid #ccc;
|
style=" padding: 8px;margin-bottom: 10px;width: 250px;border: 2px solid rgb(123, 11, 214);
|
||||||
border-radius: 5px;margin-right:15px;">
|
border-radius: 5px;margin-right:15px;">
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -353,7 +353,7 @@ foreach ($period as $day) {
|
|||||||
if ($month == date('M-Y')) {
|
if ($month == date('M-Y')) {
|
||||||
?>
|
?>
|
||||||
<i class="fa fa-cog btn-lg mt-2"
|
<i class="fa fa-cog btn-lg mt-2"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(95, 102, 105)"
|
||||||
title="Customize"
|
title="Customize"
|
||||||
data-target="#customizeModalId"
|
data-target="#customizeModalId"
|
||||||
data-toggle="modal">
|
data-toggle="modal">
|
||||||
@ -368,25 +368,25 @@ foreach ($period as $day) {
|
|||||||
title="Navigation"
|
title="Navigation"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#bs-example-modal-lg"
|
data-target="#bs-example-modal-lg"
|
||||||
style="font-size: x-large; cursor:pointer;">
|
style="font-size: x-large; cursor:pointer; color: #bd0906">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
<i class="fa fa-download btn-lg mt-2"
|
<i class="fa fa-download btn-lg mt-2"
|
||||||
title="Excel Download"
|
title="Excel Download"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color: #0b7cba"
|
||||||
id="powerConsumptionExport ">
|
id="bagStockExport">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
<i class="fe-maximize noti-icon btn-lg mt-2"
|
<i class="fe-maximize noti-icon btn-lg mt-2"
|
||||||
title="Full Screen"
|
title="Full Screen"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(230, 184, 35)"
|
||||||
onclick="toggleDivFullscreen()">
|
onclick="toggleDivFullscreen()">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|
||||||
<i class="fas fa-save btn-lg mt-2"
|
<i class="fas fa-save btn-lg mt-2"
|
||||||
title="Save"
|
title="Save"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(31, 132, 3)"
|
||||||
id="saveId">
|
id="saveId">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
@ -405,7 +405,7 @@ foreach ($period as $day) {
|
|||||||
2)choose which material/machines you want
|
2)choose which material/machines you want
|
||||||
------------------------------------------------------------>
|
------------------------------------------------------------>
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="modal fade" id="customizeModalId" tabindex="-1" role="dialog" aria-labelledby="customizeModalLabel" aria-hidden="true">
|
<div class="modal fade" id="customizeModalId" tabindex="-1" role="dialog" aria-labelledby="customizeModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-md">
|
<div class="modal-dialog modal-md">
|
||||||
@ -1622,14 +1622,14 @@ foreach ($period as $day) {
|
|||||||
tableResponsive.style.overflowY = "auto"; // Allow scrolling if needed
|
tableResponsive.style.overflowY = "auto"; // Allow scrolling if needed
|
||||||
}
|
}
|
||||||
}).catch(err => console.log("Error enabling fullscreen:", err));
|
}).catch(err => console.log("Error enabling fullscreen:", err));
|
||||||
} else {
|
} else {
|
||||||
document.exitFullscreen().then(() => {
|
document.exitFullscreen().then(() => {
|
||||||
div.style.width = "100%";
|
div.style.width = "100%";
|
||||||
div.style.height = "100%";
|
div.style.height = "100%";
|
||||||
|
|
||||||
// Reset .table-responsive height when exiting fullscreen
|
// Reset .table-responsive height when exiting fullscreen
|
||||||
// If .table-responsive exists, set its height to 90vh
|
// If .table-responsive exists, set its height to 90vh
|
||||||
if (tableResponsive) {
|
if (tableResponsive) {
|
||||||
tableResponsive.style.maxHeight = "450px";
|
tableResponsive.style.maxHeight = "450px";
|
||||||
tableResponsive.style.overflowY = "auto"; // Allow scrolling if needed
|
tableResponsive.style.overflowY = "auto"; // Allow scrolling if needed
|
||||||
}
|
}
|
||||||
@ -1648,54 +1648,48 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('.select2').select2({
|
$('.select2').select2({
|
||||||
dropdownParent: $('#fullscreenDiv')
|
dropdownParent: $('#fullscreenDiv')
|
||||||
});
|
|
||||||
|
|
||||||
// Initialize Select2 when the modal is shown inside full screen
|
|
||||||
$('#bs-example-modal-lg').on('shown.bs.modal', function () {
|
|
||||||
$('.select2').select2({
|
|
||||||
dropdownParent: $(this) // This ensures Select2 works in the modal
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#customizeModalId').on('shown.bs.modal', function () {
|
|
||||||
$('.select2').select2({
|
|
||||||
dropdownParent: $(this) // This ensures Select2 works in the modal
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Initialize Select2 when the modal is shown inside full screen
|
||||||
|
$('#bs-example-modal-lg').on('shown.bs.modal', function() {
|
||||||
|
$('.select2').select2({
|
||||||
|
dropdownParent: $(this) // This ensures Select2 works in the modal
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#customizeModalId').on('shown.bs.modal', function() {
|
||||||
|
$('.select2').select2({
|
||||||
|
dropdownParent: $(this) // This ensures Select2 works in the modal
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
//getting modal backdrop inside full screen
|
//getting modal backdrop inside full screen
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
function moveModalBackdropToFullscreen() {
|
function moveModalBackdropToFullscreen() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
$('.modal-backdrop').appendTo('#fullscreenDiv'); // Move backdrop inside fullscreen
|
$('.modal-backdrop').appendTo('#fullscreenDiv'); // Move backdrop inside fullscreen
|
||||||
}, 10); // Small delay ensures backdrop is created first
|
}, 10); // Small delay ensures backdrop is created first
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move the modal backdrop when a modal opens
|
// Move the modal backdrop when a modal opens
|
||||||
$('#bs-example-modal-lg, #customizeModalId').on('show.bs.modal', function () {
|
$('#bs-example-modal-lg, #customizeModalId').on('show.bs.modal', function() {
|
||||||
moveModalBackdropToFullscreen();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Ensure modals work properly in fullscreen mode
|
|
||||||
document.addEventListener("fullscreenchange", function() {
|
|
||||||
setTimeout(() => {
|
|
||||||
$('.modal-backdrop').remove(); // Remove any existing backdrops
|
|
||||||
moveModalBackdropToFullscreen();
|
moveModalBackdropToFullscreen();
|
||||||
}, 200);
|
});
|
||||||
|
|
||||||
|
// Ensure modals work properly in fullscreen mode
|
||||||
|
document.addEventListener("fullscreenchange", function() {
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.modal-backdrop').remove(); // Remove any existing backdrops
|
||||||
|
moveModalBackdropToFullscreen();
|
||||||
|
}, 200);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
@ -18,23 +18,27 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.fht-table td:hover {
|
.fht-table td:hover {
|
||||||
background-color: rgb(170, 222, 167);
|
background-color: rgb(170, 222, 167);
|
||||||
color:rgb(2, 2, 2);
|
color: rgb(2, 2, 2);
|
||||||
transform: scale(1.25); /* Increases size by 25% */
|
transform: scale(1.25);
|
||||||
transition: transform 0.5s ease-in-out; /* Smooth scaling effect */
|
/* Increases size by 25% */
|
||||||
|
transition: transform 0.5s ease-in-out;
|
||||||
|
/* Smooth scaling effect */
|
||||||
}
|
}
|
||||||
|
|
||||||
.fht-table tr:hover {
|
.fht-table tr:hover {
|
||||||
background-color: rgb(170, 222, 167);
|
background-color: rgb(170, 222, 167);
|
||||||
color:rgb(2, 2, 2);
|
color: rgb(2, 2, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.grab {
|
.grab {
|
||||||
cursor: grab; /* Default open-hand cursor */
|
cursor: grab;
|
||||||
|
/* Default open-hand cursor */
|
||||||
}
|
}
|
||||||
|
|
||||||
.grab:active {
|
.grab:active {
|
||||||
cursor: grabbing; /* Closed-hand cursor when dragging */
|
cursor: grabbing;
|
||||||
|
/* Closed-hand cursor when dragging */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -213,7 +217,7 @@
|
|||||||
background-color: #50bbd9;
|
background-color: #50bbd9;
|
||||||
/* Green background */
|
/* Green background */
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
border: 2px solid ;
|
border: 2px solid;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,21 +249,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
tfoot tr {
|
tfoot tr {
|
||||||
background-color:rgb(235, 236, 203);
|
background-color: rgb(235, 236, 203);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
body[data-layout-mode = horizontal] .container-fluid{
|
body[data-layout-mode=horizontal] .container-fluid {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-body{
|
.card-body {
|
||||||
padding-top : 0;
|
padding-top: 0;
|
||||||
padding-bottom : 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card{ margin-bottom: 5px;}
|
.card {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
@ -321,160 +326,160 @@ foreach ($period as $day) {
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
|
|
||||||
<form id="changeMonthForm" action="<?= base_url('resinStockDetails'); ?>" method="post">
|
<form id="changeMonthForm" action="<?= base_url('resinStockDetails'); ?>" method="post">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
||||||
class="form-control mt-2"
|
class="form-control mt-2"
|
||||||
style="z-index:30;" readonly>
|
style="z-index:30;" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-10 text-right d-flex" style="justify-content: end;" >
|
<div class="col-10 text-right d-flex" style="justify-content: end;">
|
||||||
|
|
||||||
<input type="text" id="searchInput" placeholder="Search..."
|
<input type="text" id="searchInput" placeholder="Search..."
|
||||||
class="mt-2"
|
class="mt-2"
|
||||||
style="padding: 8px;margin-bottom: 10px;width: 250px;border: 1px solid #ccc;
|
style=" padding: 8px;margin-bottom: 10px;width: 250px;border: 2px solid rgb(123, 11, 214);
|
||||||
border-radius: 5px;margin-right:15px;">
|
border-radius: 5px;margin-right:15px;">
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
if($month == date('M-Y') ){
|
|
||||||
?>
|
|
||||||
<i class="fa fa-cog btn-lg mt-2"
|
|
||||||
style="font-size: x-large; cursor:pointer;"
|
|
||||||
title = "Customize"
|
|
||||||
data-target="#customizeModalId"
|
|
||||||
data-toggle="modal">
|
|
||||||
|
|
||||||
</i>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<i class="fa fa-rocket btn-lg mt-2"
|
<?php
|
||||||
title="Navigation"
|
|
||||||
data-toggle="modal"
|
|
||||||
data-target="#bs-example-modal-lg"
|
|
||||||
style="font-size: x-large; cursor:pointer;">
|
|
||||||
</i>
|
|
||||||
|
|
||||||
<i class="fa fa-download btn-lg mt-2"
|
if ($month == date('M-Y')) {
|
||||||
title="Excel Download"
|
?>
|
||||||
style="font-size: x-large; cursor:pointer;"
|
<i class="fa fa-cog btn-lg mt-2"
|
||||||
id="resinStockExport">
|
style="font-size: x-large; cursor:pointer; color:rgb(95, 102, 105)"
|
||||||
</i>
|
title="Customize"
|
||||||
|
data-target="#customizeModalId"
|
||||||
|
data-toggle="modal">
|
||||||
|
|
||||||
<i class="fe-maximize noti-icon btn-lg mt-2"
|
</i>
|
||||||
title="Full Screen"
|
|
||||||
style="font-size: x-large; cursor:pointer;"
|
|
||||||
onclick="toggleDivFullscreen()" >
|
|
||||||
</i>
|
|
||||||
|
|
||||||
|
<?php
|
||||||
<i class="fas fa-save btn-lg mt-2"
|
}
|
||||||
title="Save"
|
?>
|
||||||
style="font-size: x-large; cursor:pointer;"
|
|
||||||
id="saveId" >
|
<i class="fa fa-rocket btn-lg mt-2"
|
||||||
</i>
|
title="Navigation"
|
||||||
|
data-toggle="modal"
|
||||||
</div>
|
data-target="#bs-example-modal-lg"
|
||||||
|
style="font-size: x-large; cursor:pointer; color: #bd0906">
|
||||||
|
</i>
|
||||||
|
|
||||||
|
<i class="fa fa-download btn-lg mt-2"
|
||||||
|
title="Excel Download"
|
||||||
|
style="font-size: x-large; cursor:pointer; color: #0b7cba"
|
||||||
|
id="bagStockExport">
|
||||||
|
</i>
|
||||||
|
|
||||||
|
<i class="fe-maximize noti-icon btn-lg mt-2"
|
||||||
|
title="Full Screen"
|
||||||
|
style="font-size: x-large; cursor:pointer; color:rgb(230, 184, 35)"
|
||||||
|
onclick="toggleDivFullscreen()">
|
||||||
|
</i>
|
||||||
|
|
||||||
|
|
||||||
|
<i class="fas fa-save btn-lg mt-2"
|
||||||
|
title="Save"
|
||||||
|
style="font-size: x-large; cursor:pointer; color:rgb(31, 132, 3)"
|
||||||
|
id="saveId">
|
||||||
|
</i>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</form>
|
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
<form action="<?= base_url('resinStockDetails'); ?>" method="post">
|
<form action="<?= base_url('resinStockDetails'); ?>" method="post">
|
||||||
|
|
||||||
<!-- modal placed here for submission of form -->
|
<!-- modal placed here for submission of form -->
|
||||||
<!---------------------------------------
|
<!---------------------------------------
|
||||||
this modal is used to customize table header
|
this modal is used to customize table header
|
||||||
1)list table header order
|
1)list table header order
|
||||||
2)choose which material/machines you want
|
2)choose which material/machines you want
|
||||||
------------------------------------------------------------>
|
------------------------------------------------------------>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="modal fade" id="customizeModalId" tabindex="-1" role="dialog" aria-labelledby="customizeModalLabel" aria-hidden="true">
|
<div class="modal fade" id="customizeModalId" tabindex="-1" role="dialog" aria-labelledby="customizeModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-md">
|
<div class="modal-dialog modal-md">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title" id="customizeModalLabel">Customize</h4>
|
<h4 class="modal-title" id="customizeModalLabel">Customize</h4>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- Dropdown to add back removed items -->
|
<!-- Dropdown to add back removed items -->
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="customizeHeader"> Add For This Month </label>
|
<label for="customizeHeader"> Add For This Month </label>
|
||||||
<select id="customizeHeader" class="form-control select2" onchange="addBackToList()">
|
<select id="customizeHeader" class="form-control select2" onchange="addBackToList()">
|
||||||
<option value="">Select</option>
|
<option value="">Select</option>
|
||||||
<?php
|
<?php
|
||||||
foreach($activeResinMaterials as $index => $activeResinMaterial){ ?>
|
foreach ($activeResinMaterials as $index => $activeResinMaterial) { ?>
|
||||||
|
|
||||||
<option value="<?=$activeResinMaterial['MaterialCode']?>">
|
<option value="<?= $activeResinMaterial['MaterialCode'] ?>">
|
||||||
<?=$activeResinMaterial['MaterialCode']?> - <?=$activeResinMaterial['MaterialName']?>
|
<?= $activeResinMaterial['MaterialCode'] ?> - <?= $activeResinMaterial['MaterialName'] ?>
|
||||||
</option>
|
</option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
<h5>List of Selected Items</h5>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="selectedItemsContainer">
|
|
||||||
<ul id="sortableList">
|
|
||||||
<?php foreach ($resinMaterials as $resinMaterial): ?>
|
|
||||||
|
|
||||||
<div class="sortable-item" draggable="true" id="<?= $resinMaterial['MaterialCode'] ?>_container">
|
|
||||||
<input type = "checkbox"
|
|
||||||
id = "<?= $resinMaterial['MaterialCode'] ?>_checkboxId"
|
|
||||||
name = "customisedMaterialCodes[]"
|
|
||||||
value = "<?= $resinMaterial['MaterialCode'] ?>"
|
|
||||||
onclick = "removeSelectedMaterial(this)"
|
|
||||||
checked>
|
|
||||||
<label class="grab" for="<?= $resinMaterial['MaterialCode'] ?>_checkboxId">
|
|
||||||
<?= $resinMaterial['MaterialCode'] ?> - <?= $resinMaterial['MaterialName']; ?>
|
|
||||||
</label>
|
|
||||||
<br>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button type="submit" class="btn btn-primary float-right"> Apply </button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<h5>List of Selected Items</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="selectedItemsContainer">
|
||||||
|
<ul id="sortableList">
|
||||||
|
<?php foreach ($resinMaterials as $resinMaterial): ?>
|
||||||
|
|
||||||
|
<div class="sortable-item" draggable="true" id="<?= $resinMaterial['MaterialCode'] ?>_container">
|
||||||
|
<input type="checkbox"
|
||||||
|
id="<?= $resinMaterial['MaterialCode'] ?>_checkboxId"
|
||||||
|
name="customisedMaterialCodes[]"
|
||||||
|
value="<?= $resinMaterial['MaterialCode'] ?>"
|
||||||
|
onclick="removeSelectedMaterial(this)"
|
||||||
|
checked>
|
||||||
|
<label class="grab" for="<?= $resinMaterial['MaterialCode'] ?>_checkboxId">
|
||||||
|
<?= $resinMaterial['MaterialCode'] ?> - <?= $resinMaterial['MaterialName']; ?>
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary float-right"> Apply </button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- hidden fields -->
|
<!-- hidden fields -->
|
||||||
<input type="hidden" name="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">
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
@ -524,7 +529,7 @@ foreach ($period as $day) {
|
|||||||
</div><!-- /.modal-content -->
|
</div><!-- /.modal-content -->
|
||||||
</div><!-- /.modal-dialog -->
|
</div><!-- /.modal-dialog -->
|
||||||
</div><!-- /.modal -->
|
</div><!-- /.modal -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -671,126 +676,122 @@ foreach ($period as $day) {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<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>
|
||||||
|
|
||||||
<?php foreach ($summary as $each) { ?>
|
<?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 } ?>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- this else condition work if groupedBagStockDetails is empty and creating new records
|
|
||||||
with initial values 0 for entire month -->
|
|
||||||
<?php } else { ?>
|
|
||||||
|
|
||||||
|
|
||||||
<?php foreach ($datesInMonth as $datesInMonthIndex => $dateInMonth) { ?>
|
|
||||||
<tr
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$currentDate = date('d-m-Y');
|
|
||||||
$dateInMonthDmYFormat = DateTime::createFromFormat('Y-m-d', $dateInMonth)->format('d-m-Y');
|
|
||||||
if ($dateInMonthDmYFormat === $currentDate) {
|
|
||||||
echo 'style="background: #cef0ad ;"';
|
|
||||||
}
|
|
||||||
?>>
|
|
||||||
<?php
|
|
||||||
// dd($resinMaterials);
|
|
||||||
foreach ($resinMaterials as $resinMaterialIndex => $resinMaterial) { ?>
|
|
||||||
<!-- this will loop till materials present -->
|
|
||||||
|
|
||||||
<?php if ($resinMaterialIndex == 0): ?>
|
|
||||||
<?php
|
|
||||||
$startDate = DateTime::createFromFormat('Y-m-d', $dateInMonth)->format('d-m-Y');
|
|
||||||
?>
|
|
||||||
<td class="celda_normal">
|
|
||||||
<?= $startDate ?>
|
|
||||||
</td>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<td class="celda_normal" style="display:none">
|
|
||||||
<?= $dateInMonth ?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="celda_normal" style="display:none"
|
|
||||||
data-id="<?= $dateInMonth ?> <?= $resinMaterial['MaterialCode'] ?>">
|
|
||||||
<?= $resinMaterial['MaterialCode'] ?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="celda_normal customer" style="display:none"
|
|
||||||
data-materialCode="<?= $resinMaterial['MaterialCode'] ?>"
|
|
||||||
data-id="<?= $dateInMonth ?> <?= $resinMaterial['MaterialCode'] ?>">
|
|
||||||
<?= $resinMaterial['customers'] ?>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="celda_normal openingStock"
|
|
||||||
data-id="<?= $dateInMonth ?> <?= $resinMaterial['MaterialCode'] ?>"
|
|
||||||
<?php if ($datesInMonthIndex == 0) { ?>
|
|
||||||
|
|
||||||
oninput="openingStockChange(this)"
|
|
||||||
contenteditable="true"
|
|
||||||
|
|
||||||
<?php } ?>>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
foreach($previousMonthResinStockDetails as $index => $previousMonthResinStockDetail)
|
|
||||||
{
|
|
||||||
if($previousMonthResinStockDetail['materialCode'] == $resinMaterial['MaterialCode']){
|
|
||||||
echo $previousMonthResinStockDetail['balanceStock'] ;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="celda_normal receiptStock"
|
|
||||||
data-id="<?= $dateInMonth ?> <?= $resinMaterial['MaterialCode'] ?>"
|
|
||||||
oninput="receiptStockChange(this)"
|
|
||||||
contenteditable="true"> <?= ' ' ?> </td>
|
|
||||||
|
|
||||||
<td class="celda_normal usedStock"
|
|
||||||
data-id="<?= $dateInMonth ?> <?= $resinMaterial['MaterialCode'] ?>"
|
|
||||||
oninput="usedStockChange(this)"
|
|
||||||
contenteditable="true"> <?= ' ' ?> </td>
|
|
||||||
|
|
||||||
<td class="celda_normal balanceStock"
|
|
||||||
data-id="<?= $dateInMonth ?> <?= $resinMaterial['MaterialCode'] ?>">
|
|
||||||
|
|
||||||
<?php
|
|
||||||
foreach($previousMonthResinStockDetails as $index => $previousMonthResinStockDetail)
|
|
||||||
{
|
|
||||||
if($previousMonthResinStockDetail['materialCode'] == $resinMaterial['MaterialCode']){
|
|
||||||
echo $previousMonthResinStockDetail['balanceStock'] ;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<?php } ?>
|
|
||||||
</tr>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
|
||||||
|
|
||||||
</tbody>
|
<!-- this else condition work if groupedBagStockDetails is empty and creating new records
|
||||||
|
with initial values 0 for entire month -->
|
||||||
|
<?php } else { ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php foreach ($datesInMonth as $datesInMonthIndex => $dateInMonth) { ?>
|
||||||
|
<tr
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$currentDate = date('d-m-Y');
|
||||||
|
$dateInMonthDmYFormat = DateTime::createFromFormat('Y-m-d', $dateInMonth)->format('d-m-Y');
|
||||||
|
if ($dateInMonthDmYFormat === $currentDate) {
|
||||||
|
echo 'style="background: #cef0ad ;"';
|
||||||
|
}
|
||||||
|
?>>
|
||||||
|
<?php
|
||||||
|
// dd($resinMaterials);
|
||||||
|
foreach ($resinMaterials as $resinMaterialIndex => $resinMaterial) { ?>
|
||||||
|
<!-- this will loop till materials present -->
|
||||||
|
|
||||||
|
<?php if ($resinMaterialIndex == 0): ?>
|
||||||
|
<?php
|
||||||
|
$startDate = DateTime::createFromFormat('Y-m-d', $dateInMonth)->format('d-m-Y');
|
||||||
|
?>
|
||||||
|
<td class="celda_normal">
|
||||||
|
<?= $startDate ?>
|
||||||
|
</td>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<td class="celda_normal" style="display:none">
|
||||||
|
<?= $dateInMonth ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="celda_normal" style="display:none"
|
||||||
|
data-id="<?= $dateInMonth ?> <?= $resinMaterial['MaterialCode'] ?>">
|
||||||
|
<?= $resinMaterial['MaterialCode'] ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="celda_normal customer" style="display:none"
|
||||||
|
data-materialCode="<?= $resinMaterial['MaterialCode'] ?>"
|
||||||
|
data-id="<?= $dateInMonth ?> <?= $resinMaterial['MaterialCode'] ?>">
|
||||||
|
<?= $resinMaterial['customers'] ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="celda_normal openingStock"
|
||||||
|
data-id="<?= $dateInMonth ?> <?= $resinMaterial['MaterialCode'] ?>"
|
||||||
|
<?php if ($datesInMonthIndex == 0) { ?>
|
||||||
|
|
||||||
|
oninput="openingStockChange(this)"
|
||||||
|
contenteditable="true"
|
||||||
|
|
||||||
|
<?php } ?>>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
foreach ($previousMonthResinStockDetails as $index => $previousMonthResinStockDetail) {
|
||||||
|
if ($previousMonthResinStockDetail['materialCode'] == $resinMaterial['MaterialCode']) {
|
||||||
|
echo $previousMonthResinStockDetail['balanceStock'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="celda_normal receiptStock"
|
||||||
|
data-id="<?= $dateInMonth ?> <?= $resinMaterial['MaterialCode'] ?>"
|
||||||
|
oninput="receiptStockChange(this)"
|
||||||
|
contenteditable="true"> <?= ' ' ?> </td>
|
||||||
|
|
||||||
|
<td class="celda_normal usedStock"
|
||||||
|
data-id="<?= $dateInMonth ?> <?= $resinMaterial['MaterialCode'] ?>"
|
||||||
|
oninput="usedStockChange(this)"
|
||||||
|
contenteditable="true"> <?= ' ' ?> </td>
|
||||||
|
|
||||||
|
<td class="celda_normal balanceStock"
|
||||||
|
data-id="<?= $dateInMonth ?> <?= $resinMaterial['MaterialCode'] ?>">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
foreach ($previousMonthResinStockDetails as $index => $previousMonthResinStockDetail) {
|
||||||
|
if ($previousMonthResinStockDetail['materialCode'] == $resinMaterial['MaterialCode']) {
|
||||||
|
echo $previousMonthResinStockDetail['balanceStock'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<?php } ?>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -812,7 +813,7 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function() {
|
||||||
$('.select2').select2();
|
$('.select2').select2();
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@ -867,9 +868,9 @@ foreach ($period as $day) {
|
|||||||
targetColumnIndex = targetColumnIndex * 7;
|
targetColumnIndex = targetColumnIndex * 7;
|
||||||
|
|
||||||
targetRow.cells[targetColumnIndex].scrollIntoView({
|
targetRow.cells[targetColumnIndex].scrollIntoView({
|
||||||
behavior: 'smooth',
|
behavior: 'smooth',
|
||||||
inline: 'center',
|
inline: 'center',
|
||||||
block: 'center'
|
block: 'center'
|
||||||
});
|
});
|
||||||
|
|
||||||
const highlightDuration = 10000;
|
const highlightDuration = 10000;
|
||||||
@ -1099,24 +1100,24 @@ foreach ($period as $day) {
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
function exportTableToExcel(tableID, filename = '') {
|
function exportTableToExcel(tableID, filename = '') {
|
||||||
let table = document.getElementById(tableID);
|
let table = document.getElementById(tableID);
|
||||||
|
|
||||||
let cloneTable = table.cloneNode(true); // Clone the table to modify
|
let cloneTable = table.cloneNode(true); // Clone the table to modify
|
||||||
|
|
||||||
// Remove hidden rows
|
// Remove hidden rows
|
||||||
$(cloneTable).find('tr').filter(function () {
|
$(cloneTable).find('tr').filter(function() {
|
||||||
return $(this).css('display') === 'none';
|
return $(this).css('display') === 'none';
|
||||||
}).remove();
|
}).remove();
|
||||||
|
|
||||||
// Remove hidden columns
|
// Remove hidden columns
|
||||||
$(cloneTable).find('th, td').each(function () {
|
$(cloneTable).find('th, td').each(function() {
|
||||||
if ($(this).css('display') === 'none') {
|
if ($(this).css('display') === 'none') {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(cloneTable).find('tbody tr').each(function() {
|
$(cloneTable).find('tbody tr').each(function() {
|
||||||
let firstTd = $(this).find('td').eq(0); // Get the first column (Date)
|
let firstTd = $(this).find('td').eq(0); // Get the first column (Date)
|
||||||
|
|
||||||
// Convert Date Format (Assuming it's in YYYY-MM-DD format)
|
// Convert Date Format (Assuming it's in YYYY-MM-DD format)
|
||||||
let originalDate = firstTd.text().trim(); // Get the text value
|
let originalDate = firstTd.text().trim(); // Get the text value
|
||||||
let parts = originalDate.split('-'); // Split into [YYYY, MM, DD]
|
let parts = originalDate.split('-'); // Split into [YYYY, MM, DD]
|
||||||
@ -1189,72 +1190,77 @@ foreach ($period as $day) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
const list = document.getElementById("sortableList");
|
const list = document.getElementById("sortableList");
|
||||||
|
|
||||||
let draggedItem = null;
|
let draggedItem = null;
|
||||||
|
|
||||||
function attachDragEvents(item) {
|
function attachDragEvents(item) {
|
||||||
item.setAttribute("draggable", "true");
|
item.setAttribute("draggable", "true");
|
||||||
|
|
||||||
item.addEventListener("dragstart", (event) => {
|
item.addEventListener("dragstart", (event) => {
|
||||||
draggedItem = event.target;
|
draggedItem = event.target;
|
||||||
event.target.classList.add("dragging");
|
event.target.classList.add("dragging");
|
||||||
});
|
});
|
||||||
|
|
||||||
item.addEventListener("dragend", (event) => {
|
item.addEventListener("dragend", (event) => {
|
||||||
event.target.classList.remove("dragging");
|
event.target.classList.remove("dragging");
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
list.addEventListener("dragover", (event) => {
|
|
||||||
event.preventDefault(); // Allow dropping
|
|
||||||
const dragging = document.querySelector(".dragging");
|
|
||||||
const closestItem = getClosestItem(list, event.clientY);
|
|
||||||
|
|
||||||
if (closestItem) {
|
|
||||||
list.insertBefore(dragging, closestItem);
|
|
||||||
} else {
|
|
||||||
list.appendChild(dragging);
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
function getClosestItem(container, y) {
|
list.addEventListener("dragover", (event) => {
|
||||||
const items = [...container.querySelectorAll(".sortable-item:not(.dragging)")];
|
event.preventDefault(); // Allow dropping
|
||||||
|
const dragging = document.querySelector(".dragging");
|
||||||
|
const closestItem = getClosestItem(list, event.clientY);
|
||||||
|
|
||||||
return items.reduce((closest, child) => {
|
if (closestItem) {
|
||||||
const box = child.getBoundingClientRect();
|
list.insertBefore(dragging, closestItem);
|
||||||
const offset = y - box.top - box.height / 2;
|
} else {
|
||||||
|
list.appendChild(dragging);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return offset < 0 && offset > closest.offset
|
function getClosestItem(container, y) {
|
||||||
? { offset, element: child }
|
const items = [...container.querySelectorAll(".sortable-item:not(.dragging)")];
|
||||||
: closest;
|
|
||||||
}, { offset: Number.NEGATIVE_INFINITY }).element;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Attach drag events to existing items
|
return items.reduce((closest, child) => {
|
||||||
document.querySelectorAll(".sortable-item").forEach(attachDragEvents);
|
const box = child.getBoundingClientRect();
|
||||||
|
const offset = y - box.top - box.height / 2;
|
||||||
|
|
||||||
window.removeSelectedMaterial = function (checkbox) {
|
return offset < 0 && offset > closest.offset ?
|
||||||
let container = checkbox.closest(".sortable-item");
|
{
|
||||||
let materialCode = checkbox.value;
|
offset,
|
||||||
let materialName = container.querySelector("label").innerText;
|
element: child
|
||||||
|
} :
|
||||||
|
closest;
|
||||||
|
}, {
|
||||||
|
offset: Number.NEGATIVE_INFINITY
|
||||||
|
}).element;
|
||||||
|
}
|
||||||
|
|
||||||
container.remove();
|
// Attach drag events to existing items
|
||||||
};
|
document.querySelectorAll(".sortable-item").forEach(attachDragEvents);
|
||||||
|
|
||||||
window.addBackToList = function () {
|
window.removeSelectedMaterial = function(checkbox) {
|
||||||
let dropdown = document.getElementById("customizeHeader");
|
let container = checkbox.closest(".sortable-item");
|
||||||
let selectedOption = dropdown.options[dropdown.selectedIndex];
|
let materialCode = checkbox.value;
|
||||||
|
let materialName = container.querySelector("label").innerText;
|
||||||
|
|
||||||
if (selectedOption.value !== "") {
|
container.remove();
|
||||||
let materialCode = selectedOption.value;
|
};
|
||||||
let materialName = selectedOption.text;
|
|
||||||
|
|
||||||
let container = document.createElement("div");
|
window.addBackToList = function() {
|
||||||
container.classList.add("sortable-item");
|
let dropdown = document.getElementById("customizeHeader");
|
||||||
container.id = materialCode + "_container";
|
let selectedOption = dropdown.options[dropdown.selectedIndex];
|
||||||
container.innerHTML = `
|
|
||||||
|
if (selectedOption.value !== "") {
|
||||||
|
let materialCode = selectedOption.value;
|
||||||
|
let materialName = selectedOption.text;
|
||||||
|
|
||||||
|
let container = document.createElement("div");
|
||||||
|
container.classList.add("sortable-item");
|
||||||
|
container.id = materialCode + "_container";
|
||||||
|
container.innerHTML = `
|
||||||
<input type="checkbox" id="${materialCode}_checkboxId"
|
<input type="checkbox" id="${materialCode}_checkboxId"
|
||||||
name="customisedMaterialCodes[]" value="${materialCode}"
|
name="customisedMaterialCodes[]" value="${materialCode}"
|
||||||
onclick="removeSelectedMaterial(this)" checked>
|
onclick="removeSelectedMaterial(this)" checked>
|
||||||
@ -1262,26 +1268,24 @@ foreach ($period as $day) {
|
|||||||
<br>
|
<br>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
attachDragEvents(container);
|
attachDragEvents(container);
|
||||||
|
|
||||||
document.getElementById("sortableList").appendChild(container);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
|
document.getElementById("sortableList").appendChild(container);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function() {
|
||||||
$('#customizeHeader').select2();
|
$('#customizeHeader').select2();
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('#month').change(function(){
|
$('#month').change(function() {
|
||||||
$('#changeMonthForm').submit();
|
$('#changeMonthForm').submit();
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#month').datepicker({
|
$('#month').datepicker({
|
||||||
format: 'M-yyyy',
|
format: 'M-yyyy',
|
||||||
@ -1294,99 +1298,90 @@ foreach ($period as $day) {
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
function toggleDivFullscreen() {
|
function toggleDivFullscreen() {
|
||||||
let div = document.getElementById("fullscreenDiv");
|
let div = document.getElementById("fullscreenDiv");
|
||||||
let tableResponsive = document.getElementById("table-responsive"); // Select the table container inside div
|
let tableResponsive = document.getElementById("table-responsive"); // Select the table container inside div
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!document.fullscreenElement) {
|
|
||||||
div.requestFullscreen().then(() => {
|
|
||||||
div.style.width = "100vw"; // Full viewport width
|
|
||||||
div.style.height = "100vh"; // Full viewport height
|
|
||||||
|
|
||||||
// If .table-responsive exists, set its height to 90vh
|
if (!document.fullscreenElement) {
|
||||||
if (tableResponsive) {
|
div.requestFullscreen().then(() => {
|
||||||
tableResponsive.style.maxHeight = "90vh";
|
div.style.width = "100vw"; // Full viewport width
|
||||||
tableResponsive.style.overflowY = "auto"; // Allow scrolling if needed
|
div.style.height = "100vh"; // Full viewport height
|
||||||
}
|
|
||||||
}).catch(err => console.log("Error enabling fullscreen:", err));
|
// If .table-responsive exists, set its height to 90vh
|
||||||
} else {
|
if (tableResponsive) {
|
||||||
|
tableResponsive.style.maxHeight = "90vh";
|
||||||
|
tableResponsive.style.overflowY = "auto"; // Allow scrolling if needed
|
||||||
|
}
|
||||||
|
}).catch(err => console.log("Error enabling fullscreen:", err));
|
||||||
|
} else {
|
||||||
document.exitFullscreen().then(() => {
|
document.exitFullscreen().then(() => {
|
||||||
div.style.width = "100%";
|
div.style.width = "100%";
|
||||||
div.style.height = "100%";
|
div.style.height = "100%";
|
||||||
|
|
||||||
// Reset .table-responsive height when exiting fullscreen
|
// Reset .table-responsive height when exiting fullscreen
|
||||||
// If .table-responsive exists, set its height to 90vh
|
// If .table-responsive exists, set its height to 90vh
|
||||||
if (tableResponsive) {
|
if (tableResponsive) {
|
||||||
tableResponsive.style.maxHeight = "450px";
|
tableResponsive.style.maxHeight = "450px";
|
||||||
tableResponsive.style.overflowY = "auto"; // Allow scrolling if needed
|
tableResponsive.style.overflowY = "auto"; // Allow scrolling if needed
|
||||||
}
|
}
|
||||||
}).catch(err => console.log("Error exiting fullscreen:", err));
|
}).catch(err => console.log("Error exiting fullscreen:", err));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#searchInput").on("keyup", function () {
|
$("#searchInput").on("keyup", function() {
|
||||||
let value = $(this).val().toLowerCase(); // Convert input to lowercase for case-insensitive search
|
let value = $(this).val().toLowerCase(); // Convert input to lowercase for case-insensitive search
|
||||||
|
|
||||||
$(".table-responsive tbody tr").filter(function () {
|
$(".table-responsive tbody tr").filter(function() {
|
||||||
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);
|
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('.select2').select2({
|
$('.select2').select2({
|
||||||
dropdownParent: $('#fullscreenDiv')
|
dropdownParent: $('#fullscreenDiv')
|
||||||
});
|
|
||||||
|
|
||||||
// Initialize Select2 when the modal is shown inside full screen
|
|
||||||
$('#bs-example-modal-lg').on('shown.bs.modal', function () {
|
|
||||||
$('.select2').select2({
|
|
||||||
dropdownParent: $(this) // This ensures Select2 works in the modal
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#customizeModalId').on('shown.bs.modal', function () {
|
|
||||||
$('.select2').select2({
|
|
||||||
dropdownParent: $(this) // This ensures Select2 works in the modal
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Initialize Select2 when the modal is shown inside full screen
|
||||||
|
$('#bs-example-modal-lg').on('shown.bs.modal', function() {
|
||||||
|
$('.select2').select2({
|
||||||
|
dropdownParent: $(this) // This ensures Select2 works in the modal
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#customizeModalId').on('shown.bs.modal', function() {
|
||||||
|
$('.select2').select2({
|
||||||
|
dropdownParent: $(this) // This ensures Select2 works in the modal
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
//getting modal backdrop inside full screen
|
//getting modal backdrop inside full screen
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
function moveModalBackdropToFullscreen() {
|
function moveModalBackdropToFullscreen() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
$('.modal-backdrop').appendTo('#fullscreenDiv'); // Move backdrop inside fullscreen
|
$('.modal-backdrop').appendTo('#fullscreenDiv'); // Move backdrop inside fullscreen
|
||||||
}, 10); // Small delay ensures backdrop is created first
|
}, 10); // Small delay ensures backdrop is created first
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move the modal backdrop when a modal opens
|
// Move the modal backdrop when a modal opens
|
||||||
$('#bs-example-modal-lg, #customizeModalId').on('show.bs.modal', function () {
|
$('#bs-example-modal-lg, #customizeModalId').on('show.bs.modal', function() {
|
||||||
moveModalBackdropToFullscreen();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Ensure modals work properly in fullscreen mode
|
|
||||||
document.addEventListener("fullscreenchange", function() {
|
|
||||||
setTimeout(() => {
|
|
||||||
$('.modal-backdrop').remove(); // Remove any existing backdrops
|
|
||||||
moveModalBackdropToFullscreen();
|
moveModalBackdropToFullscreen();
|
||||||
}, 200);
|
});
|
||||||
|
|
||||||
|
// Ensure modals work properly in fullscreen mode
|
||||||
|
document.addEventListener("fullscreenchange", function() {
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.modal-backdrop').remove(); // Remove any existing backdrops
|
||||||
|
moveModalBackdropToFullscreen();
|
||||||
|
}, 200);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
@ -405,10 +405,7 @@ $timeOtions[] = "12:00 AM";
|
|||||||
<div class="col-2 mt-2">
|
<div class="col-2 mt-2">
|
||||||
|
|
||||||
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
|
||||||
class="form-control "
|
class="form-control " readonly
|
||||||
data-provide="datepicker"
|
|
||||||
data-date-format="M-yyyy"
|
|
||||||
data-date-min-view-mode="1" readonly
|
|
||||||
style="max-width: 175px;">
|
style="max-width: 175px;">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -419,13 +416,13 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
<input type="text" id="searchInput" placeholder="Search..."
|
<input type="text" id="searchInput" placeholder="Search..."
|
||||||
class="mt-2"
|
class="mt-2"
|
||||||
style="padding: 8px;margin-bottom: 10px;width: 150px;border: 1px solid #ccc;
|
style="padding: 8px;margin-bottom: 10px;width: 150px;border: 2px solid rgb(123, 11, 214);
|
||||||
border-radius: 5px;margin-right:15px;">
|
border-radius: 5px;margin-right:15px;">
|
||||||
|
|
||||||
|
|
||||||
<i class="fa fa-table btn-lg mt-2"
|
<i class="fa fa-table btn-lg mt-2"
|
||||||
title="Date Range Filter"
|
title="Date Range Filter"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(95, 102, 105)"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#filterModalId">
|
data-target="#filterModalId">
|
||||||
|
|
||||||
@ -433,20 +430,20 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
<i class="fa fa-download btn-lg mt-2"
|
<i class="fa fa-download btn-lg mt-2"
|
||||||
title="Excel Download"
|
title="Excel Download"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color: #0b7cba"
|
||||||
id="trpProductionDetailsExport">
|
id="trpProductionDetailsExport">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
<i class="fe-maximize noti-icon btn-lg mt-2"
|
<i class="fe-maximize noti-icon btn-lg mt-2"
|
||||||
title="Full Screen"
|
title="Full Screen"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(230, 184, 35)"
|
||||||
onclick="toggleDivFullscreen()">
|
onclick="toggleDivFullscreen()">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|
||||||
<i class="fa fa-save btn-lg mt-2"
|
<i class="fa fa-save btn-lg mt-2"
|
||||||
title="Save"
|
title="Save"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(31, 132, 3)"
|
||||||
id="saveId">
|
id="saveId">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
@ -1504,16 +1501,18 @@ $timeOtions[] = "12:00 AM";
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<a href="#">
|
|
||||||
<i class="fa fa-download btn-lg mt-2"
|
|
||||||
style="font-size: x-large;"
|
|
||||||
id="trpAbstractDetailsExport">
|
|
||||||
</i>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
|
<i class="fa fa-download btn-lg mt-2"
|
||||||
|
style="font-size: x-large; color: #0b7cba"
|
||||||
|
id="trpAbstractDetailsExport">
|
||||||
|
</i>
|
||||||
|
|
||||||
|
<i class="fas fa-save btn-lg "
|
||||||
|
title="Save"
|
||||||
|
style="font-size: x-large; cursor:pointer; color:rgb(31, 132, 3)"
|
||||||
|
id="abstractSaveId">
|
||||||
|
</i>
|
||||||
|
|
||||||
<input type="button" class="btn btn-success px-4 mb-3" id="abstractSaveId" value="Save">
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-1">
|
<div class="col-1">
|
||||||
@ -1709,36 +1708,36 @@ $timeOtions[] = "12:00 AM";
|
|||||||
'absRunningHrs' => "",
|
'absRunningHrs' => "",
|
||||||
'absPerHour' => "",
|
'absPerHour' => "",
|
||||||
'absOpeningStock' => '',
|
'absOpeningStock' => '',
|
||||||
'absReceipt' => $totalWcsReceived,
|
'absReceipt' => $totalWcsReceived == 0 ? " " : $totalWcsReceived,
|
||||||
'absTotal' => $totalWcsReceived,
|
'absTotal' => $totalWcsReceived == 0 ? " " : $totalWcsReceived,
|
||||||
'absConsumption' => $summary['edProduction'],
|
'absConsumption' => $summary['edProduction'] == 0 ? " " : $summary['edProduction'] ,
|
||||||
'absClosingStock' => ($totalWcsReceived) - $summary['edProduction'],
|
'absClosingStock' => ($totalWcsReceived) - $summary['edProduction'] == 0 ? " " : $totalWcsReceived - $summary['edProduction'],
|
||||||
'absPhysicalStock' => '',
|
'absPhysicalStock' => '',
|
||||||
'absRemarks' => '',
|
'absRemarks' => '',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
||||||
'absParticulars' => "ED Details",
|
'absParticulars' => "ED Details",
|
||||||
'absRunningHrs' => $summary['edRunningHours'],
|
'absRunningHrs' => $summary['edRunningHours'] == 0 ? " " : $summary['edRunningHours'],
|
||||||
'absPerHour' => number_format($summary['edProduction'] / ($summary['edRunningHours'] == 0 ? 1 : $summary['edRunningHours']), 2),
|
'absPerHour' => number_format($summary['edProduction'] / ($summary['edRunningHours'] == 0 ? 1 : $summary['edRunningHours']), 2) == 0 ? " " : number_format($summary['edProduction'] / ($summary['edRunningHours'] == 0 ? 1 : $summary['edRunningHours']), 2),
|
||||||
'absOpeningStock' => '',
|
'absOpeningStock' => '',
|
||||||
'absReceipt' => $summary['edProduction'],
|
'absReceipt' => $summary['edProduction'] == 0 ? " " : $summary['edProduction'],
|
||||||
'absTotal' => $summary['edProduction'],
|
'absTotal' => $summary['edProduction'] == 0 ? " " : $summary['edProduction'],
|
||||||
'absConsumption' => $summary['edUsage'] + ($summary['coolerBags'] * 1250) + ($summary['cycloneWaste'] * 1250) + ($summary['edWaste'] * 1250),
|
'absConsumption' => $summary['edUsage'] + ($summary['coolerBags'] * 1250) + ($summary['cycloneWaste'] * 1250) + ($summary['edWaste'] * 1250) == 0 ? " " : $summary['edUsage'] + ($summary['coolerBags'] * 1250) + ($summary['cycloneWaste'] * 1250) + ($summary['edWaste'] * 1250),
|
||||||
'absClosingStock' => $summary['edProduction'] - $summary['edUsage'] + ($summary['coolerBags'] * 1250) + ($summary['cycloneWaste'] * 1250) + ($summary['edWaste'] * 1250),
|
'absClosingStock' => $summary['edProduction'] - $summary['edUsage'] + ($summary['coolerBags'] * 1250) + ($summary['cycloneWaste'] * 1250) + ($summary['edWaste'] * 1250) == 0 ? " " : $summary['edProduction'] - ($summary['edUsage'] + ($summary['coolerBags'] * 1250) + ($summary['cycloneWaste'] * 1250) + ($summary['edWaste'] * 1250)),
|
||||||
'absPhysicalStock' => '',
|
'absPhysicalStock' => '',
|
||||||
'absRemarks' => '',
|
'absRemarks' => '',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
||||||
'absParticulars' => "TRP Total Sand",
|
'absParticulars' => "TRP Total Sand",
|
||||||
'absRunningHrs' => $summary['sandFeedingHours'],
|
'absRunningHrs' => $summary['sandFeedingHours'] == 0 ? " " : $summary['sandFeedingHours'],
|
||||||
'absPerHour' => $summary['trpProductionPerHour'],
|
'absPerHour' => $summary['trpProductionPerHour'] == 0 ? " " : $summary['trpProductionPerHour'],
|
||||||
'absOpeningStock' => '',
|
'absOpeningStock' => '',
|
||||||
'absReceipt' => $summary['trpProduction'],
|
'absReceipt' => $summary['trpProduction'] == 0 ? " " : $summary['trpProduction'],
|
||||||
'absTotal' => $summary['trpProduction'],
|
'absTotal' => $summary['trpProduction'] == 0 ? " " : $summary['trpProduction'],
|
||||||
'absConsumption' => $totalCrsReceived,
|
'absConsumption' => $totalCrsReceived == 0 ? " " : $totalCrsReceived,
|
||||||
'absClosingStock' => $summary['trpProduction'] - $totalCrsReceived,
|
'absClosingStock' => $summary['trpProduction'] - $totalCrsReceived == 0 ? " " : $summary['trpProduction'] - $totalCrsReceived,
|
||||||
'absPhysicalStock' => '',
|
'absPhysicalStock' => '',
|
||||||
'absRemarks' => '',
|
'absRemarks' => '',
|
||||||
],
|
],
|
||||||
@ -1746,12 +1745,12 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
'absParticulars' => "Trp Physical Gas Consumption",
|
'absParticulars' => "Trp Physical Gas Consumption",
|
||||||
'absRunningHrs' => "",
|
'absRunningHrs' => "",
|
||||||
'absPerHour' => number_format(($summary['trpPlusDrierGasConsumption']) / (($summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction']) / 1000), 2, '.', ''),
|
'absPerHour' => number_format(($summary['trpPlusDrierGasConsumption']) / (($summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction']) / 1000), 2, '.', '') == 0 ? " " : number_format(($summary['trpPlusDrierGasConsumption']) / (($summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction']) / 1000), 2, '.', ''),
|
||||||
'absOpeningStock' => '',
|
'absOpeningStock' => '',
|
||||||
'absReceipt' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
'absReceipt' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'] == 0 ? " " : $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
'absTotal' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
'absTotal' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'] == 0 ? " " : $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
'absConsumption' => $summary['physicalGasConsumption'],
|
'absConsumption' => $summary['physicalGasConsumption'] == 0 ? " " : $summary['physicalGasConsumption'],
|
||||||
'absClosingStock' => ($summary['gasReceiptBg'] + $summary['gasReceiptPg']) - $summary['physicalGasConsumption'],
|
'absClosingStock' => ($summary['gasReceiptBg'] + $summary['gasReceiptPg']) - $summary['physicalGasConsumption'] == 0 ? " " : ($summary['gasReceiptBg'] + $summary['gasReceiptPg']) - $summary['physicalGasConsumption'],
|
||||||
'absPhysicalStock' => '',
|
'absPhysicalStock' => '',
|
||||||
'absRemarks' => '',
|
'absRemarks' => '',
|
||||||
],
|
],
|
||||||
@ -1759,12 +1758,12 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
'absParticulars' => "Trp Panel Gas Consumption",
|
'absParticulars' => "Trp Panel Gas Consumption",
|
||||||
'absRunningHrs' => "",
|
'absRunningHrs' => "",
|
||||||
'absPerHour' => number_format(($summary['panelGasConsumption']) / (($summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction']) / 1000), 2),
|
'absPerHour' => number_format(($summary['panelGasConsumption']) / (($summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction']) / 1000), 2) == 0 ? " " : number_format(($summary['panelGasConsumption']) / (($summary['trpProduction'] == 0 ? 1000 : $summary['trpProduction']) / 1000), 2),
|
||||||
'absOpeningStock' => '',
|
'absOpeningStock' => '',
|
||||||
'absReceipt' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
'absReceipt' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'] == 0 ? " " : $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
'absTotal' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
'absTotal' => $summary['gasReceiptBg'] + $summary['gasReceiptPg'] == 0 ? " " : $summary['gasReceiptBg'] + $summary['gasReceiptPg'],
|
||||||
'absConsumption' => $summary['panelGasConsumption'],
|
'absConsumption' => $summary['panelGasConsumption'] == 0 ? " " : $summary['panelGasConsumption'] ,
|
||||||
'absClosingStock' => ($summary['gasReceiptBg'] + $summary['gasReceiptPg']) - $summary['panelGasConsumption'],
|
'absClosingStock' => ($summary['gasReceiptBg'] + $summary['gasReceiptPg']) - $summary['panelGasConsumption'] == 0 ? " " : ($summary['gasReceiptBg'] + $summary['gasReceiptPg']) - $summary['panelGasConsumption'],
|
||||||
'absPhysicalStock' => '',
|
'absPhysicalStock' => '',
|
||||||
'absRemarks' => '',
|
'absRemarks' => '',
|
||||||
],
|
],
|
||||||
@ -1774,9 +1773,9 @@ $timeOtions[] = "12:00 AM";
|
|||||||
'absRunningHrs' => "",
|
'absRunningHrs' => "",
|
||||||
'absPerHour' => "",
|
'absPerHour' => "",
|
||||||
'absOpeningStock' => '',
|
'absOpeningStock' => '',
|
||||||
'absReceipt' => $summary['waterReceipt'],
|
'absReceipt' => $summary['waterReceipt'] == 0 ? " " : $summary['waterReceipt'],
|
||||||
'absTotal' => $summary['waterReceipt'],
|
'absTotal' => $summary['waterReceipt'] == 0 ? " " : $summary['waterReceipt'],
|
||||||
'absConsumption' => $summary['waterReceipt'] - $summary['waterConsumption'],
|
'absConsumption' => $summary['waterReceipt'] - $summary['waterConsumption'] == 0 ? " " : $summary['waterReceipt'] - $summary['waterConsumption'],
|
||||||
'absClosingStock' => '',
|
'absClosingStock' => '',
|
||||||
'absPhysicalStock' => '',
|
'absPhysicalStock' => '',
|
||||||
'absRemarks' => '',
|
'absRemarks' => '',
|
||||||
@ -1784,12 +1783,12 @@ $timeOtions[] = "12:00 AM";
|
|||||||
[
|
[
|
||||||
|
|
||||||
'absParticulars' => "Power Consumption",
|
'absParticulars' => "Power Consumption",
|
||||||
'absRunningHrs' => $summary['ebReadingPerUnitTon'],
|
'absRunningHrs' => $summary['ebReadingPerUnitTon'] == 0 ? " " : $summary['ebReadingPerUnitTon'],
|
||||||
'absPerHour' => "",
|
'absPerHour' => "",
|
||||||
'absOpeningStock' => '',
|
'absOpeningStock' => '',
|
||||||
'absReceipt' => '',
|
'absReceipt' => '',
|
||||||
'absTotal' => '',
|
'absTotal' => '',
|
||||||
'absConsumption' => $summary['ebReading'],
|
'absConsumption' => $summary['ebReading'] == 0 ? " " : $summary['ebReading'],
|
||||||
'absClosingStock' => '',
|
'absClosingStock' => '',
|
||||||
'absPhysicalStock' => '',
|
'absPhysicalStock' => '',
|
||||||
'absRemarks' => '',
|
'absRemarks' => '',
|
||||||
@ -2331,8 +2330,8 @@ $timeOtions[] = "12:00 AM";
|
|||||||
|
|
||||||
// Convert to numbers for calculations
|
// Convert to numbers for calculations
|
||||||
let openingStock = validateInput(openingStockTd) || 0;
|
let openingStock = validateInput(openingStockTd) || 0;
|
||||||
let receipt = validateInput(receiptTd) || 0;
|
let receipt = validateInput(receiptTd) || 0;
|
||||||
let consumption = validateInput(consumptionTd) || 0;
|
let consumption = validateInput(consumptionTd) || 0;
|
||||||
|
|
||||||
// Calculate values
|
// Calculate values
|
||||||
let totalStock = parseFloat(openingStock) + parseFloat(receipt);
|
let totalStock = parseFloat(openingStock) + parseFloat(receipt);
|
||||||
@ -2534,8 +2533,6 @@ $timeOtions[] = "12:00 AM";
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('#month').change(function() {
|
$('#month').change(function() {
|
||||||
$('#changeMonthForm').submit();
|
$('#changeMonthForm').submit();
|
||||||
|
|||||||
@ -345,13 +345,13 @@
|
|||||||
|
|
||||||
<input type="text" id="searchInput" placeholder="Search..."
|
<input type="text" id="searchInput" placeholder="Search..."
|
||||||
class="mt-2"
|
class="mt-2"
|
||||||
style="padding: 8px;margin-bottom: 10px;width: 150px;border: 1px solid #ccc;
|
style="padding: 8px;margin-bottom: 10px;width: 150px;border: 2px solid rgb(123, 11, 214);
|
||||||
border-radius: 5px;margin-right:15px;">
|
border-radius: 5px;margin-right:15px;">
|
||||||
|
|
||||||
|
|
||||||
<i class="fa fa-table btn-lg mt-2"
|
<i class="fa fa-table btn-lg mt-2"
|
||||||
title="Date Range Filter"
|
title="Date Range Filter"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(95, 102, 105)"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#filterModalId">
|
data-target="#filterModalId">
|
||||||
|
|
||||||
@ -359,20 +359,20 @@
|
|||||||
|
|
||||||
<i class="fa fa-download btn-lg mt-2"
|
<i class="fa fa-download btn-lg mt-2"
|
||||||
title="Excel Download"
|
title="Excel Download"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color: #0b7cba"
|
||||||
id="trpSandUseStockExport">
|
id="trpSandUseStockExport">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
<i class="fe-maximize noti-icon btn-lg mt-2"
|
<i class="fe-maximize noti-icon btn-lg mt-2"
|
||||||
title="Full Screen"
|
title="Full Screen"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(230, 184, 35)"
|
||||||
onclick="toggleDivFullscreen()">
|
onclick="toggleDivFullscreen()">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|
||||||
<i class="fa fa-save btn-lg mt-2"
|
<i class="fa fa-save btn-lg mt-2"
|
||||||
title="Save"
|
title="Save"
|
||||||
style="font-size: x-large; cursor:pointer;"
|
style="font-size: x-large; cursor:pointer; color:rgb(31, 132, 3)"
|
||||||
id="saveId">
|
id="saveId">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user