Browse Source

adding growth to pie pen

main^2
dfoso 1 year ago committed by =
parent
commit
6e65b655f6
  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']; $tahun = $param['tahun'];
$tahunl = $tahun - 1; $tahunl = $tahun - 1;
$bln = date('m'); $bln = date('m');
$query = $this->db->query("SELECT NM_PAJAK,TOTALN PENERIMAAN, $query = $this->db->query("SELECT NM_PAJAK,TOTALN PENERIMAAN, TOTALP PENL,
(SELECT ROUND(SUM(TOTAL)) FROM PERJENIS_MV WHERE THNBYR = '" . $tahun . "') PENERIMAAN_TOT (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 ( FROM (
SELECT NM_PAJAK,ROUND(SUM(CASE WHEN THNBYR= '" . $tahun . "' THEN TOTAL ELSE 0 END)) TOTALN, SELECT NM_PAJAK,ROUND(SUM(CASE WHEN THNBYR= '" . $tahun . "' AND BLNBYR <= '" . $bln . "' THEN TOTAL ELSE 0 END)) TOTALN,
ROUND(SUM(CASE WHEN THNBYR= '" . $tahunl . "' THEN TOTAL ELSE 0 END)) TOTALP ROUND(SUM(CASE WHEN THNBYR= '" . $tahunl . "' AND BLNBYR <= '" . $bln . "' THEN TOTAL ELSE 0 END)) TOTALP
FROM PERJENIS_MV 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; return $query;
} }

21
app/Views/ppm/dashboard.php

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

Loading…
Cancel
Save