Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

report_compound_index.blade.php 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. @extends('layout.master', ['uid' => $user->_id, 'token' => $user->token_firebase])
  2. @section('page_title', 'Kompaun')
  3. @section('sub_page_title', '')
  4. @section('name', $user->StaffDetail->full_name)
  5. @section('img_profile', $user->StaffDetail->profile_img)
  6. @section('content')
  7. <style type="text/css">
  8. select.form-control, select.form-control:focus, select.form-control:hover {
  9. border: 1px solid #ccc !important;
  10. height: auto !important;
  11. }
  12. .panel-group .panel {
  13. margin-bottom: 0;
  14. overflow: hidden;
  15. border-radius: 4px;
  16. }
  17. .panel-default {
  18. border-color: #ddd;
  19. }
  20. .panel-default>.panel-heading {
  21. color: #333;
  22. background-color: #f5f5f5;
  23. border-color: #ddd;
  24. }
  25. .panel-title {
  26. margin-top: 0;
  27. margin-bottom: 0;
  28. font-size: 16px;
  29. color: inherit;
  30. }
  31. .panel-body .table>thead>tr>th, .panel-body .table>tbody>tr>th, .panel-body .table>tfoot>tr>th, .panel-body .table>thead>tr>td, .panel-body .table>tbody>tr>td, .panel-body .table>tfoot>tr>td {
  32. padding: 8px;
  33. line-height: 1.428571429;
  34. vertical-align: top;
  35. border-top: 1px solid #ddd;
  36. }
  37. .glyphicon { margin-right:10px; }
  38. .panel-body { padding:0px; }
  39. .panel-body table tr td { padding-left: 15px }
  40. .panel-body .table {margin-bottom: 0px; }
  41. th { font-weight: 600; text-align: center}
  42. table.dataTable.nowrap th, table.dataTable.nowrap td {
  43. white-space: pre-line !important;
  44. }
  45. table.nowrap th, table.nowrap td {
  46. white-space: pre-line !important;
  47. }
  48. </style>
  49. <div class="inner-page">
  50. <div class="row">
  51. <div class="col-md-12">
  52. <div class="card">
  53. <div class="card-block">
  54. <!-- <form class="main"> -->
  55. <div class="row clearfix">
  56. <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
  57. <label><input id="checkDate" type="checkbox" />&nbsp;<b>Tarikh</b></label>
  58. </div>
  59. <div class="col-lg-3">
  60. <input type="date" id="start_date" class=" form-control form-control-sm" value="" />
  61. </div>
  62. <span><b>-</b></span>
  63. <div class="col-lg-3">
  64. <input type="date" id="end_date" class="form-control form-control-sm" value="" />
  65. </div>
  66. </div>
  67. <div class="form-group" style="margin-top: 1.25em">
  68. <button type="submit" id="jana" class="btn btn-info btn-sm waves-effect waves-light">Jana Report</button>
  69. </div>
  70. <!-- </form> -->
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <div class="row">
  76. <div class="col-sm-12">
  77. <div class="card">
  78. <div class="card-header">
  79. <h5>Laporan Pengeluaran Kompaun Mengikut Kesalahan</h5>
  80. </div>
  81. <div class="card-block">
  82. <div class="dt-responsive table-responsive">
  83. <table id="report" class="table table-sm table-striped table-bordered nowrap" style="width:100%">
  84. <thead>
  85. <tr>
  86. <th width="20">#</th>
  87. <th>Kesalahan</th>
  88. <th width="80">Jumlah Kompaun Keluar</th>
  89. <th width="80">Amaun Kompaun (RM)</th>
  90. <th width="80">Jumlah Bayar</th>
  91. <th width="80">Amaun Bayar (RM)</th>
  92. <th width="80">Jumlah Kompaun Belum Bayar</th>
  93. <th width="80">Amaun Tungakkan (RM)</th>
  94. <th width="80">Kompaun Batal</th>
  95. <th width="80">Amaun Batal (RM)</th>
  96. <th width="80">Kompaun Kurang</th>
  97. <th width="80">Amaun Kurang (RM)</th>
  98. </tr>
  99. </thead>
  100. <tfoot>
  101. <tr>
  102. <th width="20">#</th>
  103. <th>Kesalahan</th>
  104. <th width="80">Jumlah Kompaun Keluar</th>
  105. <th width="80">Amaun Kompaun (RM)</th>
  106. <th width="80">Jumlah Bayar</th>
  107. <th width="80">Amaun Bayar (RM)</th>
  108. <th width="80">Jumlah Kompaun Belum Bayar</th>
  109. <th width="80">Amaun Tungakkan (RM)</th>
  110. <th width="80">Kompaun Batal</th>
  111. <th width="80">Amaun Batal (RM)</th>
  112. <th width="80">Kompaun Kurang</th>
  113. <th width="80">Amaun Kurang (RM)</th>
  114. </tr>
  115. </tfoot>
  116. </table>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. @endsection
  124. @section('external_js')
  125. <script type="text/javascript">
  126. $.ajaxSetup({
  127. headers: {
  128. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  129. }
  130. });
  131. $(document).ready(function() {
  132. var origin = window.location.origin;
  133. $(".theme-loader").animate({
  134. opacity: "0"
  135. },1000);
  136. setTimeout(function() {
  137. $(".theme-loader").remove();
  138. }, 800);
  139. var checkdate = false;
  140. $('#checkDate').change(function () {
  141. checkdate = !checkdate;
  142. if(checkdate){
  143. $('#start_date').prop('required',true);
  144. }else{
  145. $('#start_date').prop('required',false);
  146. }
  147. });
  148. $('#jana').click(function () {
  149. $('#report').DataTable().clear().destroy();
  150. var url = "";
  151. if($('#start_date').val() == '' && checkdate == false){
  152. url = "{{ url('api/report/compound/list/null/null') }}";
  153. }else if($('#start_date').val() != '' && checkdate == true){
  154. if($('#end_date').val() == ''){
  155. url = "{{ url('api/report/compound/list') }}/"+$('#start_date').val()+"/null";
  156. }else{
  157. url = "{{ url('api/report/compound/list') }}/"+$('#start_date').val()+"/"+$('#end_date').val();
  158. }
  159. }
  160. var table = $('#report').DataTable({
  161. // "lengthMenu": [[50, 100, 200, -1], [50, 100, 200, "All"]],
  162. "pageLength": -1,
  163. "dom": "Bfrtip",
  164. "serverSide": true,
  165. "processing": true,
  166. "ajax": url,
  167. "columns": [
  168. { "data": "DT_RowIndex","name": "DT_RowIndex"},
  169. { "data": "kesalahan","name": "kesalahan"},
  170. { "data": "jumlahK","name": "jumlahK"},
  171. { "data": "amaunK", "name": "amaunK" },
  172. { "data": "jumlahB", "name": "jumlahB" },
  173. { "data": "amaunB", "name": "amaunB" },
  174. { "data": "belumB", "name": "belumB"},
  175. { "data": "amaunT", "name": "amaunT"},
  176. { "data": "kBatal","name": "kBatal"},
  177. { "data": "amaunBatal","name": "amaunBatal"},
  178. { "data": "kompaunKurang","name": "kompaunKurang"},
  179. { "data": "amaunKurang","name": "amaunKurang"},
  180. ],
  181. "language": {
  182. "paginate": {
  183. "previous": "Sebelumnya",
  184. "next": "Seterusnya"
  185. },
  186. "sLengthMenu": "Tunjukkan _MENU_ entri",
  187. "zeroRecords": "Tiada Data Ditemui",
  188. "infoEmpty": "Tiada Rekod Yang Wujud",
  189. "infoFiltered": "(Ditapis daripada _MAX_ jumlah rekod)",
  190. "info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri",
  191. "sSearch": "Cari:",
  192. },
  193. "buttons": [{
  194. "extend": "collection",
  195. "text": "Eksport",
  196. "buttons": [
  197. "copy",
  198. 'excel',
  199. 'csv',
  200. 'pdf',
  201. 'print'
  202. ]
  203. }]
  204. });
  205. });
  206. });
  207. </script>
  208. @endsection