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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. $listUpt = \App\Model\Setting\UPT::select('office_id','office_name','province_name')->distinct()->get();
  26. ?>
  27. <center>
  28. <div>
  29. <hr>
  30. <h2 class="font-weight-bolder">Data Status Tagihan {{date('d F Y')}}</h2>
  31. <hr>
  32. <table id="example" class="table table-bordered align-items-center">
  33. <thead class="thead-light">
  34. <tr>
  35. <th scope="col">UPT</th>
  36. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  37. <th scope="col">{{$value->nama}}</th>
  38. @endforeach
  39. </tr>
  40. </thead>
  41. <tbody>
  42. @foreach($listUpt as $key => $value)
  43. <?php $uptName = $value->office_name ?>
  44. <tr>
  45. <td scope="row">
  46. {{$value->office_name}}
  47. </td>
  48. @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
  49. <?php
  50. if($value->id_bulan == 1){
  51. $fixMonth = 12;
  52. $fixYear = $year - 1;
  53. }else{
  54. $fixMonth = $value->id_bulan - 1;
  55. $fixYear = $year;
  56. }
  57. $checkingPengiriman = \App\Model\SPP\RincianTagihan::whereMonth('bi_create_date',$fixMonth)->whereYear('bi_create_date',$fixYear)->where('upt',$uptName)->where('status_izin','Perpanjangan')->where('bi_type',$bi_type)->where('active',1)->count();
  58. ?>
  59. <td>
  60. @if($checkingPengiriman != 0)
  61. <a class="btn btn-success btn-sm text-white">YA</a>
  62. @else
  63. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  64. @endif
  65. </td>
  66. @endforeach
  67. </tr>
  68. @endforeach
  69. </tbody>
  70. </table>
  71. <hr>
  72. </div>
  73. </center>
  74. </body>
  75. </html>