| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418 |
- <script src="http://code.highcharts.com/highcharts.js"></script>
- <script src="http://code.highcharts.com/maps/modules/map.js"></script>
- <script src="http://code.highcharts.com/maps/modules/exporting.js"></script>
- <script src="http://code.highcharts.com/mapdata/countries/us/us-all.js"></script>
- <?php
- $myTime = Carbon\Carbon::now();
- $fixYears = '20'.$myTime->format('y');
- $getStatus = \App\Model\Privillage\Role::where('id',Auth::user()->role_id)->value('akses');
- ?>
- @if($getStatus == 'administrator')
- <script>
- Highcharts.chart('sppRT-admin', {
- chart: {
- type: 'bar'
- },
- title:false,
- xAxis: {
- categories: [
- @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
- '{{$value->nama}}',
- @endforeach
- ],
- title: {
- text: null
- }
- },
- yAxis: {
- min: 0,
- title: {
- text: 'UPT',
- align: 'high'
- },
- labels: {
- overflow: 'justify'
- }
- },
- tooltip: {
- valueSuffix: ' Jumlah'
- },
- plotOptions: {
- bar: {
- dataLabels: {
- enabled: true
- }
- }
- },
- legend: {
- layout: 'vertical',
- align: 'right',
- verticalAlign: 'top',
- x: -40,
- y: 80,
- floating: true,
- borderWidth: 1,
- backgroundColor:
- Highcharts.defaultOptions.legend.backgroundColor || '#FFFFFF',
- shadow: true
- },
- credits: {
- enabled: false
- },
- series: [
- {
- name: 'Total RT Terbit Diterbitkan',
- data: [
- @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
- <?php
- if ($value->id_bulan == 1) {
- $minMonth = 12;
- $minYears = $fixYears - 1;
- }
- else{
- $minMonth = $value->id_bulan - 1;
- $minYears = $fixYears;
- }
- $pay_rt = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$minMonth)->whereYear('bi_begin',$minYears)->where('status','paid')->where('status_izin','Perpanjangan')->where('bi_type',8)->count();
- $not_pay_rt = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$minMonth)->whereYear('bi_begin',$minYears)->where('status','not paid')->where('status_izin','Perpanjangan')->where('bi_type',0)->count();
- $total_rt = $pay_rt + $not_pay_rt;
- ?>
- {{$total_rt}},
- @endforeach
- ]
- },
- {
- name: 'RT Terbayar ( H-60 s.d H-30 )',
- data: [
- @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
- <?php
- if ($value->id_bulan == 1) {
- $minMonth = 12;
- $minYears = $fixYears - 1;
- }
- else{
- $minMonth = $value->id_bulan - 1;
- $minYears = $fixYears;
- }
- ?>
- {{\App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$minMonth)->whereYear('bi_begin',$minYears)->where('status','paid')->where('status_izin','Perpanjangan')->where('bi_type',8)->count()}},
- @endforeach
- ]
- },
- {
- name: 'RT Terbayar ( H-30 s.d H ) Hasil TL UPT',
- data: [
- @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
- <?php
- if ($value->id_bulan == 1) {
- $minMonth = 12;
- $minYears = $fixYears - 1;
- }
- else{
- $minMonth = $value->id_bulan - 1;
- $minYears = $fixYears;
- }
- ?>
- @if(\App\Model\SPP\RincianTagihan::where('status','paid')->get() == null)
- 0,
- @else
- {{\App\Model\SPP\RincianTagihan::where('status','paid')->whereMonth('bi_begin',$minMonth)->whereYear('bi_begin',$minYears)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('active',1)->count()}},
- @endif
- @endforeach
- ]
- },
- {
- name: 'RT Belum Terbayar ( Belum Jatuh Tempo )',
- data: [
- @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
- <?php
- if ($value->id_bulan == 1) {
- $minMonth = 12;
- $minYears = $fixYears - 1;
- }
- else{
- $minMonth = $value->id_bulan - 1;
- $minYears = $fixYears;
- }
- ?>
- {{\App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$minMonth)->whereYear('bi_begin',$minYears)->where('status_remainder',null)->where('status_izin','Perpanjangan')->where('bi_type',0)->where('status','not paid')->count()}},
- @endforeach
- ]
- },
- {
- name: 'RT Tidak Membayar ( Menjadi Reminder )',
- data: [
- @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
- <?php
- if ($value->id_bulan == 1) {
- $minMonth = 12;
- $minYears = $fixYears - 1;
- }
- else{
- $minMonth = $value->id_bulan - 1;
- $minYears = $fixYears;
- }
- ?>
- {{\App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$minMonth)->whereYear('bi_begin',$minYears)->where('status','not paid')->where('status_izin','Perpanjangan')->where('bi_type',0)->count()}},
- @endforeach
- ]
- },
- ]
- });
- </script>
- @endif
- <script>
- Highcharts.chart('sppRT', {
- chart: {
- type: 'bar'
- },
- title:false,
- xAxis: {
- categories: [
- @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
- '{{$value->nama}}',
- @endforeach
- ],
- title: {
- text: null
- }
- },
- yAxis: {
- min: 0,
- title: {
- text: 'UPT',
- align: 'high'
- },
- labels: {
- overflow: 'justify'
- }
- },
- tooltip: {
- valueSuffix: ' Jumlah'
- },
- plotOptions: {
- bar: {
- dataLabels: {
- enabled: true
- }
- }
- },
- legend: {
- layout: 'vertical',
- align: 'right',
- verticalAlign: 'top',
- x: -40,
- y: 80,
- floating: true,
- borderWidth: 1,
- backgroundColor:
- Highcharts.defaultOptions.legend.backgroundColor || '#FFFFFF',
- shadow: true
- },
- credits: {
- enabled: false
- },
- series: [
- {
- name: 'Total RT Terbit Diterbitkan',
- data: [
- @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
- <?php
- if ($value->id_bulan == 1) {
- $minMonth = 12;
- $minYears = $fixYears - 1;
- }
- else{
- $minMonth = $value->id_bulan - 1;
- $minYears = $fixYears;
- }
- $pay_rt = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$minMonth)->whereYear('bi_begin',$minYears)->where('status','paid')->where('upt',$getUptName)->where('status_izin','Perpanjangan')->where('bi_type',8)->count();
- $not_pay_rt = \App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$minMonth)->whereYear('bi_begin',$minYears)->where('status','not paid')->where('upt',$getUptName)->where('status_izin','Perpanjangan')->where('bi_type',0)->count();
- ?>
- {{$pay_rt + $not_pay_rt}},
- @endforeach
- ]
- },
- {
- name: 'RT Terbayar ( H-60 s.d H-30 )',
- data: [
- @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
- <?php
- if ($value->id_bulan == 1) {
- $minMonth = 12;
- $minYears = $fixYears - 1;
- }
- else{
- $minMonth = $value->id_bulan - 1;
- $minYears = $fixYears;
- }
- ?>
- {{\App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$minMonth)->whereYear('bi_begin',$minYears)->where('status','paid')->where('upt',$getUptName)->where('status_izin','Perpanjangan')->where('bi_type',8)->count()}},
- @endforeach
- ]
- },
- {
- name: 'RT Terbayar ( H-30 s.d H ) Hasil TL UPT',
- data: [
- @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
- <?php
- if ($value->id_bulan == 1) {
- $minMonth = 12;
- $minYears = $fixYears - 1;
- }
- else{
- $minMonth = $value->id_bulan - 1;
- $minYears = $fixYears;
- }
- ?>
- @if(\App\Model\SPP\RincianTagihan::where('active',1)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->where('upt',$getUptName)->whereMonth('bi_begin',$minMonth)->whereYear('bi_begin',$minYears)->get() == null)
- 0,
- @else
- {{\App\Model\SPP\RincianTagihan::where('active',1)->whereMonth('bi_begin',$minMonth)->whereYear('bi_begin',$minYears)->where('upt',$getUptName)->where('status_izin','Perpanjangan')->where('katagori_spp','Pokok')->count()}},
- @endif
- @endforeach
- ]
- },
- {
- name: 'RT Belum Terbayar ( Belum Jatuh Tempo )',
- data: [
- @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
- <?php
- if ($value->id_bulan == 1) {
- $minMonth = 12;
- $minYears = $fixYears - 1;
- }
- else{
- $minMonth = $value->id_bulan - 1;
- $minYears = $fixYears;
- }
- ?>
- {{\App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$minMonth)->whereYear('bi_begin',$minYears)->where('status_remainder','null')->where('upt',$getUptName)->where('status_izin','Perpanjangan')->where('bi_type',0)->count()}},
- @endforeach
- ]
- },
- {
- name: 'RT Tidak Membayar ( Menjadi Reminder )',
- data: [
- @foreach(\App\Model\Date\ListMonth::all() as $key => $value)
- <?php
- if ($value->id_bulan == 1) {
- $minMonth = 12;
- $minYears = $fixYears - 1;
- }
- else{
- $minMonth = $value->id_bulan - 1;
- $minYears = $fixYears;
- }
- ?>
- {{\App\Model\SPP\RincianTagihan::whereMonth('bi_begin',$minMonth)->whereYear('bi_begin',$minYears)->where('status','not paid')->where('upt',$getUptName)->where('status_izin','Perpanjangan')->where('bi_type',0)->count()}},
- @endforeach
- ]
- },
- ]
- });
- </script>
- <script type="text/javascript">
- var map = am4core.create("chartdiv", am4maps.MapChart);
- </script>
- <script type="text/javascript" src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>
- <script type="text/javascript">
- var j = jQuery.noConflict();
- var table = j('#server-side').DataTable({
- "lengthChange": true,
- orderCellsTop: true,
- fixedHeader: true,
- "processing": true,
- "serverSide": true,
- "ajax": {
- "type": "GET",
- "url": "{{ url()->current() }}",
- "data": function (d) {
- console.log(d);
- return j.extend({}, d, {
- "type": "WEB",
- <?php
- foreach ($_GET as $key => $value) {
- ?>
- "{{ $key }}": "{{ $value }}",
- <?php
- }
- ?>
- });
- },
- },
- "columns": [
- {
- "data": "no_spp",
- },
- {
- "data": "no_klien",
- },
- {
- "data": "nama_perusahaan",
- },
- {
- "data": "upt",
- },
- {
- "data": "bhp",
- },
- {
- "data": "bi_date",
- },
- {
- "data": null,
- "render": function (data, type, row, meta) {
- return '<center><a class="btn btn-success btn-sm text-white">Telah Bayar</a></center>';
- }
- },
- {
- "data": "due_date",
- },
- {
- "data": "pay_date",
- },
- {
- "data": "service_name",
- },
- {
- "data": null,
- "render": function (data, type, row, meta) {
- if (data.active == 1) {
- return 'Sudah Disetujui';
- }
- else if(data.active == null) {
- return 'Terbayarkan';
- }
- else {
- return 'Belum disetujui';
- }
- }
- },
- {
- "data": "method",
- },
- {
- "data": "tanggal_upaya",
- },
- {
- "data": null,
- "render": function (data, type, row, meta) {
- if(data.bukti_dukung != null) {
- return '<a href="{{url("spp/rt/lampiran")}}' + '/' + data.bukti_dukung + '" class="btn btn-info btn-sm"><i class="fa fa-download"></i></a>';
- }
- else {
- return '-';
- }
- }
- },
- {
- "data": "keterangan",
- }
- ],
- "ordering": true
- });
- </script>
|