CHANGE_PURCHASE_LIST_MINTON

This commit is contained in:
aadhavan valli 2024-08-21 17:21:51 +05:30
parent 4458f2d786
commit 9420023502
8 changed files with 658 additions and 532 deletions

View File

@ -39,133 +39,133 @@
white-space: nowrap; white-space: nowrap;
} }
</style> </style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<center>
<h3 class="box-title">Amendment Purchase Order List </h3>
</center>
</div>
<!-- /.box-header -->
<div class="box-body">
<form class="Date-filter-form" id="DateRangeFilter" >
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label> <div class="content-page">
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required> <div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Amendment Purchase Order List</h4>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table id="amend_po_list" class="table dt-responsive nowrap w-100">
<thead>
<tr>
<!-- <th>#</th> -->
<th>PO Date</th>
<th>PONO</th>
<th>PO Type</th>
<th>Supplier Name</th>
<th>Total Order Value</th>
<th>PO Status</th>
<th>Delivery Option</th>
<th>Delivery Date</th>
<th>Delivery Schedule</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($POData)) {
$index = 0;
foreach ($POData as $record) {
$index = $index + 1;
?>
<tr id="<?php echo $index; ?>">
<!-- <td align="left"><?php echo $index; ?></td> -->
<td align="right"><?php $Pdt = new DateTime($record->PODate);
$PODate = $Pdt->format('d-m-Y');
echo $PODate
?></td>
<td><?php echo $record->PONO ?></td>
<td><?php echo $record->ReqType ?></td>
<td><?php echo $record->SupplierName ?></td>
<td align="right"><?php echo $record->TotalOrderValue ?></td>
<button type="submit">Search</button> <!-- <td><?php echo $record->StatusName ?></td> -->
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i> <td><?php
<div class="error" id="error"></div> $statusMappings = [
</form> 'PO APPROVED' => 'AWAITING APPROVE',
<table id="example1" class="table table-hover editableTable" style="background-color:#fff;font-size:12px;"> 'AWAITING RELEASE' => 'AWAITING APPROVE',
<thead style="background-color: #ddd;"> 'RELEASER ONHOLD' => 'APPROVER ONHOLD',
<tr> 'PO RELEASED' => 'PO APPROVED',
<!-- <th>#</th> --> ];
<th>PO Date</th>
<th>PONO</th>
<th>PO Type</th>
<th>Supplier Name</th>
<th>Total Order Value</th>
<th>PO Status</th>
<th>Delivery Option</th>
<th>Delivery Date</th>
<th>Delivery Schedule</th>
<th>Action</th>
</tr>
</thead>
<tbody><?php
if (!empty($POData)) {
$index = 0;
foreach ($POData as $record) {
$index = $index + 1;
?>
<tr id="<?php echo $index; ?>">
<!-- <td align="left"><?php echo $index; ?></td> -->
<td align="right"><?php $Pdt = new DateTime($record->PODate);
$PODate = $Pdt->format('d-m-Y');
echo $PODate
?></td>
<td><?php echo $record->PONO ?></td>
<td><?php echo $record->ReqType ?></td>
<td><?php echo $record->SupplierName ?></td>
<td align="right"><?php echo $record->TotalOrderValue ?></td>
<!-- <td><?php echo $record->StatusName ?></td> --> if (isset($record->StatusName) && !empty($record->StatusName)) {
<td><?php if (isset($statusMappings[$record->StatusName])) {
$statusMappings = [ echo $statusMappings[$record->StatusName];
'PO APPROVED' => 'AWAITING APPROVE', } else {
'AWAITING RELEASE' => 'AWAITING APPROVE', echo $record->StatusName;
'RELEASER ONHOLD' => 'APPROVER ONHOLD', }
'PO RELEASED' => 'PO APPROVED', } else {
]; echo "Status not provided";
}
if (isset($record->StatusName) && !empty($record->StatusName)) { ?>
if (isset($statusMappings[$record->StatusName])) { </td>
echo $statusMappings[$record->StatusName]; <td><?php $option = 'By Deliver Date';
} else { if ($record->DeliveryOption == 1) {
echo $record->StatusName; $option = "By Schedule";
} } else if ($record->DeliveryOption == 2) {
} else { $option = "By Dispatch Instruction";
echo "Status not provided"; }
} echo $option ?></td>
?></td> <td align="right"><?php
<td><?php $option = 'By Deliver Date'; if ($record->DeliveryOption == 0) {
if ($record->DeliveryOption == 1) { $Ddt = new DateTime($record->DeliveryDate);
$option = "By Schedule"; $Deliverydt = $Ddt->format('d-m-Y');
} else if ($record->DeliveryOption == 2) { echo $Deliverydt;
$option = "By Dispatch Instruction"; } else if ($record->DeliveryOption == 1) {
} $Deliverydt = '';
echo $option ?></td> echo $Deliverydt;
<td align="right"><?php } ?></td>
if ($record->DeliveryOption == 0) { <td><?php echo $record->DeliverySchedule ?></td>
$Ddt = new DateTime($record->DeliveryDate);
$Deliverydt = $Ddt->format('d-m-Y');
echo $Deliverydt;
} else if ($record->DeliveryOption == 1) {
$Deliverydt = '';
echo $Deliverydt;
} ?></td>
<td><?php echo $record->DeliverySchedule ?></td>
<td> <a data-toggle="tooltip" href="<?php echo base_url() . 'EditAmendPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType . '&CapitalRange=' . $record->CapitalRange; ?>"><i class="fa fa-pencil" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Edit Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a> <td> <a data-toggle="tooltip" href="<?php echo base_url() . 'EditAmendPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType . '&CapitalRange=' . $record->CapitalRange; ?>"><i class="fas fa-pencil-alt" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Edit Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a>
<a data-toggle="tooltip" href="<?php echo base_url() . 'EditAmendPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType . '&CapitalRange=' . $record->CapitalRange; ?>"> &nbsp;&nbsp;&nbsp; <a data-toggle="tooltip" href="<?php echo base_url() . 'purchaseorder/CreatePOPrint?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType; ?>"><i class="fa fa-print" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Print the Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a> <a data-toggle="tooltip" href="<?php echo base_url() . 'EditAmendPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType . '&CapitalRange=' . $record->CapitalRange; ?>"> &nbsp;&nbsp;&nbsp; <a data-toggle="tooltip" href="<?php echo base_url() . 'purchaseorder/CreatePOPrint?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType; ?>"><i class="fa fa-print" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Print the Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a>
</td> </td>
<?php <?php
} ?> } ?>
</tr> </tr>
<?php <?php
} }
?> ?>
</tbody> </tbody>
</table>
</table> </div> <!-- end card body-->
</div> </div> <!-- end card -->
<!-- /.box-body --> </div><!-- end col-->
</div> </div>
<!-- /.box --> </div>
</div> <!-- container -->
</div> </div> <!-- content -->
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div> </div>
<!-- /.content-wrapper --> <!-- /.content-wrapper -->
<!-- <script> <!-- <script>
$(function() { $(function() {
@ -266,3 +266,24 @@ $(document).ready(function() {
}); });
}); });
</script> </script>
<script>$(document).ready(function() {
$('#amend_po_list').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
responsive: true, // Responsive table
order: [[0, 'desc']], // Default ordering (column index 0, ascending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
});
</script>

View File

@ -55,153 +55,142 @@
margin-bottom: 10px; margin-bottom: 10px;
} }
</style> </style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<center>
<h3 class="box-title"> Purchase Order List</h3>
</center>
<div class="row">
<div class="col-md-12">
<?php
helper('form');
$error = session()->getFlashdata('error');
if($error){
$type = "error";
echo show_alert($type, $error);
}
$success = session()->getFlashdata('success');
if($success){
$type = "success";
echo show_alert($type, $success);
}
?>
<div class="row"> <div class="content-page">
<div class="col-md-12"> <div class="content">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); <!-- Start Content-->
?> </div> <div class="container-fluid">
</div> <!-- start page title -->
</div> <div>
</div> <div class="row">
</div> <div class="col-12">
<!-- /.box-header --> <div class="page-title-box page-title-box-alt">
<div class="box-body"> <h4 class="page-title">Purchase Order List</h4>
<form class="Date-filter-form" id="DateRangeFilter" > </div>
<input type="hidden" name="table" value="requisition"> </div>
<label for="fromDate">From:</label> </div> <?php
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required> helper('form');
$error = session()->getFlashdata('error');
if($error){
$type = "error";
echo show_alert($type, $error);
}
$success = session()->getFlashdata('success');
if($success){
$type = "success";
echo show_alert($type, $success);
}
?>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label> <label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required> <input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button> <button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i> <i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div> <div class="error" id="error"></div>
</form> </form>
<table id="dataTableHistoriek" class="table table-bordered table-hover editableTable" style="background-color:#fff;font-size:12px;"> <div class="card-body">
<thead style="background-color: #ddd;"> <table id="po_list" class="table dt-responsive nowrap w-100">
<tr> <thead>
<th>PO Date</th> <tr>
<th>PONO#</th> <th>PO Date</th>
<th>PO Type</th> <th>PONO#</th>
<th>Supplier Name</th> <th>PO Type</th>
<th>Total Order Value</th> <th>Supplier Name</th>
<th>PO Status</th> <th>Total Order Value</th>
<th>Delivery Option</th> <th>PO Status</th>
<th>Delivery Date</th> <th>Delivery Option</th>
<th>Delivery Schedule</th> <th>Delivery Date</th>
<th>Action</th> <th>Delivery Schedule</th>
</tr> <th>Action</th>
</thead> </tr>
<tbody><?php </thead>
if (!empty($POData)) { <tbody>
$index = 0; <?php
foreach ($POData as $record) { if (!empty($POData)) {
$index = $index + 1; $index = 0;
?> foreach ($POData as $record) {
<tr id="<?php echo $index; ?>"> $index = $index + 1;
<td align="right"><?php $Pdt = new DateTime($record->PODate); ?>
$PODate = $Pdt->format('d-m-Y'); <tr id="<?php echo $index; ?>">
echo $PODate <td align="right"><?php $Pdt = new DateTime($record->PODate);
$PODate = $Pdt->format('d-m-Y');
echo $PODate
?></td>
<td><?php echo $record->PONO ?></td>
<td><?php echo $record->ReqType ?></td>
<td><?php echo $record->SupplierName ?></td>
<td align="right"><?php echo $record->TotalOrderValue ?></td>
<!-- <td><?php echo $record->StatusName ?></td> -->
<td><?php
$statusMappings = [
'PO APPROVED' => 'AWAITING APPROVE',
'AWAITING RELEASE' => 'AWAITING APPROVE',
'RELEASER ONHOLD' => 'APPROVER ONHOLD',
'PO RELEASED' => 'PO APPROVED',
];
if (isset($record->StatusName) && !empty($record->StatusName)) {
if (isset($statusMappings[$record->StatusName])) {
echo $statusMappings[$record->StatusName];
} else {
echo $record->StatusName;
}
} else {
echo "Status not provided";
}
?></td> ?></td>
<td><?php echo $record->PONO ?></td> <td><?php $option = 'By Deliver Date';
<td><?php echo $record->ReqType ?></td> if ($record->DeliveryOption == 1) {
$option = "By Schedule";
} else if ($record->DeliveryOption == 2) {
$option = "By Dispatch Instruction";
}
echo $option ?></td>
<td align="right"><?php
if ($record->DeliveryOption == 0) {
$Ddt = new DateTime($record->DeliveryDate);
$Deliverydt = $Ddt->format('d-m-Y');
echo $Deliverydt;
} else if ($record->DeliveryOption == 1) {
$Deliverydt = '';
echo $Deliverydt;
} ?></td>
<td><?php echo $record->DeliverySchedule ?></td>
<td><?php echo $record->SupplierName ?></td> <?php $statusCode = $record->StatusCode;
<td align="right"><?php echo $record->TotalOrderValue ?></td>
<!-- <td><?php echo $record->StatusName ?></td> --> if ($statusCode == PO_DRAFT || $statusCode == PO_CREATED) { ?>
<td><?php <td> <a data-toggle="tooltip" href="<?php echo base_url() . 'EditPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType . '&CapitalRange=' . $record->CapitalRange; ?>"><i class="fa fa-pencil" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Edit Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a> </td>
$statusMappings = [ <?php
'PO APPROVED' => 'AWAITING APPROVE', } else { ?>
'AWAITING RELEASE' => 'AWAITING APPROVE', <td> <a data-toggle="tooltip" href="<?php echo base_url() . 'EditPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType . '&CapitalRange=' . $record->CapitalRange; ?>"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to view Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a> &nbsp;&nbsp;&nbsp; <a data-toggle="tooltip" href="<?php echo base_url() . 'purchaseorder/CreatePOPrint?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType; ?>" target="new"><i class="fa fa-print" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Print the Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a> </td>
'RELEASER ONHOLD' => 'APPROVER ONHOLD', <?php
'PO RELEASED' => 'PO APPROVED', } ?>
]; </tr>
<?php
if (isset($record->StatusName) && !empty($record->StatusName)) { }
if (isset($statusMappings[$record->StatusName])) { }
echo $statusMappings[$record->StatusName]; ?>
} else { </tbody>
echo $record->StatusName; </table>
} </div> <!-- end card body-->
} else { </div> <!-- end card -->
echo "Status not provided"; </div><!-- end col-->
} </div>
?></td> </div>
<td><?php $option = 'By Deliver Date'; </div> <!-- container -->
if ($record->DeliveryOption == 1) { </div> <!-- content -->
$option = "By Schedule";
} else if ($record->DeliveryOption == 2) {
$option = "By Dispatch Instruction";
}
echo $option ?></td>
<td align="right"><?php
if ($record->DeliveryOption == 0) {
$Ddt = new DateTime($record->DeliveryDate);
$Deliverydt = $Ddt->format('d-m-Y');
echo $Deliverydt;
} else if ($record->DeliveryOption == 1) {
$Deliverydt = '';
echo $Deliverydt;
} ?></td>
<td><?php echo $record->DeliverySchedule ?></td>
<?php $statusCode = $record->StatusCode;
if ($statusCode == PO_DRAFT || $statusCode == PO_CREATED) { ?>
<td> <a data-toggle="tooltip" href="<?php echo base_url() . 'EditPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType . '&CapitalRange=' . $record->CapitalRange; ?>"><i class="fa fa-pencil" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Edit Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a> </td>
<?php
} else { ?>
<td> <a data-toggle="tooltip" href="<?php echo base_url() . 'EditPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType . '&CapitalRange=' . $record->CapitalRange; ?>"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to view Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a> &nbsp;&nbsp;&nbsp; <a data-toggle="tooltip" href="<?php echo base_url() . 'purchaseorder/CreatePOPrint?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType; ?>" target="new"><i class="fa fa-print" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Print the Purchase Order details"></i>&nbsp;&nbsp;&nbsp;</a> </td>
<?php
} ?>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div> </div>
<!-- /.content-wrapper --> <!-- /.content-wrapper -->
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
@ -350,3 +339,24 @@ $(document).ready(function() {
}); });
}); });
</script> --> </script> -->
<script>$(document).ready(function() {
$('#po_list').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
responsive: true, // Responsive table
order: [[0, 'desc']], // Default ordering (column index 0, ascending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
});
</script>

View File

@ -16,7 +16,7 @@
.dataTables_wrapper { .dataTables_wrapper {
padding-bottom: 0px; padding-bottom: 0px;
margin-top: -3%; /* margin-top: -3%; */
} }
.content-wrapper { .content-wrapper {
@ -37,22 +37,26 @@
float: inline-end; float: inline-end;
} }
</style> </style>
<div class="content-wrapper">
<div class="content-page">
<div class="content">
<?php $attributes = array('class' => 'form-label-left CreatePO ', 'name' => 'CreatePO', 'id' => 'CreatePO', 'method' => 'post', 'role' => 'form'); <?php $attributes = array('class' => 'form-label-left CreatePO ', 'name' => 'CreatePO', 'id' => 'CreatePO', 'method' => 'post', 'role' => 'form');
echo form_open(base_url() . 'purchaseOrder', $attributes); ?> echo form_open(base_url() . 'purchaseOrder', $attributes); ?>
<section class="content"> <!-- Start Content-->
<div class="container-fluid">
<div class="box"> <!-- start page title -->
<div class="box-header"> <div class="row">
<center> <div class="col-12">
<h3 class="box-title"> Create Purchase Order from Requistion</h3> <div class="page-title-box page-title-box-alt">
</center> <h4 class="page-title">Create Purchase Order from Requistion</h4>
</div>
<div class="container-fluid"> </div>
<div id="content"></div> </div>
<div class="row"> </div>
<div class="row">
<div class="col-md-4"> <div class="col-md-4">
<?php <?php
helper('form'); helper('form');
@ -93,8 +97,8 @@
</div> </div>
</div> </div>
<?php } ?> <?php } ?>
<div class="col-md-12"> <div class="col-md-12" style="margin-top: -79px;">
<div class="col-md-3 col-md-offset-9"> <!-- <div class="col-md-3 col-md-offset-9"> -->
<p> <p>
<div align="right" style="padding-right:0px"> <div align="right" style="padding-right:0px">
<!--<a href="<?php echo base_url(); ?>purchaseorderform/purchaseorder"> --> <!--<a href="<?php echo base_url(); ?>purchaseorderform/purchaseorder"> -->
@ -105,14 +109,16 @@
<input type="hidden" name="txtReqType" id="txtReqType" /> <input type="hidden" name="txtReqType" id="txtReqType" />
</div> </div>
</p> </p>
</div> <!-- </div> -->
</div> </div>
</div> </div>
</div> <div>
<div class="container-fluid"> <div class="row">
<div class="col-12">
<div class="modal fade" id="RequisitionDtlsModal" role="dialog"> <div class="card">
<div class="card-body">
<div class="modal fade" id="RequisitionDtlsModal" role="dialog">
<div class="modal-dialog" style="vertical-align: middle;width: fit-content"> <div class="modal-dialog" style="vertical-align: middle;width: fit-content">
<!-- Modal content--> <!-- Modal content-->
<form> <form>
@ -207,11 +213,8 @@
</form> </form>
</div> </div>
</div> </div>
<table id="create_po_from_requistion" class="table dt-responsive nowrap w-100">
<table id="REQLIST" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;"> <thead>
<div align="right" style="padding-right:10px">
<div class="modal fade" role="dialog">
<thead style="background-color: #ddd !important;">
<tr> <tr>
<th>Select</th> <th>Select</th>
<th>Requested Date</th> <th>Requested Date</th>
@ -227,9 +230,8 @@
<th>Designation</th> <th>Designation</th>
</tr> </tr>
</thead> </thead>
<tbody id="AppendReqList"> <tbody>
<?php <?php if (!empty($ReqList)) { //alert($ReqList);
if (!empty($ReqList)) { //alert($ReqList);
$index = 1; $index = 1;
foreach ($ReqList as $record) { foreach ($ReqList as $record) {
?> ?>
@ -258,13 +260,8 @@
} }
?> ?>
</tbody> </tbody>
</table> </table>
<div class="modal fade" id="ImportPOCheck" role="dialog">
<div align="right">
<!-- <input type="submit" class="btn btn-success" onclick="return Validate();" value="Create Purchase Order"> -->
</div>
<div class="modal fade" id="ImportPOCheck" role="dialog">
<div class="modal-dialog modal-dialog-centered"> <div class="modal-dialog modal-dialog-centered">
<!-- Modal content--> <!-- Modal content-->
<div class="modal-content modal-content-custom-width"> <div class="modal-content modal-content-custom-width">
@ -290,10 +287,15 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div> <!-- end card body-->
</div> </div> <!-- end card -->
</section> </div><!-- end col-->
</div>
</div>
</div> <!-- container -->
</div> <!-- content -->
</div> </div>
<script> <script>
var POType = ''; var POType = '';
function SetImportPO() { function SetImportPO() {
@ -423,3 +425,23 @@
}); });
</script> </script>
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
<script>$(document).ready(function() {
$('#create_po_from_requistion').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
responsive: true, // Responsive table
order: [[0, 'desc']], // Default ordering (column index 0, ascending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
});
</script>

View File

@ -1,4 +1,4 @@
<div?php <?php
//print_r($getTotalServicePoCount); //print_r($getTotalServicePoCount);
$Empcnt = ''; $Empcnt = '';
//echo $DEPCode; //echo $DEPCode;

View File

@ -48,7 +48,7 @@
<div class="auth-logo"> <div class="auth-logo">
<a href="index.html" class="logo logo-dark text-center"> <a href="index.html" class="logo logo-dark text-center">
<span class="logo-lg"> <span class="logo-lg">
<img src="<?php echo base_url('public/new_assets/images/RI_logo.png'); ?> " alt="" height="40"> <img src="<?php echo base_url('public/new_assets/images/RI_logo.png'); ?> " alt="" height="60">
</span> </span>
</a> </a>

View File

@ -89,56 +89,60 @@ if (empty($Status)) {
color: #0056b3; color: #0056b3;
} }
</style> </style>
<div class="content-wrapper">
<section class="content"> <div class="content-page">
<div class="box"> <div class="content">
<div class="box-header"> <!-- Start Content-->
<CENTER> <div class="container-fluid">
<h3 class="box-title">Purchase Order Approve List </h3> <!-- start page title -->
</CENTER> <div>
</div> <div class="row">
<div class="container-fluid"> <div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Purchase Order Approve List</h4>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<form class="Date-filter-form" id="DateRangeFilter"> <label for="toDate">To:</label>
<input type="hidden" name="table" value="requisition"> <input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label> <button type="submit">Search</button>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required> <i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table id="po_release" class="table dt-responsive nowrap w-100">
<thead>
<tr>
<th>PO Date</th>
<th>Purchase Order Number</th>
<th>Purchase Order Type</th>
<th>Cost Center Name</th>
<th>Supplier Name</th>
<th>Created By</th>
<th>Department</th>
<!-- <th>Created Date</th> -->
<button type="submit">Search</button> <th>Total Order Value</th>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i> <th>Approved By</th>
<div class="error" id="error"></div> <th>Status</th>
</form> <th>Action</th>
<table id="Requisition" class="table table-hover" style="background-color:#fff;font-size:12px;"> <th>Remarks</th>
<thead style="background-color: #ddd;"> </tr>
<tr> </thead>
<th>PO Date</th> <tbody>
<th>Purchase Order Number</th> <?php
<th>Purchase Order Type</th>
<th>Cost Center Name</th>
<th>Supplier Name</th>
<th>Created By</th>
<th>Department</th>
<!-- <th>Created Date</th> -->
<th>Total Order Value</th>
<th>Approved By</th>
<th>Status</th>
<th>Action</th>
<th>Remarks</th>
</tr>
</thead>
<tbody id="ApprovalList">
<?php
if (!empty($AppList)) { if (!empty($AppList)) {
$index = 0; $index = 0;
foreach ($AppList as $record) { foreach ($AppList as $record) {
@ -228,17 +232,15 @@ if (empty($Status)) {
?> ?>
</tbody>
</table>
</tbody> </div> <!-- end card body-->
</div> <!-- end card -->
</table> </div><!-- end col-->
</div>
<br> </div>
</div> </div> <!-- container -->
</div> </div> <!-- content -->
</section>
</div> </div>
<script> <script>
@ -600,3 +602,24 @@ if (empty($Status)) {
}); });
}); });
</script> </script>
<script>$(document).ready(function() {
$('#po_release').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
responsive: true, // Responsive table
order: [[0, 'desc']], // Default ordering (column index 0, ascending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
});
</script>

View File

@ -76,118 +76,115 @@ span.highlight {
} }
</style> </style>
<div class="content-wrapper"> <div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<section class="content"> <!-- start page title -->
<div>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-12">
<div class="box"> <div class="page-title-box page-title-box-alt">
<h4 class="page-title">Requisition Listing</h4>
<div class="box-header">
<center><b>
<h3 class="box-title">Requisition Listing</h3>
</b></center>
</div><!-- /.box-header -->
</div>
</div>
</div>
<?php if($DraftCount > 0 ) {?><p style="text-align: center;"> <?php if($DraftCount > 0 ) {?><p style="text-align: center;">
<span class="highlight">The Requisition No <b><?php echo $ReqNo;?></b> is in Draft <span class="highlight">The Requisition No <b><?php echo $ReqNo;?></b> is in Draft
status.</span> Please act on the requisition.<span class="highlight">Then only you can raise status.</span> Please act on the requisition.<span class="highlight">Then only you can raise
New Requisition. </span> New Requisition. </span>
</p> <?php } ?> </p> <?php } ?>
<div class="row" style="margin-top: -63px;">
<div class="row"> <div class="col-md-12 text-left">
<div class="col-md-12 text-right" style="margin-left:-2%;"> <div class="form-group row">
<div class="form-group"> <div class="col-md-3"></div>
<div class="col-md-5 text-right"></div>
<div class="col-md-8"> <div class="col-md-4 text-right">
<form class="Date-filter-form" id="DateRangeFilter" >
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
</div>
<div class="col-md-4">
<?php if($DraftCount == 0) { ?> <?php if($DraftCount == 0) { ?>
<a class="btn btn-success" onclick="Test()" <a class="btn btn-success" href="<?php echo base_url(); ?>RequisitionForm">Raise New Requisition</a>
href="<?php echo base_url(); ?>RequisitionForm">Raise New Requisition</a> <?php } ?>
<?php }?>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<table id="Requisition" class="table table-bordered table-hover" <label for="toDate">To:</label>
style="background-color:#fff;font-size:12px;"> <input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<thead style="background-color: #ddd;">
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table id="requisition_listing" class="table dt-responsive nowrap w-100">
<thead>
<tr>
<th>Requisted Date</th>
<th>Requisition No</th>
<th>Requisition Type</th>
<th>Tot No.OfLineItem </th>
<th>Po CreatedLineItem</th>
<th>Partially PoCreatedLineItem</th>
<th>NewLine Item</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($TotNoOfLine))
{
foreach($TotNoOfLine as $record)
{ //print_r($record);
?>
<tr> <tr>
<th>Requisted Date</th> <td> <?php $Pdt = new DateTime($record->CreatedDate );
<th>Requisition No</th> $PODate = $Pdt->format('d-m-Y');
<th>Requisition Type</th> echo $PODate ?>
<th>Tot No.OfLineItem </th> </td>
<th>Po CreatedLineItem</th> <td><?php echo $record->ReqNo ?></td>
<th>Partially PoCreatedLineItem</th> <td><?php echo $record->ReqType ?></td>
<th>NewLine Item</th> <td><?php echo $record->TotalNoofLineItems ?></td>
<th>Status</th> <td><?php echo $record->PolineItems ?></td>
<th>Action</th> <td><?php echo $record->PartilallyLineItems ?></td>
<td> <?php echo $record->newLineItem ?></td>
<td><?php echo $record->StatusName ?></td>
<td> <a data-toggle="tooltip"
href="<?php echo base_url().'EditRequisitionForm?ReqNo='.$record->ReqNo.'&ReqType='.$record->ReqType; ?>"><i
class="fas fa-pencil-alt" data-toggle="tooltip"
title="<?php echo $record->ReqNo; ?> - Click here to view Requisition details"></i>&nbsp;&nbsp;&nbsp;</a>
<a data-toggle="tooltip" onclick="DeleteRow('<?php echo $record->ReqNo; ?>' )"><span
class="fas fa-trash"
title="<?php echo $record->ReqNo; ?> - Click here to Delete Requisition details"></span></a>
</td>
</tr> </tr>
</thead>
<?php
}
<?php
if(!empty($TotNoOfLine))
{
foreach($TotNoOfLine as $record)
{ //print_r($record);
?>
<tr>
<td> <?php $Pdt = new DateTime($record->CreatedDate );
$PODate = $Pdt->format('d-m-Y');
echo $PODate ?>
</td>
<td><?php echo $record->ReqNo ?></td>
<td><?php echo $record->ReqType ?></td>
<td><?php echo $record->TotalNoofLineItems ?></td>
<td><?php echo $record->PolineItems ?></td>
<td><?php echo $record->PartilallyLineItems ?></td>
<td> <?php echo $record->newLineItem ?></td>
<td><?php echo $record->StatusName ?></td>
<td> <a data-toggle="tooltip"
href="<?php echo base_url().'EditRequisitionForm?ReqNo='.$record->ReqNo.'&ReqType='.$record->ReqType; ?>"><i
class="fa fa-pencil" data-toggle="tooltip"
title="<?php echo $record->ReqNo; ?> - Click here to view Requisition details"></i>&nbsp;&nbsp;&nbsp;</a>
<a data-toggle="tooltip" onclick="DeleteRow('<?php echo $record->ReqNo; ?>' )"><span
class="glyphicon glyphicon-trash"
title="<?php echo $record->ReqNo; ?> - Click here to Delete Requisition details"></span></a>
</td>
</tr>
<?php
} }
} ?>
?> </tbody>
</table> </table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div> </div>
</div> </div>
</div> </div> <!-- container -->
</section> </div> <!-- content -->
</div> </div>
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
@ -303,3 +300,24 @@ $(document).ready(function() {
}); });
}); });
</script> </script>
<script>$(document).ready(function() {
$('#requisition_listing').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
responsive: true, // Responsive table
order: [[0, 'desc']], // Default ordering (column index 0, ascending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
});
</script>

View File

@ -57,7 +57,7 @@
.dataTables_wrapper .dataTables_length { .dataTables_wrapper .dataTables_length {
float: left; float: left;
} }
.dataTables_wrapper .dt-buttons, /* .dataTables_wrapper .dt-buttons,
.dataTables_wrapper .dataTables_filter { .dataTables_wrapper .dataTables_filter {
float: right; float: right;
margin-left: 10px; margin-left: 10px;
@ -65,11 +65,11 @@
.dataTables_wrapper .dt-buttons { .dataTables_wrapper .dt-buttons {
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
} } */
.dataTables_wrapper .dataTables_filter { /* .dataTables_wrapper .dataTables_filter {
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
} } */
</style> </style>
<script> <script>
$(function() { $(function() {
@ -127,29 +127,40 @@ var data = suggestion.DriverMobileNumber;
} }
</style> </style>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/Autocomplete/jquery.autocomplete.js"></script> <script type="text/javascript" src="<?php echo base_url(); ?>public/assets/Autocomplete/jquery.autocomplete.js"></script>
<div class="content-wrapper">
<section class="content"><br/>
<div class="box">
<div class="container-fluid">
<div class="box-header">
<center><b><h3 class="box-title">View Inward Gate Register </h3></b></center>
</div>
<div class="row">
<form class="Date-filter-form" id="DateRangeFilter" >
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i> <div class="content-page">
<div class="error" id="error"></div> <div class="content">
</form> <!-- Start Content-->
<div class="col-md-12"> <div class="container-fluid">
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;"> <!-- start page title -->
<thead style="background-color: #ddd;"> <div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">View Inward Gate Register </h4>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit">Search</button>
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table id="view_inward_gate_register" class="table dt-responsive nowrap w-100">
<thead>
<tr> <tr>
<th>Create Date</th> <th>Create Date</th>
<th>Create time</th> <th>Create time</th>
@ -162,9 +173,9 @@ var data = suggestion.DriverMobileNumber;
<th>IGR Status</th> <th>IGR Status</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php <?php
if(!empty($IGR)) if(!empty($IGR))
{ $index = 0; { $index = 0;
foreach($IGR as $record) foreach($IGR as $record)
@ -212,13 +223,17 @@ var data = suggestion.DriverMobileNumber;
} }
} }
?> ?>
</tbody> </tbody>
</table> </table>
</div> </div> <!-- end card body-->
</div> </div> <!-- end card -->
</div> </div><!-- end col-->
</div> </div>
<!-- box closed here --> </div>
</div> <!-- container -->
</div> <!-- content -->
</div>
<!-- box closed here -->
<!-- Igr modal fade --> <!-- Igr modal fade -->
<div class="modal fade" id="Igrshow" role="dialog"> <div class="modal fade" id="Igrshow" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog">
@ -504,47 +519,47 @@ var data = suggestion.DriverMobileNumber;
<!-- CostCenter modal fade closed--> <!-- CostCenter modal fade closed-->
<!-- File modal --> <!-- File modal -->
<div class="modal fade" id="Fileshow" role="dialog"> <div class="modal fade" id="Fileshow" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog">
<!-- Modal content--> <!-- Modal content-->
<form id="igrfileform"> <form id="igrfileform">
<div class="modal-content" style="width:800px;"> <div class="modal-content" style="width:800px;">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
<center> <center>
<h4>Inward Gate File Details</h4> <h4>Inward Gate File Details</h4>
</center> <!-- IGR number should display here--> </center> <!-- IGR number should display here-->
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<div style="text-align: right; margin:10px;"> <div style="text-align: right; margin:10px;">
<input type="button" class="btn btn-primary" id="addmorebutton" value=" ADD FILES.."> <input type="button" class="btn btn-primary" id="addmorebutton" value=" ADD FILES..">
</div>
<div id="newdiv"></div>
<input type="hidden" name="hidecounter" id="hidecounter" value="0" />
<input type="hidden" name="hidegrandcounter" id="hidegrandcounter" value="0" />
<input type="hidden" name="hiddenIGRNO" id="hiddenIGRNO" />
<input type="hidden" name="hiddenPONO" id="hiddenPONO" />
</div>
<div id="contents"> </div>
<table class="table table-bordered" id="Inwardgateregisterfile" style="background-color:#fff;font-size:12px;">
<thead style="background-color:#ddd;">
<tr>
<th>SNo</th>
<th>BillNO</th>
<th>PONO</th>
<th>FileName</th>
<th>Action</th>
</tr>
</thead>
<tbody id="tblefile">
</tbody>
</table>
<div class="modal-footer">
<a class="btn btn-cancel" data-dismiss="modal" value="close">Close</a>
</div> </div>
<div id="newdiv"></div>
<input type="hidden" name="hidecounter" id="hidecounter" value="0" />
<input type="hidden" name="hidegrandcounter" id="hidegrandcounter" value="0" />
<input type="hidden" name="hiddenIGRNO" id="hiddenIGRNO" />
<input type="hidden" name="hiddenPONO" id="hiddenPONO" />
</div> </div>
<div id="contents"> </div> </form>
<table class="table table-bordered" id="Inwardgateregisterfile" style="background-color:#fff;font-size:12px;"> </div>
<thead style="background-color:#ddd;">
<tr>
<th>SNo</th>
<th>BillNO</th>
<th>PONO</th>
<th>FileName</th>
<th>Action</th>
</tr>
</thead>
<tbody id="tblefile">
</tbody>
</table>
<div class="modal-footer">
<a class="btn btn-cancel" data-dismiss="modal" value="close">Close</a>
</div>
</div>
</form>
</div> </div>
</div>
<!-- File modal fade closed --> <!-- File modal fade closed -->
<!-- Bill modal fade --> <!-- Bill modal fade -->
<div class="modal fade" id="billModel" role="dialog" data-backdrop-limit="1" aria-labelledby="myModalLabel"> <div class="modal fade" id="billModel" role="dialog" data-backdrop-limit="1" aria-labelledby="myModalLabel">
@ -583,10 +598,7 @@ var data = suggestion.DriverMobileNumber;
</div><!-- /.modal content --> </div><!-- /.modal content -->
</div><!-- /.modal dialog --> </div><!-- /.modal dialog -->
</div> </div>
<!-- Bill modal fade closed-->
</section>
</div>
<script> <script>
$("#Igrshow").on("shown.bs.modal", function(e) { $("#Igrshow").on("shown.bs.modal", function(e) {
var inx = $(e.relatedTarget).data('id'); var inx = $(e.relatedTarget).data('id');
@ -647,7 +659,7 @@ var data = suggestion.DriverMobileNumber;
// success:function(data) { // success:function(data) {
$('#content').loader('hide'); $('#content').loader('hide');
var parsedData = JSON.parse(data); var parsedData = JSON.parse(data);
console.log(parsedData); console.log(parsedData);
if (parsedData['details'].length === 0) { if (parsedData['details'].length === 0) {
console.log("No data available"); console.log("No data available");
// Reset all relevant fields and table // Reset all relevant fields and table
@ -1863,4 +1875,24 @@ function removeContact(button) {
$('#day').hide() $('#day').hide()
} }
} }
</script>
$(document).ready(function() {
$('#view_inward_gate_register').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
responsive: true, // Responsive table
order: [[0, 'desc']], // Default ordering (column index 0, ascending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
});
</script>