role_id)->value('akses'); if($getStatus == 'administrator'){ $listUpt = \App\Model\Setting\UPT::select('office_id','office_name','province_name')->distinct()->get(); }else{ $listUpt = \App\Model\Setting\UPT::where('office_id', Auth::user()->upt)->select('office_id','office_name','province_name')->distinct()->get(); } if($month == 1){ $fixMonth = 12; $fixYear = $year - 1; } else{ $fixMonth = $month - 1; $fixYear = $year; } ?>
| RT BELUM TERBAYAR (H-30 s.d H) | RT TIDAK TERBAYAR (MENJADI REMINDER) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| UPT | TOTAL RT TERBIT | RT TERBAYAR | % RT TERBAYAR | JUMLAH RT YANG AKAN DI TL | SUDAH DI-TL UPT | BELUM DI-TL UPT | % RT YANG DI TL | Tanggal Upload | |
| {{$value->office_name}} | whereYear('bi_begin',$fixYear)->where('status','paid')->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('upt',$value->office_name)->count(); $nopaid_rts = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$fixMonth)->whereYear('bi_begin',$fixYear)->where('status','not paid')->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('upt',$value->office_name)->count(); $total_rts = $paid_rts + $nopaid_rts; if ($paid_rts == 0) { $rt_terbayar = 0; }else{ $rt_terbayar = $paid_rts / $total_rts * 100; } $sudah_tl = \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('status','not paid')->where('active',1)->count(); $belum_tl = $nopaid_rts - $sudah_tl; if ($sudah_tl == 0) { $rt_yang_tl = 0; }else{ $rt_yang_tl = $sudah_tl / $nopaid_rts * 100; } $tanggal_upload = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$fixMonth)->whereYear('bi_begin',$fixYear)->where('upt',$value->office_name)->where('active',1)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->select('updated_at')->distinct()->value('updated_at'); $jumlah_rt = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$fixMonth)->whereYear('bi_begin',$fixYear)->where('status','not paid')->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('upt',$value->office_name)->count(); ?>{{$total_rts}} | {{$paid_rts}} | {{number_format($rt_terbayar, 2)}} % | {{$nopaid_rts}} | {{$sudah_tl}} | {{$belum_tl}} | {{number_format($rt_yang_tl, 2)}} & | @if($tanggal_upload) {{\Carbon\Carbon::parse($tanggal_upload) ->format('d, M Y')}} @else Belum Mengirim @endif | |