print-upt-tahun-paid.blade.php 11 KB

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