JezK
Edit File: asn.php
<?php include("app/checkSession.php"); include("header.php"); // include("app/adminObj.php"); if(!isset($_SESSION['customer_user_id'])){ $customerObj->redirect('login.php'); } // $query="SELECT count(*) FROM uflexit_asn_request WHERE user_id=".(int)$_SESSION['user_id']." ORDER BY asn_id DESC"; // $asn_list=$customerObj->db->get_results($query); // print_r($asn_list); ?> <style> .add_user_btn { border: 0px; padding: 4px 11px; background: #2f63c8; border-radius: 5px; box-shadow: 0px 0px 4px; cursor: pointer; font-size: 14px; font-weight: bold; } table.dataTable thead th, table.dataTable tbody td{ text-align:center; } /* .currency tbody td:nth-child(4){ max-width: 100% !important; display: grid !important; grid-template-columns: 40% 20% !important; padding-left: 20% !important; } */ /* .priceValue { overflow: hidden !important; text-overflow: ellipsis !important; } */ </style> <div class="container px-md-5 px-0"> <div class="row px-md-4 px-0 justify-content-end"> <!-- <a href="newasn.php"> <img src="images/Customer_croppings/add.png"> <span class="addusertext pl-2">New ASN</span> </a> --> </div> </div> <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><?php echo $lang['ASN'];?></h6> </div> <div class="col-md-4"> </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=" p-md-4 p-0 myquotation-table table-responsive"> <table id="example" class=" table display bg-white tbl-border dataTable table-borderless currency asnTable" style="width:100%"> <thead> <tr> <th><?php echo $lang['WAREHOUSE_ID'];?></th> <th><?php echo $lang['REQUEST_TYPE'];?></th> <th><?php echo $lang['QUOTATION_ID'];?></th> <th><?php echo $lang['QUOTATION_VALUE'];?></th> <th><?php echo $lang['CURRENCY']; ?></th> <th><?php echo $lang['ACTION'];?></th> <!-- <th>Shiptment Time</th> --> <!-- <th>Shiptment From Address</th> --> <!-- <th>Pallet No</th> <th>Total Cost</th> --> </tr> </thead> <tbody> </tbody> </table> </div> </div> <div class="container position-relative"> <div class="row export_csv"> <div class="col-md-3 offset-md-11 button-alignment"> <a id="export" href="export_asn_list.php" class="btn btn-primary"><i class="fa fa-download"></i><span class="pl-2"><?php echo $lang['EXPORT_XLSX'];?></span></a> </div> </div> </div> </div> <!-- footer --> <?php include("footer.php"); ?> <script> let $ =jQuery; $(document).ready(function() { jQuery('#example').DataTable( { "processing": true, "dataSrc": "", "dom": 'Bfrtip', "dom": 'Rlfrtlip', language: { search: '', searchPlaceholder: "<?php echo $lang['SEARCH'] ?>", paginate: {previous:'<?php echo $lang['PREV'];?>',next:'<?php echo $lang['NEXT'];?>'}}, "pagingType": "full_numbers", "bProcessing": true, "bServerSide": true, "sAjaxSource": "app/asnList-ajax.php", "ordering": false, "fnDrawCallback": function( oSettings ) { rowCount=oSettings.json.iTotalRecords; if(rowCount<1){ $("#export").addClass("d-none") } }, "aoColumns": [{ mData: 'warehouse_id' } , { mData: 'request_type' } , { mData: 'quotation_id' }, // { // mData: 'country_name' // }, { mData: 'price' }, { mData: 'currency' }, { mData: 'action' } ] } ); $("#example_filter").before("<div class='col-md-9 text-md-right mt-2 mt-md-0 position-2'><a href='newasn.php'><button class='add_user_btn'><img src='images/add-white.png'></i><span class='addusertext pl-2 text-white'><?php echo $lang['ADD_ASN'] ?></span></button> </a></div>"); } ); </script> <script src="https://code.jquery.com/jquery-3.5.1.js" type="text/javascript"></script> <script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js" type="text/javascript"></script> <script src="https://cdn.datatables.net/buttons/1.6.5/js/dataTables.buttons.min.js" type="text/javascript"></script> <script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.flash.min.js" type="text/javascript"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js" type="text/javascript"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js" type="text/javascript"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js" type="text/javascript"></script> <script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.html5.min.js" type="text/javascript"></script> <script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.print.min.js" type="text/javascript"></script> <style> button.dt-button.buttons-csv.buttons-html5 { border-radius: 7px !important; background-color: #3663c8 !important; border-color: #3663c8 !important; color: white !important; text-transform: uppercase; font-weight: bold; } .position-2{ top:0px;} </style> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.22/css/jquery.dataTables.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.6.5/css/buttons.dataTables.min.css">