print-upt-bulan-tahun-paid.blade.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <!DOCTYPE html>
  2. <?php
  3. $getStatus = \App\Model\Privillage\Role::where('id',Auth::user()->role_id)->value('akses');
  4. if($getStatus == 'administrator'){
  5. $listUpt = \App\Model\Setting\UPT::select('office_id','office_name','province_name')->distinct()->get();
  6. }else{
  7. $listUpt = \App\Model\Setting\UPT::where('office_id', Auth::user()->upt)->select('office_id','office_name','province_name')->distinct()->get();
  8. }
  9. if($month == 1){
  10. $fixMonth = 12;
  11. $fixYear = $year - 1;
  12. } else{
  13. $fixMonth = $month - 1;
  14. $fixYear = $year;
  15. }
  16. ?>
  17. <html>
  18. <head>
  19. <style>
  20. .table-bordered {
  21. border-collapse: collapse;
  22. width: 100%;
  23. }
  24. .table-bordered td, .table-bordered th {
  25. border: 1px solid black;
  26. padding: 8px;
  27. }
  28. .thead-light{
  29. background-color: #E9ECEF;
  30. }
  31. .table-bordered th {
  32. padding-top: 12px;
  33. padding-bottom: 12px;
  34. text-align: left;
  35. }
  36. </style>
  37. </head>
  38. <body>
  39. <center>
  40. <div>
  41. <hr>
  42. <h2 class="font-weight-bolder">REKAP PENGIRIMAN LAPORAN</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_begin',$fixMonth)->whereYear('bi_begin',$fixYear)->where('upt',$value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count();
  59. ?>
  60. <td>
  61. @if($checkingPengiriman == 0)
  62. <a class="btn btn-danger btn-sm text-white">BELUM</a>
  63. @else
  64. <a class="btn btn-success btn-sm text-white">YA</a>
  65. @endif
  66. </td>
  67. </tr>
  68. @endforeach
  69. </tbody>
  70. </table>
  71. <hr>
  72. </div>
  73. </center>
  74. </body>
  75. </html>