shiftSaleView.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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>Shift Closing Date</th>
  8. <th>Unit Price</th>
  9. <th>Volume</th>
  10. <th>Amount</th>
  11. </tr>
  12. </thead>
  13. <!-- <tfoot>
  14. <tr>
  15. <th>Pump Number</th>
  16. <th>Fuel Grade</th>
  17. <th>Shift Opening Date</th>
  18. <th>Shift Closing Date</th>
  19. <th>Unit Price</th>
  20. <th>Volume
  21. <th>Amount</th>
  22. </tr>
  23. </tfoot> -->
  24. </table>
  25. <script type="text/javascript">
  26. $(document).ready(function() {
  27. var table = $('#example').DataTable( {
  28. "ajax": "api/v1/ShiftSaleReport/shiftSaleData.txt",
  29. "dom": 'lBfrtip',
  30. "buttons": [
  31. 'copy',
  32. 'csv',
  33. 'excel',
  34. 'pdf',
  35. 'print',
  36. // {
  37. // extend: 'print',
  38. // text: 'Print all (not just selected)',
  39. // exportOptions: {
  40. // modifier: {
  41. // selected: null
  42. // }
  43. // }
  44. // }
  45. ],
  46. "select": true,
  47. "columns": [
  48. { "data": "Fp_Id" },
  49. { "data": "Grade_Name" },
  50. { "data": "Close_Date" },
  51. { "data": "Open_Date"},
  52. { "data": "Price" },
  53. { "data": "Volume" },
  54. { "data": "Amount" },
  55. ],
  56. "order": [[1, 'asc']],
  57. } );
  58. } );
  59. </script>