JezK
Edit File: materialtransactionhome.php
<?php include("./app/checkSession.php"); if(empty($_SESSION['admin_name'])&&$_SESSION['admin_name']==""){ echo "<script>window.location.href='index.php'</script>"; } include("header.php"); ?> <style> html { overflow-x: hidden } @media(max-width:767px){ .resArrow { margin-top: 38px; } table.dataTable tbody td { overflow: unset; } /* #example_filter label:after{ right:48px; } */ } </style> <div class="container pl-5 ml-1 resArrow"> <a href="javascript:history.back(1)"><img src="images/back_main.png" class=" mb-4"></a> </div> <div id="invoices_table" class="container first-position myquotation-table"> <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['MATERIAL_TRANSACTIONS']?></h6> </div> <!-- <div class="col-md-6"> <div class="row position-relative z-in"> <div class="col-md-1"> <label class="mt-1 from_to_label mb-0" >From</label> </div> <div class="col-md-4"> <div class="cal_img_div"> <label for="startDate" class="mb-0" > <img class="cal_img" src="images/calendar.png"> </label> </div> <input class="form-control" value="" id="startDate" style="padding-left:35px" placeholder="Select Date"> </div> <div class="col-md-1"> <label class="mt-1 from_to_label" >To</label> </div> <div class="col-md-4"> <div class="cal_img_div"> <label for="endDate" class="mb-0" > <img class="cal_img" src="images/calendar.png"> </label> </div> <input class="form-control" value="" id="endDate" style="padding-left:35px" placeholder="Select Date"> </div> </div> </div> --> </div> </div> <div class="container "> <div class="table-responsive p-md-4 p-0 myquotation-table"> <table id="example" class="display bg-white tbl-border table-borderless materialTransactionTable" style="width:100%"> <thead> <tr> <th><?php echo $lang['SNO'];?></th> <th><?php echo $lang['WAREHOUSE_NUMBER']; ?></th> <th><?php echo $lang['WAREHOUSE_NAME']; ?></th> <th><?php echo $lang['ACTION']?></th> </tr> </thead> <tbody> </tbody> </table> </div> </div> <div class="container position-relative"> <div class="row export_csv buttonAlignment"> <div class="col-md-3 pl-2"> <a href="export-materialTransactionWarehouse.php" id="export1" class="btn btn-primary text-white"><i class="fa fa-download"></i><span class="pl-0"> <?php echo $lang['EXPORT.XLSX'];?></span></a> </div> </div> </div> </div> <!-- footer --> <?php include("footer.php"); ?> <!-- <script src="js/jquery.min.js"></script> --> <!-- <script src="js/jquery.pagination.min.js"></script> --> <!----> <script> $(function() { $("#startDate").keypress(function(e) { return false; }); $("#endDate").keydown(function(e) { return false; }); $('#startDate, #endDate').datetimepicker({ format: "DD-MM-YYYY" }); }); jQuery(document).ready(function() { // alert('hello') jQuery('#example').DataTable({ "processing": true, "dataSrc": "", "dom": 'Bfrtip', "dom": 'frtlip', "buttons": [{ "extend": 'csvHtml5', "text": '<i class="fa fa-download p-1"></i>Export to csv', "titleAttr": 'CSV', "action": function(e, dt, node, config) { window.location.href = './export-warehouses.php?ExportToCSV=Yes'; } }, ], // "sDom": 'Bfrtip', 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, "fnDrawCallback": function( oSettings ) { rowCount=oSettings.json.iTotalRecords; if(rowCount<1){ $("#export1").addClass("d-none") } }, "sAjaxSource": "app/activematerial-ajax.php", // "ordering": false, "buttons": [{ "extend": 'csvHtml5', "text": '<i class="fa fa-download p-1"></i>Export to csv', "titleAttr": 'CSV', "action": function(e, dt, node, config) { window.location.href = './export-warehouses.php?ExportToCSV=Yes'; } }, ], "aoColumns": [{ mData: 'id' }, { mData: 'warehouse_number' }, { mData: 'warehouse_name' }, { mData: 'action' } ] }); }); </script>