JezK
Edit File: asnlist.php
<?php include("app/checkSession.php"); include("app/adminObj.php"); if(!isset($_SESSION['user_id'])){ $customerObj->redirect('login.php'); } //$quote_list=$customerObj->QuoteList(); /*if (isset($_POST['btn_submit'])) { $customerObj->db->query("UPDATE uflexit_request_quote SET expected_rate='".$_POST['expected_rate']."', whadmin_description='".$_POST['whadmin_description']."' WHERE quotation_id=".$_POST['quotation_id']); $customerObj->db->query("INSERT INTO uflexit_request_quote_track (quotation_id,admin_id,change_datetime,expected_rate,quotation_status,closed_status,whadmin_description,customer_description,whadmin_id) VALUES(".$_POST['quotation_id'].",".$_SESSION['user_id'].",'".date("Y-m-d H:i:s")."',".$_POST['expected_rate'].",".$_POST['quotation_status'].",1,'".$_POST['whadmin_description']."','',".$_SESSION['user_id'].")"); $customerObj->setFlashMessage('Status updated successfully!','success'); $customerObj->redirect('quotelist.php'); }*/ include("header.php"); $query="SELECT * FROM uflexit_asn_request WHERE quotation_id=".(int)$_REQUEST['q_id']." ORDER BY asn_id DESC"; $asn_list=$customerObj->db->get_results($query); ?> <link href="css/simplePagination.css" type="text/css" rel="stylesheet"/> <div class="container first-position"> <div class="container mt-3 position-2"> <div class="row px-md-4 px-0 "> <div class="tophead col-md-4"> <h6>ASN List</h6> </div> <div class="col-md-4"> <a href='cnewasn.php?q_id=<?php echo $_REQUEST['q_id']; ?>' title="ASN">Create ASN</a> </div> <div class="col-md-4"> <!-- <div class="input-group search-button mb-2" style="margin-right:10px;"> <input class="form-control border-right-0 border align-self-right border-rad-left" type="text" value="" id="myInput"> <span class="input-group-append"> <button class="btn btn-outline-secondary border-left-0 border border-rad-right" type="button"> <i class="fa fa-search"></i> </button> </span> </div> --> </div> </div> </div> <div class="container "> <div class="table-responsive p-md-4 p-0"> <?php echo $customerObj->flashMessage();?> <table id="example" class="table table-borderless dataTable bg-white tbl-border" style="width:100%"> <thead> <tr> <th>Warehouse Name</th> <th>Warehouse ID</th> <th>Quotation ID</th> <th>Request Type</th> <th>Customer Name</th> <th>Customer Type</th> <th>Price</th> <th>Date</th> <th>Created By</th> <th>Action</th> </tr> </thead> <tbody> <?php if($asn_list){ foreach ($asn_list as $alist) { $wrow = $customerObj->db->get_row("SELECT * FROM uflexit_master_warehouse WHERE warehouse_id=".(int)$alist['warehouse_id']); $urow = $customerObj->db->get_row("SELECT * FROM uflexit_users WHERE user_id=".(int)$alist['user_id']); $crow = $customerObj->db->get_row("SELECT * FROM uflexit_users WHERE user_id=".(int)$alist['created_by']); ?> <tr> <td><?php echo $wrow['warehouse_name'];?></td> <td><?php echo $alist['warehouse_id'];?></td> <td><?php echo $alist['quotation_id'];?></td> <td><?php echo $alist['request_type'];?></td> <td><?php echo $urow['first_name'];?> <?php echo $urow['last_name'];?></td> <td><?php echo $urow['role_id']==3?'Individual':'Business';?></td> <td><?php echo $alist['price'];?></td> <td><?php echo $alist['date'];?></td> <td><?php echo $crow['first_name'];?> <?php echo $crow['last_name'];?></td> <td><?php echo $alist['modify_dt'];?></td> <td> <a href='viewasn.php?asn_id=<?php echo $alist['asn_id']; ?>' title="ASN">View </a> </td> </tr> <?php } } ?> </tbody> </table> </div> </div> <div class="container position-relative"> <div class="row export_csv"> <div class="col-md-3 offset-md-9 "> <button id="export" class="btn btn-primary"><i class="fa fa-download"></i><span class="pl-2">EXPORT.CSV</span></button> </div> </div> </div> </div> <!-- footer --> <?php include("footer.php"); ?> <script> let $ =jQuery; $(document).ready(function() { $('#example').DataTable( { language: { search: "" }, "processing": true, "dataSrc": "", "sDom": 'Rfrtlip', // "sDom": 'Rlfrtlip', // "serverSide": true, // dom: 'Bfrtip', // buttons: [ // { // extend: 'csvHtml5', // text: '<i class="fa fa-file-text-o"></i>Export to csv', // titleAttr: 'CSV' // }, // ], "columns": [ { "data": "Warehouse Name" }, { "data": "Warehouse ID" }, { "data": "Quotation ID" }, { "data": "Request Type" }, { "data": "Customer Name" }, { "data": "Customer Type" }, { "data": "Price" }, { "data": "Date" }, { "data": "Created By" } ] } ); } ); </script>