Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme

This commit is contained in:
VE10-Sanjeev 2025-04-05 05:51:02 +00:00
commit 3b6db9c6d9
5 changed files with 102 additions and 145 deletions

View File

@ -559,7 +559,16 @@ class Inwardgateregister extends BaseController
}
$CreatedBy = $this->session->get('userId');
$igrDetails = array('IGRNO' => $IGRNO, 'MaterialCode' => $MaterialCode, 'QuantityAsPerInvoice' => $QuantityAsPerInvoice, 'Remarks' => $Remarks, 'IGRItemStatus' => $IGRItemStatus,'GrossWeight' => (float)$GrossWeight ,'GrossWeightDate'=> $GrossWeightDate,'TareWeight' => (float)$TareWeight ,'TareWeightDate' => $TareWeightDate ,'NetWeight' => (float)$NetWeight, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt);
$igrDetails = array(
'IGRNO' => $IGRNO, 'MaterialCode' => $MaterialCode, 'QuantityAsPerInvoice' => $QuantityAsPerInvoice,
'Remarks' => $Remarks, 'IGRItemStatus' => $IGRItemStatus,'GrossWeight' => (float)$GrossWeight ,
'GrossWeightDate'=> $GrossWeightDate,'TareWeight' => (float)$TareWeight ,'TareWeightDate' => $TareWeightDate ,
'NetWeight' => (float)$NetWeight, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt,
//current change 04-04-2025 by vadivel
'mIGRStatus' => $IGRStatus);
$igrDetails['WeightFile'] = $requestWeightFileName;
log_message('error', 'SaveIGR igrDetails result : ' . json_encode($igrDetails));

View File

@ -1390,36 +1390,99 @@ $builder = $this->db->table('t_igr_history')
//Mcat -materialCategory
public function getIgrDetailsListByMcatGas($gasMaterialCodes,$gas_status){
$builder = $this->db->table('t_igr_details as t_igrd')
->select("
t_igrd.IGRNO as IGRNO-,
(t_igrd.QuantityAsPerInvoice) as gasCylinderCount,
t_sd.SupplierName,
t_igrm.*,
t_mm.MaterialName,
t_gsd.*
")
->join('t_igr_master t_igrm', 't_igrm.IGRNO = t_igrd.IGRNO')
->join('t_purchaseorder_master t_pom', 't_igrm.PONO = t_pom.PONO', 'left')
->join('t_supplierdetailsn t_sd', 't_sd.SupplierID = t_pom.SupplierID')
->join('t_gasshortagedetails t_gsd', 't_gsd.IGRNO = t_igrd.IGRNO', 'left')
->join('t_materialmaster t_mm','t_mm.MaterialCode = t_igrd.MaterialCode','left')
->whereIn('t_igrd.MaterialCode', $gasMaterialCodes)
->where("DATE(t_igrd.CreatedDate) >= '2025-04-01' ");
switch ($gas_status) {
case "gas_entered":
$builder->where('t_gsd.gas_cylinder_status IS NULL');
$builder = $this->db->table('t_igr_details as t_igrd')
->select("
t_igrd.IGRNO as IGRNO-,
(t_igrd.QuantityAsPerInvoice) as gasCylinderCount,
t_sd.SupplierName,
t_igrm.*,
t_mm.MaterialName,
t_gsd.*
")
->join('t_igr_master t_igrm', 't_igrm.IGRNO = t_igrd.IGRNO')
->join('t_purchaseorder_master t_pom', 't_igrm.PONO = t_pom.PONO', 'left')
->join('t_supplierdetailsn t_sd', 't_sd.SupplierID = t_pom.SupplierID')
->join('t_gasshortagedetails t_gsd', 't_gsd.IGRNO = t_igrm.IGRNO', 'left')
->join('t_materialmaster t_mm','t_mm.MaterialCode = t_igrd.MaterialCode','left')
->whereIn('t_igrd.MaterialCode', $gasMaterialCodes)
->where("DATE(t_igrd.CreatedDate) >= '2025-04-01' ")
->where('t_gsd.gas_cylinder_status IS NULL');
break;
case "gas_pending":
$builder->where('t_gsd.gas_cylinder_status','gas_pending');
$builder = $this->db->table('t_igr_details as t_igrd')
->select("
t_igrd.IGRNO as IGRNO-,
(t_igrd.QuantityAsPerInvoice) as gasCylinderCount,
t_sd.SupplierName,
t_igrm.*,
t_mm.MaterialName,
t_gsd.*
")
->join('t_igr_master t_igrm', 't_igrm.IGRNO = t_igrd.IGRNO')
->join('t_purchaseorder_master t_pom', 't_igrm.PONO = t_pom.PONO', 'left')
->join('t_supplierdetailsn t_sd', 't_sd.SupplierID = t_pom.SupplierID')
->join('t_gasshortagedetails t_gsd', 't_gsd.IGRNO = t_igrm.IGRNO', 'left')
->join('t_materialmaster t_mm','t_mm.MaterialCode = t_igrd.MaterialCode','left')
->whereIn('t_igrd.MaterialCode', $gasMaterialCodes)
->where("DATE(t_igrd.CreatedDate) >= '2025-04-01' ")
->where('t_gsd.gas_cylinder_status','gas_pending');
break;
case "gas_returned":
$builder->where('t_gsd.gas_cylinder_status','gas_returned');
$builder = $this->db->table('t_igr_details as t_igrd')
->select("
t_igrd.IGRNO as IGRNO-,
(t_igrd.QuantityAsPerInvoice) as gasCylinderCount,
t_sd.SupplierName,
t_igrm.*,
t_mm.MaterialName,
t_gsd.*,
SUM(t_gsd.grossWeight) as grossWeight,
SUM(t_gsd.tareWeight) as tareWeight,
SUM(t_gsd.netWeight) as netWeight,
SUM(t_gsd.actualWeight) as actualWeight,
SUM(t_gsd.shortage) as shortage,
Count(t_gsd.gas_cylinder_status) as gasCylinderCompletedCount,
(t_igrd.QuantityAsPerInvoice - Count(t_gsd.gas_cylinder_status)) as gasCylinderPendingCount
")
->join('t_igr_master t_igrm', 't_igrm.IGRNO = t_igrd.IGRNO')
->join('t_purchaseorder_master t_pom', 't_igrm.PONO = t_pom.PONO', 'left')
->join('t_supplierdetailsn t_sd', 't_sd.SupplierID = t_pom.SupplierID')
->join('t_gasshortagedetails t_gsd', 't_gsd.IGRNO = t_igrm.IGRNO', 'left')
->join('t_materialmaster t_mm','t_mm.MaterialCode = t_igrd.MaterialCode','left')
->whereIn('t_igrd.MaterialCode', $gasMaterialCodes)
->where("DATE(t_igrd.CreatedDate) >= '2025-04-01' ")
->where('t_gsd.gas_cylinder_status','gas_returned')
->groupBy('t_igrd.IGRNO');
break;
default:
$builder->where('t_gsd.gas_cylinder_status IS NULL');
}

View File

@ -711,6 +711,7 @@ $(document).ready(function () {
if (response.status === "success") {
alert("Gas Shortage Data Saved Successfully!");
$('#gasEnteredDetails').modal('hide'); // Close modal
window.location.reload();
} else {
alert("Error: " + response.message);
}

View File

@ -232,7 +232,7 @@
<?php if(empty($gasCylinderPendingList)){?>
<p align="center" > No Gas Cylinder Entered in the Given Dates..!!</p>
<p align="center" > No Gas Cylinder Pending in the Given Dates..!!</p>
<?php }else{ ?>
<?php foreach($gasCylinderPendingList as $index => $gasCylinder):
@ -777,6 +777,7 @@ $(document).ready(function () {
if (response.status === "success") {
alert("Gas Shortage Data Updated Successfully!");
$('#gasPendingDetails').modal('hide'); // Close modal
window.location.reload();
} else {
alert("Error: " + response.message);
}

View File

@ -212,26 +212,25 @@
<!-- cylinderdetails -->
<th>Cylinder No</th>
<th>Gross Weight</th>
<th>Empty Cylinder Date</th>
<th>Tare Weight</th>
<th>Net Weight</th>
<th>Actual Weight</th>
<th>Shortage</th>
<th>Cylinder Pending</th>
<!-- least details -->
<th>Bill Date</th>
<th>Driver Name</th>
<th>Vehicle No</th>
<th>Gas Details</th>
</tr>
</thead>
<tbody>
<?php if(empty($gasCylinderReturnedList)){?>
<p align="center" > No Gas Cylinder Entered in the Given Dates..!!</p>
<p align="center" > No Gas Cylinder Returned in the Given Dates..!!</p>
<?php }else{ ?>
<?php foreach($gasCylinderReturnedList as $index => $gasCylinder):
@ -250,29 +249,20 @@
<td><?=$gasCylinder['MaterialName']?></td>
<!-- cylinderdetails -->
<td><?=$gasCylinder['cylinderNo']?></td>
<td><?=$gasCylinder['grossWeight']?></td>
<td><?=$gasCylinder['emptyCylinderDate']?></td>
<td><?=$gasCylinder['tareWeight']?></td>
<td><?=$gasCylinder['netWeight']?></td>
<td><?=$gasCylinder['actualWeight']?></td>
<td><?=$gasCylinder['shortage']?></td>
<td><?=$gasCylinder['gasCylinderPendingCount']?></td>
<!-- least details -->
<td><?=$gasCylinder['DeliveryChellanDate']?></td>
<td><?=$gasCylinder['DriverName']?></td>
<td><?=$gasCylinder['VehicleNo']?></td>
<!-- #gasEnteredDetails modal will open when clicking this button -->
<td>
<a href="#">
<i class="fa fa-edit gas-entered-details" ></i>
</a>
</td>
<td><?=$gasCylinder['VehicleNo']?></td>
</tr>
@ -298,113 +288,6 @@
<!-- gas Entered modal -->
<div id="gasEnteredDetails" data-form="add" class="modal fade" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-xl">
<div class="modal-content" style="border: 1px solid #ddd; margin-top: 73px; box-shadow: 0 0 40px rgb(0 0 0 / 43%);">
<div class="modal-header">
<h4 class="modal-title">Gas Cylinder Details </h4>
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">×</button>
</div>
<div class="modal-body p-4">
<form action="#">
<!-- first row -->
<div class="form-group row">
<div class="col-md-4">
<label for="fullCylinderDate"> Full Cylinder Date</label>
<input type="date" class="form-control" id="fullCylinderDate" name="fullCylinderDate" value="" readonly>
</div>
<div class="col-md-4">
<label for="IGRNO"> IGRNO</label>
<input type="text" class="form-control" id="IGRNO" name="IGRNO" value="" readonly>
</div>
<div class="col-md-4">
<label for="supplierName"> Supplier Name</label>
<input type="text" class="form-control" id="supplierName" name="supplierName" value="" readonly>
</div>
</div>
<!-- second row -->
<div class="form-group row">
<div class="col-md-4">
<label for="invoiceNo"> Bill No/Invoice No </label>
<input type="text" class="form-control" id="invoiceNo" name="invoiceNo" value="" readonly>
</div>
<div class="col-md-4">
<label for="billDate"> Bill Date</label>
<input type="date" class="form-control" id="billDate" name="billDate" value="" readonly>
</div>
<div class="col-md-4">
<label for="driverName"> Driver Name</label>
<input type="text" class="form-control" id="driverName" name="driverName" value="" readonly>
</div>
</div>
<!-- third row -->
<div class="form-group row">
<div class="col-md-4">
<label for="vehicleNo"> Vehicle No</label>
<input type="text" class="form-control" id="vehicleNo" name="vehicleNo" value="" readonly>
</div>
<div class="col-md-4">
<label for="cylinderCount"> Cylinder Name </label>
<input type="text" class="form-control" id="cylinderName" name="cylinderName" value="" readonly>
</div>
<div class="col-md-4">
<label for="cylinderCount"> Cylinder Count </label>
<input type="text" class="form-control" id="cylinderCount" name="cylinderCount" value="" readonly>
</div>
</div>
<hr>
<!-- fourth row -->
<div id="cylinderDiv">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect"
data-dismiss="modal" value="Cancel">Cancel</button>
<button type="submit"
class="btn btn-info waves-effect waves-light" >Save</button>
</div>
</form>
</div>
</div>
</div>
<!-- end gas shortage calculator modal -->
@ -562,7 +445,7 @@
<!-- while Opening gasEnteredDetails modal -->
<!-- while Opening gasEnteredDetails modal -->
<script>
$(document).on('click', '.gas-entered-details', function() {