Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<? class Belanjasipkd_model extends CI_Model { function getdata($kode) { $this->db->selec..

Decoded Output download

<?  class Belanjasipkd_model extends CI_Model { function getdata($kode) { $this->db->select("*"); $this->db->select("SUM(realisasi_lra) AS realisasi_lra"); $this->db->join("skpd", "data_belanja_lra.kode_skpd=skpd.kode_skpd"); $this->db->where("data_belanja_lra.kode_skpd", $kode); $this->db->group_by("data_belanja_lra.kodeper_belanja"); $query = $this->db->get("data_belanja_lra"); return $query->result(); } function get_nama_skpd($kode_skpd) { $this->db->where("kode_skpd", $kode_skpd); $query = $this->db->get("skpd"); return $query->row()->nama_skpd; } function get_wkt_update() { $this->db->limit(1); $query = $this->db->get("data_belanja_lra"); return $query->row()->create_at; } function get_spj_lra_skpd($kode_skpd, $kodeper_belanja) { $this->db->join("lra_blud", "data_belanja_lra.kodeper_belanja=lra_blud.kodeper_belanja", "LEFT"); $this->db->where("data_belanja_lra.kode_skpd", $kode_skpd); $this->db->where("data_belanja_lra.kodeper_belanja", $kodeper_belanja); $query = $this->db->get("data_belanja_lra"); return $query->result(); } function get_spj_lra_puskesmas($kode_skpd, $kodeper_belanja) { $this->db->join("mapping_belanja_puskesmas", "mapping_belanja_puskesmas.kdrek_nobukti_uptd=data_belanja_lra.kdrek_nobukti"); $this->db->where("mapping_belanja_puskesmas.kode_puskesmas", $kode_skpd); $this->db->where("data_belanja_lra.kodeper_belanja", $kodeper_belanja); $query = $this->db->get("data_belanja_lra"); return $query->result(); } function get_namaper_belanja($kode_skpd, $kodeper_belanja) { $this->db->where("kode_skpd", $kode_skpd); $this->db->where("kodeper_belanja", $kodeper_belanja); $query = $this->db->get("data_belanja_lra"); return $query->row()->namaper_belanja; } function get_namaper_belanja_puskesmas($kode_skpd, $kodeper_belanja) { $this->db->join("mapping_belanja_puskesmas", "mapping_belanja_puskesmas.kdrek_nobukti_uptd=data_belanja_lra.kdrek_nobukti"); $this->db->where("mapping_belanja_puskesmas.kode_puskesmas", $kode_skpd); $this->db->where("data_belanja_lra.kodeper_belanja", $kodeper_belanja); $query = $this->db->get("data_belanja_lra"); return $query->row()->namaper_belanja; } function cek_opd($kode_skpd) { $query = $this->db->query(" 
	\x9\x9	SELECT * FROM opd_uptd  
		\x9\x9WHERE kode_skpd='{$kode_skpd}' 
	\x9\x9	GROUP BY kode_skpd\xa			"); return $query->num_rows(); } function data_kiriman($kode_skpd) { $query = $this->db->query(" 
\x9		\x9\x9SELECT * FROM dok_transaksi 
				\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd\xa		\x9\x9	WHERE penerima='{$kode_skpd}'\xa	\x9\x9\x9	AND kode_transaksi='K02'\xa\x9\x9	\x9\x9ORDER BY tgl_dok ASC\xa\x9	\x9	"); return $query->result(); } function trx_in_skpd($kode_skpd) { $query = $this->db->query("\xa\x9		\x9\x9SELECT * FROM dok_transaksi\xa\x9\x9\x9		JOIN skpd ON dok_transaksi.pengirim=skpd.kode_skpd\xa	\x9		\x9WHERE dok_transaksi.kode_skpd='{$kode_skpd}'\xa\x9\x9	\x9\x9AND kode_transaksi='M03' 
	\x9	\x9	ORDER BY tgl_dok ASC\xa\x9\x9	\x9"); return $query->result(); } function terima_retur($kode_skpd) { $query = $this->db->query("\xa	\x9			SELECT * FROM dok_transaksi 
\x9\x9	\x9\x9JOIN skpd ON dok_transaksi.pengirim=skpd.kode_skpd 
			\x9	WHERE dok_transaksi.kode_skpd='{$kode_skpd}' 
\x9\x9			AND kode_transaksi='M13' 
\x9	\x9\x9	ORDER BY tgl_dok ASC 
\x9	\x9\x9"); return $query->result(); } function data_retur($kode_skpd) { $query = $this->db->query("\xa\x9\x9	\x9	SELECT * FROM dok_transaksi\xa		\x9\x9	JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd\xa\x9\x9	\x9\x9WHERE penerima='{$kode_skpd}'\xa\x9\x9\x9\x9\x9AND kode_transaksi='K12' 
	\x9	\x9	ORDER BY tgl_dok ASC 
\x9\x9\x9\x9"); return $query->result(); } function adm_getdata() { $query = $this->db->query("SELECT *, SUM(nilai_realisasi) AS total \xa	\x9\x9FROM data_belanja_sipkd  
\x9	\x9JOIN skpd ON data_belanja_sipkd.kode_skpd=skpd.kode_skpd \xa		\x9GROUP BY data_belanja_sipkd.kode_skpd ORDER BY skpd.kode_skpd"); return $query->result(); } function getsumdata($kode) { $query = $this->db->query("SELECT *, SUM(nilai_realisasi) AS total  
\x9\x9	FROM data_belanja_sipkd  
\x9		JOIN skpd ON data_belanja_sipkd.kode_skpd=skpd.kode_skpd \xa\x9\x9	WHERE data_belanja_sipkd.kode_skpd='{$kode}'  
		\x9GROUP BY data_belanja_sipkd.kode_skpd"); return $query->result(); } function getsumdata_app($kode) { $query = $this->db->query("SELECT *, SUM(harga_transaksi) AS harga_transaksi_app\xa		\x9FROM dok_transaksi\xa	\x9\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd\xa\x9\x9\x9WHERE kode_skpd_kompilasi='{$kode}' AND kode_transaksi='M02' 
			GROUP BY skpd.kode_skpd_kompilasi, dok_transaksi.kdrek\xa\x9\x9	ORDER BY kode_skpd_kompilasi\xa\x9	\x9"); return $query->row()->harga_transaksi_app; } function adm_getsumdata_app() { $query = $this->db->query("SELECT *, SUM(harga_transaksi) AS harga_transaksi_app 
\x9		FROM dok_transaksi 
\x9	\x9WHERE kode_transaksi='M02' 
	\x9\x9GROUP BY kode_skpd\xa			ORDER BY kode_skpd 
	\x9\x9"); return $query->result(); } function adm_getdata_lra() { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, sum(realisasi_lra) AS total FROM data_belanja_lra  
\x9\x9\x9JOIN skpd ON data_belanja_lra.kode_skpd=skpd.kode_skpd  
		\x9GROUP BY data_belanja_lra.kode_skpd\xa\x9		ORDER BY skpd.kode_skpd"); return $query->result(); } function adm_getsumdatabeli() { $query = $this->db->query("SELECT kode_skpd, SUM(harga_transaksi) AS harga_transaksi_app\xa\x9	\x9FROM dok_transaksi\xa\x9		WHERE kode_transaksi='M02' 
		\x9GROUP BY kode_skpd\xa	\x9\x9ORDER BY kode_skpd 
		\x9"); return $query->result(); } function getsumdatabeli($kode) { $query = $this->db->query("SELECT *, SUM(harga_transaksi) AS harga_transaksi_app 
\x9		FROM dok_transaksi JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd\xa			WHERE skpd.kode_skpd_kompilasi='{$kode}' AND kode_transaksi='M02' 
\x9		GROUP BY kode_skpd_kompilasi 
\x9\x9	ORDER BY kode_skpd_kompilasi\xa\x9	\x9"); return $query->row()->harga_transaksi_app; } function getdata_lra($kode) { $this->db->select("skpd.nama_skpd"); $this->db->select("SUM(realisasi_lra) AS total"); $this->db->join("skpd", "data_belanja_lra.kode_skpd=skpd.kode_skpd"); $this->db->where("data_belanja_lra.kode_skpd", $this->session->userdata("kode_skpd_kompilasi")); $query = $this->db->get("data_belanja_lra"); return $query->result(); } function input_belanja($kode) { $query = $this->db->query(" 
\x9	\x9	SELECT dok_transaksi.kdrek, SUM(detail_transaksi.harga_total) AS total, kode_transaksi, barang_skpd.kode_skpd from dok_transaksi\xa                    JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa                    JOIN barang_skpd ON detail_transaksi.id_barang_skpd=barang_skpd.id_barang_skpd 
                    JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd 
\x9		\x9\x9WHERE 
                  	\x9dok_transaksi.kode_transaksi='M02'\xa                    \x9AND skpd.kode_skpd_kompilasi='{$kode}'\xa                 	\x9GROUP by kdrek\xa	\x9	"); return $query->result(); } function adm_get_lraskpd() { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, sum(realisasi_lra) AS total_lra, sum(lra_blud.nom_blud) AS total_lra_blud FROM data_belanja_lra \xa	\x9\x9JOIN skpd ON data_belanja_lra.kode_skpd=skpd.kode_skpd \xa\x9\x9\x9LEFT JOIN lra_blud ON data_belanja_lra.kodeper_belanja=lra_blud.kodeper_belanja\xa\x9		GROUP BY data_belanja_lra.kode_skpd 
			ORDER BY skpd.kode_skpd"); return $query->result(); } function adm_get_lraskpd_range($tgl_awal, $tgl_akhir) { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, sum(realisasi_lra) AS total_lra, sum(lra_blud.nom_blud) AS total_lra_blud FROM data_belanja_lra  
\x9		JOIN skpd ON data_belanja_lra.kode_skpd=skpd.kode_skpd  
	\x9	LEFT JOIN lra_blud ON data_belanja_lra.kodeper_belanja=lra_blud.kodeper_belanja 
	\x9\x9WHERE (tglbukti >= '{$tgl_awal}' AND tglbukti <= '{$tgl_akhir}') OR namaper_belanja like '%BLUD%' 
		\x9GROUP BY data_belanja_lra.kode_skpd 
\x9\x9\x9ORDER BY skpd.kode_skpd"); return $query->result(); } function get_lraskpd_byskpd($kode_skpd_kompilasi) { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, sum(realisasi_lra) AS total_lra, sum(lra_blud.nom_blud) AS total_lra_blud FROM data_belanja_lra \xa	\x9\x9JOIN skpd ON data_belanja_lra.kode_skpd=skpd.kode_skpd  
\x9		LEFT JOIN lra_blud ON data_belanja_lra.kodeper_belanja=lra_blud.kodeper_belanja 
\x9	\x9WHERE data_belanja_lra.kode_skpd='{$kode_skpd_kompilasi}'\xa			GROUP BY data_belanja_lra.kode_skpd\xa			ORDER BY skpd.kode_skpd"); return $query->result(); } function adm_get_belanja_persediaan() { $query = $this->db->query("SELECT skpd.kode_skpd_kompilasi AS kode_skpd, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi \xa\x9\x9	JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa		\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd 
			WHERE dok_transaksi.kode_transaksi='M02'\xa\x9\x9	GROUP BY skpd.kode_skpd_kompilasi 
\x9		ORDER BY skpd.kode_skpd"); return $query->result(); } function adm_get_belanja_persediaan_range($tgl_awal, $tgl_akhir) { $query = $this->db->query("SELECT skpd.kode_skpd_kompilasi AS kode_skpd, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi \xa	\x9\x9JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa\x9	\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd\xa\x9		WHERE dok_transaksi.kode_transaksi='M02' AND tgl_dok >= '{$tgl_awal}' AND tgl_dok <= '{$tgl_akhir}'\xa\x9\x9	GROUP BY skpd.kode_skpd_kompilasi 
\x9		ORDER BY skpd.kode_skpd"); return $query->result(); } function get_mst_belanja_dkk($kode_skpd) { $query = $this->db->query("\xa\x9\x9\x9\x9SELECT * FROM data_belanja_lra WHERE kode_skpd='{$kode_skpd}' 
\x9	\x9	GROUP BY kodeper_belanja 
	\x9\x9"); return $query->result(); } function get_belanja_persediaan_byskpd($kode_skpd_kompilasi) { $query = $this->db->query("SELECT skpd.kode_skpd_kompilasi AS kode_skpd, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi  
	\x9\x9JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa\x9	\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd 
\x9\x9\x9WHERE dok_transaksi.kode_transaksi='M02' AND skpd.kode_skpd_kompilasi='{$kode_skpd_kompilasi}'\xa\x9		GROUP BY skpd.kode_skpd_kompilasi\xa	\x9\x9ORDER BY skpd.kode_skpd"); return $query->result(); } function get_lra_skpd_bykode($kode_skpd) { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, data_belanja_lra.kodeper_belanja, data_belanja_lra.namaper_belanja, sum(realisasi_lra) AS total_lra, sum(lra_blud.nom_blud) AS total_lra_blud FROM data_belanja_lra  
	\x9\x9JOIN skpd ON data_belanja_lra.kode_skpd=skpd.kode_skpd  
\x9\x9\x9LEFT JOIN lra_blud ON data_belanja_lra.kodeper_belanja=lra_blud.kodeper_belanja 
	\x9\x9WHERE skpd.kode_skpd='{$kode_skpd}'\xa			GROUP BY data_belanja_lra.kodeper_belanja 
		\x9ORDER BY data_belanja_lra.id_data_belanja_lra"); return $query->result(); } function get_lra_uptd_bykode($kode_skpd) { $query = $this->db->query("SELECT skpd.nama_skpd, mapping_belanja_puskesmas.kode_puskesmas AS kode_skpd, data_belanja_lra.kodeper_belanja, data_belanja_lra.namaper_belanja, sum(nom_blj_puskesmas) AS total_lra FROM data_belanja_lra  
\x9		JOIN skpd ON data_belanja_lra.kode_skpd=skpd.kode_skpd  
		\x9JOIN mapping_belanja_puskesmas ON data_belanja_lra.kdrek_nobukti=mapping_belanja_puskesmas.kdrek_nobukti_uptd\xa	\x9\x9WHERE mapping_belanja_puskesmas.kode_puskesmas='{$kode_skpd}' 
\x9	\x9GROUP BY data_belanja_lra.kodeper_belanja\xa		\x9ORDER BY skpd.kode_skpd"); return $query->result(); } function get_belanja_persediaan_bykode($kode_skpd) { $query = $this->db->query("SELECT skpd.kode_skpd_kompilasi AS kode_skpd, dok_transaksi.kdrek, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi  
\x9\x9	JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa			JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd\xa	\x9	WHERE dok_transaksi.kode_transaksi='M02' AND skpd.kode_skpd_kompilasi='{$kode_skpd}'\xa\x9\x9	GROUP BY skpd.kode_skpd_kompilasi, dok_transaksi.kdrek 
\x9\x9	ORDER BY skpd.kode_skpd"); return $query->result(); } function get_belanja_uptd_bykode($kode_skpd) { $query = $this->db->query("SELECT skpd.kode_skpd AS kode_skpd, dok_transaksi.kdrek, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi  
\x9	\x9JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa\x9\x9\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd 
	\x9\x9WHERE dok_transaksi.kode_transaksi='M02' AND skpd.kode_skpd='{$kode_skpd}'\xa	\x9	GROUP BY skpd.kode_skpd_kompilasi, dok_transaksi.kdrek 
\x9\x9\x9ORDER BY skpd.kode_skpd"); return $query->result(); } function get_pembelian($kode_skpd, $kodeper_belanja) { $this->db->select("skpd.kode_skpd, skpd.nama_skpd, skpd.singkat_skpd, penyedia.nama_penyedia, sumberdana.nama_sumberdana, dok_transaksi.*, data_belanja_lra_mst.*"); $this->db->join("skpd", "dok_transaksi.kode_skpd=skpd.kode_skpd"); $this->db->join("data_belanja_lra_mst", "dok_transaksi.kdrek=data_belanja_lra_mst.kodeper_belanja"); $this->db->join("penyedia", "dok_transaksi.id_penyedia=penyedia.id_penyedia"); $this->db->join("sumberdana", "dok_transaksi.id_sumberdana=sumberdana.id_sumberdana"); $this->db->where("skpd.kode_skpd_kompilasi", $kode_skpd); $this->db->where("kdrek", $kodeper_belanja); $this->db->where("dok_transaksi.harga_transaksi !=", 0); $this->db->where("dok_transaksi.kode_transaksi", "M02"); $query = $this->db->get("dok_transaksi"); return $query->result(); } function get_pembelian_puskesmas($kode_skpd, $kodeper_belanja) { $this->db->select("skpd.kode_skpd, skpd.nama_skpd, skpd.singkat_skpd, penyedia.nama_penyedia, sumberdana.nama_sumberdana, dok_transaksi.*, data_belanja_lra_mst.*"); $this->db->join("skpd", "dok_transaksi.kode_skpd=skpd.kode_skpd"); $this->db->join("data_belanja_lra_mst", "dok_transaksi.kdrek=data_belanja_lra_mst.kodeper_belanja"); $this->db->join("penyedia", "dok_transaksi.id_penyedia=penyedia.id_penyedia"); $this->db->join("sumberdana", "dok_transaksi.id_sumberdana=sumberdana.id_sumberdana"); $this->db->where("skpd.kode_skpd", $kode_skpd); $this->db->where("kdrek", $kodeper_belanja); $this->db->where("dok_transaksi.harga_transaksi !=", 0); $this->db->where("dok_transaksi.kode_transaksi", "M02"); $query = $this->db->get("dok_transaksi"); return $query->result(); } function get_lra_byskpd_kode($kode_skpd, $kodeper_belanja) { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, data_belanja_lra.kodeper_belanja, data_belanja_lra.namaper_belanja, sum(realisasi_lra) AS total_lra, nom_blud FROM data_belanja_lra \xa	\x9	JOIN skpd ON data_belanja_lra.kode_skpd=skpd.kode_skpd  
\x9\x9\x9LEFT JOIN lra_blud ON data_belanja_lra.kodeper_belanja=lra_blud.kodeper_belanja\xa\x9\x9	WHERE skpd.kode_skpd_kompilasi='{$kode_skpd}' AND data_belanja_lra.kodeper_belanja='{$kodeper_belanja}' 
	\x9	GROUP BY data_belanja_lra.kodeper_belanja 
\x9\x9\x9ORDER BY skpd.kode_skpd"); if ($query->row()->total_lra == 0) { return $query->row()->nom_blud; } else { return $query->row()->total_lra; } } function get_lra_bypuskesmas_kode($kode_skpd, $kodeper_belanja) { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, data_belanja_lra.kodeper_belanja, data_belanja_lra.namaper_belanja, sum(nom_blj_puskesmas) AS total_lra FROM data_belanja_lra  
	\x9	JOIN mapping_belanja_puskesmas ON data_belanja_lra.kdrek_nobukti=mapping_belanja_puskesmas.kdrek_nobukti_uptd\xa\x9\x9\x9JOIN skpd ON mapping_belanja_puskesmas.kode_puskesmas=skpd.kode_skpd\xa			WHERE skpd.kode_skpd='{$kode_skpd}' AND data_belanja_lra.kodeper_belanja='{$kodeper_belanja}' 
\x9\x9\x9GROUP BY data_belanja_lra.kodeper_belanja\xa			ORDER BY skpd.kode_skpd"); return $query->row()->total_lra; } function get_puskesmas() { $this->db->where("kode_skpd_kompilasi", "1.02.02."); $this->db->select("kode_skpd, nama_skpd"); $query = $this->db->get("skpd"); return $query->result(); } function get_belanja_puskesmas_byuptd($kode_puskesmas) { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, sum(nom_blj_puskesmas) AS total_lra FROM data_belanja_lra \xa\x9\x9	JOIN mapping_belanja_puskesmas ON data_belanja_lra.kdrek_nobukti=mapping_belanja_puskesmas.kdrek_nobukti_uptd\xa			JOIN skpd ON mapping_belanja_puskesmas.kode_puskesmas=skpd.kode_skpd  
\x9	\x9WHERE mapping_belanja_puskesmas.kode_puskesmas='{$kode_puskesmas}'\xa			GROUP BY data_belanja_lra.kode_skpd\xa\x9\x9\x9ORDER BY skpd.kode_skpd"); return $query->result(); } function get_belanja_puskesmas_app($kode_skpd) { $query = $this->db->query("SELECT skpd.kode_skpd AS kode_skpd, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi  
\x9\x9\x9JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi 
	\x9	JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd\xa			WHERE dok_transaksi.kode_transaksi='M02' AND skpd.kode_skpd='{$kode_skpd}' 
\x9\x9\x9GROUP BY skpd.kode_skpd\xa		\x9ORDER BY skpd.kode_skpd"); return $query->result(); } function belanja_puskesmas() { $this->db->join("skpd", "mapping_belanja_puskesmas.kode_puskesmas=skpd.kode_skpd"); $this->db->join("data_belanja_lra", "mapping_belanja_puskesmas.kdrek_nobukti_uptd=data_belanja_lra.kdrek_nobukti"); $query = $this->db->get("mapping_belanja_puskesmas"); return $query->result(); } function set_belanja_puskesmas($param) { $this->db->insert("mapping_belanja_puskesmas", $param); } function edit_belanja_puskesmas($param, $id_belanja_puskesmas) { $this->db->where("id_belanja_puskesmas", $id_belanja_puskesmas); $this->db->update("mapping_belanja_puskesmas", $param); } function belanja_dkk() { $query = $this->db->query(" 
	\x9	\x9\x9SELECT * FROM data_belanja_lra  
	\x9\x9\x9	WHERE kode_skpd='1.02.02.';\xa\x9			"); return $query->result(); } function belanja_dkk_edit_form($id_belanja_puskesmas) { $query = $this->db->query(" 
\x9				SELECT * FROM data_belanja_lra \xa\x9\x9\x9	\x9WHERE kode_skpd='1.02.02.';\xa\x9\x9		"); return $query->result(); } function get_belanja_puskesmas_byid($id_belanja_puskesmas) { $this->db->where("id_belanja_puskesmas", $id_belanja_puskesmas); $query = $this->db->get("mapping_belanja_puskesmas"); return $query->result(); } function hapus_belanjapuskesmas($id_belanja_puskesmas) { $this->db->where("id_belanja_puskesmas", $id_belanja_puskesmas); $this->db->delete("mapping_belanja_puskesmas"); } function get_lra_puskesmas_bykode($kode_skpd) { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, data_belanja_lra.kodeper_belanja, data_belanja_lra.namaper_belanja, sum(nom_blj_puskesmas) AS total_lra FROM mapping_belanja_puskesmas 
\x9		JOIN data_belanja_lra ON mapping_belanja_puskesmas.kdrek_nobukti_uptd=data_belanja_lra.kdrek_nobukti \xa\x9		JOIN skpd ON mapping_belanja_puskesmas.kode_puskesmas=skpd.kode_skpd  
	\x9\x9WHERE skpd.kode_skpd='{$kode_skpd}' 
\x9\x9\x9GROUP BY data_belanja_lra.kodeper_belanja\xa	\x9\x9ORDER BY skpd.kode_skpd"); return $query->result(); } function get_belanja_puskesmas_bykode($kode_skpd) { $query = $this->db->query("SELECT skpd.kode_skpd AS kode_skpd, dok_transaksi.kdrek, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi \xa	\x9\x9JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa	\x9\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd 
		\x9WHERE dok_transaksi.kode_transaksi='M02' AND skpd.kode_skpd='{$kode_skpd}' 
	\x9	GROUP BY skpd.kode_skpd, dok_transaksi.kdrek\xa\x9		ORDER BY skpd.kode_skpd"); return $query->result(); } function get_uptd_dkk($kode_skpd) { $query = $this->db->query("\xa\x9\x9\x9	SELECT skpd.kode_skpd, skpd.nama_skpd FROM skpd 
\x9			WHERE kode_skpd_kompilasi LIKE '%{$kode_skpd}%'\xa			\x9ORDER BY kode_skpd ASC\xa\x9\x9	"); return $query->result(); } function get_blj_sipkd_uptd() { $query = $this->db->query(" 
		\x9		SELECT kode_puskesmas, sum(nom_blj_puskesmas) AS tot_nom_blj_puskesmas FROM mapping_belanja_puskesmas\xa		\x9\x9	JOIN data_belanja_lra ON mapping_belanja_puskesmas.kdrek_nobukti_uptd=data_belanja_lra.kdrek_nobukti 
		\x9\x9\x9GROUP BY mapping_belanja_puskesmas.kode_puskesmas\xa	\x9			ORDER BY mapping_belanja_puskesmas.kode_puskesmas ASC\xa	\x9	\x9"); return $query->result(); } function get_blj_app_puskesmas($kode_skpd) { $query = $this->db->query("SELECT skpd.kode_skpd AS kode_skpd, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi \xa	\x9\x9JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa\x9	\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd 
\x9\x9	WHERE dok_transaksi.kode_transaksi='M02' AND skpd.kode_skpd_kompilasi LIKE '%{$kode_skpd}%'\xa	\x9\x9GROUP BY skpd.kode_skpd\xa\x9\x9	ORDER BY skpd.kode_skpd ASC"); return $query->result(); } } ?>

Did this file decode correctly?

Original Code

<?  class Belanjasipkd_model extends CI_Model { function getdata($kode) { $this->db->select("*"); $this->db->select("SUM(realisasi_lra) AS realisasi_lra"); $this->db->join("skpd", "data_belanja_lra.kode_skpd=skpd.kode_skpd"); $this->db->where("data_belanja_lra.kode_skpd", $kode); $this->db->group_by("data_belanja_lra.kodeper_belanja"); $query = $this->db->get("data_belanja_lra"); return $query->result(); } function get_nama_skpd($kode_skpd) { $this->db->where("kode_skpd", $kode_skpd); $query = $this->db->get("skpd"); return $query->row()->nama_skpd; } function get_wkt_update() { $this->db->limit(1); $query = $this->db->get("data_belanja_lra"); return $query->row()->create_at; } function get_spj_lra_skpd($kode_skpd, $kodeper_belanja) { $this->db->join("lra_blud", "data_belanja_lra.kodeper_belanja=lra_blud.kodeper_belanja", "LEFT"); $this->db->where("data_belanja_lra.kode_skpd", $kode_skpd); $this->db->where("data_belanja_lra.kodeper_belanja", $kodeper_belanja); $query = $this->db->get("data_belanja_lra"); return $query->result(); } function get_spj_lra_puskesmas($kode_skpd, $kodeper_belanja) { $this->db->join("mapping_belanja_puskesmas", "mapping_belanja_puskesmas.kdrek_nobukti_uptd=data_belanja_lra.kdrek_nobukti"); $this->db->where("mapping_belanja_puskesmas.kode_puskesmas", $kode_skpd); $this->db->where("data_belanja_lra.kodeper_belanja", $kodeper_belanja); $query = $this->db->get("data_belanja_lra"); return $query->result(); } function get_namaper_belanja($kode_skpd, $kodeper_belanja) { $this->db->where("kode_skpd", $kode_skpd); $this->db->where("kodeper_belanja", $kodeper_belanja); $query = $this->db->get("data_belanja_lra"); return $query->row()->namaper_belanja; } function get_namaper_belanja_puskesmas($kode_skpd, $kodeper_belanja) { $this->db->join("mapping_belanja_puskesmas", "mapping_belanja_puskesmas.kdrek_nobukti_uptd=data_belanja_lra.kdrek_nobukti"); $this->db->where("mapping_belanja_puskesmas.kode_puskesmas", $kode_skpd); $this->db->where("data_belanja_lra.kodeper_belanja", $kodeper_belanja); $query = $this->db->get("data_belanja_lra"); return $query->row()->namaper_belanja; } function cek_opd($kode_skpd) { $query = $this->db->query("
	\x9\x9	SELECT * FROM opd_uptd 
		\x9\x9WHERE kode_skpd='{$kode_skpd}'
	\x9\x9	GROUP BY kode_skpd\xa			"); return $query->num_rows(); } function data_kiriman($kode_skpd) { $query = $this->db->query("
\x9		\x9\x9SELECT * FROM dok_transaksi
				\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd\xa		\x9\x9	WHERE penerima='{$kode_skpd}'\xa	\x9\x9\x9	AND kode_transaksi='K02'\xa\x9\x9	\x9\x9ORDER BY tgl_dok ASC\xa\x9	\x9	"); return $query->result(); } function trx_in_skpd($kode_skpd) { $query = $this->db->query("\xa\x9		\x9\x9SELECT * FROM dok_transaksi\xa\x9\x9\x9		JOIN skpd ON dok_transaksi.pengirim=skpd.kode_skpd\xa	\x9		\x9WHERE dok_transaksi.kode_skpd='{$kode_skpd}'\xa\x9\x9	\x9\x9AND kode_transaksi='M03'
	\x9	\x9	ORDER BY tgl_dok ASC\xa\x9\x9	\x9"); return $query->result(); } function terima_retur($kode_skpd) { $query = $this->db->query("\xa	\x9			SELECT * FROM dok_transaksi
\x9\x9	\x9\x9JOIN skpd ON dok_transaksi.pengirim=skpd.kode_skpd
			\x9	WHERE dok_transaksi.kode_skpd='{$kode_skpd}'
\x9\x9			AND kode_transaksi='M13'
\x9	\x9\x9	ORDER BY tgl_dok ASC
\x9	\x9\x9"); return $query->result(); } function data_retur($kode_skpd) { $query = $this->db->query("\xa\x9\x9	\x9	SELECT * FROM dok_transaksi\xa		\x9\x9	JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd\xa\x9\x9	\x9\x9WHERE penerima='{$kode_skpd}'\xa\x9\x9\x9\x9\x9AND kode_transaksi='K12'
	\x9	\x9	ORDER BY tgl_dok ASC
\x9\x9\x9\x9"); return $query->result(); } function adm_getdata() { $query = $this->db->query("SELECT *, SUM(nilai_realisasi) AS total \xa	\x9\x9FROM data_belanja_sipkd 
\x9	\x9JOIN skpd ON data_belanja_sipkd.kode_skpd=skpd.kode_skpd \xa		\x9GROUP BY data_belanja_sipkd.kode_skpd ORDER BY skpd.kode_skpd"); return $query->result(); } function getsumdata($kode) { $query = $this->db->query("SELECT *, SUM(nilai_realisasi) AS total 
\x9\x9	FROM data_belanja_sipkd 
\x9		JOIN skpd ON data_belanja_sipkd.kode_skpd=skpd.kode_skpd \xa\x9\x9	WHERE data_belanja_sipkd.kode_skpd='{$kode}' 
		\x9GROUP BY data_belanja_sipkd.kode_skpd"); return $query->result(); } function getsumdata_app($kode) { $query = $this->db->query("SELECT *, SUM(harga_transaksi) AS harga_transaksi_app\xa		\x9FROM dok_transaksi\xa	\x9\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd\xa\x9\x9\x9WHERE kode_skpd_kompilasi='{$kode}' AND kode_transaksi='M02'
			GROUP BY skpd.kode_skpd_kompilasi, dok_transaksi.kdrek\xa\x9\x9	ORDER BY kode_skpd_kompilasi\xa\x9	\x9"); return $query->row()->harga_transaksi_app; } function adm_getsumdata_app() { $query = $this->db->query("SELECT *, SUM(harga_transaksi) AS harga_transaksi_app
\x9		FROM dok_transaksi
\x9	\x9WHERE kode_transaksi='M02'
	\x9\x9GROUP BY kode_skpd\xa			ORDER BY kode_skpd
	\x9\x9"); return $query->result(); } function adm_getdata_lra() { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, sum(realisasi_lra) AS total FROM data_belanja_lra 
\x9\x9\x9JOIN skpd ON data_belanja_lra.kode_skpd=skpd.kode_skpd 
		\x9GROUP BY data_belanja_lra.kode_skpd\xa\x9		ORDER BY skpd.kode_skpd"); return $query->result(); } function adm_getsumdatabeli() { $query = $this->db->query("SELECT kode_skpd, SUM(harga_transaksi) AS harga_transaksi_app\xa\x9	\x9FROM dok_transaksi\xa\x9		WHERE kode_transaksi='M02'
		\x9GROUP BY kode_skpd\xa	\x9\x9ORDER BY kode_skpd
		\x9"); return $query->result(); } function getsumdatabeli($kode) { $query = $this->db->query("SELECT *, SUM(harga_transaksi) AS harga_transaksi_app
\x9		FROM dok_transaksi JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd\xa			WHERE skpd.kode_skpd_kompilasi='{$kode}' AND kode_transaksi='M02'
\x9		GROUP BY kode_skpd_kompilasi
\x9\x9	ORDER BY kode_skpd_kompilasi\xa\x9	\x9"); return $query->row()->harga_transaksi_app; } function getdata_lra($kode) { $this->db->select("skpd.nama_skpd"); $this->db->select("SUM(realisasi_lra) AS total"); $this->db->join("skpd", "data_belanja_lra.kode_skpd=skpd.kode_skpd"); $this->db->where("data_belanja_lra.kode_skpd", $this->session->userdata("kode_skpd_kompilasi")); $query = $this->db->get("data_belanja_lra"); return $query->result(); } function input_belanja($kode) { $query = $this->db->query("
\x9	\x9	SELECT dok_transaksi.kdrek, SUM(detail_transaksi.harga_total) AS total, kode_transaksi, barang_skpd.kode_skpd from dok_transaksi\xa                    JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa                    JOIN barang_skpd ON detail_transaksi.id_barang_skpd=barang_skpd.id_barang_skpd
                    JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd
\x9		\x9\x9WHERE
                  	\x9dok_transaksi.kode_transaksi='M02'\xa                    \x9AND skpd.kode_skpd_kompilasi='{$kode}'\xa                 	\x9GROUP by kdrek\xa	\x9	"); return $query->result(); } function adm_get_lraskpd() { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, sum(realisasi_lra) AS total_lra, sum(lra_blud.nom_blud) AS total_lra_blud FROM data_belanja_lra \xa	\x9\x9JOIN skpd ON data_belanja_lra.kode_skpd=skpd.kode_skpd \xa\x9\x9\x9LEFT JOIN lra_blud ON data_belanja_lra.kodeper_belanja=lra_blud.kodeper_belanja\xa\x9		GROUP BY data_belanja_lra.kode_skpd
			ORDER BY skpd.kode_skpd"); return $query->result(); } function adm_get_lraskpd_range($tgl_awal, $tgl_akhir) { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, sum(realisasi_lra) AS total_lra, sum(lra_blud.nom_blud) AS total_lra_blud FROM data_belanja_lra 
\x9		JOIN skpd ON data_belanja_lra.kode_skpd=skpd.kode_skpd 
	\x9	LEFT JOIN lra_blud ON data_belanja_lra.kodeper_belanja=lra_blud.kodeper_belanja
	\x9\x9WHERE (tglbukti >= '{$tgl_awal}' AND tglbukti <= '{$tgl_akhir}') OR namaper_belanja like '%BLUD%'
		\x9GROUP BY data_belanja_lra.kode_skpd
\x9\x9\x9ORDER BY skpd.kode_skpd"); return $query->result(); } function get_lraskpd_byskpd($kode_skpd_kompilasi) { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, sum(realisasi_lra) AS total_lra, sum(lra_blud.nom_blud) AS total_lra_blud FROM data_belanja_lra \xa	\x9\x9JOIN skpd ON data_belanja_lra.kode_skpd=skpd.kode_skpd 
\x9		LEFT JOIN lra_blud ON data_belanja_lra.kodeper_belanja=lra_blud.kodeper_belanja
\x9	\x9WHERE data_belanja_lra.kode_skpd='{$kode_skpd_kompilasi}'\xa			GROUP BY data_belanja_lra.kode_skpd\xa			ORDER BY skpd.kode_skpd"); return $query->result(); } function adm_get_belanja_persediaan() { $query = $this->db->query("SELECT skpd.kode_skpd_kompilasi AS kode_skpd, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi \xa\x9\x9	JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa		\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd
			WHERE dok_transaksi.kode_transaksi='M02'\xa\x9\x9	GROUP BY skpd.kode_skpd_kompilasi
\x9		ORDER BY skpd.kode_skpd"); return $query->result(); } function adm_get_belanja_persediaan_range($tgl_awal, $tgl_akhir) { $query = $this->db->query("SELECT skpd.kode_skpd_kompilasi AS kode_skpd, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi \xa	\x9\x9JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa\x9	\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd\xa\x9		WHERE dok_transaksi.kode_transaksi='M02' AND tgl_dok >= '{$tgl_awal}' AND tgl_dok <= '{$tgl_akhir}'\xa\x9\x9	GROUP BY skpd.kode_skpd_kompilasi
\x9		ORDER BY skpd.kode_skpd"); return $query->result(); } function get_mst_belanja_dkk($kode_skpd) { $query = $this->db->query("\xa\x9\x9\x9\x9SELECT * FROM data_belanja_lra WHERE kode_skpd='{$kode_skpd}'
\x9	\x9	GROUP BY kodeper_belanja
	\x9\x9"); return $query->result(); } function get_belanja_persediaan_byskpd($kode_skpd_kompilasi) { $query = $this->db->query("SELECT skpd.kode_skpd_kompilasi AS kode_skpd, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi 
	\x9\x9JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa\x9	\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd
\x9\x9\x9WHERE dok_transaksi.kode_transaksi='M02' AND skpd.kode_skpd_kompilasi='{$kode_skpd_kompilasi}'\xa\x9		GROUP BY skpd.kode_skpd_kompilasi\xa	\x9\x9ORDER BY skpd.kode_skpd"); return $query->result(); } function get_lra_skpd_bykode($kode_skpd) { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, data_belanja_lra.kodeper_belanja, data_belanja_lra.namaper_belanja, sum(realisasi_lra) AS total_lra, sum(lra_blud.nom_blud) AS total_lra_blud FROM data_belanja_lra 
	\x9\x9JOIN skpd ON data_belanja_lra.kode_skpd=skpd.kode_skpd 
\x9\x9\x9LEFT JOIN lra_blud ON data_belanja_lra.kodeper_belanja=lra_blud.kodeper_belanja
	\x9\x9WHERE skpd.kode_skpd='{$kode_skpd}'\xa			GROUP BY data_belanja_lra.kodeper_belanja
		\x9ORDER BY data_belanja_lra.id_data_belanja_lra"); return $query->result(); } function get_lra_uptd_bykode($kode_skpd) { $query = $this->db->query("SELECT skpd.nama_skpd, mapping_belanja_puskesmas.kode_puskesmas AS kode_skpd, data_belanja_lra.kodeper_belanja, data_belanja_lra.namaper_belanja, sum(nom_blj_puskesmas) AS total_lra FROM data_belanja_lra 
\x9		JOIN skpd ON data_belanja_lra.kode_skpd=skpd.kode_skpd 
		\x9JOIN mapping_belanja_puskesmas ON data_belanja_lra.kdrek_nobukti=mapping_belanja_puskesmas.kdrek_nobukti_uptd\xa	\x9\x9WHERE mapping_belanja_puskesmas.kode_puskesmas='{$kode_skpd}'
\x9	\x9GROUP BY data_belanja_lra.kodeper_belanja\xa		\x9ORDER BY skpd.kode_skpd"); return $query->result(); } function get_belanja_persediaan_bykode($kode_skpd) { $query = $this->db->query("SELECT skpd.kode_skpd_kompilasi AS kode_skpd, dok_transaksi.kdrek, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi 
\x9\x9	JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa			JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd\xa	\x9	WHERE dok_transaksi.kode_transaksi='M02' AND skpd.kode_skpd_kompilasi='{$kode_skpd}'\xa\x9\x9	GROUP BY skpd.kode_skpd_kompilasi, dok_transaksi.kdrek
\x9\x9	ORDER BY skpd.kode_skpd"); return $query->result(); } function get_belanja_uptd_bykode($kode_skpd) { $query = $this->db->query("SELECT skpd.kode_skpd AS kode_skpd, dok_transaksi.kdrek, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi 
\x9	\x9JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa\x9\x9\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd
	\x9\x9WHERE dok_transaksi.kode_transaksi='M02' AND skpd.kode_skpd='{$kode_skpd}'\xa	\x9	GROUP BY skpd.kode_skpd_kompilasi, dok_transaksi.kdrek
\x9\x9\x9ORDER BY skpd.kode_skpd"); return $query->result(); } function get_pembelian($kode_skpd, $kodeper_belanja) { $this->db->select("skpd.kode_skpd, skpd.nama_skpd, skpd.singkat_skpd, penyedia.nama_penyedia, sumberdana.nama_sumberdana, dok_transaksi.*, data_belanja_lra_mst.*"); $this->db->join("skpd", "dok_transaksi.kode_skpd=skpd.kode_skpd"); $this->db->join("data_belanja_lra_mst", "dok_transaksi.kdrek=data_belanja_lra_mst.kodeper_belanja"); $this->db->join("penyedia", "dok_transaksi.id_penyedia=penyedia.id_penyedia"); $this->db->join("sumberdana", "dok_transaksi.id_sumberdana=sumberdana.id_sumberdana"); $this->db->where("skpd.kode_skpd_kompilasi", $kode_skpd); $this->db->where("kdrek", $kodeper_belanja); $this->db->where("dok_transaksi.harga_transaksi !=", 0); $this->db->where("dok_transaksi.kode_transaksi", "M02"); $query = $this->db->get("dok_transaksi"); return $query->result(); } function get_pembelian_puskesmas($kode_skpd, $kodeper_belanja) { $this->db->select("skpd.kode_skpd, skpd.nama_skpd, skpd.singkat_skpd, penyedia.nama_penyedia, sumberdana.nama_sumberdana, dok_transaksi.*, data_belanja_lra_mst.*"); $this->db->join("skpd", "dok_transaksi.kode_skpd=skpd.kode_skpd"); $this->db->join("data_belanja_lra_mst", "dok_transaksi.kdrek=data_belanja_lra_mst.kodeper_belanja"); $this->db->join("penyedia", "dok_transaksi.id_penyedia=penyedia.id_penyedia"); $this->db->join("sumberdana", "dok_transaksi.id_sumberdana=sumberdana.id_sumberdana"); $this->db->where("skpd.kode_skpd", $kode_skpd); $this->db->where("kdrek", $kodeper_belanja); $this->db->where("dok_transaksi.harga_transaksi !=", 0); $this->db->where("dok_transaksi.kode_transaksi", "M02"); $query = $this->db->get("dok_transaksi"); return $query->result(); } function get_lra_byskpd_kode($kode_skpd, $kodeper_belanja) { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, data_belanja_lra.kodeper_belanja, data_belanja_lra.namaper_belanja, sum(realisasi_lra) AS total_lra, nom_blud FROM data_belanja_lra \xa	\x9	JOIN skpd ON data_belanja_lra.kode_skpd=skpd.kode_skpd 
\x9\x9\x9LEFT JOIN lra_blud ON data_belanja_lra.kodeper_belanja=lra_blud.kodeper_belanja\xa\x9\x9	WHERE skpd.kode_skpd_kompilasi='{$kode_skpd}' AND data_belanja_lra.kodeper_belanja='{$kodeper_belanja}'
	\x9	GROUP BY data_belanja_lra.kodeper_belanja
\x9\x9\x9ORDER BY skpd.kode_skpd"); if ($query->row()->total_lra == 0) { return $query->row()->nom_blud; } else { return $query->row()->total_lra; } } function get_lra_bypuskesmas_kode($kode_skpd, $kodeper_belanja) { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, data_belanja_lra.kodeper_belanja, data_belanja_lra.namaper_belanja, sum(nom_blj_puskesmas) AS total_lra FROM data_belanja_lra 
	\x9	JOIN mapping_belanja_puskesmas ON data_belanja_lra.kdrek_nobukti=mapping_belanja_puskesmas.kdrek_nobukti_uptd\xa\x9\x9\x9JOIN skpd ON mapping_belanja_puskesmas.kode_puskesmas=skpd.kode_skpd\xa			WHERE skpd.kode_skpd='{$kode_skpd}' AND data_belanja_lra.kodeper_belanja='{$kodeper_belanja}'
\x9\x9\x9GROUP BY data_belanja_lra.kodeper_belanja\xa			ORDER BY skpd.kode_skpd"); return $query->row()->total_lra; } function get_puskesmas() { $this->db->where("kode_skpd_kompilasi", "1.02.02."); $this->db->select("kode_skpd, nama_skpd"); $query = $this->db->get("skpd"); return $query->result(); } function get_belanja_puskesmas_byuptd($kode_puskesmas) { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, sum(nom_blj_puskesmas) AS total_lra FROM data_belanja_lra \xa\x9\x9	JOIN mapping_belanja_puskesmas ON data_belanja_lra.kdrek_nobukti=mapping_belanja_puskesmas.kdrek_nobukti_uptd\xa			JOIN skpd ON mapping_belanja_puskesmas.kode_puskesmas=skpd.kode_skpd 
\x9	\x9WHERE mapping_belanja_puskesmas.kode_puskesmas='{$kode_puskesmas}'\xa			GROUP BY data_belanja_lra.kode_skpd\xa\x9\x9\x9ORDER BY skpd.kode_skpd"); return $query->result(); } function get_belanja_puskesmas_app($kode_skpd) { $query = $this->db->query("SELECT skpd.kode_skpd AS kode_skpd, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi 
\x9\x9\x9JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi
	\x9	JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd\xa			WHERE dok_transaksi.kode_transaksi='M02' AND skpd.kode_skpd='{$kode_skpd}'
\x9\x9\x9GROUP BY skpd.kode_skpd\xa		\x9ORDER BY skpd.kode_skpd"); return $query->result(); } function belanja_puskesmas() { $this->db->join("skpd", "mapping_belanja_puskesmas.kode_puskesmas=skpd.kode_skpd"); $this->db->join("data_belanja_lra", "mapping_belanja_puskesmas.kdrek_nobukti_uptd=data_belanja_lra.kdrek_nobukti"); $query = $this->db->get("mapping_belanja_puskesmas"); return $query->result(); } function set_belanja_puskesmas($param) { $this->db->insert("mapping_belanja_puskesmas", $param); } function edit_belanja_puskesmas($param, $id_belanja_puskesmas) { $this->db->where("id_belanja_puskesmas", $id_belanja_puskesmas); $this->db->update("mapping_belanja_puskesmas", $param); } function belanja_dkk() { $query = $this->db->query("
	\x9	\x9\x9SELECT * FROM data_belanja_lra 
	\x9\x9\x9	WHERE kode_skpd='1.02.02.';\xa\x9			"); return $query->result(); } function belanja_dkk_edit_form($id_belanja_puskesmas) { $query = $this->db->query("
\x9				SELECT * FROM data_belanja_lra \xa\x9\x9\x9	\x9WHERE kode_skpd='1.02.02.';\xa\x9\x9		"); return $query->result(); } function get_belanja_puskesmas_byid($id_belanja_puskesmas) { $this->db->where("id_belanja_puskesmas", $id_belanja_puskesmas); $query = $this->db->get("mapping_belanja_puskesmas"); return $query->result(); } function hapus_belanjapuskesmas($id_belanja_puskesmas) { $this->db->where("id_belanja_puskesmas", $id_belanja_puskesmas); $this->db->delete("mapping_belanja_puskesmas"); } function get_lra_puskesmas_bykode($kode_skpd) { $query = $this->db->query("SELECT skpd.nama_skpd, skpd.kode_skpd, data_belanja_lra.kodeper_belanja, data_belanja_lra.namaper_belanja, sum(nom_blj_puskesmas) AS total_lra FROM mapping_belanja_puskesmas
\x9		JOIN data_belanja_lra ON mapping_belanja_puskesmas.kdrek_nobukti_uptd=data_belanja_lra.kdrek_nobukti \xa\x9		JOIN skpd ON mapping_belanja_puskesmas.kode_puskesmas=skpd.kode_skpd 
	\x9\x9WHERE skpd.kode_skpd='{$kode_skpd}'
\x9\x9\x9GROUP BY data_belanja_lra.kodeper_belanja\xa	\x9\x9ORDER BY skpd.kode_skpd"); return $query->result(); } function get_belanja_puskesmas_bykode($kode_skpd) { $query = $this->db->query("SELECT skpd.kode_skpd AS kode_skpd, dok_transaksi.kdrek, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi \xa	\x9\x9JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa	\x9\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd
		\x9WHERE dok_transaksi.kode_transaksi='M02' AND skpd.kode_skpd='{$kode_skpd}'
	\x9	GROUP BY skpd.kode_skpd, dok_transaksi.kdrek\xa\x9		ORDER BY skpd.kode_skpd"); return $query->result(); } function get_uptd_dkk($kode_skpd) { $query = $this->db->query("\xa\x9\x9\x9	SELECT skpd.kode_skpd, skpd.nama_skpd FROM skpd
\x9			WHERE kode_skpd_kompilasi LIKE '%{$kode_skpd}%'\xa			\x9ORDER BY kode_skpd ASC\xa\x9\x9	"); return $query->result(); } function get_blj_sipkd_uptd() { $query = $this->db->query("
		\x9		SELECT kode_puskesmas, sum(nom_blj_puskesmas) AS tot_nom_blj_puskesmas FROM mapping_belanja_puskesmas\xa		\x9\x9	JOIN data_belanja_lra ON mapping_belanja_puskesmas.kdrek_nobukti_uptd=data_belanja_lra.kdrek_nobukti
		\x9\x9\x9GROUP BY mapping_belanja_puskesmas.kode_puskesmas\xa	\x9			ORDER BY mapping_belanja_puskesmas.kode_puskesmas ASC\xa	\x9	\x9"); return $query->result(); } function get_blj_app_puskesmas($kode_skpd) { $query = $this->db->query("SELECT skpd.kode_skpd AS kode_skpd, sum(detail_transaksi.harga_total) AS harga_total FROM dok_transaksi \xa	\x9\x9JOIN detail_transaksi ON dok_transaksi.id_dok_transaksi=detail_transaksi.id_dok_transaksi\xa\x9	\x9JOIN skpd ON dok_transaksi.kode_skpd=skpd.kode_skpd
\x9\x9	WHERE dok_transaksi.kode_transaksi='M02' AND skpd.kode_skpd_kompilasi LIKE '%{$kode_skpd}%'\xa	\x9\x9GROUP BY skpd.kode_skpd\xa\x9\x9	ORDER BY skpd.kode_skpd ASC"); return $query->result(); } } ?>

Function Calls

None

Variables

None

Stats

MD5 97e44ef3f43b3bae716ba847ea9b5079
Eval Count 0
Decode Time 78 ms