shiftPumpView.php 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. //"bFilter": false,
  35. //"bInfo": false,
  36. "responsive": true,
  37. "pagingType": "full", // "simple" option for 'Previous' and 'Next' buttons only
  38. "ajax": "api/v1/ShiftPumpReport/shiftPumpData.txt",
  39. "dom": 'Bfrtip',
  40. // "dom": '<"top"i>rt<"bottom"lp><"clear">',
  41. // "scrollY": "500px",
  42. "buttons": [
  43. // 'copy',
  44. // 'csv',
  45. // 'excel',
  46. // 'pdf',
  47. // 'print',
  48. // { "extend": 'copy', "text":'PDF',"className": 'btn btn-primary' },
  49. // { "extend": 'csv', "text":'PDF',"className": 'btn btn-primary' },
  50. // { "extend": 'excel', "text":'PDF',"className": 'btn btn-primary' },
  51. // { "extend": 'pdf', "text":'PDF',"className": 'btn btn-primary' },
  52. { "extend": 'print', "text":'Print',"className": 'btn btn-primary' }
  53. // {
  54. // text: 'My button',
  55. // action: function ( e, dt, node, config ) {
  56. // alert( 'Button activated' );
  57. // }
  58. // },
  59. // {
  60. // extend: 'print',
  61. // text: 'Print all (not just selected)',
  62. // exportOptions: {
  63. // modifier: {
  64. // selected: null
  65. // }
  66. // }
  67. // }
  68. ],
  69. "select": true,
  70. "columns": [
  71. { "data": "Fp_Id" },
  72. { "data": "Grade_Name" },
  73. { "data": "Open_Date"},
  74. { "data": "Close_Date" },
  75. { "data": "Open_Volume" },
  76. { "data": "Close_Volume" },
  77. { "data": "Sale_Total" },
  78. { "data": "Price" },
  79. { "data": "Money_Total" },
  80. ],
  81. "order": [[1, 'asc']],
  82. } );
  83. } );
  84. </script>