| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- <!DOCTYPE html>
- <?php $getStatus = \App\Model\Privillage\Role::where('id',Auth::user()->role_id)->value('akses');
- if($getStatus == 'administrator'){
- if($getUptId == '' || $getUptName == 'SELURUH UPT'){
- $upt = \App\Model\Setting\UPT::select('office_name','office_id')->distinct()->get();
- }else{
- $upt = \App\Model\Setting\UPT::where('office_name',$getUptName)->orWhereNull('office_name')->select('office_id', 'office_name')->distinct()->get();
- }
- }else{
- $upt = \App\Model\Setting\UPT::where('office_id', Auth::user()->upt)->select('office_name','office_id')->distinct()->get();
- }
- ?>
- <html>
- <head>
- <style>
- .table-bordered {
- border-collapse: collapse;
- width: 100%;
- }
- .table-bordered td, .table-bordered th {
- border: 1px solid black;
- padding: 8px;
- }
- .thead-light{
- background-color: #E9ECEF;
- }
- .table-bordered th {
- padding-top: 12px;
- padding-bottom: 12px;
- text-align: left;
- }
- </style>
- </head>
- <body>
- <center>
- <div>
- <hr>
- <h2 class="font-weight-bolder">REKAP PENGIRIMAN LAPORAN</h2>
- <hr>
- <table id="example" class="table table-bordered align-items-center">
- <thead class="thead-light">
- <tr>
- <th scope="col">UPT</th>
- <th scope="col">Jan</th>
- <th scope="col">Feb</th>
- <th scope="col">Mar</th>
- <th scope="col">Apr</th>
- <th scope="col">Mei</th>
- <th scope="col">Jun</th>
- <th scope="col">Jul</th>
- <th scope="col">Aug</th>
- <th scope="col">Sep</th>
- <th scope="col">Okt</th>
- <th scope="col">Nov</th>
- <th scope="col">Des</th>
- </tr>
- </thead>
- <tbody>
- @foreach($upt as $key => $value)
- <tr>
- <th scope="row">
- {{$value->office_name}}
- </th>
- <?php
- $fixYear = $year - 1;
- // $januari = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',12)->whereYear('bi_begin',$fixYear)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('bi_type','8')->where('active',1)->count();
- // $februari = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',1)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('bi_type','8')->where('active',1)->count();
- // $maret = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',2)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('bi_type','8')->where('active',1)->count();
- // $april = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',3)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('bi_type','8')->where('active',1)->count();
- // $mei = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',4)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('bi_type','8')->where('active',1)->count();
- // $juni = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',5)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('bi_type','8')->where('active',1)->count();
- // $juli = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',6)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('bi_type','8')->where('active',1)->count();
- // $agustus = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',7)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('bi_type','8')->where('active',1)->count();
- // $september = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',8)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('bi_type','8')->where('active',1)->count();
- // $oktober = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',9)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('bi_type','8')->where('active',1)->count();
- // $november = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',10)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('bi_type','8')->where('active',1)->count();
- // $desember = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',11)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('bi_type','8')->where('active',1)->count();
-
- $januari = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',12)->whereYear('bi_begin',$fixYear)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count();
- $februari = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',1)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count();
- $maret = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',2)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count();
- $april = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',3)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count();
- $mei = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',4)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count();
- $juni = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',5)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count();
- $juli = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',6)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count();
- $agustus = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',7)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count();
- $september = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',8)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count();
- $oktober = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',9)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count();
- $november = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',10)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count();
- $desember = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',11)->whereYear('bi_begin',$year)->where('upt', $value->office_name)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count();
- ?>
- <td>
- @if($januari == 0)
- <a class="btn btn-danger btn-sm text-white">BELUM</a>
- @else
- <a class="btn btn-success btn-sm text-white">YA</a>
- @endif
- </td>
- <td>
- @if($februari == 0)
- <a class="btn btn-danger btn-sm text-white">BELUM</a>
- @else
- <a class="btn btn-success btn-sm text-white">YA</a>
- @endif
- </td>
- <td>
- @if($maret == 0)
- <a class="btn btn-danger btn-sm text-white">BELUM</a>
- @else
- <a class="btn btn-success btn-sm text-white">YA</a>
- @endif
- </td>
- <td>
- @if($april == 0)
- <a class="btn btn-danger btn-sm text-white">BELUM</a>
- @else
- <a class="btn btn-success btn-sm text-white">YA</a>
- @endif
- </td>
- <td>
- @if($mei == 0)
- <a class="btn btn-danger btn-sm text-white">BELUM</a>
- @else
- <a class="btn btn-success btn-sm text-white">YA</a>
- @endif
- </td>
- <td>
- @if($juni == 0)
- <a class="btn btn-danger btn-sm text-white">BELUM</a>
- @else
- <a class="btn btn-success btn-sm text-white">YA</a>
- @endif
- </td>
- <td>
- @if($juli == 0)
- <a class="btn btn-danger btn-sm text-white">BELUM</a>
- @else
- <a class="btn btn-success btn-sm text-white">YA</a>
- @endif
- </td>
- <td>
- @if($agustus == 0)
- <a class="btn btn-danger btn-sm text-white">BELUM</a>
- @else
- <a class="btn btn-success btn-sm text-white">YA</a>
- @endif
- </td>
- <td>
- @if($september == 0)
- <a class="btn btn-danger btn-sm text-white">BELUM</a>
- @else
- <a class="btn btn-success btn-sm text-white">YA</a>
- @endif
- </td>
- <td>
- @if($oktober == 0)
- <a class="btn btn-danger btn-sm text-white">BELUM</a>
- @else
- <a class="btn btn-success btn-sm text-white">YA</a>
- @endif
- </td>
- <td>
- @if($november == 0)
- <a class="btn btn-danger btn-sm text-white">BELUM</a>
- @else
- <a class="btn btn-success btn-sm text-white">YA</a>
- @endif
- </td>
- <td>
- @if($desember == 0)
- <a class="btn btn-danger btn-sm text-white">BELUM</a>
- @else
- <a class="btn btn-success btn-sm text-white">YA</a>
- @endif
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <hr>
- </div>
- </center>
- </body>
- </html>
|