print-seluruh-upt-tahun-not-paid.blade.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <!DOCTYPE html>
  2. <?php
  3. $getStatus = \App\Model\Privillage\Role::where('id',Auth::user()->role_id)->value('akses');
  4. $listUpt = \App\Model\Setting\UPT::select('office_id','office_name','province_name')->distinct()->get();
  5. ?>
  6. <html>
  7. <head>
  8. <style>
  9. .table-bordered {
  10. border-collapse: collapse;
  11. width: 100%;
  12. }
  13. .table-bordered td, .table-bordered th {
  14. border: 1px solid black;
  15. padding: 8px;
  16. }
  17. .thead-light{
  18. background-color: #E9ECEF;
  19. }
  20. .table-bordered th {
  21. padding-top: 12px;
  22. padding-bottom: 12px;
  23. text-align: left;
  24. }
  25. </style>
  26. </head>
  27. <body>
  28. <center>
  29. <div>
  30. <hr>
  31. <h2 class="font-weight-bolder">REKAPITULASI DAN PERSENTASE AKSI PENCEGAHAN PIUTANG</h2>
  32. <hr>
  33. <table id="example" class="table table-bordered align-items-center">
  34. <thead class="thead-light">
  35. <tr>
  36. <th class="tg-0pky" colspan="1"></th>
  37. <th class="tg-0lax" colspan="12" style="background-color: #E9E214; color: #fff; text-align: center;">% RT TERBAYAR SEBELUM TNGGAL JATUH TEMPO</th>
  38. </tr>
  39. <tr>
  40. <td class="tg-0lax">UPT</td>
  41. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  42. <td class="tg-0lax">{{$value->nama}}</td>
  43. @endforeach
  44. </tr>
  45. </thead>
  46. @foreach($listUpt as $key => $value)
  47. <?php $uptName = $value->office_name ?>
  48. <tr>
  49. <td class="tg-0lax">{{$value->office_name}}</td>
  50. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  51. <?php
  52. if($value->id_bulan == 1){
  53. $fixMonth = 12;
  54. $fixYear = $year - 1;
  55. }else{
  56. $fixMonth = $value->id_bulan - 1;
  57. $fixYear = $year;
  58. }
  59. $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',$uptName)->count();
  60. ?>
  61. <td>{{$paid_rts}}</td>
  62. @endforeach
  63. </tr>
  64. @endforeach
  65. </table>
  66. <hr>
  67. </div>
  68. </center>
  69. </body>
  70. </html>