Browse Source

adding growth to pie pen

main
dfoso 1 year ago
parent
commit
1f97a69b8b
  1. 11
      app/Models/Mpemby.php
  2. 21
      app/Views/ppm/dashboard.php

11
app/Models/Mpemby.php

@ -54,13 +54,14 @@ class Mpemby extends Model
$tahun = $param['tahun'];
$tahunl = $tahun - 1;
$bln = date('m');
$query = $this->db->query("SELECT NM_PAJAK,TOTALN PENERIMAAN,
(SELECT ROUND(SUM(TOTAL)) FROM PERJENIS_MV WHERE THNBYR = '" . $tahun . "') PENERIMAAN_TOT
$query = $this->db->query("SELECT NM_PAJAK,TOTALN PENERIMAAN, TOTALP PENL,
(SELECT ROUND(SUM(TOTAL)) FROM PERJENIS_MV WHERE THNBYR = '" . $tahun . "' AND BLNBYR <= '" . $bln . "') PENERIMAAN_TOT,
(SELECT ROUND(SUM(TOTAL)) FROM PERJENIS_MV WHERE THNBYR = '" . $tahunl . "' AND BLNBYR <= '" . $bln . "') PENERIMAAN_TOTL
FROM (
SELECT NM_PAJAK,ROUND(SUM(CASE WHEN THNBYR= '" . $tahun . "' THEN TOTAL ELSE 0 END)) TOTALN,
ROUND(SUM(CASE WHEN THNBYR= '" . $tahunl . "' THEN TOTAL ELSE 0 END)) TOTALP
SELECT NM_PAJAK,ROUND(SUM(CASE WHEN THNBYR= '" . $tahun . "' AND BLNBYR <= '" . $bln . "' THEN TOTAL ELSE 0 END)) TOTALN,
ROUND(SUM(CASE WHEN THNBYR= '" . $tahunl . "' AND BLNBYR <= '" . $bln . "' THEN TOTAL ELSE 0 END)) TOTALP
FROM PERJENIS_MV
GROUP BY NM_PAJAK ORDER BY TOTALN DESC) WHERE ROWNUM < = 10
GROUP BY NM_PAJAK ORDER BY TOTALN DESC) WHERE ROWNUM < = 7
");
return $query;
}

21
app/Views/ppm/dashboard.php

@ -60,25 +60,32 @@ foreach ($penerimaan as $row) {
$jml_penerimaan = 0;
$jml_penlalu = 0;
foreach ($pie_penerimaan as $_junk => $data) {
$jml_penerimaan = $jml_penerimaan + $data->PENERIMAAN;
$jml_penerimaantot = $data->PENERIMAAN_TOT;
$pentotlalu = $data->PENERIMAAN_TOTL;
$jml_penlalu = $jml_penlalu + $data->PENL;
}
$jml_penerimaan = $jml_penerimaantot - $jml_penerimaan;
$jml_penlalu = $pentotlalu - $jml_penlalu;
$gwpiepenl = (($jml_penerimaan - $jml_penlalu) / $jml_penlalu) * 100;
$row = 0;
$datanya_penerimaan = "[";
foreach ($pie_penerimaan as $_junk => $data) {
$datanya_penerimaan = $datanya_penerimaan . "{name :'" . $data->NM_PAJAK . "',y: " . $data->PENERIMAAN . "}";
$gwpiepen = (($data->PENERIMAAN - $data->PENL) / $data->PENL) * 100;
$datanya_penerimaan = $datanya_penerimaan . "{name :'" . $data->NM_PAJAK . "',y: " . $data->PENERIMAAN . " , gw:" . $gwpiepen . "}";
break;
}
foreach ($pie_penerimaan as $_junk => $data) {
if ($row <> 0) {
$datanya_penerimaan = $datanya_penerimaan . ",{name :'" . $data->NM_PAJAK . "',y: " . $data->PENERIMAAN . "}";
$gwpiepen = (($data->PENERIMAAN - $data->PENL) / $data->PENL) * 100;
$datanya_penerimaan = $datanya_penerimaan . ",{name :'" . $data->NM_PAJAK . "',y: " . $data->PENERIMAAN . ", gw:" . $gwpiepen . "}";
}
$row = $row + 1;
}
$datanya_penerimaan = $datanya_penerimaan . ",{name: 'Lainnya',y:" . $jml_penerimaan . "}]";
$datanya_penerimaan = $datanya_penerimaan . ",{name: 'Lainnya',y:" . $jml_penerimaan . ", gw: " . $gwpiepenl . "}]";
$datapaycomp = "[";
@ -93,7 +100,7 @@ $datapaycomp = $datapaycomp . "]";
<div class="main-content">
<div class="container-fluid">
<h3>Dashboard Nasional</h3>
<h4>Dashboard Penerimaan Nasional</h4>
<div class="row clearfix">
<div class="col-lg-3 col-md-6 col-sm-12">
<div class="widget">
@ -414,7 +421,7 @@ $datapaycomp = $datapaycomp . "]";
</tbody>
<?php } ?>
</table>
<small>*) Nilai Persentase dibawah 20% berwarna merah</small>
<small class="text-primary">*) Nilai Persentase dibawah 20% berwarna merah</small>
</div>
</div>
@ -680,7 +687,7 @@ $datapaycomp = $datapaycomp . "]";
text: ''
},
tooltip: {
pointFormat: 'Peranan: <b>{point.percentage:.1f}%</b>'
pointFormat: 'Peranan: <b>{point.percentage:.1f}%</b> <br> Gw : {point.gw:.1f}%'
},
accessibility: {
point: {
@ -802,7 +809,7 @@ $datapaycomp = $datapaycomp . "]";
text: ''
},
tooltip: {
pointFormat: '{point.name}: <b>{point.percentage:.1f}%</b> <br> jmlWP : {point.y}'
pointFormat: '{point.name}: <b>{point.percentage:.1f}%</b> <br> jmlWP : {point.y} '
},
accessibility: {
point: {

Loading…
Cancel
Save