JezK
Edit File: asn.php
<?php include("app/checkSession.php"); include("app/adminObj.php"); if(!isset($_SESSION['user_id'])){ $customerObj->redirect('login.php'); } include("header.php"); ?> <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</h6> </div> <div class="col-md-4"> </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 "> <?php echo $customerObj->flashMessage();?> <div class="table-responsive p-md-4 p-0"> <table id="example" class="display bg-white tbl-border table-borderless" style="width:100%"> <thead> <tr> <th>ASN Number</th> <th>Item Code</th> <th>Item Description</th> <th>Item Quality</th> <th>Shiptment Date</th> <th>Shiptment Time</th> <th>Shiptment From Address</th> <th>Pallet No</th> <th>Total Cost</th> </tr> </thead> <tbody> <?php $asns = $customerObj->db->get_results("SELECT a.asn_id, m.* FROM uflexit_asn_request a LEFT JOIN uflexit_mini_goods_track m ON m.quotation_id=a.quotation_id WHERE a.user_id=".(int)$_SESSION['user_id']); foreach ($asns as $asn) { ?> <tr> <td><?php echo $asn['asn_id'];?></td> <td><?php echo $asn['item_code'];?></td> <td><?php echo $asn['item_description'];?></td> <td><?php echo $asn['item_quantity'];?></td> <td><?php echo date("d/m/Y",strtotime($asn['created_date']));?></td> <td><?php echo date("h:i A",strtotime($asn['created_date']));?></td> <td></td> <td><?php echo $asn['pallet_space_num'];?></td> <td><?php echo $asn['price'];?></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-upload"></i><span class="pl-2">EXPORT.CSV</span></button> </div> </div> </div> </div> <!-- footer --> <?php include("footer.php"); ?> <script> jQuery(document).ready(function() { jQuery('#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": "ASN Number" }, { "data": "Item Code" }, { "data": "Item Description" }, { "data": "Item Quality" }, { "data": "Shiptment Date" }, { "data": "Shiptment Time" }, { "data": "Shiptment From Address" }, { "data": "Pallet No" }, { "data": "Total Cost" } ] } ); } ); </script>