seluruh-upt-bulan-tahun.blade.php 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. @include('templates.SPP.RT.export.preview-search')
  2. @include('templates.SPP.RT.export.export-search')
  3. @include('templates.SPP.RT.export.print-search')
  4. @include('templates.SPP.RT.dev.data')
  5. <style>
  6. #example_filter {width: 990px !important;}
  7. .dataTables_length{width: 560px !important;}
  8. </style>
  9. @if($getStatus == 'administrator')
  10. <?php
  11. $listUpt = \App\Model\Setting\UPT::select('office_id','office_name','province_name')->distinct('office_name')->get();
  12. if($month == 1){
  13. $fixMonth = 12;
  14. $fixYear = $year - 1;
  15. } else{
  16. $fixMonth = $month - 1;
  17. $fixYear = $year;
  18. }
  19. ?>
  20. <div class="col text-left" style="margin-top: 10px;margin-bottom: -20px;">
  21. <a class="btn btn-sm btn-success" style="color: white;" id="getPreview" data-toggle="modal" data-target="#previewModal" data-status-pembayaran="paid" data-bi-type="8"><i class="ni ni-single-copy-04"></i>&nbsp;PRINT</a>
  22. <a class="btn btn-sm btn-info" style="color: white;" id="getPrint" data-toggle="modal" data-target="#printModal" data-status-pembayaran="paid" data-bi-type="8"><i class="ni ni-single-copy-04"></i>&nbsp;DOWNLOAD AS PDF</a>
  23. <a class="btn btn-sm btn-danger" style="color: white;" id="getDownload" data-toggle="modal" data-target="#downloadModal" data-status-pembayaran="paid" data-bi-type="8"><i class="ni ni-cloud-download-95"></i>&nbsp;DOWNLOAD AS XLS</a>
  24. </div>
  25. <div class="col-xl-12 mt-5">
  26. <div class="card shadow">
  27. <div class="card-header border-0" style="background-color: #5f5f5f;">
  28. <div class="row align-items-center">
  29. <div class="col">
  30. <h3 class="mb-0" style="color: #fff;">REKAP PENGIRIMAN LAPORAN</h3>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="table-responsive">
  35. <div class="">
  36. <table id="example" class="table table-dark table-striped align-items-center table-flush data-table">
  37. <thead class="thead-light">
  38. <tr>
  39. <th scope="col">UPT</th>
  40. <th scope="col">Pengiriman Laporan</th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. @foreach($listUpt as $key => $value)
  45. <tr>
  46. <td scope="row">
  47. {{$value->office_name}}
  48. </td>
  49. <?php
  50. $checkingPengiriman = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$fixMonth)->whereYear('bi_begin',$fixYear)->where('upt',$value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count();
  51. $nihil = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$fixMonth)->whereYear('bi_begin',$fixYear)->where('upt',$value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('status','not paid')->count();
  52. ?>
  53. <td>
  54. @if($checkingPengiriman != 0)
  55. <a class="btn btn-success btn-sm text-white">YA</a>
  56. @elseif($nihil == 0)
  57. <a class="btn btn-success btn-sm text-white">NIHIL</a>
  58. @else
  59. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  60. @endif
  61. </td>
  62. </tr>
  63. @endforeach
  64. </tbody>
  65. </table>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. @endif
  71. <br>
  72. @if($getStatus == 'administrator')
  73. <div class="col text-left" style="margin-top: 10px;margin-bottom: -20px;">
  74. <a class="btn btn-sm btn-success" style="color: white;" id="getPreview" data-toggle="modal" data-target="#previewModal" data-status-pembayaran="not_paid" data-bi-type="0"><i class="ni ni-single-copy-04"></i>&nbsp;PRINT</a>
  75. <a class="btn btn-sm btn-info" style="color: white;" id="getPrint" data-toggle="modal" data-target="#printModal" data-status-pembayaran="not_paid" data-bi-type="0"><i class="ni ni-single-copy-04"></i>&nbsp;DOWNLOAD AS PDF</a>
  76. <a class="btn btn-sm btn-danger" style="color: white;" id="getDownload" data-toggle="modal" data-target="#downloadModal" data-status-pembayaran="not_paid" data-bi-type="0"><i class="ni ni-cloud-download-95"></i>&nbsp;DOWNLOAD AS XLS</a>
  77. </div>
  78. <div class="col-xl-12 mt-5">
  79. <div class="card shadow">
  80. <div class="card-header border-0">
  81. <div class="row align-items-center">
  82. <div class="col">
  83. <h3 class="mb-0" style="color: #ffff;">REKAPITULASI DAN PERSENTASE AKSI PENCEGAHAN PIUTANG</h3>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="table-responsive">
  88. <table id="example" class="table table-dark table-striped align-items-center table-flush data-table">
  89. <thead class="thead-light">
  90. <tr>
  91. <th class="tg-0pky" colspan="3"></th>
  92. <th class="tg-0lax" colspan="4" style="background-color: #63a53a; color: #fff; text-align: center;">RT BELUM TERBAYAR (H-30 s.d H)</th>
  93. <th class="tg-0lax" colspan="3" style="background-color: #ff1228; color: #fff;">RT TIDAK TERBAYAR (MENJADI REMINDER)</th>
  94. </tr>
  95. <tr>
  96. <td class="tg-0lax">UPT</td>
  97. <td class="tg-0lax">TOTAL RT TERBIT</td>
  98. <td class="tg-0lax">RT TERBAYAR</td>
  99. <td class="tg-0lax">% RT TERBAYAR</td>
  100. <td class="tg-0lax">JUMLAH RT YANG AKAN DI TL</td>
  101. <td class="tg-0lax">SUDAH DI-TL UPT</td>
  102. <td class="tg-0lax">BELUM DI-TL UPT</td>
  103. <td class="tg-0lax">% RT YANG DI TL</td>
  104. <td class="tg-0lax">Tanggal Upload</td>
  105. </tr>
  106. </thead>
  107. @foreach($listUpt as $key => $value)
  108. <tr>
  109. <td class="tg-0lax">{{$value->office_name}}</td>
  110. <?php
  111. $paid_rts = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$fixMonth)->whereYear('bi_begin',$fixYear)->where('status','paid')->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('upt',$value->office_name)->count();
  112. $nopaid_rts = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$fixMonth)->whereYear('bi_begin',$fixYear)->where('status','not paid')->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('upt',$value->office_name)->count();
  113. $total_rts = $paid_rts + $nopaid_rts;
  114. if ($paid_rts == 0) {
  115. $rt_terbayar = 0;
  116. }else{
  117. $rt_terbayar = $paid_rts / $total_rts * 100;
  118. }
  119. $sudah_tl = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$fixMonth)->whereYear('bi_begin',$fixYear)->where('upt',$value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('status','not paid')->where('active',1)->count();
  120. $belum_tl = $nopaid_rts - $sudah_tl;
  121. if ($sudah_tl == 0) {
  122. $rt_yang_tl = 0;
  123. }else{
  124. $rt_yang_tl = $sudah_tl / $nopaid_rts * 100;
  125. }
  126. $tanggal_upload = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$fixMonth)->whereYear('bi_begin',$fixYear)->where('upt',$value->office_name)->where('active',1)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->select('updated_at')->distinct()->value('updated_at');
  127. $jumlah_rt = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$fixMonth)->whereYear('bi_begin',$fixYear)->where('status','not paid')->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('upt',$value->office_name)->count();
  128. $nihil2 = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$fixMonth)->whereYear('bi_begin',$fixYear)->where('upt',$value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('status','not paid')->count();
  129. ?>
  130. <td>{{$total_rts}}</td>
  131. <td>{{$paid_rts}}</td>
  132. <td>{{number_format($rt_terbayar, 2)}} %</td>
  133. <td>{{$nopaid_rts}}</td>
  134. <td>{{$sudah_tl}}</td>
  135. <td>{{$belum_tl}}</td>
  136. <td>{{number_format($rt_yang_tl, 2)}} &</td>
  137. <td>
  138. @if($tanggal_upload)
  139. {{\Carbon\Carbon::parse($tanggal_upload)
  140. ->format('d, M Y')}}
  141. @elseif($nihil2 == 0)
  142. NIHIL
  143. @else
  144. Belum Mengirim
  145. @endif
  146. </td>
  147. </tr>
  148. @endforeach
  149. </table>
  150. </div>
  151. </div>
  152. @endif