diff --git a/app/Config/Boot/development.php b/app/Config/Boot/development.php index 73c7c60a..9e209ba3 100644 --- a/app/Config/Boot/development.php +++ b/app/Config/Boot/development.php @@ -9,7 +9,7 @@ | | If you set 'display_errors' to '1', CI4's detailed error report will show. */ -ini_set('display_errors', '0'); +ini_set('display_errors', '1'); error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); /* @@ -20,4 +20,4 @@ error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & | the system. It's not widely used currently, and may not survive | release of the framework. */ -defined('CI_DEBUG') || define('CI_DEBUG', false); +defined('CI_DEBUG') || define('CI_DEBUG', true); diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php index 1bb4a2b1..6dd04686 100644 --- a/app/Controllers/Home.php +++ b/app/Controllers/Home.php @@ -3,11 +3,16 @@ namespace App\Controllers; use App\Models\Mpemby; +use CodeIgniter\HTTP\RequestInterface; +use CodeIgniter\HTTP\ResponseInterface; class Home extends BaseController { + + public function index() { + if (session('isLogin')) { $model = new Mpemby(); @@ -24,6 +29,10 @@ class Home extends BaseController $p['updatex'] = $model->getUpd()->getFirstRow('array'); $p['perkategori'] = $model->getKat($param)->getResult(); $p['pie_penerimaan'] = $model->getPiePen($param)->getResult(); + $p['paycomp'] = $model->paycompNas($param)->getResult(); + $p['parsesof'] = $model->sofNas($param)->getResult(); + + echo view('inc/head'); diff --git a/app/Models/Mpemby.php b/app/Models/Mpemby.php index 383d499f..72bb541c 100644 --- a/app/Models/Mpemby.php +++ b/app/Models/Mpemby.php @@ -55,13 +55,34 @@ class Mpemby extends Model $tahunl = $tahun - 1; $bln = date('m'); $query = $this->db->query("SELECT NM_PAJAK,TOTALN PENERIMAAN, - (SELECT ROUND(SUM(TOTAL)) FROM PERJENIS_MV) PENERIMAAN_TOT + (SELECT ROUND(SUM(TOTAL)) FROM PERJENIS_MV WHERE THNBYR = '" . $tahun . "') 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) + FROM PERJENIS_MV + GROUP BY NM_PAJAK ORDER BY TOTALN DESC) WHERE ROWNUM < = 10 "); return $query; } + + + function paycompNas($param) + { + $tahun = $param['tahun']; + $tahunl = $tahun - 1; + $query = $this->db->query("SELECT A.JMLBULAN, A.JUMLAHWP,B.JUMLAHWP JUMLAHWPP FROM + (SELECT TO_NUMBER(BLNBYR) JMLBULAN,JUMLAHWP FROM PAYCOMPNAS + WHERE THNBYR = '" . $tahun . "') A, + (SELECT TO_NUMBER(BLNBYR) JMLBULAN,JUMLAHWP FROM PAYCOMPNAS + WHERE THNBYR = '" . $tahunl . "') B + WHERE A.JMLBULAN =B.JMLBULAN"); + return $query; + } + + function sofNas($param) + { + $tahun = $param['tahun']; + $query = $this->db->query("SELECT LAPISAN,TO_NUMBER(WPBYR) WPBYR,ROUND(TOTAL) TOTAL FROM SOFNAS WHERE THNBYR = '" . $tahun . "'"); + return $query; + } } diff --git a/app/Views/inc/js.php b/app/Views/inc/js.php index 4a6a2462..65409ebd 100644 --- a/app/Views/inc/js.php +++ b/app/Views/inc/js.php @@ -13,6 +13,9 @@ + + + diff --git a/app/Views/inc/sidebar.php b/app/Views/inc/sidebar.php index 19dda028..8b87f196 100644 --- a/app/Views/inc/sidebar.php +++ b/app/Views/inc/sidebar.php @@ -19,7 +19,7 @@ Dashboard