shiftPumpView.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <table id="example" class="table display table-striped table-bordered table-hover table-sm" 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>Pump Opening Volume</th>
  8. <th>Shift Closing</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. "ajax": "api/v1/ShiftPumpReport/shiftPumpData.txt",
  33. "dom": 'Bfrtip',
  34. "buttons": [
  35. 'copy',
  36. 'csv',
  37. 'excel',
  38. 'pdf',
  39. 'print',
  40. // {
  41. // extend: 'print',
  42. // text: 'Print all (not just selected)',
  43. // exportOptions: {
  44. // modifier: {
  45. // selected: null
  46. // }
  47. // }
  48. // }
  49. ],
  50. "select": true,
  51. "columns": [
  52. { "data": "Fp_Id" },
  53. { "data": "Grade_Name" },
  54. { "data": "Open_Date"},
  55. { "data": "Open_Volume" },
  56. { "data": "Close_Date" },
  57. { "data": "Close_Volume" },
  58. { "data": "Sale_Total" },
  59. { "data": "Price" },
  60. { "data": "Money_Total" },
  61. ],
  62. "order": [[1, 'asc']],
  63. } );
  64. } );
  65. </script>