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

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