diff --git a/app/Models/Mpemby.php b/app/Models/Mpemby.php
index 38e26cc9..7d65d050 100644
--- a/app/Models/Mpemby.php
+++ b/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;
}
diff --git a/app/Views/ppm/dashboard.php b/app/Views/ppm/dashboard.php
index 6c88ff4b..0757bc38 100644
--- a/app/Views/ppm/dashboard.php
+++ b/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 . "]";
-
Dashboard Nasional
+
Dashboard Penerimaan Nasional
@@ -414,7 +421,7 @@ $datapaycomp = $datapaycomp . "]";
- *) Nilai Persentase dibawah 20% berwarna merah
+ *) Nilai Persentase dibawah 20% berwarna merah
@@ -680,7 +687,7 @@ $datapaycomp = $datapaycomp . "]";
text: ''
},
tooltip: {
- pointFormat: 'Peranan:
{point.percentage:.1f}%'
+ pointFormat: 'Peranan:
{point.percentage:.1f}% Gw : {point.gw:.1f}%'
},
accessibility: {
point: {
@@ -802,7 +809,7 @@ $datapaycomp = $datapaycomp . "]";
text: ''
},
tooltip: {
- pointFormat: '{point.name}:
{point.percentage:.1f}% jmlWP : {point.y}'
+ pointFormat: '{point.name}:
{point.percentage:.1f}% jmlWP : {point.y} '
},
accessibility: {
point: {