shiftTankView.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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>Tank Number</th>
  5. <th>Product</th>
  6. <th>Shift Opening Date</th>
  7. <th>Shift Closing Date</th>
  8. <th>Tank Opening Volume
  9. (Liters)</th>
  10. <th>Tank Closing Volume
  11. (Liters)</th>
  12. <th>Tank Water Opening Volume
  13. (Liters)</th>
  14. <th>Tank Water Closing Volume
  15. (Liters)</th>
  16. <th>Tank Opening Level
  17. (mm)</th>
  18. <th>Tank Closing Level
  19. (mm)</th>
  20. </tr>
  21. </thead>
  22. <!-- <tfoot>
  23. <tr>
  24. <th>Pump Number</th>
  25. <th>Fuel Grade</th>
  26. <th>Shift Opening Date</th>
  27. <th>Shift Closing Date</th>
  28. <th>Unit Price</th>
  29. <th>Volume
  30. <th>Amount</th>
  31. </tr>
  32. </tfoot> -->
  33. </table>
  34. <script type="text/javascript">
  35. $(document).ready(function() {
  36. var table = $('#example').DataTable( {
  37. "ajax": "api/v1/ShiftTankReport/shiftTankData.txt",
  38. "dom": 'Bfrtip',
  39. "buttons": [
  40. 'copy',
  41. 'csv',
  42. 'excel',
  43. 'pdf',
  44. 'print',
  45. // {
  46. // extend: 'print',
  47. // text: 'Print all (not just selected)',
  48. // exportOptions: {
  49. // modifier: {
  50. // selected: null
  51. // }
  52. // }
  53. // }
  54. ],
  55. "select": true,
  56. "columns": [
  57. { "data": "Tank_Id" },
  58. { "data": "Product_Text" },
  59. { "data": "Close_Date" },
  60. { "data": "Open_Date"},
  61. { "data": "Open_Vol" },
  62. { "data": "Close_Vol" },
  63. { "data": "Open_Water_Vol" },
  64. { "data": "Close_Water_Vol" },
  65. { "data": "Close_Level" },
  66. { "data": "Close_Level" },
  67. ],
  68. "order": [[1, 'asc']],
  69. } );
  70. } );
  71. </script>