diff --git a/app/Controllers/Bendahara/Apbd.php b/app/Controllers/Bendahara/Apbd.php
new file mode 100644
index 00000000..5b162e27
--- /dev/null
+++ b/app/Controllers/Bendahara/Apbd.php
@@ -0,0 +1,139 @@
+request->getGet('cari_tahun');
+ $cari_bulan_awal = $this->request->getGet('cari_bulan_awal');
+ $cari_bulan_akhir = $this->request->getGet('cari_bulan_akhir');
+ $cari_kanwil = $this->request->getGet('cari_kanwil');
+ $cari_kpp = $this->request->getGet('cari_kpp');
+ $cari_seksi = $this->request->getGet('cari_seksi');
+ $cari_ar = $this->request->getGet('cari_ar');
+ $cari_kabkot = $this->request->getGet('cari_kabkot');
+ $cari_limit = $this->request->getGet('cari_limit');
+ $cari_page = $this->request->getGet('cari_page');
+
+ if (empty($cari_tahun)) $cari_tahun = date('Y');
+ if (empty($cari_bulan_awal)) $cari_bulan_awal = "01";
+ if (empty($cari_bulan_akhir)) $cari_bulan_akhir = date('m');
+ if (empty($cari_limit)) $cari_limit = '25';
+ if (empty($cari_page)) $cari_page = '1';
+
+ if (session('tpkantor') == 'KPP') {
+ $cari_kanwil = session('kwladm');
+ $cari_kpp = session('kppadm');
+ }
+ else if (session('tpkantor') == 'Kanwil') {
+ $cari_kanwil = session('kwladm');
+ }
+
+ $param = array(
+ 'cari_tahun' => $cari_tahun,
+ 'cari_bulan_awal' => $cari_bulan_awal,
+ 'cari_bulan_akhir' => $cari_bulan_akhir,
+ 'cari_kanwil' => $cari_kanwil,
+ 'cari_kpp' => $cari_kpp,
+ 'cari_seksi' => $cari_seksi,
+ 'cari_ar' => $cari_ar,
+ 'cari_kabkot' => $cari_kabkot,
+ 'cari_limit' => $cari_limit,
+ 'cari_page' => $cari_page
+ );
+
+ $p['cari_tahun'] = $cari_tahun;
+ $p['cari_bulan_awal'] = $cari_bulan_awal;
+ $p['cari_bulan_akhir'] = $cari_bulan_akhir;
+ $p['cari_kanwil'] = $cari_kanwil;
+ $p['cari_kpp'] = $cari_kpp;
+ $p['cari_seksi'] = $cari_seksi;
+ $p['cari_ar'] = $cari_ar;
+ $p['cari_kabkot'] = $cari_kabkot;
+ $p['cari_limit'] = $cari_limit;
+ $p['cari_page'] = $cari_page;
+ $p['ref_tahun'] = $general->get_ref_tahun();
+ $p['ref_bulan'] = $general->get_ref_bulan();
+ $p['ref_kanwil'] = $general->get_ref_kanwil();
+ $p['ref_seksi'] = $general->get_ref_seksi();
+ $p['data_apbd'] = $apbd->get_data_apbd($param);
+ $p['data_apbd_total'] = $apbd->get_data_apbd_total($param);
+
+ echo view('inc/head');
+ echo view('inc/js');
+ echo view('inc/navbar');
+ echo view('inc/sidebar');
+ echo view('apbd/index', $p);
+ echo view('inc/footer');
+ }
+ else return redirect()->to(base_url('auth'));
+ }
+
+ public function data_grafik_timeline() {
+ if (session('isLogin')) {
+ $apbdes = new MApbd();
+
+ $cari_tahun = $this->request->getGet('cari_tahun');
+ $cari_bulan_awal = $this->request->getGet('cari_bulan_awal');
+ $cari_bulan_akhir = $this->request->getGet('cari_bulan_akhir');
+ $cari_kanwil = $this->request->getGet('cari_kanwil');
+ $cari_kpp = $this->request->getGet('cari_kpp');
+ $cari_seksi = $this->request->getGet('cari_seksi');
+ $cari_ar = $this->request->getGet('cari_ar');
+ $cari_kabkot = $this->request->getGet('cari_kabkot');
+
+ if (empty($cari_tahun)) $cari_tahun = date('Y');
+ if (empty($cari_bulan_awal)) $cari_bulan_awal = "01";
+ if (empty($cari_bulan_akhir)) $cari_bulan_akhir = date('m');
+
+ if (session('tpkantor') == 'KPP') {
+ $cari_kanwil = session('kwladm');
+ $cari_kpp = session('kppadm');
+ }
+ else if (session('tpkantor') == 'Kanwil') {
+ $cari_kanwil = session('kwladm');
+ }
+
+ $param = array(
+ 'cari_tahun' => $cari_tahun,
+ 'cari_bulan_awal' => $cari_bulan_awal,
+ 'cari_bulan_akhir' => $cari_bulan_akhir,
+ 'cari_kanwil' => $cari_kanwil,
+ 'cari_kpp' => $cari_kpp,
+ 'cari_seksi' => $cari_seksi,
+ 'cari_ar' => $cari_ar,
+ 'cari_kabkot' => $cari_kabkot
+ );
+
+ $data = $apbdes->get_data_apbd_grafik($param);
+
+ $series_1 = [];
+ $series_2 = [];
+ $series_1_temp = 0;
+ $series_2_temp = 0;
+
+ foreach($data as $idx => $val) {
+ $series_1_temp += $val->REAL_TOTAL;
+ $series_2_temp += $val->BAYAR_TOTAL;
+
+ $series_1[$idx] = $series_1_temp;
+ $series_2[$idx] = $series_2_temp;
+ }
+
+ $data_lengkap['realisasi_pagu'] = $series_1;
+ $data_lengkap['realisasi_pajak'] = $series_2;
+
+ echo json_encode($data_lengkap, JSON_NUMERIC_CHECK);
+ }
+ }
+
+}
diff --git a/app/Controllers/Bendahara/Apbdes.php b/app/Controllers/Bendahara/Apbdes.php
new file mode 100644
index 00000000..a96d79bc
--- /dev/null
+++ b/app/Controllers/Bendahara/Apbdes.php
@@ -0,0 +1,139 @@
+request->getGet('cari_tahun');
+ $cari_bulan_awal = $this->request->getGet('cari_bulan_awal');
+ $cari_bulan_akhir = $this->request->getGet('cari_bulan_akhir');
+ $cari_kanwil = $this->request->getGet('cari_kanwil');
+ $cari_kpp = $this->request->getGet('cari_kpp');
+ $cari_seksi = $this->request->getGet('cari_seksi');
+ $cari_ar = $this->request->getGet('cari_ar');
+ $cari_kabkot = $this->request->getGet('cari_kabkot');
+ $cari_limit = $this->request->getGet('cari_limit');
+ $cari_page = $this->request->getGet('cari_page');
+
+ if (empty($cari_tahun)) $cari_tahun = date('Y');
+ if (empty($cari_bulan_awal)) $cari_bulan_awal = "01";
+ if (empty($cari_bulan_akhir)) $cari_bulan_akhir = date('m');
+ if (empty($cari_limit)) $cari_limit = '25';
+ if (empty($cari_page)) $cari_page = '1';
+
+ if (session('tpkantor') == 'KPP') {
+ $cari_kanwil = session('kwladm');
+ $cari_kpp = session('kppadm');
+ }
+ else if (session('tpkantor') == 'Kanwil') {
+ $cari_kanwil = session('kwladm');
+ }
+
+ $param = array(
+ 'cari_tahun' => $cari_tahun,
+ 'cari_bulan_awal' => $cari_bulan_awal,
+ 'cari_bulan_akhir' => $cari_bulan_akhir,
+ 'cari_kanwil' => $cari_kanwil,
+ 'cari_kpp' => $cari_kpp,
+ 'cari_seksi' => $cari_seksi,
+ 'cari_ar' => $cari_ar,
+ 'cari_kabkot' => $cari_kabkot,
+ 'cari_limit' => $cari_limit,
+ 'cari_page' => $cari_page
+ );
+
+ $p['cari_tahun'] = $cari_tahun;
+ $p['cari_bulan_awal'] = $cari_bulan_awal;
+ $p['cari_bulan_akhir'] = $cari_bulan_akhir;
+ $p['cari_kanwil'] = $cari_kanwil;
+ $p['cari_kpp'] = $cari_kpp;
+ $p['cari_seksi'] = $cari_seksi;
+ $p['cari_ar'] = $cari_ar;
+ $p['cari_kabkot'] = $cari_kabkot;
+ $p['cari_limit'] = $cari_limit;
+ $p['cari_page'] = $cari_page;
+ $p['ref_tahun'] = $general->get_ref_tahun();
+ $p['ref_bulan'] = $general->get_ref_bulan();
+ $p['ref_kanwil'] = $general->get_ref_kanwil();
+ $p['ref_seksi'] = $general->get_ref_seksi();
+ $p['data_apbdes'] = $apbdes->get_data_apbdes($param);
+ $p['data_apbdes_total'] = $apbdes->get_data_apbdes_total($param);
+
+ echo view('inc/head');
+ echo view('inc/js');
+ echo view('inc/navbar');
+ echo view('inc/sidebar');
+ echo view('apbdes/index', $p);
+ echo view('inc/footer');
+ }
+ else return redirect()->to(base_url('auth'));
+ }
+
+ public function data_grafik_timeline() {
+ if (session('isLogin')) {
+ $apbdes = new MApbdes();
+
+ $cari_tahun = $this->request->getGet('cari_tahun');
+ $cari_bulan_awal = $this->request->getGet('cari_bulan_awal');
+ $cari_bulan_akhir = $this->request->getGet('cari_bulan_akhir');
+ $cari_kanwil = $this->request->getGet('cari_kanwil');
+ $cari_kpp = $this->request->getGet('cari_kpp');
+ $cari_seksi = $this->request->getGet('cari_seksi');
+ $cari_ar = $this->request->getGet('cari_ar');
+ $cari_kabkot = $this->request->getGet('cari_kabkot');
+
+ if (empty($cari_tahun)) $cari_tahun = date('Y');
+ if (empty($cari_bulan_awal)) $cari_bulan_awal = "01";
+ if (empty($cari_bulan_akhir)) $cari_bulan_akhir = date('m');
+
+ if (session('tpkantor') == 'KPP') {
+ $cari_kanwil = session('kwladm');
+ $cari_kpp = session('kppadm');
+ }
+ else if (session('tpkantor') == 'Kanwil') {
+ $cari_kanwil = session('kwladm');
+ }
+
+ $param = array(
+ 'cari_tahun' => $cari_tahun,
+ 'cari_bulan_awal' => $cari_bulan_awal,
+ 'cari_bulan_akhir' => $cari_bulan_akhir,
+ 'cari_kanwil' => $cari_kanwil,
+ 'cari_kpp' => $cari_kpp,
+ 'cari_seksi' => $cari_seksi,
+ 'cari_ar' => $cari_ar,
+ 'cari_kabkot' => $cari_kabkot
+ );
+
+ $data = $apbdes->get_data_apbdes_grafik($param);
+
+ $series_1 = [];
+ $series_2 = [];
+ $series_1_temp = 0;
+ $series_2_temp = 0;
+
+ foreach($data as $idx => $val) {
+ $series_1_temp += $val->REAL_TOTAL;
+ $series_2_temp += $val->BAYAR_TOTAL;
+
+ $series_1[$idx] = $series_1_temp;
+ $series_2[$idx] = $series_2_temp;
+ }
+
+ $data_lengkap['realisasi_pagu'] = $series_1;
+ $data_lengkap['realisasi_pajak'] = $series_2;
+
+ echo json_encode($data_lengkap, JSON_NUMERIC_CHECK);
+ }
+ }
+
+}
diff --git a/app/Controllers/Bendahara/Apbn.php b/app/Controllers/Bendahara/Apbn.php
new file mode 100644
index 00000000..5eecc420
--- /dev/null
+++ b/app/Controllers/Bendahara/Apbn.php
@@ -0,0 +1,139 @@
+request->getGet('cari_tahun');
+ $cari_bulan_awal = $this->request->getGet('cari_bulan_awal');
+ $cari_bulan_akhir = $this->request->getGet('cari_bulan_akhir');
+ $cari_kanwil = $this->request->getGet('cari_kanwil');
+ $cari_kpp = $this->request->getGet('cari_kpp');
+ $cari_seksi = $this->request->getGet('cari_seksi');
+ $cari_ar = $this->request->getGet('cari_ar');
+ $cari_kabkot = $this->request->getGet('cari_kabkot');
+ $cari_limit = $this->request->getGet('cari_limit');
+ $cari_page = $this->request->getGet('cari_page');
+
+ if (empty($cari_tahun)) $cari_tahun = date('Y');
+ if (empty($cari_bulan_awal)) $cari_bulan_awal = "01";
+ if (empty($cari_bulan_akhir)) $cari_bulan_akhir = date('m');
+ if (empty($cari_limit)) $cari_limit = '25';
+ if (empty($cari_page)) $cari_page = '1';
+
+ if (session('tpkantor') == 'KPP') {
+ $cari_kanwil = session('kwladm');
+ $cari_kpp = session('kppadm');
+ }
+ else if (session('tpkantor') == 'Kanwil') {
+ $cari_kanwil = session('kwladm');
+ }
+
+ $param = array(
+ 'cari_tahun' => $cari_tahun,
+ 'cari_bulan_awal' => $cari_bulan_awal,
+ 'cari_bulan_akhir' => $cari_bulan_akhir,
+ 'cari_kanwil' => $cari_kanwil,
+ 'cari_kpp' => $cari_kpp,
+ 'cari_seksi' => $cari_seksi,
+ 'cari_ar' => $cari_ar,
+ 'cari_kabkot' => $cari_kabkot,
+ 'cari_limit' => $cari_limit,
+ 'cari_page' => $cari_page
+ );
+
+ $p['cari_tahun'] = $cari_tahun;
+ $p['cari_bulan_awal'] = $cari_bulan_awal;
+ $p['cari_bulan_akhir'] = $cari_bulan_akhir;
+ $p['cari_kanwil'] = $cari_kanwil;
+ $p['cari_kpp'] = $cari_kpp;
+ $p['cari_seksi'] = $cari_seksi;
+ $p['cari_ar'] = $cari_ar;
+ $p['cari_kabkot'] = $cari_kabkot;
+ $p['cari_limit'] = $cari_limit;
+ $p['cari_page'] = $cari_page;
+ $p['ref_tahun'] = $general->get_ref_tahun();
+ $p['ref_bulan'] = $general->get_ref_bulan();
+ $p['ref_kanwil'] = $general->get_ref_kanwil();
+ $p['ref_seksi'] = $general->get_ref_seksi();
+ $p['data_apbn'] = $apbn->get_data_apbn($param);
+ $p['data_apbn_total'] = $apbn->get_data_apbn_total($param);
+
+ echo view('inc/head');
+ echo view('inc/js');
+ echo view('inc/navbar');
+ echo view('inc/sidebar');
+ echo view('apbn/index', $p);
+ echo view('inc/footer');
+ }
+ else return redirect()->to(base_url('auth'));
+ }
+
+ public function data_grafik_timeline() {
+ if (session('isLogin')) {
+ $apbdes = new MApbn();
+
+ $cari_tahun = $this->request->getGet('cari_tahun');
+ $cari_bulan_awal = $this->request->getGet('cari_bulan_awal');
+ $cari_bulan_akhir = $this->request->getGet('cari_bulan_akhir');
+ $cari_kanwil = $this->request->getGet('cari_kanwil');
+ $cari_kpp = $this->request->getGet('cari_kpp');
+ $cari_seksi = $this->request->getGet('cari_seksi');
+ $cari_ar = $this->request->getGet('cari_ar');
+ $cari_kabkot = $this->request->getGet('cari_kabkot');
+
+ if (empty($cari_tahun)) $cari_tahun = date('Y');
+ if (empty($cari_bulan_awal)) $cari_bulan_awal = "01";
+ if (empty($cari_bulan_akhir)) $cari_bulan_akhir = date('m');
+
+ if (session('tpkantor') == 'KPP') {
+ $cari_kanwil = session('kwladm');
+ $cari_kpp = session('kppadm');
+ }
+ else if (session('tpkantor') == 'Kanwil') {
+ $cari_kanwil = session('kwladm');
+ }
+
+ $param = array(
+ 'cari_tahun' => $cari_tahun,
+ 'cari_bulan_awal' => $cari_bulan_awal,
+ 'cari_bulan_akhir' => $cari_bulan_akhir,
+ 'cari_kanwil' => $cari_kanwil,
+ 'cari_kpp' => $cari_kpp,
+ 'cari_seksi' => $cari_seksi,
+ 'cari_ar' => $cari_ar,
+ 'cari_kabkot' => $cari_kabkot
+ );
+
+ $data = $apbdes->get_data_apbn_grafik($param);
+
+ $series_1 = [];
+ $series_2 = [];
+ $series_1_temp = 0;
+ $series_2_temp = 0;
+
+ foreach($data as $idx => $val) {
+ $series_1_temp += $val->REAL_TOTAL;
+ $series_2_temp += $val->BAYAR_TOTAL;
+
+ $series_1[$idx] = $series_1_temp;
+ $series_2[$idx] = $series_2_temp;
+ }
+
+ $data_lengkap['realisasi_pagu'] = $series_1;
+ $data_lengkap['realisasi_pajak'] = $series_2;
+
+ echo json_encode($data_lengkap, JSON_NUMERIC_CHECK);
+ }
+ }
+
+}
diff --git a/app/Controllers/Bendahara/Beranda.php b/app/Controllers/Bendahara/Beranda.php
new file mode 100644
index 00000000..8fe365aa
--- /dev/null
+++ b/app/Controllers/Bendahara/Beranda.php
@@ -0,0 +1,319 @@
+to(base_url('Bendahara/beranda/kpp'));
+ else if (session('tpkantor') == 'Kanwil') return redirect()->to(base_url('Bendahara/beranda/kanwil'));
+
+ $cari_tahun = $this->request->getGet('cari_tahun');
+ $cari_bulan_awal = $this->request->getGet('cari_bulan_awal');
+ $cari_bulan_akhir = $this->request->getGet('cari_bulan_akhir');
+ $cari_sumber_dana = $this->request->getGet('cari_sumber_dana');
+ $cari_limit = $this->request->getGet('cari_limit');
+ $cari_page = $this->request->getGet('cari_page');
+
+ if (empty($cari_tahun)) $cari_tahun = date('Y');
+ if (empty($cari_bulan_awal)) $cari_bulan_awal = "01";
+ if (empty($cari_bulan_akhir)) $cari_bulan_akhir = date('m');
+ if (empty($cari_limit)) $cari_limit = "25";
+ if (empty($cari_page)) $cari_page = "1";
+
+ $param = array(
+ 'cari_tahun' => $cari_tahun,
+ 'cari_bulan_awal' => $cari_bulan_awal,
+ 'cari_bulan_akhir' => $cari_bulan_akhir,
+ 'cari_sumber_dana' => $cari_sumber_dana,
+ 'cari_limit' => $cari_limit,
+ 'cari_page' => $cari_page
+ );
+
+ $p['cari_tahun'] = $cari_tahun;
+ $p['cari_bulan_awal'] = $cari_bulan_awal;
+ $p['cari_bulan_akhir'] = $cari_bulan_akhir;
+ $p['cari_sumber_dana'] = $cari_sumber_dana;
+ $p['cari_limit'] = $cari_limit;
+ $p['cari_page'] = $cari_page;
+ $p['ref_tahun'] = $general->get_ref_tahun();
+ $p['ref_bulan'] = $general->get_ref_bulan();
+ $p['data_beranda'] = $beranda->get_data_beranda_index($param);
+ $p['data_beranda_total'] = $beranda->get_data_beranda_index_total($param);
+
+ echo view('inc/head');
+ echo view('inc/js');
+ echo view('inc/navbar');
+ echo view('inc/sidebar');
+ echo view('beranda/index', $p);
+ echo view('inc/footer');
+ }
+ else return redirect()->to(base_url('auth'));
+ }
+
+ public function data_index_grafik_timeline() {
+ if (session('isLogin')) {
+ $beranda = new MBeranda();
+
+ if (session('tpkantor') == 'KPP') return redirect()->to(base_url('Bendahara/beranda/kpp'));
+ else if (session('tpkantor') == 'Kanwil') return redirect()->to(base_url('Bendahara/beranda/kanwil'));
+
+ $cari_tahun = $this->request->getGet('cari_tahun');
+ $cari_bulan_awal = $this->request->getGet('cari_bulan_awal');
+ $cari_bulan_akhir = $this->request->getGet('cari_bulan_akhir');
+ $cari_sumber_dana = $this->request->getGet('cari_sumber_dana');
+
+ if (empty($cari_tahun)) $cari_tahun = date('Y');
+ if (empty($cari_bulan_awal)) $cari_bulan_awal = "01";
+ if (empty($cari_bulan_akhir)) $cari_bulan_akhir = date('m');
+
+ $param = array(
+ 'cari_tahun' => $cari_tahun,
+ 'cari_bulan_awal' => $cari_bulan_awal,
+ 'cari_bulan_akhir' => $cari_bulan_akhir,
+ 'cari_sumber_dana' => $cari_sumber_dana
+ );
+
+ $data = $beranda->get_data_beranda_index_grafik($param);
+
+ $series_1 = [];
+ $series_2 = [];
+ $series_1_temp = 0;
+ $series_2_temp = 0;
+
+ foreach($data as $idx => $val) {
+ $series_1_temp += $val->REAL_TOTAL;
+ $series_2_temp += $val->BAYAR_TOTAL;
+
+ $series_1[$idx] = $series_1_temp;
+ $series_2[$idx] = $series_2_temp;
+ }
+
+ $data_lengkap['realisasi_pagu'] = $series_1;
+ $data_lengkap['realisasi_pajak'] = $series_2;
+
+ echo json_encode($data_lengkap, JSON_NUMERIC_CHECK);
+ }
+ }
+
+ public function kanwil() {
+ if (session('isLogin')) {
+ $general = new MGeneral();
+ $beranda = new MBeranda();
+
+ if (session('tpkantor') == 'KPP') return redirect()->to(base_url('Bendahara/beranda/kpp'));
+
+ $cari_tahun = $this->request->getGet('cari_tahun');
+ $cari_bulan_awal = $this->request->getGet('cari_bulan_awal');
+ $cari_bulan_akhir = $this->request->getGet('cari_bulan_akhir');
+ $cari_kanwil = $this->request->getGet('cari_kanwil');
+ $cari_sumber_dana = $this->request->getGet('cari_sumber_dana');
+ $cari_limit = $this->request->getGet('cari_limit');
+ $cari_page = $this->request->getGet('cari_page');
+
+ if (empty($cari_tahun)) $cari_tahun = date('Y');
+ if (empty($cari_bulan_awal)) $cari_bulan_awal = "01";
+ if (empty($cari_bulan_akhir)) $cari_bulan_akhir = date('m');
+ if (empty($cari_limit)) $cari_limit = "25";
+ if (empty($cari_page)) $cari_page = "1";
+
+ if (session('tpkantor') == 'Kanwil') {
+ $cari_kanwil = session('kwladm');
+ }
+
+ $param = array(
+ 'cari_tahun' => $cari_tahun,
+ 'cari_bulan_awal' => $cari_bulan_awal,
+ 'cari_bulan_akhir' => $cari_bulan_akhir,
+ 'cari_kanwil' => $cari_kanwil,
+ 'cari_sumber_dana' => $cari_sumber_dana,
+ 'cari_limit' => $cari_limit,
+ 'cari_page' => $cari_page
+ );
+
+ $p['cari_tahun'] = $cari_tahun;
+ $p['cari_bulan_awal'] = $cari_bulan_awal;
+ $p['cari_bulan_akhir'] = $cari_bulan_akhir;
+ $p['cari_kanwil'] = $cari_kanwil;
+ $p['cari_sumber_dana'] = $cari_sumber_dana;
+ $p['cari_limit'] = $cari_limit;
+ $p['cari_page'] = $cari_page;
+ $p['ref_tahun'] = $general->get_ref_tahun();
+ $p['ref_bulan'] = $general->get_ref_bulan();
+ $p['ref_kanwil'] = $general->get_ref_kanwil();
+ $p['data_beranda'] = $beranda->get_data_beranda_kanwil($param);
+ $p['data_beranda_total'] = $beranda->get_data_beranda_kanwil_total($param);
+
+ echo view('inc/head');
+ echo view('inc/js');
+ echo view('inc/navbar');
+ echo view('inc/sidebar');
+ echo view('beranda/kanwil', $p);
+ echo view('inc/footer');
+ }
+ else return redirect()->to(base_url('auth'));
+ }
+
+ public function data_kanwil_grafik_timeline() {
+ if (session('isLogin')) {
+ $beranda = new MBeranda();
+
+ if (session('tpkantor') == 'KPP') return redirect()->to(base_url('Bendahara/beranda/kpp'));
+
+ $cari_tahun = $this->request->getGet('cari_tahun');
+ $cari_bulan_awal = $this->request->getGet('cari_bulan_awal');
+ $cari_bulan_akhir = $this->request->getGet('cari_bulan_akhir');
+ $cari_kanwil = $this->request->getGet('cari_kanwil');
+ $cari_sumber_dana = $this->request->getGet('cari_sumber_dana');
+
+ if (empty($cari_tahun)) $cari_tahun = date('Y');
+ if (empty($cari_bulan_awal)) $cari_bulan_awal = "01";
+ if (empty($cari_bulan_akhir)) $cari_bulan_akhir = date('m');
+
+ $param = array(
+ 'cari_tahun' => $cari_tahun,
+ 'cari_bulan_awal' => $cari_bulan_awal,
+ 'cari_bulan_akhir' => $cari_bulan_akhir,
+ 'cari_kanwil' => $cari_kanwil,
+ 'cari_sumber_dana' => $cari_sumber_dana
+ );
+
+ $data = $beranda->get_data_beranda_kanwil_grafik($param);
+
+ $series_1 = [];
+ $series_2 = [];
+ $series_1_temp = 0;
+ $series_2_temp = 0;
+
+ foreach($data as $idx => $val) {
+ $series_1_temp += $val->REAL_TOTAL;
+ $series_2_temp += $val->BAYAR_TOTAL;
+
+ $series_1[$idx] = $series_1_temp;
+ $series_2[$idx] = $series_2_temp;
+ }
+
+ $data_lengkap['realisasi_pagu'] = $series_1;
+ $data_lengkap['realisasi_pajak'] = $series_2;
+
+ echo json_encode($data_lengkap, JSON_NUMERIC_CHECK);
+ }
+ }
+
+ public function kpp() {
+ if (session('isLogin')) {
+ $general = new MGeneral();
+ $beranda = new MBeranda();
+
+ $cari_tahun = $this->request->getGet('cari_tahun');
+ $cari_bulan_awal = $this->request->getGet('cari_bulan_awal');
+ $cari_bulan_akhir = $this->request->getGet('cari_bulan_akhir');
+ $cari_kanwil = $this->request->getGet('cari_kanwil');
+ $cari_kpp = $this->request->getGet('cari_kpp');
+ $cari_sumber_dana = $this->request->getGet('cari_sumber_dana');
+ $cari_limit = $this->request->getGet('cari_limit');
+ $cari_page = $this->request->getGet('cari_page');
+
+ if (empty($cari_tahun)) $cari_tahun = date('Y');
+ if (empty($cari_bulan_awal)) $cari_bulan_awal = "01";
+ if (empty($cari_bulan_akhir)) $cari_bulan_akhir = date('m');
+ if (empty($cari_limit)) $cari_limit = "25";
+ if (empty($cari_page)) $cari_page = "1";
+
+ if (session('tpkantor') == 'KPP') {
+ $cari_kanwil = session('kwladm');
+ $cari_kpp = session('kppadm');
+ }
+ else if (session('tpkantor') == 'Kanwil') {
+ $cari_kanwil = session('kwladm');
+ }
+
+ $param = array(
+ 'cari_tahun' => $cari_tahun,
+ 'cari_bulan_awal' => $cari_bulan_awal,
+ 'cari_bulan_akhir' => $cari_bulan_akhir,
+ 'cari_kanwil' => $cari_kanwil,
+ 'cari_kpp' => $cari_kpp,
+ 'cari_sumber_dana' => $cari_sumber_dana,
+ 'cari_limit' => $cari_limit,
+ 'cari_page' => $cari_page
+ );
+
+ $p['cari_tahun'] = $cari_tahun;
+ $p['cari_bulan_awal'] = $cari_bulan_awal;
+ $p['cari_bulan_akhir'] = $cari_bulan_akhir;
+ $p['cari_kanwil'] = $cari_kanwil;
+ $p['cari_kpp'] = $cari_kpp;
+ $p['cari_sumber_dana'] = $cari_sumber_dana;
+ $p['cari_limit'] = $cari_limit;
+ $p['cari_page'] = $cari_page;
+ $p['ref_tahun'] = $general->get_ref_tahun();
+ $p['ref_bulan'] = $general->get_ref_bulan();
+ $p['ref_kanwil'] = $general->get_ref_kanwil();
+ $p['data_beranda'] = $beranda->get_data_beranda_kpp($param);
+ $p['data_beranda_total'] = $beranda->get_data_beranda_kpp_total($param);
+
+ echo view('inc/head');
+ echo view('inc/js');
+ echo view('inc/navbar');
+ echo view('inc/sidebar');
+ echo view('beranda/kpp', $p);
+ echo view('inc/footer');
+ }
+ else return redirect()->to(base_url('auth'));
+ }
+
+ public function data_kpp_grafik_timeline() {
+ if (session('isLogin')) {
+ $beranda = new MBeranda();
+
+ $cari_tahun = $this->request->getGet('cari_tahun');
+ $cari_bulan_awal = $this->request->getGet('cari_bulan_awal');
+ $cari_bulan_akhir = $this->request->getGet('cari_bulan_akhir');
+ $cari_kanwil = $this->request->getGet('cari_kanwil');
+ $cari_kpp = $this->request->getGet('cari_kpp');
+ $cari_sumber_dana = $this->request->getGet('cari_sumber_dana');
+
+ if (empty($cari_tahun)) $cari_tahun = date('Y');
+ if (empty($cari_bulan_awal)) $cari_bulan_awal = "01";
+ if (empty($cari_bulan_akhir)) $cari_bulan_akhir = date('m');
+
+ $param = array(
+ 'cari_tahun' => $cari_tahun,
+ 'cari_bulan_awal' => $cari_bulan_awal,
+ 'cari_bulan_akhir' => $cari_bulan_akhir,
+ 'cari_kanwil' => $cari_kanwil,
+ 'cari_kpp' => $cari_kpp,
+ 'cari_sumber_dana' => $cari_sumber_dana
+ );
+
+ $data = $beranda->get_data_beranda_kpp_grafik($param);
+
+ $series_1 = [];
+ $series_2 = [];
+ $series_1_temp = 0;
+ $series_2_temp = 0;
+
+ foreach($data as $idx => $val) {
+ $series_1_temp += $val->REAL_TOTAL;
+ $series_2_temp += $val->BAYAR_TOTAL;
+
+ $series_1[$idx] = $series_1_temp;
+ $series_2[$idx] = $series_2_temp;
+ }
+
+ $data_lengkap['realisasi_pagu'] = $series_1;
+ $data_lengkap['realisasi_pajak'] = $series_2;
+
+ echo json_encode($data_lengkap, JSON_NUMERIC_CHECK);
+ }
+ }
+
+}
diff --git a/app/Controllers/Bendahara/General.php b/app/Controllers/Bendahara/General.php
new file mode 100644
index 00000000..58c73397
--- /dev/null
+++ b/app/Controllers/Bendahara/General.php
@@ -0,0 +1,63 @@
+request->getGet('kanwil');
+
+ $param = array(
+ 'kanwil' => $kanwil
+ );
+
+ $data_kpp = $general->get_ref_kpp($param);
+
+ echo json_encode($data_kpp);
+ }
+ }
+
+ public function get_ref_ar() {
+ if (session('isLogin')) {
+ $general = new MGeneral();
+
+ $kpp = $this->request->getGet('kpp');
+ $seksi = $this->request->getGet('seksi');
+
+ $param = array(
+ 'kpp' => $kpp,
+ 'seksi' => $seksi
+ );
+
+ $data_kpp = $general->get_ref_ar($param);
+
+ echo json_encode($data_kpp);
+ }
+ }
+
+ public function get_ref_kabkot() {
+ if (session('isLogin')) {
+ $general = new MGeneral();
+
+ $kpp = $this->request->getGet('kpp');
+
+ $param = array(
+ 'kpp' => $kpp
+ );
+
+ $data_kpp = $general->get_ref_kabkot($param);
+
+ echo json_encode($data_kpp);
+ }
+ }
+
+}
diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php
index 39c2654c..9616fa5a 100644
--- a/app/Controllers/Home.php
+++ b/app/Controllers/Home.php
@@ -356,4 +356,48 @@ class Home extends BaseController
return redirect()->to('auth');
}
}
+
+
+ function wpskpoc(){
+ if (session('isLogin')) {
+ $uri = service('uri');
+ $param = array(
+ 'tahun' => $uri->getSegment('3'),
+ 'bulan' => $uri->getSegment('4'),
+ 'kwl' => $uri->getSegment('5'),
+ 'kpp' => $uri->getSegment('6'),
+ 'src' => $uri->getSegment('7')
+ );
+
+ $p['sourcex'] = $uri->getSegment('7');
+ $model = new Mpemby();
+ $p['paycomp'] = $model->wpsk_paycompNas($param)->getResult();
+ echo view('ppm/wpskpoc', $p);
+ } else {
+ return redirect()->to('auth');
+ }
+
+ }
+
+ function wpsksof(){
+ if (session('isLogin')) {
+ $uri = service('uri');
+ $param = array(
+ 'tahun' => $uri->getSegment('3'),
+ 'bulan' => $uri->getSegment('4'),
+ 'kwl' => $uri->getSegment('5'),
+ 'kpp' => $uri->getSegment('6'),
+ 'src' => $uri->getSegment('7')
+ );
+
+ $p['sourcex'] = $uri->getSegment('7');
+ $p['tahunx'] = $uri->getSegment('3');
+ $model = new Mpemby();
+ $p['SoF'] = $model->wpsk_sofNas($param)->getResult();
+ echo view('ppm/wpsksof', $p);
+ } else {
+ return redirect()->to('auth');
+ }
+
+ }
}
diff --git a/app/Controllers/Kewilayahan/Peta.php b/app/Controllers/Kewilayahan/Peta.php
index 4481ee99..d089e7ab 100644
--- a/app/Controllers/Kewilayahan/Peta.php
+++ b/app/Controllers/Kewilayahan/Peta.php
@@ -87,10 +87,13 @@ class Peta extends Controller
$data = $db->table('KPDL_MV_POI_GOOGLE A')
->select("ID_DATA, NAMA, ALAMAT, CATEGORY, NM_AR_ZONA, B.NM_KANTOR,
TOP_IMAGE_URL, ADM1_EN, ADM2_EN, ADM3_EN, ADM4_EN,
- to_number(regexp_replace(RATING , ',', '.')) RATING,
+ (regexp_replace(RATING , ',' , '.')) RATING,
to_number(regexp_replace(REVIEWS , '[^[:digit:]]', '')) REVIEW")
->join('REF_KPP B', 'A.KD_KPP_ZONA =B.KD_KPP', 'left')
- ->where('ID_DATA', $id_data)->get()->getRowArray();
+ ->where('ID_DATA', $id_data);
+ // print_r($data->getCompiledSelect());
+ //exit;
+ $data = $data->get()->getRowArray();
return $this->respond(array_change_key_case($data), 200);
}
diff --git a/app/Controllers/Rapor.php b/app/Controllers/Rapor.php
index b04f4ffd..8b9d42d4 100644
--- a/app/Controllers/Rapor.php
+++ b/app/Controllers/Rapor.php
@@ -368,7 +368,7 @@ class Rapor extends BaseController
$p['selkpp'] = $modelref->selKpp($kwl)->getResult();
$p['selseksi'] = $modelref->selSeksi($kpp)->getResult();
$p['refbulan'] = $modelref->getBln();
- $p['data'] = $model->;
+ //$p['data'] = $model->;
echo view('inc/head');
diff --git a/app/Helpers/myhelper_helper.php b/app/Helpers/myhelper_helper.php
index 9d14503a..89ba18e7 100644
--- a/app/Helpers/myhelper_helper.php
+++ b/app/Helpers/myhelper_helper.php
@@ -10,3 +10,10 @@ if (!function_exists('nomor')) {
return $nomor;
}
}
+
+function remove_url_param($url, $remove) {
+ parse_str(parse_url($url)['query'], $url_param);
+ unset($url_param[$remove]);
+
+ return current_url()."?".http_build_query($url_param);
+}
diff --git a/app/Models/Bendahara/.gitkeep b/app/Models/Bendahara/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/app/Models/Bendahara/MApbd.php b/app/Models/Bendahara/MApbd.php
new file mode 100644
index 00000000..377a3a5d
--- /dev/null
+++ b/app/Models/Bendahara/MApbd.php
@@ -0,0 +1,210 @@
+ "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ if($param['cari_kpp'] <> "") $cari_kpp = " AND KD_KPP = '".$param['cari_kpp']."' ";
+ else $cari_kpp = "";
+
+ if($param['cari_seksi'] <> "") $cari_seksi = " AND KD_SEKSI = '".$param['cari_seksi']."' ";
+ else $cari_seksi = "";
+
+ if($param['cari_ar'] <> "") $cari_ar = " AND NIP_AR = '".$param['cari_ar']."' ";
+ else $cari_ar = "";
+
+ if($param['cari_kabkot'] <> "") $cari_kabkot = " AND KABKOTA = '".$param['cari_kabkot']."' ";
+ else $cari_kabkot = "";
+
+ $limit_bottom = ($param['cari_page'] * $param['cari_limit']) - $param['cari_limit'];
+
+ $query = "SELECT
+ TAHUN, KD_KANWIL, NM_KANWIL,
+ KD_KPP, NM_KPP, KABKOTA, KD_SEKSI, NM_SEKSI,
+ NIP_AR, NM_AR, NPWP, KODE_SATKER, NAMA_SATKER,
+ PAGU_PEGAWAI, PAGU_BARANG, PAGU_MODAL, PAGU_SOSIAL, PAGU_LAINNYA, PAGU_TOTAL,
+ ESTI_PPH21_PAGU, ESTI_PPH22_PAGU, ESTI_PPH23_PAGU, ESTI_PPH42_PAGU, ESTI_PPN_PAGU, ESTI_TOTAL_PAGU,
+
+ SUM(REAL_PEGAWAI) REAL_PEGAWAI,
+ SUM(REAL_BARANG) REAL_BARANG,
+ SUM(REAL_MODAL) REAL_MODAL,
+ SUM(REAL_SOSIAL) REAL_SOSIAL,
+ SUM(REAL_LAINNYA) REAL_LAINNYA,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_PPH21_REAL) ESTI_PPH21_REAL,
+ SUM(ESTI_PPH22_REAL) ESTI_PPH22_REAL,
+ SUM(ESTI_PPH23_REAL) ESTI_PPH23_REAL,
+ SUM(ESTI_PPH42_REAL) ESTI_PPH42_REAL,
+ SUM(ESTI_PPN_REAL) ESTI_PPN_REAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_PPH21) BAYAR_PPH21,
+ SUM(BAYAR_PPH22) BAYAR_PPH22,
+ SUM(BAYAR_PPH23) BAYAR_PPH23,
+ SUM(BAYAR_PPH42) BAYAR_PPH42,
+ SUM(BAYAR_PPN) BAYAR_PPN,
+ SUM(BAYAR_LAINNYA) BAYAR_LAINNYA,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL,
+ (NVL(ESTI_PPH21_PAGU, 0) - NVL(SUM(BAYAR_PPH21), 0)) TAXGAP_PPH21_PAGU,
+ (NVL(ESTI_PPH22_PAGU, 0) - NVL(SUM(BAYAR_PPH22), 0)) TAXGAP_PPH22_PAGU,
+ (NVL(ESTI_PPH23_PAGU, 0) - NVL(SUM(BAYAR_PPH23), 0)) TAXGAP_PPH23_PAGU,
+ (NVL(ESTI_PPH42_PAGU, 0) - NVL(SUM(BAYAR_PPH42), 0)) TAXGAP_PPH42_PAGU,
+ (NVL(ESTI_PPN_PAGU, 0) - NVL(SUM(BAYAR_PPN), 0)) TAXGAP_PPN_PAGU,
+ (NVL(ESTI_TOTAL_PAGU, 0) - NVL(SUM(BAYAR_TOTAL), 0)) TAXGAP_TOTAL_PAGU,
+ (NVL(SUM(ESTI_PPH21_REAL), 0) - NVL(SUM(BAYAR_PPH21), 0)) TAXGAP_PPH21_REAL,
+ (NVL(SUM(ESTI_PPH22_REAL), 0) - NVL(SUM(BAYAR_PPH22), 0)) TAXGAP_PPH22_REAL,
+ (NVL(SUM(ESTI_PPH23_REAL), 0) - NVL(SUM(BAYAR_PPH23), 0)) TAXGAP_PPH23_REAL,
+ (NVL(SUM(ESTI_PPH42_REAL), 0) - NVL(SUM(BAYAR_PPH42), 0)) TAXGAP_PPH42_REAL,
+ (NVL(SUM(ESTI_PPN_REAL), 0) - NVL(SUM(BAYAR_PPN), 0)) TAXGAP_PPN_REAL,
+ (NVL(SUM(ESTI_TOTAL_REAL), 0) - NVL(SUM(BAYAR_TOTAL), 0)) TAXGAP_TOTAL_REAL,
+ ROUND(((NVL(SUM(BAYAR_TOTAL), 0) / NULLIF(NVL(PAGU_TOTAL, 0), 0))*100), 2) TAX_COLLECTION
+ FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp $cari_seksi $cari_ar $cari_kabkot
+ GROUP BY TAHUN, KD_KANWIL, NM_KANWIL,
+ KD_KPP, NM_KPP, KABKOTA, KD_SEKSI, NM_SEKSI,
+ NIP_AR, NM_AR, NPWP, KODE_SATKER, NAMA_SATKER,
+ PAGU_PEGAWAI, PAGU_BARANG, PAGU_MODAL, PAGU_SOSIAL, PAGU_LAINNYA, PAGU_TOTAL,
+ ESTI_PPH21_PAGU, ESTI_PPH22_PAGU, ESTI_PPH23_PAGU,ESTI_PPH42_PAGU, ESTI_PPN_PAGU, ESTI_TOTAL_PAGU
+ ORDER BY KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER
+ OFFSET $limit_bottom ROWS FETCH NEXT ".$param['cari_limit']." ROWS ONLY";
+ //echo $query;
+ //exit;
+
+ return $this->db->query($query)->getResult();
+ }
+
+ function get_data_apbd_total($param) {
+ if($param['cari_kanwil'] <> "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ if($param['cari_kpp'] <> "") $cari_kpp = " AND KD_KPP = '".$param['cari_kpp']."' ";
+ else $cari_kpp = "";
+
+ if($param['cari_seksi'] <> "") $cari_seksi = " AND KD_SEKSI = '".$param['cari_seksi']."' ";
+ else $cari_seksi = "";
+
+ if($param['cari_ar'] <> "") $cari_ar = " AND NIP_AR = '".$param['cari_ar']."' ";
+ else $cari_ar = "";
+
+ if($param['cari_kabkot'] <> "") $cari_kabkot = " AND KABKOTA = '".$param['cari_kabkot']."' ";
+ else $cari_kabkot = "";
+
+ $query = "SELECT
+ SUM(PAGU_PEGAWAI) PAGU_PEGAWAI,
+ SUM(PAGU_BARANG) PAGU_BARANG,
+ SUM(PAGU_MODAL) PAGU_MODAL,
+ SUM(PAGU_SOSIAL) PAGU_SOSIAL,
+ SUM(PAGU_LAINNYA) PAGU_LAINNYA,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(ESTI_PPH21_PAGU) ESTI_PPH21_PAGU,
+ SUM(ESTI_PPH22_PAGU) ESTI_PPH22_PAGU,
+ SUM(ESTI_PPH23_PAGU) ESTI_PPH23_PAGU,
+ SUM(ESTI_PPH42_PAGU) ESTI_PPH42_PAGU,
+ SUM(ESTI_PPN_PAGU) ESTI_PPN_PAGU,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(REAL_PEGAWAI) REAL_PEGAWAI,
+ SUM(REAL_BARANG) REAL_BARANG,
+ SUM(REAL_MODAL) REAL_MODAL,
+ SUM(REAL_SOSIAL) REAL_SOSIAL,
+ SUM(REAL_LAINNYA) REAL_LAINNYA,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_PPH21_REAL) ESTI_PPH21_REAL,
+ SUM(ESTI_PPH22_REAL) ESTI_PPH22_REAL,
+ SUM(ESTI_PPH23_REAL) ESTI_PPH23_REAL,
+ SUM(ESTI_PPH42_REAL) ESTI_PPH42_REAL,
+ SUM(ESTI_PPN_REAL) ESTI_PPN_REAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_PPH21) BAYAR_PPH21,
+ SUM(BAYAR_PPH22) BAYAR_PPH22,
+ SUM(BAYAR_PPH23) BAYAR_PPH23,
+ SUM(BAYAR_PPH42) BAYAR_PPH42,
+ SUM(BAYAR_PPN) BAYAR_PPN,
+ SUM(BAYAR_LAINNYA) BAYAR_LAINNYA,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL,
+ (NVL(SUM(ESTI_PPH21_PAGU), 0) - NVL(SUM(BAYAR_PPH21), 0)) TAXGAP_PPH21_PAGU,
+ (NVL(SUM(ESTI_PPH22_PAGU), 0) - NVL(SUM(BAYAR_PPH22), 0)) TAXGAP_PPH22_PAGU,
+ (NVL(SUM(ESTI_PPH23_PAGU), 0) - NVL(SUM(BAYAR_PPH23), 0)) TAXGAP_PPH23_PAGU,
+ (NVL(SUM(ESTI_PPH42_PAGU), 0) - NVL(SUM(BAYAR_PPH42), 0)) TAXGAP_PPH42_PAGU,
+ (NVL(SUM(ESTI_PPN_PAGU), 0) - NVL(SUM(BAYAR_PPN), 0)) TAXGAP_PPN_PAGU,
+ (NVL(SUM(ESTI_TOTAL_PAGU), 0) - NVL(SUM(BAYAR_TOTAL), 0)) TAXGAP_TOTAL_PAGU,
+ (NVL(SUM(ESTI_PPH21_REAL), 0) - NVL(SUM(BAYAR_PPH21), 0)) TAXGAP_PPH21_REAL,
+ (NVL(SUM(ESTI_PPH22_REAL), 0) - NVL(SUM(BAYAR_PPH22), 0)) TAXGAP_PPH22_REAL,
+ (NVL(SUM(ESTI_PPH23_REAL), 0) - NVL(SUM(BAYAR_PPH23), 0)) TAXGAP_PPH23_REAL,
+ (NVL(SUM(ESTI_PPH42_REAL), 0) - NVL(SUM(BAYAR_PPH42), 0)) TAXGAP_PPH42_REAL,
+ (NVL(SUM(ESTI_PPN_REAL), 0) - NVL(SUM(BAYAR_PPN), 0)) TAXGAP_PPN_REAL,
+ (NVL(SUM(ESTI_TOTAL_REAL), 0) - NVL(SUM(BAYAR_TOTAL), 0)) TAXGAP_TOTAL_REAL,
+ ROUND(((NVL(SUM(BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(PAGU_TOTAL), 0), 0))*100), 2) TAX_COLLECTION,
+ COUNT(*) KUANTITAS
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, NM_KANWIL,
+ KD_KPP, NM_KPP, KABKOTA, KD_SEKSI, NM_SEKSI,
+ NIP_AR, NM_AR, NPWP, NAMA_SATKER,
+ PAGU_PEGAWAI, PAGU_BARANG, PAGU_MODAL, PAGU_SOSIAL, PAGU_LAINNYA, PAGU_TOTAL,
+ ESTI_PPH21_PAGU, ESTI_PPH22_PAGU, ESTI_PPH23_PAGU, ESTI_PPH42_PAGU, ESTI_PPN_PAGU, ESTI_TOTAL_PAGU,
+
+ SUM(REAL_PEGAWAI) REAL_PEGAWAI,
+ SUM(REAL_BARANG) REAL_BARANG,
+ SUM(REAL_MODAL) REAL_MODAL,
+ SUM(REAL_SOSIAL) REAL_SOSIAL,
+ SUM(REAL_LAINNYA) REAL_LAINNYA,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_PPH21_REAL) ESTI_PPH21_REAL,
+ SUM(ESTI_PPH22_REAL) ESTI_PPH22_REAL,
+ SUM(ESTI_PPH23_REAL) ESTI_PPH23_REAL,
+ SUM(ESTI_PPH42_REAL) ESTI_PPH42_REAL,
+ SUM(ESTI_PPN_REAL) ESTI_PPN_REAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_PPH21) BAYAR_PPH21,
+ SUM(BAYAR_PPH22) BAYAR_PPH22,
+ SUM(BAYAR_PPH23) BAYAR_PPH23,
+ SUM(BAYAR_PPH42) BAYAR_PPH42,
+ SUM(BAYAR_PPN) BAYAR_PPN,
+ SUM(BAYAR_LAINNYA) BAYAR_LAINNYA,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp $cari_seksi $cari_ar $cari_kabkot
+ GROUP BY TAHUN, KD_KANWIL, NM_KANWIL,
+ KD_KPP, NM_KPP, KABKOTA, KD_SEKSI, NM_SEKSI,
+ NIP_AR, NM_AR, NPWP, NAMA_SATKER,
+ PAGU_PEGAWAI, PAGU_BARANG, PAGU_MODAL, PAGU_SOSIAL, PAGU_LAINNYA, PAGU_TOTAL,
+ ESTI_PPH21_PAGU, ESTI_PPH22_PAGU, ESTI_PPH23_PAGU, ESTI_PPH42_PAGU, ESTI_PPN_PAGU, ESTI_TOTAL_PAGU
+ ORDER BY KD_KANWIL, KD_KPP, KABKOTA, NPWP, NAMA_SATKER) A";
+ //echo $query;
+ //exit;
+
+ return $this->db->query($query)->getRow();
+ }
+
+ function get_data_apbd_grafik($param) {
+ if($param['cari_kanwil'] <> "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ if($param['cari_kpp'] <> "") $cari_kpp = " AND KD_KPP = '".$param['cari_kpp']."' ";
+ else $cari_kpp = "";
+
+ if($param['cari_seksi'] <> "") $cari_seksi = " AND KD_SEKSI = '".$param['cari_seksi']."' ";
+ else $cari_seksi = "";
+
+ if($param['cari_ar'] <> "") $cari_ar = " AND NIP_AR = '".$param['cari_ar']."' ";
+ else $cari_ar = "";
+
+ if($param['cari_kabkot'] <> "") $cari_kabkot = " AND KABKOTA = '".$param['cari_kabkot']."' ";
+ else $cari_kabkot = "";
+
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp $cari_seksi $cari_ar $cari_kabkot
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+
+ return $this->db->query($query)->getResult();
+ }
+
+}
diff --git a/app/Models/Bendahara/MApbdes.php b/app/Models/Bendahara/MApbdes.php
new file mode 100644
index 00000000..ba37f712
--- /dev/null
+++ b/app/Models/Bendahara/MApbdes.php
@@ -0,0 +1,162 @@
+ "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ if($param['cari_kpp'] <> "") $cari_kpp = " AND KD_KPP = '".$param['cari_kpp']."' ";
+ else $cari_kpp = "";
+
+ if($param['cari_seksi'] <> "") $cari_seksi = " AND KD_SEKSI = '".$param['cari_seksi']."' ";
+ else $cari_seksi = "";
+
+ if($param['cari_ar'] <> "") $cari_ar = " AND NIP_AR = '".$param['cari_ar']."' ";
+ else $cari_ar = "";
+
+ if($param['cari_kabkot'] <> "") $cari_kabkot = " AND KABKOTA = '".$param['cari_kabkot']."' ";
+ else $cari_kabkot = "";
+
+ $limit_bottom = ($param['cari_page'] * $param['cari_limit']) - $param['cari_limit'];
+
+ $query = "SELECT
+ TAHUN, KD_KANWIL, NM_KANWIL,
+ KD_KPP, NM_KPP, KABKOTA, KECAMATAN, KD_SEKSI, NM_SEKSI,
+ NIP_AR, NM_AR, NPWP, NAMA_DESA, NAMA_WP,
+ PAGU_DANA_ADD, PAGU_DANA_DESA, PAGU_BAGI_HASIL, PAGU_LAINNYA, PAGU_TOTAL,
+ ESTI_TOTAL_PAGU,
+
+ SUM(REAL_DANA_ADD) REAL_DANA_ADD,
+ SUM(REAL_DANA_DESA) REAL_DANA_DESA,
+ SUM(REAL_BAGI_HASIL) REAL_BAGI_HASIL,
+ SUM(REAL_LAINNYA) REAL_LAINNYA,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_PPH21) BAYAR_PPH21,
+ SUM(BAYAR_PPH22) BAYAR_PPH22,
+ SUM(BAYAR_PPH23) BAYAR_PPH23,
+ SUM(BAYAR_PPH42) BAYAR_PPH42,
+ SUM(BAYAR_PPN) BAYAR_PPN,
+ SUM(BAYAR_LAINNYA) BAYAR_LAINNYA,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL,
+ (NVL(ESTI_TOTAL_PAGU, 0) - NVL(SUM(BAYAR_TOTAL), 0)) TAXGAP_TOTAL_PAGU,
+ (NVL(SUM(ESTI_TOTAL_REAL), 0) - NVL(SUM(BAYAR_TOTAL), 0)) TAXGAP_TOTAL_REAL,
+ ROUND(((NVL(SUM(BAYAR_TOTAL), 0) / NULLIF(NVL(PAGU_TOTAL, 0), 0))*100), 2) TAX_COLLECTION
+ FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp $cari_seksi $cari_ar $cari_kabkot
+ GROUP BY TAHUN, KD_KANWIL, NM_KANWIL,
+ KD_KPP, NM_KPP, KABKOTA, KECAMATAN, KD_SEKSI, NM_SEKSI,
+ NIP_AR, NM_AR, NPWP, NAMA_DESA, NAMA_WP,
+ PAGU_DANA_ADD, PAGU_DANA_DESA, PAGU_BAGI_HASIL, PAGU_LAINNYA, PAGU_TOTAL,
+ ESTI_TOTAL_PAGU
+ ORDER BY KD_KANWIL, KD_KPP, KABKOTA, KECAMATAN, NAMA_DESA
+ OFFSET $limit_bottom ROWS FETCH NEXT ".$param['cari_limit']." ROWS ONLY";
+
+ return $this->db->query($query)->getResult();
+ }
+
+ function get_data_apbdes_total($param) {
+ if($param['cari_kanwil'] <> "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ if($param['cari_kpp'] <> "") $cari_kpp = " AND KD_KPP = '".$param['cari_kpp']."' ";
+ else $cari_kpp = "";
+
+ if($param['cari_seksi'] <> "") $cari_seksi = " AND KD_SEKSI = '".$param['cari_seksi']."' ";
+ else $cari_seksi = "";
+
+ if($param['cari_ar'] <> "") $cari_ar = " AND NIP_AR = '".$param['cari_ar']."' ";
+ else $cari_ar = "";
+
+ if($param['cari_kabkot'] <> "") $cari_kabkot = " AND KABKOTA = '".$param['cari_kabkot']."' ";
+ else $cari_kabkot = "";
+
+ $query = "SELECT
+ SUM(PAGU_DANA_ADD) PAGU_DANA_ADD,
+ SUM(PAGU_DANA_DESA) PAGU_DANA_DESA,
+ SUM(PAGU_BAGI_HASIL) PAGU_BAGI_HASIL,
+ SUM(PAGU_LAINNYA) PAGU_LAINNYA,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(REAL_DANA_ADD) REAL_DANA_ADD,
+ SUM(REAL_DANA_DESA) REAL_DANA_DESA,
+ SUM(REAL_BAGI_HASIL) REAL_BAGI_HASIL,
+ SUM(REAL_LAINNYA) REAL_LAINNYA,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_PPH21) BAYAR_PPH21,
+ SUM(BAYAR_PPH22) BAYAR_PPH22,
+ SUM(BAYAR_PPH23) BAYAR_PPH23,
+ SUM(BAYAR_PPH42) BAYAR_PPH42,
+ SUM(BAYAR_PPN) BAYAR_PPN,
+ SUM(BAYAR_LAINNYA) BAYAR_LAINNYA,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL,
+ (NVL(SUM(ESTI_TOTAL_PAGU), 0) - NVL(SUM(BAYAR_TOTAL), 0)) TAXGAP_TOTAL_PAGU,
+ (NVL(SUM(ESTI_TOTAL_REAL), 0) - NVL(SUM(BAYAR_TOTAL), 0)) TAXGAP_TOTAL_REAL,
+ ROUND(((NVL(SUM(BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(PAGU_TOTAL), 0), 0))*100), 2) TAX_COLLECTION,
+ COUNT(*) KUANTITAS
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, NM_KANWIL,
+ KD_KPP, NM_KPP, KABKOTA, KECAMATAN, KD_SEKSI, NM_SEKSI,
+ NIP_AR, NM_AR, NPWP, NAMA_DESA, NAMA_WP,
+ PAGU_DANA_ADD, PAGU_DANA_DESA, PAGU_BAGI_HASIL, PAGU_LAINNYA, PAGU_TOTAL,
+ ESTI_TOTAL_PAGU,
+
+ SUM(REAL_DANA_ADD) REAL_DANA_ADD,
+ SUM(REAL_DANA_DESA) REAL_DANA_DESA,
+ SUM(REAL_BAGI_HASIL) REAL_BAGI_HASIL,
+ SUM(REAL_LAINNYA) REAL_LAINNYA,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_PPH21) BAYAR_PPH21,
+ SUM(BAYAR_PPH22) BAYAR_PPH22,
+ SUM(BAYAR_PPH23) BAYAR_PPH23,
+ SUM(BAYAR_PPH42) BAYAR_PPH42,
+ SUM(BAYAR_PPN) BAYAR_PPN,
+ SUM(BAYAR_LAINNYA) BAYAR_LAINNYA,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp $cari_seksi $cari_ar $cari_kabkot
+ GROUP BY TAHUN, KD_KANWIL, NM_KANWIL,
+ KD_KPP, NM_KPP, KABKOTA, KECAMATAN, KD_SEKSI, NM_SEKSI,
+ NIP_AR, NM_AR, NPWP, NAMA_DESA, NAMA_WP,
+ PAGU_DANA_ADD, PAGU_DANA_DESA, PAGU_BAGI_HASIL, PAGU_LAINNYA, PAGU_TOTAL,
+ ESTI_TOTAL_PAGU
+ ORDER BY KD_KANWIL, KD_KPP, KABKOTA, KECAMATAN, NAMA_DESA) A";
+
+ return $this->db->query($query)->getRow();
+ }
+
+ function get_data_apbdes_grafik($param) {
+ if($param['cari_kanwil'] <> "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ if($param['cari_kpp'] <> "") $cari_kpp = " AND KD_KPP = '".$param['cari_kpp']."' ";
+ else $cari_kpp = "";
+
+ if($param['cari_seksi'] <> "") $cari_seksi = " AND KD_SEKSI = '".$param['cari_seksi']."' ";
+ else $cari_seksi = "";
+
+ if($param['cari_ar'] <> "") $cari_ar = " AND NIP_AR = '".$param['cari_ar']."' ";
+ else $cari_ar = "";
+
+ if($param['cari_kabkot'] <> "") $cari_kabkot = " AND KABKOTA = '".$param['cari_kabkot']."' ";
+ else $cari_kabkot = "";
+
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp $cari_seksi $cari_ar $cari_kabkot
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+
+ return $this->db->query($query)->getResult();
+ }
+
+}
diff --git a/app/Models/Bendahara/MApbn.php b/app/Models/Bendahara/MApbn.php
new file mode 100644
index 00000000..f296e04a
--- /dev/null
+++ b/app/Models/Bendahara/MApbn.php
@@ -0,0 +1,210 @@
+ "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ if($param['cari_kpp'] <> "") $cari_kpp = " AND KD_KPP = '".$param['cari_kpp']."' ";
+ else $cari_kpp = "";
+
+ if($param['cari_seksi'] <> "") $cari_seksi = " AND KD_SEKSI = '".$param['cari_seksi']."' ";
+ else $cari_seksi = "";
+
+ if($param['cari_ar'] <> "") $cari_ar = " AND NIP_AR = '".$param['cari_ar']."' ";
+ else $cari_ar = "";
+
+ if($param['cari_kabkot'] <> "") $cari_kabkot = " AND KABKOTA = '".$param['cari_kabkot']."' ";
+ else $cari_kabkot = "";
+
+ $limit_bottom = ($param['cari_page'] * $param['cari_limit']) - $param['cari_limit'];
+
+ $query = "SELECT
+ TAHUN, KD_KANWIL, NM_KANWIL,
+ KD_KPP, NM_KPP, KABKOTA, KD_SEKSI, NM_SEKSI,
+ NIP_AR, NM_AR, NPWP, KODE_SATKER, NAMA_SATKER,
+ PAGU_PEGAWAI, PAGU_BARANG, PAGU_MODAL, PAGU_SOSIAL, PAGU_LAINNYA, PAGU_TOTAL,
+ ESTI_PPH21_PAGU, ESTI_PPH22_PAGU, ESTI_PPH23_PAGU, ESTI_PPH42_PAGU, ESTI_PPN_PAGU, ESTI_TOTAL_PAGU,
+
+ SUM(REAL_PEGAWAI) REAL_PEGAWAI,
+ SUM(REAL_BARANG) REAL_BARANG,
+ SUM(REAL_MODAL) REAL_MODAL,
+ SUM(REAL_SOSIAL) REAL_SOSIAL,
+ SUM(REAL_LAINNYA) REAL_LAINNYA,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_PPH21_REAL) ESTI_PPH21_REAL,
+ SUM(ESTI_PPH22_REAL) ESTI_PPH22_REAL,
+ SUM(ESTI_PPH23_REAL) ESTI_PPH23_REAL,
+ SUM(ESTI_PPH42_REAL) ESTI_PPH42_REAL,
+ SUM(ESTI_PPN_REAL) ESTI_PPN_REAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_PPH21) BAYAR_PPH21,
+ SUM(BAYAR_PPH22) BAYAR_PPH22,
+ SUM(BAYAR_PPH23) BAYAR_PPH23,
+ SUM(BAYAR_PPH42) BAYAR_PPH42,
+ SUM(BAYAR_PPN) BAYAR_PPN,
+ SUM(BAYAR_LAINNYA) BAYAR_LAINNYA,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL,
+ (NVL(ESTI_PPH21_PAGU, 0) - NVL(SUM(BAYAR_PPH21), 0)) TAXGAP_PPH21_PAGU,
+ (NVL(ESTI_PPH22_PAGU, 0) - NVL(SUM(BAYAR_PPH22), 0)) TAXGAP_PPH22_PAGU,
+ (NVL(ESTI_PPH23_PAGU, 0) - NVL(SUM(BAYAR_PPH23), 0)) TAXGAP_PPH23_PAGU,
+ (NVL(ESTI_PPH42_PAGU, 0) - NVL(SUM(BAYAR_PPH42), 0)) TAXGAP_PPH42_PAGU,
+ (NVL(ESTI_PPN_PAGU, 0) - NVL(SUM(BAYAR_PPN), 0)) TAXGAP_PPN_PAGU,
+ (NVL(ESTI_TOTAL_PAGU, 0) - NVL(SUM(BAYAR_TOTAL), 0)) TAXGAP_TOTAL_PAGU,
+ (NVL(SUM(ESTI_PPH21_REAL), 0) - NVL(SUM(BAYAR_PPH21), 0)) TAXGAP_PPH21_REAL,
+ (NVL(SUM(ESTI_PPH22_REAL), 0) - NVL(SUM(BAYAR_PPH22), 0)) TAXGAP_PPH22_REAL,
+ (NVL(SUM(ESTI_PPH23_REAL), 0) - NVL(SUM(BAYAR_PPH23), 0)) TAXGAP_PPH23_REAL,
+ (NVL(SUM(ESTI_PPH42_REAL), 0) - NVL(SUM(BAYAR_PPH42), 0)) TAXGAP_PPH42_REAL,
+ (NVL(SUM(ESTI_PPN_REAL), 0) - NVL(SUM(BAYAR_PPN), 0)) TAXGAP_PPN_REAL,
+ (NVL(SUM(ESTI_TOTAL_REAL), 0) - NVL(SUM(BAYAR_TOTAL), 0)) TAXGAP_TOTAL_REAL,
+ ROUND(((NVL(SUM(BAYAR_TOTAL), 0) / NULLIF(NVL(PAGU_TOTAL, 0), 0))*100), 2) TAX_COLLECTION
+ FROM APBN_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp $cari_seksi $cari_ar $cari_kabkot
+ GROUP BY TAHUN, KD_KANWIL, NM_KANWIL,
+ KD_KPP, NM_KPP, KABKOTA, KD_SEKSI, NM_SEKSI,
+ NIP_AR, NM_AR, NPWP, KODE_SATKER, NAMA_SATKER,
+ PAGU_PEGAWAI, PAGU_BARANG, PAGU_MODAL, PAGU_SOSIAL, PAGU_LAINNYA, PAGU_TOTAL,
+ ESTI_PPH21_PAGU, ESTI_PPH22_PAGU, ESTI_PPH23_PAGU,ESTI_PPH42_PAGU, ESTI_PPN_PAGU, ESTI_TOTAL_PAGU
+ ORDER BY KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER
+ OFFSET $limit_bottom ROWS FETCH NEXT ".$param['cari_limit']." ROWS ONLY";
+ //echo $query;
+ //exit;
+
+ return $this->db->query($query)->getResult();
+ }
+
+ function get_data_apbn_total($param) {
+ if($param['cari_kanwil'] <> "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ if($param['cari_kpp'] <> "") $cari_kpp = " AND KD_KPP = '".$param['cari_kpp']."' ";
+ else $cari_kpp = "";
+
+ if($param['cari_seksi'] <> "") $cari_seksi = " AND KD_SEKSI = '".$param['cari_seksi']."' ";
+ else $cari_seksi = "";
+
+ if($param['cari_ar'] <> "") $cari_ar = " AND NIP_AR = '".$param['cari_ar']."' ";
+ else $cari_ar = "";
+
+ if($param['cari_kabkot'] <> "") $cari_kabkot = " AND KABKOTA = '".$param['cari_kabkot']."' ";
+ else $cari_kabkot = "";
+
+ $query = "SELECT
+ SUM(PAGU_PEGAWAI) PAGU_PEGAWAI,
+ SUM(PAGU_BARANG) PAGU_BARANG,
+ SUM(PAGU_MODAL) PAGU_MODAL,
+ SUM(PAGU_SOSIAL) PAGU_SOSIAL,
+ SUM(PAGU_LAINNYA) PAGU_LAINNYA,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(ESTI_PPH21_PAGU) ESTI_PPH21_PAGU,
+ SUM(ESTI_PPH22_PAGU) ESTI_PPH22_PAGU,
+ SUM(ESTI_PPH23_PAGU) ESTI_PPH23_PAGU,
+ SUM(ESTI_PPH42_PAGU) ESTI_PPH42_PAGU,
+ SUM(ESTI_PPN_PAGU) ESTI_PPN_PAGU,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(REAL_PEGAWAI) REAL_PEGAWAI,
+ SUM(REAL_BARANG) REAL_BARANG,
+ SUM(REAL_MODAL) REAL_MODAL,
+ SUM(REAL_SOSIAL) REAL_SOSIAL,
+ SUM(REAL_LAINNYA) REAL_LAINNYA,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_PPH21_REAL) ESTI_PPH21_REAL,
+ SUM(ESTI_PPH22_REAL) ESTI_PPH22_REAL,
+ SUM(ESTI_PPH23_REAL) ESTI_PPH23_REAL,
+ SUM(ESTI_PPH42_REAL) ESTI_PPH42_REAL,
+ SUM(ESTI_PPN_REAL) ESTI_PPN_REAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_PPH21) BAYAR_PPH21,
+ SUM(BAYAR_PPH22) BAYAR_PPH22,
+ SUM(BAYAR_PPH23) BAYAR_PPH23,
+ SUM(BAYAR_PPH42) BAYAR_PPH42,
+ SUM(BAYAR_PPN) BAYAR_PPN,
+ SUM(BAYAR_LAINNYA) BAYAR_LAINNYA,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL,
+ (NVL(SUM(ESTI_PPH21_PAGU), 0) - NVL(SUM(BAYAR_PPH21), 0)) TAXGAP_PPH21_PAGU,
+ (NVL(SUM(ESTI_PPH22_PAGU), 0) - NVL(SUM(BAYAR_PPH22), 0)) TAXGAP_PPH22_PAGU,
+ (NVL(SUM(ESTI_PPH23_PAGU), 0) - NVL(SUM(BAYAR_PPH23), 0)) TAXGAP_PPH23_PAGU,
+ (NVL(SUM(ESTI_PPH42_PAGU), 0) - NVL(SUM(BAYAR_PPH42), 0)) TAXGAP_PPH42_PAGU,
+ (NVL(SUM(ESTI_PPN_PAGU), 0) - NVL(SUM(BAYAR_PPN), 0)) TAXGAP_PPN_PAGU,
+ (NVL(SUM(ESTI_TOTAL_PAGU), 0) - NVL(SUM(BAYAR_TOTAL), 0)) TAXGAP_TOTAL_PAGU,
+ (NVL(SUM(ESTI_PPH21_REAL), 0) - NVL(SUM(BAYAR_PPH21), 0)) TAXGAP_PPH21_REAL,
+ (NVL(SUM(ESTI_PPH22_REAL), 0) - NVL(SUM(BAYAR_PPH22), 0)) TAXGAP_PPH22_REAL,
+ (NVL(SUM(ESTI_PPH23_REAL), 0) - NVL(SUM(BAYAR_PPH23), 0)) TAXGAP_PPH23_REAL,
+ (NVL(SUM(ESTI_PPH42_REAL), 0) - NVL(SUM(BAYAR_PPH42), 0)) TAXGAP_PPH42_REAL,
+ (NVL(SUM(ESTI_PPN_REAL), 0) - NVL(SUM(BAYAR_PPN), 0)) TAXGAP_PPN_REAL,
+ (NVL(SUM(ESTI_TOTAL_REAL), 0) - NVL(SUM(BAYAR_TOTAL), 0)) TAXGAP_TOTAL_REAL,
+ ROUND(((NVL(SUM(BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(PAGU_TOTAL), 0), 0))*100), 2) TAX_COLLECTION,
+ COUNT(*) KUANTITAS
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, NM_KANWIL,
+ KD_KPP, NM_KPP, KABKOTA, KD_SEKSI, NM_SEKSI,
+ NIP_AR, NM_AR, NPWP, NAMA_SATKER,
+ PAGU_PEGAWAI, PAGU_BARANG, PAGU_MODAL, PAGU_SOSIAL, PAGU_LAINNYA, PAGU_TOTAL,
+ ESTI_PPH21_PAGU, ESTI_PPH22_PAGU, ESTI_PPH23_PAGU, ESTI_PPH42_PAGU, ESTI_PPN_PAGU, ESTI_TOTAL_PAGU,
+
+ SUM(REAL_PEGAWAI) REAL_PEGAWAI,
+ SUM(REAL_BARANG) REAL_BARANG,
+ SUM(REAL_MODAL) REAL_MODAL,
+ SUM(REAL_SOSIAL) REAL_SOSIAL,
+ SUM(REAL_LAINNYA) REAL_LAINNYA,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_PPH21_REAL) ESTI_PPH21_REAL,
+ SUM(ESTI_PPH22_REAL) ESTI_PPH22_REAL,
+ SUM(ESTI_PPH23_REAL) ESTI_PPH23_REAL,
+ SUM(ESTI_PPH42_REAL) ESTI_PPH42_REAL,
+ SUM(ESTI_PPN_REAL) ESTI_PPN_REAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_PPH21) BAYAR_PPH21,
+ SUM(BAYAR_PPH22) BAYAR_PPH22,
+ SUM(BAYAR_PPH23) BAYAR_PPH23,
+ SUM(BAYAR_PPH42) BAYAR_PPH42,
+ SUM(BAYAR_PPN) BAYAR_PPN,
+ SUM(BAYAR_LAINNYA) BAYAR_LAINNYA,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBN_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp $cari_seksi $cari_ar $cari_kabkot
+ GROUP BY TAHUN, KD_KANWIL, NM_KANWIL,
+ KD_KPP, NM_KPP, KABKOTA, KD_SEKSI, NM_SEKSI,
+ NIP_AR, NM_AR, NPWP, NAMA_SATKER,
+ PAGU_PEGAWAI, PAGU_BARANG, PAGU_MODAL, PAGU_SOSIAL, PAGU_LAINNYA, PAGU_TOTAL,
+ ESTI_PPH21_PAGU, ESTI_PPH22_PAGU, ESTI_PPH23_PAGU, ESTI_PPH42_PAGU, ESTI_PPN_PAGU, ESTI_TOTAL_PAGU
+ ORDER BY KD_KANWIL, KD_KPP, KABKOTA, NPWP, NAMA_SATKER) A";
+ //echo $query;
+ //exit;
+
+ return $this->db->query($query)->getRow();
+ }
+
+ function get_data_apbn_grafik($param) {
+ if($param['cari_kanwil'] <> "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ if($param['cari_kpp'] <> "") $cari_kpp = " AND KD_KPP = '".$param['cari_kpp']."' ";
+ else $cari_kpp = "";
+
+ if($param['cari_seksi'] <> "") $cari_seksi = " AND KD_SEKSI = '".$param['cari_seksi']."' ";
+ else $cari_seksi = "";
+
+ if($param['cari_ar'] <> "") $cari_ar = " AND NIP_AR = '".$param['cari_ar']."' ";
+ else $cari_ar = "";
+
+ if($param['cari_kabkot'] <> "") $cari_kabkot = " AND KABKOTA = '".$param['cari_kabkot']."' ";
+ else $cari_kabkot = "";
+
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBN_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp $cari_seksi $cari_ar $cari_kabkot
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+
+ return $this->db->query($query)->getResult();
+ }
+
+}
diff --git a/app/Models/Bendahara/MBeranda.php b/app/Models/Bendahara/MBeranda.php
new file mode 100644
index 00000000..24b958b9
--- /dev/null
+++ b/app/Models/Bendahara/MBeranda.php
@@ -0,0 +1,926 @@
+= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL) APBN
+
+ ON D.KD_KANWIL = APBN.KD_KANWIL
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL) APBD
+ ON D.KD_KANWIL = APBD.KD_KANWIL
+ LEFT JOIN
+ (SELECT KD_KANWIL,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, NAMA_DESA, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, NAMA_DESA, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL) APBDES
+
+ ON D.KD_KANWIL = APBDES.KD_KANWIL
+
+ ORDER BY D.KD_KANWIL
+ OFFSET $limit_bottom ROWS FETCH NEXT ".$param['cari_limit']." ROWS ONLY";
+ //echo $query;
+ //exit;
+
+ return $this->db->query($query)->getResult();
+ }
+
+ function get_data_beranda_index_total($param) {
+ $query = "SELECT
+ SUM(APBN_PAGU_TOTAL) APBN_PAGU_TOTAL,
+ SUM(APBN_REAL_TOTAL) APBN_REAL_TOTAL,
+ SUM(APBN_ESTI_TOTAL_PAGU) APBN_ESTI_TOTAL_PAGU,
+ SUM(APBN_ESTI_TOTAL_REAL) APBN_ESTI_TOTAL_REAL,
+ SUM(APBN_BAYAR_TOTAL) APBN_BAYAR_TOTAL,
+ (NVL(SUM(APBN_ESTI_TOTAL_PAGU), 0) - NVL(SUM(APBN_BAYAR_TOTAL), 0)) APBN_TAXGAP_PAGU,
+ (NVL(SUM(APBN_ESTI_TOTAL_REAL), 0) - NVL(SUM(APBN_BAYAR_TOTAL), 0)) APBN_TAXGAP_REAL,
+ ROUND(((NVL(SUM(APBN_BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(APBN_PAGU_TOTAL), 0), 0))*100), 2) APBN_TAX_COLLECTION,
+
+ SUM(APBD_PAGU_TOTAL) APBD_PAGU_TOTAL,
+ SUM(APBD_REAL_TOTAL) APBD_REAL_TOTAL,
+ SUM(APBD_ESTI_TOTAL_PAGU) APBD_ESTI_TOTAL_PAGU,
+ SUM(APBD_ESTI_TOTAL_REAL) APBD_ESTI_TOTAL_REAL,
+ SUM(APBD_BAYAR_TOTAL) APBD_BAYAR_TOTAL,
+ (NVL(SUM(APBD_ESTI_TOTAL_PAGU), 0) - NVL(SUM(APBD_BAYAR_TOTAL), 0)) APBD_TAXGAP_PAGU,
+ (NVL(SUM(APBD_ESTI_TOTAL_REAL), 0) - NVL(SUM(APBD_BAYAR_TOTAL), 0)) APBD_TAXGAP_REAL,
+ ROUND(((NVL(SUM(APBD_BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(APBD_PAGU_TOTAL), 0), 0))*100), 2) APBD_TAX_COLLECTION,
+
+ SUM(APBDES_PAGU_TOTAL) APBDES_PAGU_TOTAL,
+ SUM(APBDES_REAL_TOTAL) APBDES_REAL_TOTAL,
+ SUM(APBDES_ESTI_TOTAL_PAGU) APBDES_ESTI_TOTAL_PAGU,
+ SUM(APBDES_ESTI_TOTAL_REAL) APBDES_ESTI_TOTAL_REAL,
+ SUM(APBDES_BAYAR_TOTAL) APBDES_BAYAR_TOTAL,
+ (NVL(SUM(APBDES_ESTI_TOTAL_PAGU), 0) - NVL(SUM(APBDES_BAYAR_TOTAL), 0)) APBDES_TAXGAP_PAGU,
+ (NVL(SUM(APBDES_ESTI_TOTAL_REAL), 0) - NVL(SUM(APBDES_BAYAR_TOTAL), 0)) APBDES_TAXGAP_REAL,
+ ROUND(((NVL(SUM(APBDES_BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(APBDES_PAGU_TOTAL), 0), 0))*100), 2) APBDES_TAX_COLLECTION,
+
+ SUM(ALL_PAGU_TOTAL) ALL_PAGU_TOTAL,
+ SUM(ALL_REAL_TOTAL) ALL_REAL_TOTAL,
+ SUM(ALL_ESTI_TOTAL_PAGU) ALL_ESTI_TOTAL_PAGU,
+ SUM(ALL_ESTI_TOTAL_REAL) ALL_ESTI_TOTAL_REAL,
+ SUM(ALL_BAYAR_TOTAL) ALL_BAYAR_TOTAL,
+ (NVL(SUM(ALL_ESTI_TOTAL_PAGU), 0) - NVL(SUM(ALL_BAYAR_TOTAL), 0)) ALL_TAXGAP_PAGU,
+ (NVL(SUM(ALL_ESTI_TOTAL_REAL), 0) - NVL(SUM(ALL_BAYAR_TOTAL), 0)) ALL_TAXGAP_REAL,
+ ROUND(((NVL(SUM(ALL_BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(ALL_PAGU_TOTAL), 0), 0))*100), 2) ALL_TAX_COLLECTION,
+
+ COUNT(*) KUANTITAS
+ FROM
+ (SELECT D.*,
+ APBN.PAGU_TOTAL APBN_PAGU_TOTAL,
+ APBN.REAL_TOTAL APBN_REAL_TOTAL,
+ APBN.ESTI_TOTAL_PAGU APBN_ESTI_TOTAL_PAGU,
+ APBN.ESTI_TOTAL_REAL APBN_ESTI_TOTAL_REAL,
+ APBN.BAYAR_TOTAL APBN_BAYAR_TOTAL,
+ APBD.PAGU_TOTAL APBD_PAGU_TOTAL,
+ APBD.REAL_TOTAL APBD_REAL_TOTAL,
+ APBD.ESTI_TOTAL_PAGU APBD_ESTI_TOTAL_PAGU,
+ APBD.ESTI_TOTAL_REAL APBD_ESTI_TOTAL_REAL,
+ APBD.BAYAR_TOTAL APBD_BAYAR_TOTAL,
+ APBDES.PAGU_TOTAL APBDES_PAGU_TOTAL,
+ APBDES.REAL_TOTAL APBDES_REAL_TOTAL,
+ APBDES.ESTI_TOTAL_PAGU APBDES_ESTI_TOTAL_PAGU,
+ APBDES.ESTI_TOTAL_REAL APBDES_ESTI_TOTAL_REAL,
+ APBDES.BAYAR_TOTAL APBDES_BAYAR_TOTAL,
+ NVL(APBN.PAGU_TOTAL, 0) + NVL(APBD.PAGU_TOTAL, 0) + NVL(APBDES.PAGU_TOTAL, 0) ALL_PAGU_TOTAL,
+ NVL(APBN.REAL_TOTAL, 0) + NVL(APBD.REAL_TOTAL, 0) + NVL(APBDES.REAL_TOTAL, 0) ALL_REAL_TOTAL,
+ NVL(APBN.ESTI_TOTAL_PAGU, 0) + NVL(APBD.ESTI_TOTAL_PAGU, 0) + NVL(APBDES.ESTI_TOTAL_PAGU, 0) ALL_ESTI_TOTAL_PAGU,
+ NVL(APBN.ESTI_TOTAL_REAL, 0) + NVL(APBD.ESTI_TOTAL_REAL, 0) + NVL(APBDES.ESTI_TOTAL_REAL, 0) ALL_ESTI_TOTAL_REAL,
+ NVL(APBN.BAYAR_TOTAL, 0) + NVL(APBD.BAYAR_TOTAL, 0) + NVL(APBDES.BAYAR_TOTAL, 0) ALL_BAYAR_TOTAL
+ FROM
+
+ (SELECT KD_KANWIL, NM_KANWIL FROM REF_MFWP_WILAYAH
+ GROUP BY KD_KANWIL, NM_KANWIL) D
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBN_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL) APBN
+
+ ON D.KD_KANWIL = APBN.KD_KANWIL
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL) APBD
+
+ ON D.KD_KANWIL = APBD.KD_KANWIL
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, NAMA_DESA, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, NAMA_DESA, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL) APBDES
+
+ ON D.KD_KANWIL = APBDES.KD_KANWIL)";
+ //echo $query;
+ //exit;
+
+ return $this->db->query($query)->getRow();
+ }
+
+ function get_data_beranda_index_grafik($param) {
+ if($param['cari_sumber_dana'] == "APBN") {
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBN_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+ }
+ else if($param['cari_sumber_dana'] == "APBD") {
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+ }
+ else if($param['cari_sumber_dana'] == "APBDes") {
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+ }
+ else {
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT KD_BULAN, NM_BULAN, REAL_TOTAL, BAYAR_TOTAL FROM APBN_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ UNION
+ SELECT KD_BULAN, NM_BULAN, REAL_TOTAL, BAYAR_TOTAL FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ UNION
+ SELECT KD_BULAN, NM_BULAN, REAL_TOTAL, BAYAR_TOTAL FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."')
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+ }
+
+ return $this->db->query($query)->getResult();
+ }
+
+ function get_data_beranda_kanwil($param) {
+ if($param['cari_kanwil'] <> "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ $limit_bottom = ($param['cari_page'] * $param['cari_limit']) - $param['cari_limit'];
+
+ $query = "SELECT D.*,
+ APBN.PAGU_TOTAL APBN_PAGU_TOTAL,
+ APBN.REAL_TOTAL APBN_REAL_TOTAL,
+ APBN.ESTI_TOTAL_PAGU APBN_ESTI_TOTAL_PAGU,
+ APBN.ESTI_TOTAL_REAL APBN_ESTI_TOTAL_REAL,
+ APBN.BAYAR_TOTAL APBN_BAYAR_TOTAL,
+ (NVL(APBN.ESTI_TOTAL_PAGU, 0) - NVL(APBN.BAYAR_TOTAL, 0)) APBN_TAXGAP_PAGU,
+ (NVL(APBN.ESTI_TOTAL_REAL, 0) - NVL(APBN.BAYAR_TOTAL, 0)) APBN_TAXGAP_REAL,
+ ROUND(((NVL(APBN.BAYAR_TOTAL, 0) / NULLIF(NVL(APBN.PAGU_TOTAL, 0), 0))*100), 2) APBN_TAX_COLLECTION,
+
+ APBD.PAGU_TOTAL APBD_PAGU_TOTAL,
+ APBD.REAL_TOTAL APBD_REAL_TOTAL,
+ APBD.ESTI_TOTAL_PAGU APBD_ESTI_TOTAL_PAGU,
+ APBD.ESTI_TOTAL_REAL APBD_ESTI_TOTAL_REAL,
+ APBD.BAYAR_TOTAL APBD_BAYAR_TOTAL,
+ (NVL(APBD.ESTI_TOTAL_PAGU, 0) - NVL(APBD.BAYAR_TOTAL, 0)) APBD_TAXGAP_PAGU,
+ (NVL(APBD.ESTI_TOTAL_REAL, 0) - NVL(APBD.BAYAR_TOTAL, 0)) APBD_TAXGAP_REAL,
+ ROUND(((NVL(APBD.BAYAR_TOTAL, 0) / NULLIF(NVL(APBD.PAGU_TOTAL, 0), 0))*100), 2) APBD_TAX_COLLECTION,
+
+ APBDES.PAGU_TOTAL APBDES_PAGU_TOTAL,
+ APBDES.REAL_TOTAL APBDES_REAL_TOTAL,
+ APBDES.ESTI_TOTAL_PAGU APBDES_ESTI_TOTAL_PAGU,
+ APBDES.ESTI_TOTAL_REAL APBDES_ESTI_TOTAL_REAL,
+ APBDES.BAYAR_TOTAL APBDES_BAYAR_TOTAL,
+ (NVL(APBDES.ESTI_TOTAL_PAGU, 0) - NVL(APBDES.BAYAR_TOTAL, 0)) APBDES_TAXGAP_PAGU,
+ (NVL(APBDES.ESTI_TOTAL_REAL, 0) - NVL(APBDES.BAYAR_TOTAL, 0)) APBDES_TAXGAP_REAL,
+ ROUND(((NVL(APBDES.BAYAR_TOTAL, 0) / NULLIF(NVL(APBDES.PAGU_TOTAL, 0), 0))*100), 2) APBDES_TAX_COLLECTION,
+
+ (NVL(APBN.PAGU_TOTAL, 0) + NVL(APBD.PAGU_TOTAL, 0) + NVL(APBDES.PAGU_TOTAL, 0)) ALL_PAGU_TOTAL,
+ (NVL(APBN.REAL_TOTAL, 0) + NVL(APBD.REAL_TOTAL, 0) + NVL(APBDES.REAL_TOTAL, 0)) ALL_REAL_TOTAL,
+ (NVL(APBN.ESTI_TOTAL_PAGU, 0) + NVL(APBD.ESTI_TOTAL_PAGU, 0) + NVL(APBDES.ESTI_TOTAL_PAGU, 0)) ALL_ESTI_TOTAL_PAGU,
+ (NVL(APBN.ESTI_TOTAL_REAL, 0) + NVL(APBD.ESTI_TOTAL_REAL, 0) + NVL(APBDES.ESTI_TOTAL_REAL, 0)) ALL_ESTI_TOTAL_REAL,
+ (NVL(APBN.BAYAR_TOTAL, 0) + NVL(APBD.BAYAR_TOTAL, 0) + NVL(APBDES.BAYAR_TOTAL, 0)) ALL_BAYAR_TOTAL,
+ ((NVL(APBN.ESTI_TOTAL_PAGU, 0) + NVL(APBD.ESTI_TOTAL_PAGU, 0) + NVL(APBDES.ESTI_TOTAL_PAGU, 0)) - (NVL(APBN.BAYAR_TOTAL, 0) + NVL(APBD.BAYAR_TOTAL, 0) + NVL(APBDES.BAYAR_TOTAL, 0))) ALL_TAXGAP_PAGU,
+ ((NVL(APBN.ESTI_TOTAL_REAL, 0) + NVL(APBD.ESTI_TOTAL_REAL, 0) + NVL(APBDES.ESTI_TOTAL_REAL, 0)) - (NVL(APBN.BAYAR_TOTAL, 0) + NVL(APBD.BAYAR_TOTAL, 0) + NVL(APBDES.BAYAR_TOTAL, 0))) ALL_TAXGAP_REAL,
+ ROUND((((NVL(APBN.BAYAR_TOTAL, 0) + NVL(APBD.BAYAR_TOTAL, 0) + NVL(APBDES.BAYAR_TOTAL, 0)) / NULLIF((NVL(APBN.PAGU_TOTAL, 0) + NVL(APBD.PAGU_TOTAL, 0) + NVL(APBDES.PAGU_TOTAL, 0)), 0))*100), 2) ALL_TAX_COLLECTION
+ FROM
+
+ (SELECT KD_KANWIL, NM_KANWIL, KD_KPP, NM_KPP FROM REF_MFWP_WILAYAH
+ WHERE 1 = 1 $cari_kanwil
+ GROUP BY KD_KANWIL, NM_KANWIL, KD_KPP, NM_KPP) D
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL, KD_KPP,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBN_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ $cari_kanwil
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL, KD_KPP) APBN
+
+ ON D.KD_KANWIL = APBN.KD_KANWIL AND D.KD_KPP = APBN.KD_KPP
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL, KD_KPP,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ $cari_kanwil
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL, KD_KPP) APBD
+
+ ON D.KD_KANWIL = APBD.KD_KANWIL AND D.KD_KPP = APBD.KD_KPP
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL, KD_KPP,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, NAMA_DESA, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ $cari_kanwil
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, NAMA_DESA, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL, KD_KPP) APBDES
+
+ ON D.KD_KANWIL = APBDES.KD_KANWIL AND D.KD_KPP = APBDES.KD_KPP
+
+ ORDER BY D.KD_KANWIL, D.KD_KPP
+ OFFSET $limit_bottom ROWS FETCH NEXT ".$param['cari_limit']." ROWS ONLY";
+ //echo $query;
+ //exit;
+
+ return $this->db->query($query)->getResult();
+ }
+
+ function get_data_beranda_kanwil_total($param) {
+ if($param['cari_kanwil'] <> "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ $query = "SELECT
+ SUM(APBN_PAGU_TOTAL) APBN_PAGU_TOTAL,
+ SUM(APBN_REAL_TOTAL) APBN_REAL_TOTAL,
+ SUM(APBN_ESTI_TOTAL_PAGU) APBN_ESTI_TOTAL_PAGU,
+ SUM(APBN_ESTI_TOTAL_REAL) APBN_ESTI_TOTAL_REAL,
+ SUM(APBN_BAYAR_TOTAL) APBN_BAYAR_TOTAL,
+ (NVL(SUM(APBN_ESTI_TOTAL_PAGU), 0) - NVL(SUM(APBN_BAYAR_TOTAL), 0)) APBN_TAXGAP_PAGU,
+ (NVL(SUM(APBN_ESTI_TOTAL_REAL), 0) - NVL(SUM(APBN_BAYAR_TOTAL), 0)) APBN_TAXGAP_REAL,
+ ROUND(((NVL(SUM(APBN_BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(APBN_PAGU_TOTAL), 0), 0))*100), 2) APBN_TAX_COLLECTION,
+
+ SUM(APBD_PAGU_TOTAL) APBD_PAGU_TOTAL,
+ SUM(APBD_REAL_TOTAL) APBD_REAL_TOTAL,
+ SUM(APBD_ESTI_TOTAL_PAGU) APBD_ESTI_TOTAL_PAGU,
+ SUM(APBD_ESTI_TOTAL_REAL) APBD_ESTI_TOTAL_REAL,
+ SUM(APBD_BAYAR_TOTAL) APBD_BAYAR_TOTAL,
+ (NVL(SUM(APBD_ESTI_TOTAL_PAGU), 0) - NVL(SUM(APBD_BAYAR_TOTAL), 0)) APBD_TAXGAP_PAGU,
+ (NVL(SUM(APBD_ESTI_TOTAL_REAL), 0) - NVL(SUM(APBD_BAYAR_TOTAL), 0)) APBD_TAXGAP_REAL,
+ ROUND(((NVL(SUM(APBD_BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(APBD_PAGU_TOTAL), 0), 0))*100), 2) APBD_TAX_COLLECTION,
+
+ SUM(APBDES_PAGU_TOTAL) APBDES_PAGU_TOTAL,
+ SUM(APBDES_REAL_TOTAL) APBDES_REAL_TOTAL,
+ SUM(APBDES_ESTI_TOTAL_PAGU) APBDES_ESTI_TOTAL_PAGU,
+ SUM(APBDES_ESTI_TOTAL_REAL) APBDES_ESTI_TOTAL_REAL,
+ SUM(APBDES_BAYAR_TOTAL) APBDES_BAYAR_TOTAL,
+ (NVL(SUM(APBDES_ESTI_TOTAL_PAGU), 0) - NVL(SUM(APBDES_BAYAR_TOTAL), 0)) APBDES_TAXGAP_PAGU,
+ (NVL(SUM(APBDES_ESTI_TOTAL_REAL), 0) - NVL(SUM(APBDES_BAYAR_TOTAL), 0)) APBDES_TAXGAP_REAL,
+ ROUND(((NVL(SUM(APBDES_BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(APBDES_PAGU_TOTAL), 0), 0))*100), 2) APBDES_TAX_COLLECTION,
+
+ SUM(ALL_PAGU_TOTAL) ALL_PAGU_TOTAL,
+ SUM(ALL_REAL_TOTAL) ALL_REAL_TOTAL,
+ SUM(ALL_ESTI_TOTAL_PAGU) ALL_ESTI_TOTAL_PAGU,
+ SUM(ALL_ESTI_TOTAL_REAL) ALL_ESTI_TOTAL_REAL,
+ SUM(ALL_BAYAR_TOTAL) ALL_BAYAR_TOTAL,
+ (NVL(SUM(ALL_ESTI_TOTAL_PAGU), 0) - NVL(SUM(ALL_BAYAR_TOTAL), 0)) ALL_TAXGAP_PAGU,
+ (NVL(SUM(ALL_ESTI_TOTAL_REAL), 0) - NVL(SUM(ALL_BAYAR_TOTAL), 0)) ALL_TAXGAP_REAL,
+ ROUND(((NVL(SUM(ALL_BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(ALL_PAGU_TOTAL), 0), 0))*100), 2) ALL_TAX_COLLECTION,
+
+ COUNT(*) KUANTITAS
+ FROM
+ (SELECT D.*,
+ APBN.PAGU_TOTAL APBN_PAGU_TOTAL,
+ APBN.REAL_TOTAL APBN_REAL_TOTAL,
+ APBN.ESTI_TOTAL_PAGU APBN_ESTI_TOTAL_PAGU,
+ APBN.ESTI_TOTAL_REAL APBN_ESTI_TOTAL_REAL,
+ APBN.BAYAR_TOTAL APBN_BAYAR_TOTAL,
+ APBD.PAGU_TOTAL APBD_PAGU_TOTAL,
+ APBD.REAL_TOTAL APBD_REAL_TOTAL,
+ APBD.ESTI_TOTAL_PAGU APBD_ESTI_TOTAL_PAGU,
+ APBD.ESTI_TOTAL_REAL APBD_ESTI_TOTAL_REAL,
+ APBD.BAYAR_TOTAL APBD_BAYAR_TOTAL,
+ APBDES.PAGU_TOTAL APBDES_PAGU_TOTAL,
+ APBDES.REAL_TOTAL APBDES_REAL_TOTAL,
+ APBDES.ESTI_TOTAL_PAGU APBDES_ESTI_TOTAL_PAGU,
+ APBDES.ESTI_TOTAL_REAL APBDES_ESTI_TOTAL_REAL,
+ APBDES.BAYAR_TOTAL APBDES_BAYAR_TOTAL,
+ NVL(APBN.PAGU_TOTAL, 0) + NVL(APBD.PAGU_TOTAL, 0) + NVL(APBDES.PAGU_TOTAL, 0) ALL_PAGU_TOTAL,
+ NVL(APBN.REAL_TOTAL, 0) + NVL(APBD.REAL_TOTAL, 0) + NVL(APBDES.REAL_TOTAL, 0) ALL_REAL_TOTAL,
+ NVL(APBN.ESTI_TOTAL_PAGU, 0) + NVL(APBD.ESTI_TOTAL_PAGU, 0) + NVL(APBDES.ESTI_TOTAL_PAGU, 0) ALL_ESTI_TOTAL_PAGU,
+ NVL(APBN.ESTI_TOTAL_REAL, 0) + NVL(APBD.ESTI_TOTAL_REAL, 0) + NVL(APBDES.ESTI_TOTAL_REAL, 0) ALL_ESTI_TOTAL_REAL,
+ NVL(APBN.BAYAR_TOTAL, 0) + NVL(APBD.BAYAR_TOTAL, 0) + NVL(APBDES.BAYAR_TOTAL, 0) ALL_BAYAR_TOTAL
+ FROM
+
+ (SELECT KD_KANWIL, NM_KANWIL, KD_KPP, NM_KPP FROM REF_MFWP_WILAYAH
+ WHERE 1 = 1 $cari_kanwil
+ GROUP BY KD_KANWIL, NM_KANWIL, KD_KPP, NM_KPP) D
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL, KD_KPP,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBN_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ $cari_kanwil
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL, KD_KPP) APBN
+
+ ON D.KD_KANWIL = APBN.KD_KANWIL AND D.KD_KPP = APBN.KD_KPP
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL, KD_KPP,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ $cari_kanwil
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL, KD_KPP) APBD
+
+ ON D.KD_KANWIL = APBD.KD_KANWIL AND D.KD_KPP = APBD.KD_KPP
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL, KD_KPP,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, NAMA_DESA, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ $cari_kanwil
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, NAMA_DESA, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL, KD_KPP) APBDES
+
+ ON D.KD_KANWIL = APBDES.KD_KANWIL AND D.KD_KPP = APBDES.KD_KPP)";
+ //echo $query;
+ //exit;
+
+ return $this->db->query($query)->getRow();
+ }
+
+ function get_data_beranda_kanwil_grafik($param) {
+ if($param['cari_kanwil'] <> "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ if($param['cari_sumber_dana'] == "APBN") {
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBN_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+ }
+ else if($param['cari_sumber_dana'] == "APBD") {
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+ }
+ else if($param['cari_sumber_dana'] == "APBDes") {
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+ }
+ else {
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT KD_BULAN, NM_BULAN, REAL_TOTAL, BAYAR_TOTAL FROM APBN_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil
+ UNION
+ SELECT KD_BULAN, NM_BULAN, REAL_TOTAL, BAYAR_TOTAL FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil
+ UNION
+ SELECT KD_BULAN, NM_BULAN, REAL_TOTAL, BAYAR_TOTAL FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil)
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+ }
+
+ return $this->db->query($query)->getResult();
+ }
+
+ function get_data_beranda_kpp($param) {
+ if($param['cari_kanwil'] <> "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ if($param['cari_kpp'] <> "") $cari_kpp = " AND KD_KPP = '".$param['cari_kpp']."' ";
+ else $cari_kpp = "";
+
+ $limit_bottom = ($param['cari_page'] * $param['cari_limit']) - $param['cari_limit'];
+
+ $query = "SELECT D.*,
+ APBN.PAGU_TOTAL APBN_PAGU_TOTAL,
+ APBN.REAL_TOTAL APBN_REAL_TOTAL,
+ APBN.ESTI_TOTAL_PAGU APBN_ESTI_TOTAL_PAGU,
+ APBN.ESTI_TOTAL_REAL APBN_ESTI_TOTAL_REAL,
+ APBN.BAYAR_TOTAL APBN_BAYAR_TOTAL,
+ (NVL(APBN.ESTI_TOTAL_PAGU, 0) - NVL(APBN.BAYAR_TOTAL, 0)) APBN_TAXGAP_PAGU,
+ (NVL(APBN.ESTI_TOTAL_REAL, 0) - NVL(APBN.BAYAR_TOTAL, 0)) APBN_TAXGAP_REAL,
+ ROUND(((NVL(APBN.BAYAR_TOTAL, 0) / NULLIF(NVL(APBN.PAGU_TOTAL, 0), 0))*100), 2) APBN_TAX_COLLECTION,
+
+ APBD.PAGU_TOTAL APBD_PAGU_TOTAL,
+ APBD.REAL_TOTAL APBD_REAL_TOTAL,
+ APBD.ESTI_TOTAL_PAGU APBD_ESTI_TOTAL_PAGU,
+ APBD.ESTI_TOTAL_REAL APBD_ESTI_TOTAL_REAL,
+ APBD.BAYAR_TOTAL APBD_BAYAR_TOTAL,
+ (NVL(APBD.ESTI_TOTAL_PAGU, 0) - NVL(APBD.BAYAR_TOTAL, 0)) APBD_TAXGAP_PAGU,
+ (NVL(APBD.ESTI_TOTAL_REAL, 0) - NVL(APBD.BAYAR_TOTAL, 0)) APBD_TAXGAP_REAL,
+ ROUND(((NVL(APBD.BAYAR_TOTAL, 0) / NULLIF(NVL(APBD.PAGU_TOTAL, 0), 0))*100), 2) APBD_TAX_COLLECTION,
+
+ APBDES.PAGU_TOTAL APBDES_PAGU_TOTAL,
+ APBDES.REAL_TOTAL APBDES_REAL_TOTAL,
+ APBDES.ESTI_TOTAL_PAGU APBDES_ESTI_TOTAL_PAGU,
+ APBDES.ESTI_TOTAL_REAL APBDES_ESTI_TOTAL_REAL,
+ APBDES.BAYAR_TOTAL APBDES_BAYAR_TOTAL,
+ (NVL(APBDES.ESTI_TOTAL_PAGU, 0) - NVL(APBDES.BAYAR_TOTAL, 0)) APBDES_TAXGAP_PAGU,
+ (NVL(APBDES.ESTI_TOTAL_REAL, 0) - NVL(APBDES.BAYAR_TOTAL, 0)) APBDES_TAXGAP_REAL,
+ ROUND(((NVL(APBDES.BAYAR_TOTAL, 0) / NULLIF(NVL(APBDES.PAGU_TOTAL, 0), 0))*100), 2) APBDES_TAX_COLLECTION,
+
+ (NVL(APBN.PAGU_TOTAL, 0) + NVL(APBD.PAGU_TOTAL, 0) + NVL(APBDES.PAGU_TOTAL, 0)) ALL_PAGU_TOTAL,
+ (NVL(APBN.REAL_TOTAL, 0) + NVL(APBD.REAL_TOTAL, 0) + NVL(APBDES.REAL_TOTAL, 0)) ALL_REAL_TOTAL,
+ (NVL(APBN.ESTI_TOTAL_PAGU, 0) + NVL(APBD.ESTI_TOTAL_PAGU, 0) + NVL(APBDES.ESTI_TOTAL_PAGU, 0)) ALL_ESTI_TOTAL_PAGU,
+ (NVL(APBN.ESTI_TOTAL_REAL, 0) + NVL(APBD.ESTI_TOTAL_REAL, 0) + NVL(APBDES.ESTI_TOTAL_REAL, 0)) ALL_ESTI_TOTAL_REAL,
+ (NVL(APBN.BAYAR_TOTAL, 0) + NVL(APBD.BAYAR_TOTAL, 0) + NVL(APBDES.BAYAR_TOTAL, 0)) ALL_BAYAR_TOTAL,
+ ((NVL(APBN.ESTI_TOTAL_PAGU, 0) + NVL(APBD.ESTI_TOTAL_PAGU, 0) + NVL(APBDES.ESTI_TOTAL_PAGU, 0)) - (NVL(APBN.BAYAR_TOTAL, 0) + NVL(APBD.BAYAR_TOTAL, 0) + NVL(APBDES.BAYAR_TOTAL, 0))) ALL_TAXGAP_PAGU,
+ ((NVL(APBN.ESTI_TOTAL_REAL, 0) + NVL(APBD.ESTI_TOTAL_REAL, 0) + NVL(APBDES.ESTI_TOTAL_REAL, 0)) - (NVL(APBN.BAYAR_TOTAL, 0) + NVL(APBD.BAYAR_TOTAL, 0) + NVL(APBDES.BAYAR_TOTAL, 0))) ALL_TAXGAP_REAL,
+ ROUND((((NVL(APBN.BAYAR_TOTAL, 0) + NVL(APBD.BAYAR_TOTAL, 0) + NVL(APBDES.BAYAR_TOTAL, 0)) / NULLIF((NVL(APBN.PAGU_TOTAL, 0) + NVL(APBD.PAGU_TOTAL, 0) + NVL(APBDES.PAGU_TOTAL, 0)), 0))*100), 2) ALL_TAX_COLLECTION
+ FROM
+
+ (SELECT * FROM REF_MFWP_WILAYAH
+ WHERE 1 = 1 $cari_kanwil $cari_kpp) D
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL, KD_KPP, KABKOTA,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBN_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ $cari_kanwil $cari_kpp
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL, KD_KPP, KABKOTA) APBN
+
+ ON D.KD_KANWIL = APBN.KD_KANWIL AND D.KD_KPP = APBN.KD_KPP AND D.KABKOTA = APBN.KABKOTA
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL, KD_KPP, KABKOTA,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ $cari_kanwil $cari_kpp
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL, KD_KPP, KABKOTA) APBD
+
+ ON D.KD_KANWIL = APBD.KD_KANWIL AND D.KD_KPP = APBD.KD_KPP AND D.KABKOTA = APBD.KABKOTA
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL, KD_KPP, KABKOTA,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, NAMA_DESA, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ $cari_kanwil $cari_kpp
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, NAMA_DESA, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL, KD_KPP, KABKOTA) APBDES
+
+ ON D.KD_KANWIL = APBDES.KD_KANWIL AND D.KD_KPP = APBDES.KD_KPP AND D.KABKOTA = APBDES.KABKOTA
+
+ ORDER BY D.KD_KANWIL, D.KD_KPP, D.KABKOTA
+ OFFSET $limit_bottom ROWS FETCH NEXT ".$param['cari_limit']." ROWS ONLY";
+ //echo $query;
+ //exit;
+
+ return $this->db->query($query)->getResult();
+ }
+
+ function get_data_beranda_kpp_total($param) {
+ if($param['cari_kanwil'] <> "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ if($param['cari_kpp'] <> "") $cari_kpp = " AND KD_KPP = '".$param['cari_kpp']."' ";
+ else $cari_kpp = "";
+
+ $query = "SELECT
+ SUM(APBN_PAGU_TOTAL) APBN_PAGU_TOTAL,
+ SUM(APBN_REAL_TOTAL) APBN_REAL_TOTAL,
+ SUM(APBN_ESTI_TOTAL_PAGU) APBN_ESTI_TOTAL_PAGU,
+ SUM(APBN_ESTI_TOTAL_REAL) APBN_ESTI_TOTAL_REAL,
+ SUM(APBN_BAYAR_TOTAL) APBN_BAYAR_TOTAL,
+ (NVL(SUM(APBN_ESTI_TOTAL_PAGU), 0) - NVL(SUM(APBN_BAYAR_TOTAL), 0)) APBN_TAXGAP_PAGU,
+ (NVL(SUM(APBN_ESTI_TOTAL_REAL), 0) - NVL(SUM(APBN_BAYAR_TOTAL), 0)) APBN_TAXGAP_REAL,
+ ROUND(((NVL(SUM(APBN_BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(APBN_PAGU_TOTAL), 0), 0))*100), 2) APBN_TAX_COLLECTION,
+
+ SUM(APBD_PAGU_TOTAL) APBD_PAGU_TOTAL,
+ SUM(APBD_REAL_TOTAL) APBD_REAL_TOTAL,
+ SUM(APBD_ESTI_TOTAL_PAGU) APBD_ESTI_TOTAL_PAGU,
+ SUM(APBD_ESTI_TOTAL_REAL) APBD_ESTI_TOTAL_REAL,
+ SUM(APBD_BAYAR_TOTAL) APBD_BAYAR_TOTAL,
+ (NVL(SUM(APBD_ESTI_TOTAL_PAGU), 0) - NVL(SUM(APBD_BAYAR_TOTAL), 0)) APBD_TAXGAP_PAGU,
+ (NVL(SUM(APBD_ESTI_TOTAL_REAL), 0) - NVL(SUM(APBD_BAYAR_TOTAL), 0)) APBD_TAXGAP_REAL,
+ ROUND(((NVL(SUM(APBD_BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(APBD_PAGU_TOTAL), 0), 0))*100), 2) APBD_TAX_COLLECTION,
+
+ SUM(APBDES_PAGU_TOTAL) APBDES_PAGU_TOTAL,
+ SUM(APBDES_REAL_TOTAL) APBDES_REAL_TOTAL,
+ SUM(APBDES_ESTI_TOTAL_PAGU) APBDES_ESTI_TOTAL_PAGU,
+ SUM(APBDES_ESTI_TOTAL_REAL) APBDES_ESTI_TOTAL_REAL,
+ SUM(APBDES_BAYAR_TOTAL) APBDES_BAYAR_TOTAL,
+ (NVL(SUM(APBDES_ESTI_TOTAL_PAGU), 0) - NVL(SUM(APBDES_BAYAR_TOTAL), 0)) APBDES_TAXGAP_PAGU,
+ (NVL(SUM(APBDES_ESTI_TOTAL_REAL), 0) - NVL(SUM(APBDES_BAYAR_TOTAL), 0)) APBDES_TAXGAP_REAL,
+ ROUND(((NVL(SUM(APBDES_BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(APBDES_PAGU_TOTAL), 0), 0))*100), 2) APBDES_TAX_COLLECTION,
+
+ SUM(ALL_PAGU_TOTAL) ALL_PAGU_TOTAL,
+ SUM(ALL_REAL_TOTAL) ALL_REAL_TOTAL,
+ SUM(ALL_ESTI_TOTAL_PAGU) ALL_ESTI_TOTAL_PAGU,
+ SUM(ALL_ESTI_TOTAL_REAL) ALL_ESTI_TOTAL_REAL,
+ SUM(ALL_BAYAR_TOTAL) ALL_BAYAR_TOTAL,
+ (NVL(SUM(ALL_ESTI_TOTAL_PAGU), 0) - NVL(SUM(ALL_BAYAR_TOTAL), 0)) ALL_TAXGAP_PAGU,
+ (NVL(SUM(ALL_ESTI_TOTAL_REAL), 0) - NVL(SUM(ALL_BAYAR_TOTAL), 0)) ALL_TAXGAP_REAL,
+ ROUND(((NVL(SUM(ALL_BAYAR_TOTAL), 0) / NULLIF(NVL(SUM(ALL_PAGU_TOTAL), 0), 0))*100), 2) ALL_TAX_COLLECTION,
+
+ COUNT(*) KUANTITAS
+ FROM
+ (SELECT D.*,
+ APBN.PAGU_TOTAL APBN_PAGU_TOTAL,
+ APBN.REAL_TOTAL APBN_REAL_TOTAL,
+ APBN.ESTI_TOTAL_PAGU APBN_ESTI_TOTAL_PAGU,
+ APBN.ESTI_TOTAL_REAL APBN_ESTI_TOTAL_REAL,
+ APBN.BAYAR_TOTAL APBN_BAYAR_TOTAL,
+ APBD.PAGU_TOTAL APBD_PAGU_TOTAL,
+ APBD.REAL_TOTAL APBD_REAL_TOTAL,
+ APBD.ESTI_TOTAL_PAGU APBD_ESTI_TOTAL_PAGU,
+ APBD.ESTI_TOTAL_REAL APBD_ESTI_TOTAL_REAL,
+ APBD.BAYAR_TOTAL APBD_BAYAR_TOTAL,
+ APBDES.PAGU_TOTAL APBDES_PAGU_TOTAL,
+ APBDES.REAL_TOTAL APBDES_REAL_TOTAL,
+ APBDES.ESTI_TOTAL_PAGU APBDES_ESTI_TOTAL_PAGU,
+ APBDES.ESTI_TOTAL_REAL APBDES_ESTI_TOTAL_REAL,
+ APBDES.BAYAR_TOTAL APBDES_BAYAR_TOTAL,
+ NVL(APBN.PAGU_TOTAL, 0) + NVL(APBD.PAGU_TOTAL, 0) + NVL(APBDES.PAGU_TOTAL, 0) ALL_PAGU_TOTAL,
+ NVL(APBN.REAL_TOTAL, 0) + NVL(APBD.REAL_TOTAL, 0) + NVL(APBDES.REAL_TOTAL, 0) ALL_REAL_TOTAL,
+ NVL(APBN.ESTI_TOTAL_PAGU, 0) + NVL(APBD.ESTI_TOTAL_PAGU, 0) + NVL(APBDES.ESTI_TOTAL_PAGU, 0) ALL_ESTI_TOTAL_PAGU,
+ NVL(APBN.ESTI_TOTAL_REAL, 0) + NVL(APBD.ESTI_TOTAL_REAL, 0) + NVL(APBDES.ESTI_TOTAL_REAL, 0) ALL_ESTI_TOTAL_REAL,
+ NVL(APBN.BAYAR_TOTAL, 0) + NVL(APBD.BAYAR_TOTAL, 0) + NVL(APBDES.BAYAR_TOTAL, 0) ALL_BAYAR_TOTAL
+ FROM
+
+ (SELECT * FROM REF_MFWP_WILAYAH
+ WHERE 1 = 1 $cari_kanwil $cari_kpp) D
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL, KD_KPP, KABKOTA,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBN_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ $cari_kanwil $cari_kpp
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL, KD_KPP, KABKOTA) APBN
+
+ ON D.KD_KANWIL = APBN.KD_KANWIL AND D.KD_KPP = APBN.KD_KPP AND D.KABKOTA = APBN.KABKOTA
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL, KD_KPP, KABKOTA,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ $cari_kanwil $cari_kpp
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, KODE_SATKER, NAMA_SATKER, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL, KD_KPP, KABKOTA) APBD
+
+ ON D.KD_KANWIL = APBD.KD_KANWIL AND D.KD_KPP = APBD.KD_KPP AND D.KABKOTA = APBD.KABKOTA
+
+ LEFT JOIN
+
+ (SELECT KD_KANWIL, KD_KPP, KABKOTA,
+ SUM(PAGU_TOTAL) PAGU_TOTAL,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_PAGU) ESTI_TOTAL_PAGU,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT
+ TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, NAMA_DESA, PAGU_TOTAL, ESTI_TOTAL_PAGU,
+ SUM(REAL_TOTAL) REAL_TOTAL,
+ SUM(ESTI_TOTAL_REAL) ESTI_TOTAL_REAL,
+ SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."'
+ $cari_kanwil $cari_kpp
+ GROUP BY TAHUN, KD_KANWIL, KD_KPP, KABKOTA, NPWP, NAMA_DESA, PAGU_TOTAL, ESTI_TOTAL_PAGU)
+ GROUP BY KD_KANWIL, KD_KPP, KABKOTA) APBDES
+
+ ON D.KD_KANWIL = APBDES.KD_KANWIL AND D.KD_KPP = APBDES.KD_KPP AND D.KABKOTA = APBDES.KABKOTA)";
+ //echo $query;
+ //exit;
+
+ return $this->db->query($query)->getRow();
+ }
+
+ function get_data_beranda_kpp_grafik($param) {
+ if($param['cari_kanwil'] <> "") $cari_kanwil = " AND KD_KANWIL = '".$param['cari_kanwil']."' ";
+ else $cari_kanwil = "";
+
+ if($param['cari_kpp'] <> "") $cari_kpp = " AND KD_KPP = '".$param['cari_kpp']."' ";
+ else $cari_kpp = "";
+
+ if($param['cari_sumber_dana'] == "APBN") {
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBN_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+ }
+ else if($param['cari_sumber_dana'] == "APBD") {
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+ }
+ else if($param['cari_sumber_dana'] == "APBDes") {
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+ }
+ else {
+ $query = "SELECT KD_BULAN, NM_BULAN,
+ SUM(REAL_TOTAL) REAL_TOTAL, SUM(BAYAR_TOTAL) BAYAR_TOTAL
+ FROM
+ (SELECT KD_BULAN, NM_BULAN, REAL_TOTAL, BAYAR_TOTAL FROM APBN_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp
+ UNION
+ SELECT KD_BULAN, NM_BULAN, REAL_TOTAL, BAYAR_TOTAL FROM APBD_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp
+ UNION
+ SELECT KD_BULAN, NM_BULAN, REAL_TOTAL, BAYAR_TOTAL FROM APBDES_REKAP
+ WHERE TAHUN = '".$param['cari_tahun']."' AND KD_BULAN >= '".$param['cari_bulan_awal']."' AND KD_BULAN <= '".$param['cari_bulan_akhir']."' $cari_kanwil $cari_kpp)
+ GROUP BY KD_BULAN, NM_BULAN
+ ORDER BY KD_BULAN";
+ }
+
+ return $this->db->query($query)->getResult();
+ }
+
+}
diff --git a/app/Models/Bendahara/MGeneral.php b/app/Models/Bendahara/MGeneral.php
new file mode 100644
index 00000000..5cf6b2ee
--- /dev/null
+++ b/app/Models/Bendahara/MGeneral.php
@@ -0,0 +1,69 @@
+db->table('GENAPP.REF_TAHUN');
+ $builder->select('*');
+ $builder->orderBy('TAHUN', 'DESC');
+
+ return $builder->get()->getResult();
+ }
+
+ function get_ref_bulan() {
+ $builder = $this->db->table('GENAPP.BULAN');
+ $builder->select('*');
+
+ return $builder->get()->getResult();
+ }
+
+ function get_ref_kanwil() {
+ $builder = $this->db->table('GENAPP.REF_KANWIL');
+ $builder->select('*');
+ $builder->orderBy('KODE', 'ASC');
+
+ return $builder->get()->getResult();
+ }
+
+ function get_ref_kpp($param) {
+ $builder = $this->db->table('GENAPP.REF_KPP');
+ $builder->select('*');
+ $builder->where('KD_KANWIL', $param["kanwil"]);
+ $builder->orderBy('KD_KPP', 'ASC');
+
+ return $builder->get()->getResult();
+ }
+
+ function get_ref_seksi() {
+ $builder = $this->db->table('GENAPP.REF_SEKSI');
+ $builder->select('*');
+ $builder->orderBy('KODESIE', 'ASC');
+
+ return $builder->get()->getResult();
+ }
+
+ function get_ref_ar($param) {
+ $param = ['KPPADM' => $param["kpp"], 'KODESIE' => $param["seksi"]];
+ $builder = $this->db->table('GENAPP.REF_AR');
+ $builder->select('*');
+ $builder->where($param);
+ $builder->orderBy('NAMA', 'ASC');
+
+ return $builder->get()->getResult();
+ }
+
+ function get_ref_kabkot($param) {
+ $builder = $this->db->table('GENAPP.DIM_WIL');
+ $builder->select('NM_DATI2');
+ $builder->where('KPPADM', $param["kpp"]);
+ $builder->orderBy('NM_DATI2', 'ASC');
+ $builder->distinct();
+
+ return $builder->get()->getResult();
+ }
+
+}
diff --git a/app/Models/Mpemby.php b/app/Models/Mpemby.php
index 1d12416d..bb35c673 100644
--- a/app/Models/Mpemby.php
+++ b/app/Models/Mpemby.php
@@ -114,6 +114,8 @@ class Mpemby extends Model
return $query;
}
+
+
function sofNas($param)
{
$tahun = $param['tahun'];
@@ -619,4 +621,67 @@ class Mpemby extends Model
return $query;
}
+
+ function wpsk_paycompNas($param)
+ {
+ $tahun = $param['tahun'];
+ $bln = $param['bulan'];
+ $kwl = $param['kwl'];
+ $kpp = $param['kpp'];
+ $source = $param['src'];
+ if ($kwl == 'SEMUA') {
+ $cekkwl = "";
+ }else{
+ $cekkwl = "AND KWLADM = '".$kwl."'";
+ }
+
+ if ($kpp == 'SEMUA'){
+ $cekkpp = "";
+ }else{
+ $cekkpp = "AND KPPADM = '".$kpp."'";
+ }
+ if($source == '1'){
+ $src = "WPS";
+ }else{
+ $src = "WPK";
+ }
+ $query = $this->db->query("SELECT JMLBLN JMLBULAN, COUNT(1) JMLWP FROM(
+ SELECT NPWP,COUNT(1) JMLBLN
+ FROM DASHBOARD_WP_BLN
+ WHERE TAHUN = '".$tahun."' AND BULAN <= '".$bln."' AND FLAG_WPS_WPK = '".$src."' $cekkwl $cekkpp
+ GROUP BY NPWP)
+ WHERE JMLBLN <= TO_NUMBER('".$bln."')
+ GROUP BY JMLBLN ORDER BY JMLBLN ASC");
+ return $query;
+ }
+
+ function wpsk_sofNas($param)
+ {
+ $tahun = $param['tahun'];
+ $bln = $param['bulan'];
+ $kwl = $param['kwl'];
+ $kpp = $param['kpp'];
+ $source = $param['src'];
+ if ($kwl == 'SEMUA') {
+ $cekkwl = "";
+ }else{
+ $cekkwl = "AND KWLADM = '".$kwl."'";
+ }
+
+ if ($kpp == 'SEMUA'){
+ $cekkpp = "";
+ }else{
+ $cekkpp = "AND KPPADM = '".$kpp."'";
+ }
+ if($source == '1'){
+ $src = "WPS";
+ }else{
+ $src = "WPK";
+ }
+ $query = $this->db->query("SELECT NPWP,SUM(TOTAL)TOTAL FROM DASHBOARD_WP_BLN
+ WHERE TAHUN = '" . $tahun . "' AND BULAN <= '".$bln."'
+ AND FLAG_WPS_WPK = '".$src."' $cekkwl $cekkpp
+ GROUP BY NPWP");
+ return $query;
+ }
}
diff --git a/app/Views/apbd/index.php b/app/Views/apbd/index.php
new file mode 100644
index 00000000..851a1f27
--- /dev/null
+++ b/app/Views/apbd/index.php
@@ -0,0 +1,934 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ KUANTITAS / $cari_limit);
+
+ if($page_count >= 5) {
+ $page_bottom = $page_curr - 2;
+ $page_option = 5;
+
+ if($page_bottom <= 0) $page_bottom = 1;
+ if($page_bottom + $page_option - 1 > $page_count) $page_bottom = $page_count - $page_option + 1;
+ }
+ else {
+ $page_option = $page_count;
+ $page_bottom = 1;
+ }
+
+ $page_arr = [];
+ for($i = $page_bottom; $i <= $page_bottom + $page_option - 1; $i++) {
+ $page_arr[] = $i;
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+ 25 Per Halaman
+ 50 Per Halaman
+ 100 Per Halaman
+ 200 Per Halaman
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No.
+ Kanwil
+ KPP
+ Kabupaten/Kota
+ Seksi
+ AR
+ Satuan Kerja
+ Total Pagu
+ Realisasi Pagu
+ Estimasi Pajak (Total Pagu)
+ Estimasi Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+ NPWP
+ Nama
+ Kode
+ Pegawai
+ Barang/Jasa
+ Modal
+ Sosial
+ Lainnya
+ Jumlah
+ Pegawai
+ Barang/Jasa
+ Modal
+ Sosial
+ Lainnya
+ Jumlah
+ PPh 21
+ PPh 22
+ PPh 23
+ PPh 4(2)
+ PPN
+ Jumlah
+ PPh 21
+ PPh 22
+ PPh 23
+ PPh 4(2)
+ PPN
+ Jumlah
+ PPh 21
+ PPh 22
+ PPh 23
+ PPh 4(2)
+ PPN
+ Lainnya
+ Jumlah
+ PPh 21
+ PPh 22
+ PPh 23
+ PPh 4(2)
+ PPN
+ Jumlah
+ PPh 21
+ PPh 22
+ PPh 23
+ PPh 4(2)
+ PPN
+ Jumlah
+
+
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 40
+ 40
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+
+
+
+ $row) {
+ $nomor = $nomor + 1;
+ ?>
+
+
+ NM_KANWIL; ?>
+ NM_KPP; ?>
+ KABKOTA)); ?>
+ NM_SEKSI; ?>
+ NM_AR)); ?>
+ NPWP; ?>
+ NAMA_SATKER)); ?>
+ KODE_SATKER; ?>
+ PAGU_PEGAWAI, 0, ",", ".") ?>
+ PAGU_BARANG, 0, ",", ".") ?>
+ PAGU_MODAL, 0, ",", ".") ?>
+ PAGU_SOSIAL, 0, ",", ".") ?>
+ PAGU_LAINNYA, 0, ",", ".") ?>
+ PAGU_TOTAL, 0, ",", ".") ?>
+ REAL_PEGAWAI, 0, ",", ".") ?>
+ REAL_BARANG, 0, ",", ".") ?>
+ REAL_MODAL, 0, ",", ".") ?>
+ REAL_SOSIAL, 0, ",", ".") ?>
+ REAL_LAINNYA, 0, ",", ".") ?>
+ REAL_TOTAL, 0, ",", ".") ?>
+ ESTI_PPH21_PAGU, 0, ",", ".") ?>
+ ESTI_PPH22_PAGU, 0, ",", ".") ?>
+ ESTI_PPH23_PAGU, 0, ",", ".") ?>
+ ESTI_PPH42_PAGU, 0, ",", ".") ?>
+ ESTI_PPN_PAGU, 0, ",", ".") ?>
+ ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ ESTI_PPH21_REAL, 0, ",", ".") ?>
+ ESTI_PPH22_REAL, 0, ",", ".") ?>
+ ESTI_PPH23_REAL, 0, ",", ".") ?>
+ ESTI_PPH42_REAL, 0, ",", ".") ?>
+ ESTI_PPN_REAL, 0, ",", ".") ?>
+ ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ BAYAR_PPH21, 0, ",", ".") ?>
+ BAYAR_PPH22, 0, ",", ".") ?>
+ BAYAR_PPH23, 0, ",", ".") ?>
+ BAYAR_PPH42, 0, ",", ".") ?>
+ BAYAR_PPN, 0, ",", ".") ?>
+ BAYAR_LAINNYA, 0, ",", ".") ?>
+ BAYAR_TOTAL, 0, ",", ".") ?>
+ TAXGAP_PPH21_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH22_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH23_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH42_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPN_PAGU, 0, ",", ".") ?>
+ TAXGAP_TOTAL_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH21_REAL, 0, ",", ".") ?>
+ TAXGAP_PPH22_REAL, 0, ",", ".") ?>
+ TAXGAP_PPH23_REAL, 0, ",", ".") ?>
+ TAXGAP_PPH42_REAL, 0, ",", ".") ?>
+ TAXGAP_PPN_REAL, 0, ",", ".") ?>
+ TAXGAP_TOTAL_REAL, 0, ",", ".") ?>
+ TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+
+
+ Jumlah
+
+
+
+
+
+
+
+
+ PAGU_PEGAWAI, 0, ",", ".") ?>
+ PAGU_BARANG, 0, ",", ".") ?>
+ PAGU_MODAL, 0, ",", ".") ?>
+ PAGU_SOSIAL, 0, ",", ".") ?>
+ PAGU_LAINNYA, 0, ",", ".") ?>
+ PAGU_TOTAL, 0, ",", ".") ?>
+ REAL_PEGAWAI, 0, ",", ".") ?>
+ REAL_BARANG, 0, ",", ".") ?>
+ REAL_MODAL, 0, ",", ".") ?>
+ REAL_SOSIAL, 0, ",", ".") ?>
+ REAL_LAINNYA, 0, ",", ".") ?>
+ REAL_TOTAL, 0, ",", ".") ?>
+ ESTI_PPH21_PAGU, 0, ",", ".") ?>
+ ESTI_PPH22_PAGU, 0, ",", ".") ?>
+ ESTI_PPH23_PAGU, 0, ",", ".") ?>
+ ESTI_PPH42_PAGU, 0, ",", ".") ?>
+ ESTI_PPN_PAGU, 0, ",", ".") ?>
+ ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ ESTI_PPH21_REAL, 0, ",", ".") ?>
+ ESTI_PPH22_REAL, 0, ",", ".") ?>
+ ESTI_PPH23_REAL, 0, ",", ".") ?>
+ ESTI_PPH42_REAL, 0, ",", ".") ?>
+ ESTI_PPN_REAL, 0, ",", ".") ?>
+ ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ BAYAR_PPH21, 0, ",", ".") ?>
+ BAYAR_PPH22, 0, ",", ".") ?>
+ BAYAR_PPH23, 0, ",", ".") ?>
+ BAYAR_PPH42, 0, ",", ".") ?>
+ BAYAR_PPN, 0, ",", ".") ?>
+ BAYAR_LAINNYA, 0, ",", ".") ?>
+ BAYAR_TOTAL, 0, ",", ".") ?>
+ TAXGAP_PPH21_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH22_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH23_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH42_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPN_PAGU, 0, ",", ".") ?>
+ TAXGAP_TOTAL_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH21_REAL, 0, ",", ".") ?>
+ TAXGAP_PPH22_REAL, 0, ",", ".") ?>
+ TAXGAP_PPH23_REAL, 0, ",", ".") ?>
+ TAXGAP_PPH42_REAL, 0, ",", ".") ?>
+ TAXGAP_PPN_REAL, 0, ",", ".") ?>
+ TAXGAP_TOTAL_REAL, 0, ",", ".") ?>
+ TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Views/apbdes/index.php b/app/Views/apbdes/index.php
new file mode 100644
index 00000000..0fa16530
--- /dev/null
+++ b/app/Views/apbdes/index.php
@@ -0,0 +1,843 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ KUANTITAS / $cari_limit);
+
+ if($page_count >= 5) {
+ $page_bottom = $page_curr - 2;
+ $page_option = 5;
+
+ if($page_bottom <= 0) $page_bottom = 1;
+ if($page_bottom + $page_option - 1 > $page_count) $page_bottom = $page_count - $page_option + 1;
+ }
+ else {
+ $page_option = $page_count;
+ $page_bottom = 1;
+ }
+
+ $page_arr = [];
+ for($i = $page_bottom; $i <= $page_bottom + $page_option - 1; $i++) {
+ $page_arr[] = $i;
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+ 25 Per Halaman
+ 50 Per Halaman
+ 100 Per Halaman
+ 200 Per Halaman
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No
+ Kanwil
+ KPP
+ Kabupaten/Kota
+ Kecamatan
+ Seksi
+ AR
+ Desa
+ Total Pagu
+ Realisasi Pagu
+ Estimasi Pajak (Total Pagu)
+ Estimasi Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+ NPWP
+ Nama
+ Dana ADD
+ Dana Desa
+ Bagi Hasil
+ Lainnya
+ Jumlah
+ Dana ADD
+ Dana Desa
+ Bagi Hasil
+ Lainnya
+ Jumlah
+ PPh 21
+ PPh 22
+ PPh 23
+ PPh 4(2)
+ PPN
+ Lainnya
+ Jumlah
+
+
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+
+
+
+ $row) {
+ $nomor = $nomor + 1;
+ ?>
+
+
+ NM_KANWIL; ?>
+ NM_KPP; ?>
+ KABKOTA)); ?>
+ KECAMATAN)); ?>
+ NM_SEKSI; ?>
+ NM_AR)); ?>
+ NPWP; ?>
+ NAMA_DESA)); ?>
+ PAGU_DANA_ADD, 0, ",", ".") ?>
+ PAGU_DANA_DESA, 0, ",", ".") ?>
+ PAGU_BAGI_HASIL, 0, ",", ".") ?>
+ PAGU_LAINNYA, 0, ",", ".") ?>
+ PAGU_TOTAL, 0, ",", ".") ?>
+ REAL_DANA_ADD, 0, ",", ".") ?>
+ REAL_DANA_DESA, 0, ",", ".") ?>
+ REAL_BAGI_HASIL, 0, ",", ".") ?>
+ REAL_LAINNYA, 0, ",", ".") ?>
+ REAL_TOTAL, 0, ",", ".") ?>
+ ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ BAYAR_PPH21, 0, ",", ".") ?>
+ BAYAR_PPH22, 0, ",", ".") ?>
+ BAYAR_PPH23, 0, ",", ".") ?>
+ BAYAR_PPH42, 0, ",", ".") ?>
+ BAYAR_PPN, 0, ",", ".") ?>
+ BAYAR_LAINNYA, 0, ",", ".") ?>
+ BAYAR_TOTAL, 0, ",", ".") ?>
+ TAXGAP_TOTAL_PAGU, 0, ",", ".") ?>
+ TAXGAP_TOTAL_REAL, 0, ",", ".") ?>
+ TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+
+
+ Jumlah
+
+
+
+
+
+
+
+
+ PAGU_DANA_ADD, 0, ",", ".") ?>
+ PAGU_DANA_DESA, 0, ",", ".") ?>
+ PAGU_BAGI_HASIL, 0, ",", ".") ?>
+ PAGU_LAINNYA, 0, ",", ".") ?>
+ PAGU_TOTAL, 0, ",", ".") ?>
+ REAL_DANA_ADD, 0, ",", ".") ?>
+ REAL_DANA_DESA, 0, ",", ".") ?>
+ REAL_BAGI_HASIL, 0, ",", ".") ?>
+ REAL_LAINNYA, 0, ",", ".") ?>
+ REAL_TOTAL, 0, ",", ".") ?>
+ ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ BAYAR_PPH21, 0, ",", ".") ?>
+ BAYAR_PPH22, 0, ",", ".") ?>
+ BAYAR_PPH23, 0, ",", ".") ?>
+ BAYAR_PPH42, 0, ",", ".") ?>
+ BAYAR_PPN, 0, ",", ".") ?>
+ BAYAR_LAINNYA, 0, ",", ".") ?>
+ BAYAR_TOTAL, 0, ",", ".") ?>
+ TAXGAP_TOTAL_PAGU, 0, ",", ".") ?>
+ TAXGAP_TOTAL_REAL, 0, ",", ".") ?>
+ TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Views/apbn/index.php b/app/Views/apbn/index.php
new file mode 100644
index 00000000..b06a00e8
--- /dev/null
+++ b/app/Views/apbn/index.php
@@ -0,0 +1,938 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ KUANTITAS / $cari_limit);
+
+ if($page_count >= 5) {
+ $page_bottom = $page_curr - 2;
+ $page_option = 5;
+
+ if($page_bottom <= 0) $page_bottom = 1;
+ if($page_bottom + $page_option - 1 > $page_count) $page_bottom = $page_count - $page_option + 1;
+ }
+ else {
+ $page_option = $page_count;
+ $page_bottom = 1;
+ }
+
+ $page_arr = [];
+ for($i = $page_bottom; $i <= $page_bottom + $page_option - 1; $i++) {
+ $page_arr[] = $i;
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+ 25 Per Halaman
+ 50 Per Halaman
+ 100 Per Halaman
+ 200 Per Halaman
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No.
+ Kanwil
+ KPP
+ Kabupaten/Kota
+ Seksi
+ AR
+ Satuan Kerja
+ Total Pagu
+ Realisasi Pagu
+ ESTI Pajak (Total Pagu)
+ ESTI Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+ NPWP
+ Nama
+ Kode
+ Pegawai
+ Barang/Jasa
+ Modal
+ Sosial
+ Lainnya
+ Jumlah
+ Pegawai
+ Barang/Jasa
+ Modal
+ Sosial
+ Lainnya
+ Jumlah
+ PPh 21
+ PPh 22
+ PPh 23
+ PPh 4(2)
+ PPN
+ Jumlah
+ PPh 21
+ PPh 22
+ PPh 23
+ PPh 4(2)
+ PPN
+ Jumlah
+ PPh 21
+ PPh 22
+ PPh 23
+ PPh 4(2)
+ PPN
+ Lainnya
+ Jumlah
+ PPh 21
+ PPh 22
+ PPh 23
+ PPh 4(2)
+ PPN
+ Jumlah
+ PPh 21
+ PPh 22
+ PPh 23
+ PPh 4(2)
+ PPN
+ Jumlah
+
+
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 40
+ 40
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+
+
+
+
+ $row) {
+ $nomor = $nomor + 1;
+ ?>
+
+
+ NM_KANWIL; ?>
+ NM_KPP; ?>
+ KABKOTA)); ?>
+ NM_SEKSI; ?>
+ NM_AR)); ?>
+ NPWP; ?>
+ NAMA_SATKER)); ?>
+ KODE_SATKER; ?>
+ PAGU_PEGAWAI, 0, ",", ".") ?>
+ PAGU_BARANG, 0, ",", ".") ?>
+ PAGU_MODAL, 0, ",", ".") ?>
+ PAGU_SOSIAL, 0, ",", ".") ?>
+ PAGU_LAINNYA, 0, ",", ".") ?>
+ PAGU_TOTAL, 0, ",", ".") ?>
+ REAL_PEGAWAI, 0, ",", ".") ?>
+ REAL_BARANG, 0, ",", ".") ?>
+ REAL_MODAL, 0, ",", ".") ?>
+ REAL_SOSIAL, 0, ",", ".") ?>
+ REAL_LAINNYA, 0, ",", ".") ?>
+ REAL_TOTAL, 0, ",", ".") ?>
+ ESTI_PPH21_PAGU, 0, ",", ".") ?>
+ ESTI_PPH22_PAGU, 0, ",", ".") ?>
+ ESTI_PPH23_PAGU, 0, ",", ".") ?>
+ ESTI_PPH42_PAGU, 0, ",", ".") ?>
+ ESTI_PPN_PAGU, 0, ",", ".") ?>
+ ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ ESTI_PPH21_REAL, 0, ",", ".") ?>
+ ESTI_PPH22_REAL, 0, ",", ".") ?>
+ ESTI_PPH23_REAL, 0, ",", ".") ?>
+ ESTI_PPH42_REAL, 0, ",", ".") ?>
+ ESTI_PPN_REAL, 0, ",", ".") ?>
+ ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ BAYAR_PPH21, 0, ",", ".") ?>
+ BAYAR_PPH22, 0, ",", ".") ?>
+ BAYAR_PPH23, 0, ",", ".") ?>
+ BAYAR_PPH42, 0, ",", ".") ?>
+ BAYAR_PPN, 0, ",", ".") ?>
+ BAYAR_LAINNYA, 0, ",", ".") ?>
+ BAYAR_TOTAL, 0, ",", ".") ?>
+ TAXGAP_PPH21_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH22_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH23_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH42_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPN_PAGU, 0, ",", ".") ?>
+ TAXGAP_TOTAL_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH21_REAL, 0, ",", ".") ?>
+ TAXGAP_PPH22_REAL, 0, ",", ".") ?>
+ TAXGAP_PPH23_REAL, 0, ",", ".") ?>
+ TAXGAP_PPH42_REAL, 0, ",", ".") ?>
+ TAXGAP_PPN_REAL, 0, ",", ".") ?>
+ TAXGAP_TOTAL_REAL, 0, ",", ".") ?>
+ TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+
+
+ Jumlah
+
+
+
+
+
+
+
+
+ PAGU_PEGAWAI, 0, ",", ".") ?>
+ PAGU_BARANG, 0, ",", ".") ?>
+ PAGU_MODAL, 0, ",", ".") ?>
+ PAGU_SOSIAL, 0, ",", ".") ?>
+ PAGU_LAINNYA, 0, ",", ".") ?>
+ PAGU_TOTAL, 0, ",", ".") ?>
+ REAL_PEGAWAI, 0, ",", ".") ?>
+ REAL_BARANG, 0, ",", ".") ?>
+ REAL_MODAL, 0, ",", ".") ?>
+ REAL_SOSIAL, 0, ",", ".") ?>
+ REAL_LAINNYA, 0, ",", ".") ?>
+ REAL_TOTAL, 0, ",", ".") ?>
+ ESTI_PPH21_PAGU, 0, ",", ".") ?>
+ ESTI_PPH22_PAGU, 0, ",", ".") ?>
+ ESTI_PPH23_PAGU, 0, ",", ".") ?>
+ ESTI_PPH42_PAGU, 0, ",", ".") ?>
+ ESTI_PPN_PAGU, 0, ",", ".") ?>
+ ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ ESTI_PPH21_REAL, 0, ",", ".") ?>
+ ESTI_PPH22_REAL, 0, ",", ".") ?>
+ ESTI_PPH23_REAL, 0, ",", ".") ?>
+ ESTI_PPH42_REAL, 0, ",", ".") ?>
+ ESTI_PPN_REAL, 0, ",", ".") ?>
+ ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ BAYAR_PPH21, 0, ",", ".") ?>
+ BAYAR_PPH22, 0, ",", ".") ?>
+ BAYAR_PPH23, 0, ",", ".") ?>
+ BAYAR_PPH42, 0, ",", ".") ?>
+ BAYAR_PPN, 0, ",", ".") ?>
+ BAYAR_LAINNYA, 0, ",", ".") ?>
+ BAYAR_TOTAL, 0, ",", ".") ?>
+ TAXGAP_PPH21_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH22_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH23_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH42_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPN_PAGU, 0, ",", ".") ?>
+ TAXGAP_TOTAL_PAGU, 0, ",", ".") ?>
+ TAXGAP_PPH21_REAL, 0, ",", ".") ?>
+ TAXGAP_PPH22_REAL, 0, ",", ".") ?>
+ TAXGAP_PPH23_REAL, 0, ",", ".") ?>
+ TAXGAP_PPH42_REAL, 0, ",", ".") ?>
+ TAXGAP_PPN_REAL, 0, ",", ".") ?>
+ TAXGAP_TOTAL_REAL, 0, ",", ".") ?>
+ TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Views/beranda/index.php b/app/Views/beranda/index.php
new file mode 100644
index 00000000..7b503acb
--- /dev/null
+++ b/app/Views/beranda/index.php
@@ -0,0 +1,776 @@
+
+
+
+
+
+
+
+
+ APBN_PAGU_TOTAL;
+ $summary_realisasi_total = $data_beranda_total->APBN_REAL_TOTAL;
+ $summary_estimasi_total = $data_beranda_total->APBN_EST_TOTAL_PAGU;
+ $summary_bayar_total = $data_beranda_total->APBN_BAYAR_TOTAL;
+ $summary_taxgap_pagu = $data_beranda_total->APBN_TAXGAP_PAGU;
+ $summary_taxgap_realisasi = $data_beranda_total->APBN_TAXGAP_REAL;
+ $summary_tax_collection = $data_beranda_total->APBN_TAX_COLLECTION;
+ }
+ else if($cari_sumber_dana == "APBD") {
+ $summary_pagu_total = $data_beranda_total->APBD_PAGU_TOTAL;
+ $summary_realisasi_total = $data_beranda_total->APBD_REAL_TOTAL;
+ $summary_estimasi_total = $data_beranda_total->APBD_EST_TOTAL_PAGU;
+ $summary_bayar_total = $data_beranda_total->APBD_BAYAR_TOTAL;
+ $summary_taxgap_pagu = $data_beranda_total->APBD_TAXGAP_PAGU;
+ $summary_taxgap_realisasi = $data_beranda_total->APBD_TAXGAP_REAL;
+ $summary_tax_collection = $data_beranda_total->APBD_TAX_COLLECTION;
+ }
+ else if($cari_sumber_dana == "APBDes") {
+ $summary_pagu_total = $data_beranda_total->APBDES_PAGU_TOTAL;
+ $summary_realisasi_total = $data_beranda_total->APBDES_REAL_TOTAL;
+ $summary_estimasi_total = $data_beranda_total->APBDES_EST_TOTAL_PAGU;
+ $summary_bayar_total = $data_beranda_total->APBDES_BAYAR_TOTAL;
+ $summary_taxgap_pagu = $data_beranda_total->APBDES_TAXGAP_PAGU;
+ $summary_taxgap_realisasi = $data_beranda_total->APBDES_TAXGAP_REAL;
+ $summary_tax_collection = $data_beranda_total->APBDES_TAX_COLLECTION;
+ }
+ else {
+ $summary_pagu_total = $data_beranda_total->ALL_PAGU_TOTAL;
+ $summary_realisasi_total = $data_beranda_total->ALL_REAL_TOTAL;
+ $summary_estimasi_total = $data_beranda_total->ALL_EST_TOTAL_PAGU;
+ $summary_bayar_total = $data_beranda_total->ALL_BAYAR_TOTAL;
+ $summary_taxgap_pagu = $data_beranda_total->ALL_TAXGAP_PAGU;
+ $summary_taxgap_realisasi = $data_beranda_total->ALL_TAXGAP_REAL;
+ $summary_tax_collection = $data_beranda_total->ALL_TAX_COLLECTION;
+ }
+ ?>
+
+
+
+
+
+
+ KUANTITAS / $cari_limit);
+
+ if($page_count >= 5) {
+ $page_bottom = $page_curr - 2;
+ $page_option = 5;
+
+ if($page_bottom <= 0) $page_bottom = 1;
+ if($page_bottom + $page_option - 1 > $page_count) $page_bottom = $page_count - $page_option + 1;
+ }
+ else {
+ $page_option = $page_count;
+ $page_bottom = 1;
+ }
+
+ $page_arr = [];
+ for($i = $page_bottom; $i <= $page_bottom + $page_option - 1; $i++) {
+ $page_arr[] = $i;
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+ 25 Per Halaman
+ 50 Per Halaman
+ 100 Per Halaman
+ 200 Per Halaman
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No
+ Kanwil
+
+
+ APBN
+
+
+
+ APBD
+
+
+
+ APBDes
+
+
+
+ Total
+
+
+
+
+
+
+ Total Pagu
+ Realisasi Pagu
+ Estimasi Pajak (Total Pagu)
+ Estimasi Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+
+ Total Pagu
+ Realisasi Pagu
+ Estimasi Pajak (Total Pagu)
+ Estimasi Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+
+ Total Pagu
+ Realisasi Pagu
+ Estimasi Pajak (Total Pagu)
+ Estimasi Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+
+ Total Pagu
+ Realisasi Pagu
+ Estimasi Pajak (Total Pagu)
+ Estimasi Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+
+
+ 1
+ 2
+
+
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+
+
+
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+
+
+
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+
+
+
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+
+
+
+
+
+ $row) {
+ $nomor = $nomor + 1;
+ ?>
+
+
+ NM_KANWIL; ?>
+
+
+ APBN_PAGU_TOTAL, 0, ",", ".") ?>
+ APBN_REAL_TOTAL, 0, ",", ".") ?>
+ APBN_EST_TOTAL_PAGU, 0, ",", ".") ?>
+ APBN_EST_TOTAL_REAL, 0, ",", ".") ?>
+ APBN_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBN_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBN_TAXGAP_REAL, 0, ",", ".") ?>
+ APBN_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ APBD_PAGU_TOTAL, 0, ",", ".") ?>
+ APBD_REAL_TOTAL, 0, ",", ".") ?>
+ APBD_EST_TOTAL_PAGU, 0, ",", ".") ?>
+ APBD_EST_TOTAL_REAL, 0, ",", ".") ?>
+ APBD_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBD_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBD_TAXGAP_REAL, 0, ",", ".") ?>
+ APBD_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ APBDES_PAGU_TOTAL, 0, ",", ".") ?>
+ APBDES_REAL_TOTAL, 0, ",", ".") ?>
+ APBDES_EST_TOTAL_PAGU, 0, ",", ".") ?>
+ APBDES_EST_TOTAL_REAL, 0, ",", ".") ?>
+ APBDES_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBDES_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBDES_TAXGAP_REAL, 0, ",", ".") ?>
+ APBDES_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ ALL_PAGU_TOTAL, 0, ",", ".") ?>
+ ALL_REAL_TOTAL, 0, ",", ".") ?>
+ ALL_EST_TOTAL_PAGU, 0, ",", ".") ?>
+ ALL_EST_TOTAL_REAL, 0, ",", ".") ?>
+ ALL_BAYAR_TOTAL, 0, ",", ".") ?>
+ ALL_TAXGAP_PAGU, 0, ",", ".") ?>
+ ALL_TAXGAP_REAL, 0, ",", ".") ?>
+ ALL_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+
+
+
+
+ Jumlah
+
+
+
+ APBN_PAGU_TOTAL, 0, ",", ".") ?>
+ APBN_REAL_TOTAL, 0, ",", ".") ?>
+ APBN_EST_TOTAL_PAGU, 0, ",", ".") ?>
+ APBN_EST_TOTAL_REAL, 0, ",", ".") ?>
+ APBN_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBN_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBN_TAXGAP_REAL, 0, ",", ".") ?>
+ APBN_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ APBD_PAGU_TOTAL, 0, ",", ".") ?>
+ APBD_REAL_TOTAL, 0, ",", ".") ?>
+ APBD_EST_TOTAL_PAGU, 0, ",", ".") ?>
+ APBD_EST_TOTAL_REAL, 0, ",", ".") ?>
+ APBD_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBD_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBD_TAXGAP_REAL, 0, ",", ".") ?>
+ APBD_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ APBDES_PAGU_TOTAL, 0, ",", ".") ?>
+ APBDES_REAL_TOTAL, 0, ",", ".") ?>
+ APBDES_EST_TOTAL_PAGU, 0, ",", ".") ?>
+ APBDES_EST_TOTAL_REAL, 0, ",", ".") ?>
+ APBDES_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBDES_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBDES_TAXGAP_REAL, 0, ",", ".") ?>
+ APBDES_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ ALL_PAGU_TOTAL, 0, ",", ".") ?>
+ ALL_REAL_TOTAL, 0, ",", ".") ?>
+ ALL_EST_TOTAL_PAGU, 0, ",", ".") ?>
+ ALL_EST_TOTAL_REAL, 0, ",", ".") ?>
+ ALL_BAYAR_TOTAL, 0, ",", ".") ?>
+ ALL_TAXGAP_PAGU, 0, ",", ".") ?>
+ ALL_TAXGAP_REAL, 0, ",", ".") ?>
+ ALL_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Views/beranda/kanwil.php b/app/Views/beranda/kanwil.php
new file mode 100644
index 00000000..8cea283c
--- /dev/null
+++ b/app/Views/beranda/kanwil.php
@@ -0,0 +1,817 @@
+
+
+
+
+
+
+
+
+ APBN_PAGU_TOTAL;
+ $summary_realisasi_total = $data_beranda_total->APBN_REAL_TOTAL;
+ $summary_estimasi_total = $data_beranda_total->APBN_ESTI_TOTAL_PAGU;
+ $summary_bayar_total = $data_beranda_total->APBN_BAYAR_TOTAL;
+ $summary_taxgap_pagu = $data_beranda_total->APBN_TAXGAP_PAGU;
+ $summary_taxgap_realisasi = $data_beranda_total->APBN_TAXGAP_REAL;
+ $summary_tax_collection = $data_beranda_total->APBN_TAX_COLLECTION;
+ }
+ else if($cari_sumber_dana == "APBD") {
+ $summary_pagu_total = $data_beranda_total->APBD_PAGU_TOTAL;
+ $summary_realisasi_total = $data_beranda_total->APBD_REAL_TOTAL;
+ $summary_estimasi_total = $data_beranda_total->APBD_ESTI_TOTAL_PAGU;
+ $summary_bayar_total = $data_beranda_total->APBD_BAYAR_TOTAL;
+ $summary_taxgap_pagu = $data_beranda_total->APBD_TAXGAP_PAGU;
+ $summary_taxgap_realisasi = $data_beranda_total->APBD_TAXGAP_REAL;
+ $summary_tax_collection = $data_beranda_total->APBD_TAX_COLLECTION;
+ }
+ else if($cari_sumber_dana == "APBDes") {
+ $summary_pagu_total = $data_beranda_total->APBDES_PAGU_TOTAL;
+ $summary_realisasi_total = $data_beranda_total->APBDES_REAL_TOTAL;
+ $summary_estimasi_total = $data_beranda_total->APBDES_ESTI_TOTAL_PAGU;
+ $summary_bayar_total = $data_beranda_total->APBDES_BAYAR_TOTAL;
+ $summary_taxgap_pagu = $data_beranda_total->APBDES_TAXGAP_PAGU;
+ $summary_taxgap_realisasi = $data_beranda_total->APBDES_TAXGAP_REAL;
+ $summary_tax_collection = $data_beranda_total->APBDES_TAX_COLLECTION;
+ }
+ else {
+ $summary_pagu_total = $data_beranda_total->ALL_PAGU_TOTAL;
+ $summary_realisasi_total = $data_beranda_total->ALL_REAL_TOTAL;
+ $summary_estimasi_total = $data_beranda_total->ALL_ESTI_TOTAL_PAGU;
+ $summary_bayar_total = $data_beranda_total->ALL_BAYAR_TOTAL;
+ $summary_taxgap_pagu = $data_beranda_total->ALL_TAXGAP_PAGU;
+ $summary_taxgap_realisasi = $data_beranda_total->ALL_TAXGAP_REAL;
+ $summary_tax_collection = $data_beranda_total->ALL_TAX_COLLECTION;
+ }
+ ?>
+
+
+
+
+
+
+ KUANTITAS / $cari_limit);
+
+ if($page_count >= 5) {
+ $page_bottom = $page_curr - 2;
+ $page_option = 5;
+
+ if($page_bottom <= 0) $page_bottom = 1;
+ if($page_bottom + $page_option - 1 > $page_count) $page_bottom = $page_count - $page_option + 1;
+ }
+ else {
+ $page_option = $page_count;
+ $page_bottom = 1;
+ }
+
+ $page_arr = [];
+ for($i = $page_bottom; $i <= $page_bottom + $page_option - 1; $i++) {
+ $page_arr[] = $i;
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+ 25 Per Halaman
+ 50 Per Halaman
+ 100 Per Halaman
+ 200 Per Halaman
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No
+ Kanwil
+ KPP
+
+
+ APBN
+
+
+
+ APBD
+
+
+
+ APBDes
+
+
+
+ Total
+
+
+
+
+
+
+ Total Pagu
+ Realisasi Pagu
+ Estimasi Pajak (Total Pagu)
+ Estimasi Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+
+ Total Pagu
+ Realisasi Pagu
+ Estimasi Pajak (Total Pagu)
+ Estimasi Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+
+ Total Pagu
+ Realisasi Pagu
+ Estimasi Pajak (Total Pagu)
+ Estimasi Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+
+ Total Pagu
+ Realisasi Pagu
+ Estimasi Pajak (Total Pagu)
+ Estimasi Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+
+
+ 1
+ 2
+ 3
+
+
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+
+
+
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+
+
+
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+
+
+
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+
+
+
+
+
+ $row) {
+ $nomor = $nomor + 1;
+ ?>
+
+
+ NM_KANWIL; ?>
+ NM_KPP; ?>
+
+
+ APBN_PAGU_TOTAL, 0, ",", ".") ?>
+ APBN_REAL_TOTAL, 0, ",", ".") ?>
+ APBN_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ APBN_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ APBN_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBN_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBN_TAXGAP_REAL, 0, ",", ".") ?>
+ APBN_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ APBD_PAGU_TOTAL, 0, ",", ".") ?>
+ APBD_REAL_TOTAL, 0, ",", ".") ?>
+ APBD_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ APBD_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ APBD_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBD_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBD_TAXGAP_REAL, 0, ",", ".") ?>
+ APBD_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ APBDES_PAGU_TOTAL, 0, ",", ".") ?>
+ APBDES_REAL_TOTAL, 0, ",", ".") ?>
+ APBDES_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ APBDES_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ APBDES_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBDES_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBDES_TAXGAP_REAL, 0, ",", ".") ?>
+ APBDES_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ ALL_PAGU_TOTAL, 0, ",", ".") ?>
+ ALL_REAL_TOTAL, 0, ",", ".") ?>
+ ALL_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ ALL_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ ALL_BAYAR_TOTAL, 0, ",", ".") ?>
+ ALL_TAXGAP_PAGU, 0, ",", ".") ?>
+ ALL_TAXGAP_REAL, 0, ",", ".") ?>
+ ALL_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+
+
+
+
+ Jumlah
+
+
+
+
+ APBN_PAGU_TOTAL, 0, ",", ".") ?>
+ APBN_REAL_TOTAL, 0, ",", ".") ?>
+ APBN_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ APBN_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ APBN_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBN_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBN_TAXGAP_REAL, 0, ",", ".") ?>
+ APBN_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ APBD_PAGU_TOTAL, 0, ",", ".") ?>
+ APBD_REAL_TOTAL, 0, ",", ".") ?>
+ APBD_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ APBD_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ APBD_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBD_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBD_TAXGAP_REAL, 0, ",", ".") ?>
+ APBD_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ APBDES_PAGU_TOTAL, 0, ",", ".") ?>
+ APBDES_REAL_TOTAL, 0, ",", ".") ?>
+ APBDES_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ APBDES_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ APBDES_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBDES_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBDES_TAXGAP_REAL, 0, ",", ".") ?>
+ APBDES_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ ALL_PAGU_TOTAL, 0, ",", ".") ?>
+ ALL_REAL_TOTAL, 0, ",", ".") ?>
+ ALL_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ ALL_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ ALL_BAYAR_TOTAL, 0, ",", ".") ?>
+ ALL_TAXGAP_PAGU, 0, ",", ".") ?>
+ ALL_TAXGAP_REAL, 0, ",", ".") ?>
+ ALL_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Views/beranda/kpp.php b/app/Views/beranda/kpp.php
new file mode 100644
index 00000000..ad95e651
--- /dev/null
+++ b/app/Views/beranda/kpp.php
@@ -0,0 +1,870 @@
+
+
+
+
+
+
+
+
+ APBN_PAGU_TOTAL;
+ $summary_realisasi_total = $data_beranda_total->APBN_REAL_TOTAL;
+ $summary_estimasi_total = $data_beranda_total->APBN_ESTI_TOTAL_PAGU;
+ $summary_bayar_total = $data_beranda_total->APBN_BAYAR_TOTAL;
+ $summary_taxgap_pagu = $data_beranda_total->APBN_TAXGAP_PAGU;
+ $summary_taxgap_realisasi = $data_beranda_total->APBN_TAXGAP_REAL;
+ $summary_tax_collection = $data_beranda_total->APBN_TAX_COLLECTION;
+ }
+ else if($cari_sumber_dana == "APBD") {
+ $summary_pagu_total = $data_beranda_total->APBD_PAGU_TOTAL;
+ $summary_realisasi_total = $data_beranda_total->APBD_REAL_TOTAL;
+ $summary_estimasi_total = $data_beranda_total->APBD_ESTI_TOTAL_PAGU;
+ $summary_bayar_total = $data_beranda_total->APBD_BAYAR_TOTAL;
+ $summary_taxgap_pagu = $data_beranda_total->APBD_TAXGAP_PAGU;
+ $summary_taxgap_realisasi = $data_beranda_total->APBD_TAXGAP_REAL;
+ $summary_tax_collection = $data_beranda_total->APBD_TAX_COLLECTION;
+ }
+ else if($cari_sumber_dana == "APBDes") {
+ $summary_pagu_total = $data_beranda_total->APBDES_PAGU_TOTAL;
+ $summary_realisasi_total = $data_beranda_total->APBDES_REAL_TOTAL;
+ $summary_estimasi_total = $data_beranda_total->APBDES_ESTI_TOTAL_PAGU;
+ $summary_bayar_total = $data_beranda_total->APBDES_BAYAR_TOTAL;
+ $summary_taxgap_pagu = $data_beranda_total->APBDES_TAXGAP_PAGU;
+ $summary_taxgap_realisasi = $data_beranda_total->APBDES_TAXGAP_REAL;
+ $summary_tax_collection = $data_beranda_total->APBDES_TAX_COLLECTION;
+ }
+ else {
+ $summary_pagu_total = $data_beranda_total->ALL_PAGU_TOTAL;
+ $summary_realisasi_total = $data_beranda_total->ALL_REAL_TOTAL;
+ $summary_estimasi_total = $data_beranda_total->ALL_ESTI_TOTAL_PAGU;
+ $summary_bayar_total = $data_beranda_total->ALL_BAYAR_TOTAL;
+ $summary_taxgap_pagu = $data_beranda_total->ALL_TAXGAP_PAGU;
+ $summary_taxgap_realisasi = $data_beranda_total->ALL_TAXGAP_REAL;
+ $summary_tax_collection = $data_beranda_total->ALL_TAX_COLLECTION;
+ }
+ ?>
+
+
+
+
+
+
+ KUANTITAS / $cari_limit);
+
+ if($page_count >= 5) {
+ $page_bottom = $page_curr - 2;
+ $page_option = 5;
+
+ if($page_bottom <= 0) $page_bottom = 1;
+ if($page_bottom + $page_option - 1 > $page_count) $page_bottom = $page_count - $page_option + 1;
+ }
+ else {
+ $page_option = $page_count;
+ $page_bottom = 1;
+ }
+
+ $page_arr = [];
+ for($i = $page_bottom; $i <= $page_bottom + $page_option - 1; $i++) {
+ $page_arr[] = $i;
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+ 25 Per Halaman
+ 50 Per Halaman
+ 100 Per Halaman
+ 200 Per Halaman
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No
+ Kanwil
+ KPP
+ Kabupaten/Kota
+
+
+ APBN
+
+
+
+ APBD
+
+
+
+ APBDes
+
+
+
+ Total
+
+
+
+
+
+
+ Total Pagu
+ Realisasi Pagu
+ Estimasi Pajak (Total Pagu)
+ Estimasi Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+
+ Total Pagu
+ Realisasi Pagu
+ Estimasi Pajak (Total Pagu)
+ Estimasi Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+
+ Total Pagu
+ Realisasi Pagu
+ Estimasi Pajak (Total Pagu)
+ Estimasi Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+
+ Total Pagu
+ Realisasi Pagu
+ Estimasi Pajak (Total Pagu)
+ Estimasi Pajak (Realisasi Pagu)
+ Realisasi Pajak
+ Tax Gap (Total Pagu)
+ Tax Gap (Realisasi Pagu)
+ Tax Collection
+
+
+
+
+ 1
+ 2
+ 3
+ 4
+
+
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+
+
+
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+
+
+
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+
+
+
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+
+
+
+
+
+ $row) {
+ $nomor = $nomor + 1;
+ ?>
+
+
+ NM_KANWIL; ?>
+ NM_KPP; ?>
+ KABKOTA)); ?>
+
+
+ APBN_PAGU_TOTAL, 0, ",", ".") ?>
+ APBN_REAL_TOTAL, 0, ",", ".") ?>
+ APBN_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ APBN_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ APBN_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBN_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBN_TAXGAP_REAL, 0, ",", ".") ?>
+ APBN_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ APBD_PAGU_TOTAL, 0, ",", ".") ?>
+ APBD_REAL_TOTAL, 0, ",", ".") ?>
+ APBD_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ APBD_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ APBD_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBD_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBD_TAXGAP_REAL, 0, ",", ".") ?>
+ APBD_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ APBDES_PAGU_TOTAL, 0, ",", ".") ?>
+ APBDES_REAL_TOTAL, 0, ",", ".") ?>
+ APBDES_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ APBDES_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ APBDES_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBDES_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBDES_TAXGAP_REAL, 0, ",", ".") ?>
+ APBDES_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ ALL_PAGU_TOTAL, 0, ",", ".") ?>
+ ALL_REAL_TOTAL, 0, ",", ".") ?>
+ ALL_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ ALL_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ ALL_BAYAR_TOTAL, 0, ",", ".") ?>
+ ALL_TAXGAP_PAGU, 0, ",", ".") ?>
+ ALL_TAXGAP_REAL, 0, ",", ".") ?>
+ ALL_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+
+
+
+
+ Jumlah
+
+
+
+
+
+ APBN_PAGU_TOTAL, 0, ",", ".") ?>
+ APBN_REAL_TOTAL, 0, ",", ".") ?>
+ APBN_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ APBN_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ APBN_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBN_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBN_TAXGAP_REAL, 0, ",", ".") ?>
+ APBN_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ APBD_PAGU_TOTAL, 0, ",", ".") ?>
+ APBD_REAL_TOTAL, 0, ",", ".") ?>
+ APBD_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ APBD_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ APBD_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBD_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBD_TAXGAP_REAL, 0, ",", ".") ?>
+ APBD_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ APBDES_PAGU_TOTAL, 0, ",", ".") ?>
+ APBDES_REAL_TOTAL, 0, ",", ".") ?>
+ APBDES_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ APBDES_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ APBDES_BAYAR_TOTAL, 0, ",", ".") ?>
+ APBDES_TAXGAP_PAGU, 0, ",", ".") ?>
+ APBDES_TAXGAP_REAL, 0, ",", ".") ?>
+ APBDES_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+ ALL_PAGU_TOTAL, 0, ",", ".") ?>
+ ALL_REAL_TOTAL, 0, ",", ".") ?>
+ ALL_ESTI_TOTAL_PAGU, 0, ",", ".") ?>
+ ALL_ESTI_TOTAL_REAL, 0, ",", ".") ?>
+ ALL_BAYAR_TOTAL, 0, ",", ".") ?>
+ ALL_TAXGAP_PAGU, 0, ",", ".") ?>
+ ALL_TAXGAP_REAL, 0, ",", ".") ?>
+ ALL_TAX_COLLECTION), 2, ",", ".") ?>%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Views/inc/sidebar.php b/app/Views/inc/sidebar.php
index 7cbe5a1d..2cd2743f 100644
--- a/app/Views/inc/sidebar.php
+++ b/app/Views/inc/sidebar.php
@@ -85,6 +85,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+