shiftPumpView.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <table id="example" class="table display table-striped table-bordered table-hover table-sm compact" cellspacing="0" width="100%">
  2. <thead>
  3. <tr>
  4. <th>Pump Number</th>
  5. <th>Fuel Grade</th>
  6. <th>Shift Opening Date</th>
  7. <th>Shift Closing Date</th>
  8. <th>Pump Opening Volume</th>
  9. <th>Pump Closing Volume</th>
  10. <th>Sale Volume (Closing Volume - Opening Volume)</th>
  11. <th>Unit Price</th>
  12. <th>Money (Sale Volume x Unit Price)</th>
  13. </tr>
  14. </thead>
  15. <!-- <tfoot>
  16. <tr>
  17. <th>Pump Number</th>
  18. <th>Fuel Grade</th>
  19. <th>Shift Opening Date</th>
  20. <th>Pump Opening Volume</th>
  21. <th>Shift Closing</th>
  22. <th>Pump Closing Volume</th>
  23. <th>Sale Volume (Closing Volume - Opening Volume)</th>
  24. <th>Unit Price</th>
  25. <th>Money (Sale Volume x Unit Price)</th>
  26. </tr>
  27. </tfoot> -->
  28. </table>
  29. <script type="text/javascript">
  30. $(document).ready(function() {
  31. var table = $('#example').DataTable( {
  32. "processing": true, // for show progress bar
  33. "serverSide": false, // for process server side
  34. "ordering": false,
  35. //"bFilter": false,
  36. //"bInfo": false,
  37. "responsive": true,
  38. "pagingType": "full", // "simple" option for 'Previous' and 'Next' buttons only
  39. "ajax": "api/v1/ShiftPumpReport/shiftPumpData.txt",
  40. "dom": 'lBfrtip',
  41. "lengthMenu": [[ 30, 50, -1], [ 30, 50, "All"]],
  42. // "dom": '<"top"i>rt<"bottom"lp><"clear">',
  43. // "scrollY": "500px",
  44. //"buttons": [
  45. // 'copy',
  46. // 'csv',
  47. // 'excel',
  48. // 'pdf',
  49. // 'print',
  50. // { "extend": 'copy', "text":'PDF',"className": 'btn btn-primary' },
  51. // { "extend": 'csv', "text":'PDF',"className": 'btn btn-primary' },
  52. // { "extend": 'excel', "text":'PDF',"className": 'btn btn-primary' },
  53. // { "extend": 'pdf', "text":'PDF',"className": 'btn btn-primary' },
  54. // { "extend": 'print', "text":'Print',"className": 'btn btn-primary' }
  55. // {
  56. // text: 'My button',
  57. // action: function ( e, dt, node, config ) {
  58. // alert( 'Button activated' );
  59. // }
  60. // },
  61. // {
  62. // extend: 'print',
  63. // text: 'Print all (not just selected)',
  64. // exportOptions: {
  65. // modifier: {
  66. // selected: null
  67. // }
  68. // }
  69. // }
  70. //],
  71. "select": true,
  72. "columns": [
  73. { "data": "Fp_Id" },
  74. { "data": "Grade_Name" },
  75. { "data": "Open_Date"},
  76. { "data": "Close_Date" },
  77. { "data": "Open_Volume" },
  78. { "data": "Close_Volume" },
  79. { "data": "Sale_Total" },
  80. { "data": "Price" },
  81. { "data": "Money_Total" },
  82. ],
  83. "order": [[1, 'asc']],
  84. } );
  85. } );
  86. </script>