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