print-upt-bulan-tahun-paid.blade.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <!DOCTYPE html>
  2. <?php
  3. $getStatus = \App\Model\Privillage\Role::where('id',Auth::user()->role_id)->value('akses');
  4. if($getStatus == 'administrator'){
  5. $listUpt = \App\Model\Setting\UPT::select('office_id','office_name','province_name')->distinct()->get();
  6. }else{
  7. $listUpt = \App\Model\Setting\UPT::where('office_id', Auth::user()->upt)->select('office_id','office_name','province_name')->distinct()->get();
  8. }
  9. ?>
  10. <html>
  11. <head>
  12. <style>
  13. .table-bordered {
  14. border-collapse: collapse;
  15. width: 100%;
  16. }
  17. .table-bordered td, .table-bordered th {
  18. border: 1px solid black;
  19. padding: 8px;
  20. }
  21. .thead-light{
  22. background-color: #E9ECEF;
  23. }
  24. .table-bordered th {
  25. padding-top: 12px;
  26. padding-bottom: 12px;
  27. text-align: left;
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <center>
  33. <div>
  34. <hr>
  35. <h2 class="font-weight-bolder">REKAP PENGIRIMAN LAPORAN @if($jenis_st == 'First Reminder') ST-1 @elseif($jenis_st == 'Second Reminder') ST-2 @elseif($jenis_st == 'Third Reminder') ST-3 @elseif($jenis_st == 'Last Reminder') STT @endif</h2>
  36. <hr>
  37. <table id="example" class="table table-dark table-striped align-items-center table-flush data-table">
  38. <thead class="thead-light">
  39. <tr>
  40. <th scope="col">UPT</th>
  41. <th scope="col">Jan</th>
  42. <th scope="col">Feb</th>
  43. <th scope="col">Mar</th>
  44. <th scope="col">Apr</th>
  45. <th scope="col">Mei</th>
  46. <th scope="col">Jun</th>
  47. <th scope="col">Jul</th>
  48. <th scope="col">Aug</th>
  49. <th scope="col">Sep</th>
  50. <th scope="col">Okt</th>
  51. <th scope="col">Nov</th>
  52. <th scope="col">Des</th>
  53. </tr>
  54. </thead>
  55. <tbody>
  56. <tr>
  57. <th scope="row">
  58. {{$getUptName}}
  59. </th>
  60. <?php
  61. $fixYear = $year - 1;
  62. $januari = \App\Model\SPP\RincianTagihan::whereMonth('bi_create_date',12)->whereYear('bi_create_date',$fixYear)->where('upt', $getUptName)->where('status_izin','Perpanjangan')->where('bi_type',$bi_type)->where('active',1)->count();
  63. $februari = \App\Model\SPP\RincianTagihan::whereMonth('bi_create_date',1)->whereYear('bi_create_date',$year)->where('upt', $getUptName)->where('status_izin','Perpanjangan')->where('bi_type',$bi_type)->where('active',1)->count();
  64. $maret = \App\Model\SPP\RincianTagihan::whereMonth('bi_create_date',2)->whereYear('bi_create_date',$year)->where('upt', $getUptName)->where('status_izin','Perpanjangan')->where('bi_type',$bi_type)->where('active',1)->count();
  65. $april = \App\Model\SPP\RincianTagihan::whereMonth('bi_create_date',3)->whereYear('bi_create_date',$year)->where('upt', $getUptName)->where('status_izin','Perpanjangan')->where('bi_type',$bi_type)->where('active',1)->count();
  66. $mei = \App\Model\SPP\RincianTagihan::whereMonth('bi_create_date',4)->whereYear('bi_create_date',$year)->where('upt', $getUptName)->where('status_izin','Perpanjangan')->where('bi_type',$bi_type)->where('active',1)->count();
  67. $juni = \App\Model\SPP\RincianTagihan::whereMonth('bi_create_date',5)->whereYear('bi_create_date',$year)->where('upt', $getUptName)->where('status_izin','Perpanjangan')->where('bi_type',$bi_type)->where('active',1)->count();
  68. $juli = \App\Model\SPP\RincianTagihan::whereMonth('bi_create_date',6)->whereYear('bi_create_date',$year)->where('upt', $getUptName)->where('status_izin','Perpanjangan')->where('bi_type',$bi_type)->where('active',1)->count();
  69. $agustus = \App\Model\SPP\RincianTagihan::whereMonth('bi_create_date',7)->whereYear('bi_create_date',$year)->where('upt', $getUptName)->where('status_izin','Perpanjangan')->where('bi_type',$bi_type)->where('active',1)->count();
  70. $september = \App\Model\SPP\RincianTagihan::whereMonth('bi_create_date',8)->whereYear('bi_create_date',$year)->where('upt', $getUptName)->where('status_izin','Perpanjangan')->where('bi_type',$bi_type)->where('active',1)->count();
  71. $oktober = \App\Model\SPP\RincianTagihan::whereMonth('bi_create_date',9)->whereYear('bi_create_date',$year)->where('upt', $getUptName)->where('status_izin','Perpanjangan')->where('bi_type',$bi_type)->where('active',1)->count();
  72. $november = \App\Model\SPP\RincianTagihan::whereMonth('bi_create_date',10)->whereYear('bi_create_date',$year)->where('upt', $getUptName)->where('status_izin','Perpanjangan')->where('bi_type',$bi_type)->where('active',1)->count();
  73. $desember = \App\Model\SPP\RincianTagihan::whereMonth('bi_create_date',11)->whereYear('bi_create_date',$year)->where('upt', $getUptName)->where('status_izin','Perpanjangan')->where('bi_type',$bi_type)->where('active',1)->count();
  74. ?>
  75. <td>
  76. @if($januari != 0)
  77. <a class="btn btn-success btn-sm text-white">YA</a>
  78. @else
  79. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  80. @endif
  81. </td>
  82. <td>
  83. @if($februari != 0)
  84. <a class="btn btn-success btn-sm text-white">YA</a>
  85. @else
  86. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  87. @endif
  88. </td>
  89. <td>
  90. @if($maret != 0)
  91. <a class="btn btn-success btn-sm text-white">YA</a>
  92. @else
  93. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  94. @endif
  95. </td>
  96. <td>
  97. @if($april != 0)
  98. <a class="btn btn-success btn-sm text-white">YA</a>
  99. @else
  100. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  101. @endif
  102. </td>
  103. <td>
  104. @if($mei != 0)
  105. <a class="btn btn-success btn-sm text-white">YA</a>
  106. @else
  107. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  108. @endif
  109. </td>
  110. <td>
  111. @if($juni != 0)
  112. <a class="btn btn-success btn-sm text-white">YA</a>
  113. @else
  114. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  115. @endif
  116. </td>
  117. <td>
  118. @if($juli != 0)
  119. <a class="btn btn-success btn-sm text-white">YA</a>
  120. @else
  121. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  122. @endif
  123. </td>
  124. <td>
  125. @if($agustus != 0)
  126. <a class="btn btn-success btn-sm text-white">YA</a>
  127. @else
  128. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  129. @endif
  130. </td>
  131. <td>
  132. @if($september != 0)
  133. <a class="btn btn-success btn-sm text-white">YA</a>
  134. @else
  135. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  136. @endif
  137. </td>
  138. <td>
  139. @if($oktober != 0)
  140. <a class="btn btn-success btn-sm text-white">YA</a>
  141. @else
  142. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  143. @endif
  144. </td>
  145. <td>
  146. @if($november != 0)
  147. <a class="btn btn-success btn-sm text-white">YA</a>
  148. @else
  149. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  150. @endif
  151. </td>
  152. <td>
  153. @if($desember != 0)
  154. <a class="btn btn-success btn-sm text-white">YA</a>
  155. @else
  156. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  157. @endif
  158. </td>
  159. </tr>
  160. </tbody>
  161. </table>
  162. <hr>
  163. </div>
  164. </center>
  165. </body>
  166. </html>