diff --git a/app/Config/Boot/development.php b/app/Config/Boot/development.php
index 37dafdc0..a868447a 100644
--- a/app/Config/Boot/development.php
+++ b/app/Config/Boot/development.php
@@ -21,7 +21,7 @@ ini_set('display_errors', '1');
| backtraces along with the other error information. If you would
| prefer to not see this, set this value to false.
*/
-defined('SHOW_DEBUG_BACKTRACE') || define('SHOW_DEBUG_BACKTRACE', false);
+defined('SHOW_DEBUG_BACKTRACE') || define('SHOW_DEBUG_BACKTRACE', true);
/*
|--------------------------------------------------------------------------
diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php
index dba09cec..1bb4a2b1 100644
--- a/app/Controllers/Home.php
+++ b/app/Controllers/Home.php
@@ -23,13 +23,14 @@ class Home extends BaseController
$p['penerimaan'] = $model->getPenn($param)->getResult();
$p['updatex'] = $model->getUpd()->getFirstRow('array');
$p['perkategori'] = $model->getKat($param)->getResult();
+ $p['pie_penerimaan'] = $model->getPiePen($param)->getResult();
+
echo view('inc/head');
echo view('inc/navbar');
echo view('inc/sidebar');
echo view('ppm/dashboard', $p);
echo view('inc/footer');
- echo view('inc/js');
} else {
return redirect()->to('auth');
}
diff --git a/app/Models/Mpemby.php b/app/Models/Mpemby.php
index 4311e030..383d499f 100644
--- a/app/Models/Mpemby.php
+++ b/app/Models/Mpemby.php
@@ -47,4 +47,21 @@ class Mpemby extends Model
");
return $query;
}
+
+
+ function getPiePen($param)
+ {
+ $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) PENERIMAAN_TOT
+ 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
+ FROM PERJENIS_MV
+ GROUP BY NM_PAJAK ORDER BY TOTALN DESC)
+ ");
+ return $query;
+ }
}
diff --git a/app/Views/inc/js.php b/app/Views/inc/js.php
index dc1fb055..4a6a2462 100644
--- a/app/Views/inc/js.php
+++ b/app/Views/inc/js.php
@@ -1,23 +1,22 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-