db->query(" SELECT B.NM_PDK nama, B.NAMA NM_PANJANG, a.KWLADM, SUM (wp_bayar_bulan_bayar) wpbyr, SUM (wp_bayar_teratur_bulan_bayar) wpbyrteratur, sum(jml_wp) jmlwp FROM GENAPP.RAPOR_WP_BAYAR a LEFT JOIN GENAPP.REF_KANWIL b ON a.KWLADM = b.KODE WHERE THN_BYR = '" . $tahun . "' and b.NM_PDK IS NOT NULL and bln_byr = to_number('" . $bln . "') group by b.NM_PDK, a.KWLADM, B.NAMA "); return $query; } public function getRatKpp($param) { $tahun = $param['tahun']; $bln = $param['bln']; $query = $this->db->query("SELECT SUBSTR(b.NM_KANTOR, 5) nama, a.KWLADM, a.KPPADM, SUM(wp_bayar_bulan_bayar) wpbyr, SUM(wp_bayar_teratur_bulan_bayar) wpbyrteratur, SUM(jml_wp) jmlwp FROM GENAPP.RAPOR_WP_BAYAR a LEFT JOIN GENAPP.REF_KPP b ON a.KPPADM = b.KD_KPP WHERE THN_BYR = '{$tahun}' AND b.NM_KANTOR IS NOT NULL AND BLN_BYR = TO_NUMBER('{$bln}') GROUP BY b.NM_KANTOR, a.KWLADM, a.KPPADM"); return $query; } public function getRatSie($param) { $tahun = $param['tahun']; $bln = $param['bln']; $query = $this->db->query("SELECT SUBSTR(b.NAMA_UNIT_ES4, 7) nama, a.KWLADM, a.KPPADM, a.KODESIE, SUM(wp_bayar_bulan_bayar) wpbyr, SUM(wp_bayar_teratur_bulan_bayar) wpbyrteratur, SUM(jml_wp) jmlwp FROM GENAPP.RAPOR_WP_BAYAR a LEFT JOIN GENAPP.REF_SEKSI b ON a.KODESIE = b.KODESIE WHERE THN_BYR = '{$tahun}' AND b.NAMA_UNIT_ES4 IS NOT NULL AND BLN_BYR = TO_NUMBER('{$bln}') GROUP BY b.NAMA_UNIT_ES4, a.KWLADM, a.KPPADM, a.KODESIE"); return $query; } public function getRatPeg($param) { $tahun = $param['tahun']; $bln = $param['bln']; $query = $this->db->query("SELECT B.NAMA, a.KWLADM, a.KPPADM, a.KODESIE, a.NIP, SUM(wp_bayar_bulan_bayar) wpbyr, SUM(wp_bayar_teratur_bulan_bayar) wpbyrteratur, SUM(jml_wp) jmlwp FROM GENAPP.RAPOR_WP_BAYAR a LEFT JOIN GENAPP.REF_AR b ON a.NIP = b.NIP WHERE THN_BYR = '{$tahun}' AND b.NAMA IS NOT NULL AND BLN_BYR = TO_NUMBER('{$bln}') GROUP BY b.nama, a.KWLADM, a.KPPADM, a.KODESIE, a.NIP"); return $query; } // public function getLapKwl($param) // { // $tahun = $param['tahun']; // $bln = $param['bln']; // $query = $this->db->query(" SELECT B.NM_PDK nama, // B.NAMA NM_PANJANG, // a.KWLADM, // SUM (wp_bayar) wpbyr, // SUM (wp_bayar_teratur) wpbyrteratur, // sum(jml_wp) jmlwp // FROM GENAPP.RAPOR_WP_LAPOR_V3 a // LEFT JOIN GENAPP.REF_KANWIL b ON a.KWLADM = b.KODE // WHERE THN_BYR = '" . $tahun . "' and b.NM_PDK IS NOT NULL and bln_byr = to_number('" . $bln . "') // group by b.NM_PDK, a.KWLADM, B.NAMA // "); // return $query; // } public function getLprKwl($param) { $tahun = $param['tahun']; $query = $this->db->query(" SELECT B.NM_PDK NAMA, B.NAMA NM_PANJANG, a.KD_KANWIL KWLADM, SUM(JML_LAPOR) WPLPR, SUM(JML_WP) JMLWP FROM GENAPP.RAPOR_WP_LAPOR a LEFT JOIN GENAPP.REF_KANWIL b ON a.KD_KANWIL = b.KODE WHERE TAHUN_PAJAK = '{$tahun}' AND b.NM_PDK IS NOT NULL GROUP BY b.NM_PDK, a.KD_KANWIL, B.NAMA "); return $query; } public function getLprKpp($param) { $tahun = $param['tahun']; $query = $this->db->query(" SELECT SUBSTR(b.NM_KANTOR, 5) NAMA, a.KD_KANWIL KWLADM, a.KPPADM, SUM(JML_LAPOR) WPLPR, SUM(JML_WP) JMLWP FROM GENAPP.RAPOR_WP_LAPOR a LEFT JOIN GENAPP.REF_KPP b ON a.KPPADM = b.KD_KPP WHERE TAHUN_PAJAK = '{$tahun}' AND b.NM_KANTOR IS NOT NULL GROUP BY b.NM_KANTOR, a.KD_KANWIL, a.KPPADM "); return $query; } public function getLprSie($param) { $tahun = $param['tahun']; $query = $this->db->query(" SELECT SUBSTR(b.NAMA_UNIT_ES4, 7) NAMA, a.KD_KANWIL KWLADM, a.KPPADM, a.KODESIE, SUM(JML_LAPOR) WPLPR, SUM(JML_WP) JMLWP FROM GENAPP.RAPOR_WP_LAPOR a LEFT JOIN GENAPP.REF_SEKSI b ON a.KODESIE = b.KODESIE WHERE TAHUN_PAJAK = '{$tahun}' AND b.NAMA_UNIT_ES4 IS NOT NULL GROUP BY b.NAMA_UNIT_ES4, a.KD_KANWIL, a.KPPADM, a.KODESIE "); return $query; } public function getLprPeg($param) { $tahun = $param['tahun']; $query = $this->db->query(" SELECT B.NAMA, a.KD_KANWIL KWLADM, a.KPPADM, a.KODESIE, a.NIP, SUM(JML_LAPOR) WPLPR, SUM(JML_WP) JMLWP FROM GENAPP.RAPOR_WP_LAPOR a LEFT JOIN GENAPP.REF_AR b ON a.NIP = b.NIP WHERE TAHUN_PAJAK = '{$tahun}' AND b.NAMA IS NOT NULL GROUP BY b.NAMA, a.KD_KANWIL, a.KPPADM, a.KODESIE, a.NIP "); return $query; } function getDftrKwl($param) { $tahun = $param['tahun']; $bln = $param['bln']; $query = $this->db->query(" SELECT B.NM_PDK NAMA, B.NAMA NM_PANJANG, a.KWLADM, SUM (wp_bayar_bulan_bayar) wpbyr, SUM (wp_bayar_teratur_bulan_bayar) wpbyrteratur, sum(jml_wp) jmlwp FROM GENAPP.RAPOR_WP_BAYAR a LEFT JOIN GENAPP.REF_KANWIL b ON a.KWLADM = b.KODE WHERE THN_BYR = '" . $tahun . "' and b.NM_PDK IS NOT NULL and bln_byr = to_number('" . $bln . "') GROUP BY b.NM_PDK, a.KWLADM, B.NAMA "); return $query; } public function getDftrKpp($param) { $tahun = $param['tahun']; $bln = $param['bln']; $query = $this->db->query(" SELECT SUBSTR(b.NM_KANTOR, 5) NAMA, a.KWLADM, a.KPPADM, SUM(wp_bayar_bulan_bayar) wpbyr, SUM(wp_bayar_teratur_bulan_bayar) wpbyrteratur, SUM(jml_wp) jmlwp FROM GENAPP.RAPOR_WP_BAYAR a LEFT JOIN GENAPP.REF_KPP b ON a.KPPADM = b.KD_KPP WHERE THN_BYR = '{$tahun}' AND b.NM_KANTOR IS NOT NULL AND BLN_BYR = TO_NUMBER('{$bln}') GROUP BY b.NM_KANTOR, a.KWLADM, a.KPPADM "); return $query; } public function getDftrSie($param) { $tahun = $param['tahun']; $bln = $param['bln']; $query = $this->db->query("SELECT SUBSTR(b.NAMA_UNIT_ES4, 7) nama, a.KWLADM, a.KPPADM, a.KODESIE, SUM(wp_bayar_bulan_bayar) wpbyr, SUM(wp_bayar_teratur_bulan_bayar) wpbyrteratur, SUM(jml_wp) jmlwp FROM GENAPP.RAPOR_WP_BAYAR a LEFT JOIN GENAPP.REF_SEKSI b ON a.KODESIE = b.KODESIE WHERE THN_BYR = '{$tahun}' AND b.NAMA_UNIT_ES4 IS NOT NULL AND BLN_BYR = TO_NUMBER('{$bln}') GROUP BY b.NAMA_UNIT_ES4, a.KWLADM, a.KPPADM, a.KODESIE"); return $query; } public function getDftrPeg($param) { $tahun = $param['tahun']; $bln = $param['bln']; $query = $this->db->query("SELECT B.NAMA, a.KWLADM, a.KPPADM, a.KODESIE, a.NIP, SUM(wp_bayar_bulan_bayar) wpbyr, SUM(wp_bayar_teratur_bulan_bayar) wpbyrteratur, SUM(jml_wp) jmlwp FROM GENAPP.RAPOR_WP_BAYAR a LEFT JOIN GENAPP.REF_AR b ON a.NIP = b.NIP WHERE THN_BYR = '{$tahun}' AND b.NAMA IS NOT NULL AND BLN_BYR = TO_NUMBER('{$bln}') GROUP BY b.nama, a.KWLADM, a.KPPADM, a.KODESIE, a.NIP"); return $query; } }