<?php 
class Rep_uang_masuk_model_thn extends CI_Model {
	
	function get_data($periode) {
		$date = new DateTime($periode);
		$resultM = $date->format('m');
		$resultY = $date->format('Y');
		$q = $this->db->query("select sum(a.besarnya) as besarnya, b.daftarlist 
			from trans_uang_masuk a, ref_list_uang_masuk b 
			where a.kodedesk = b.kodedesk 
			and a.kodesub = b.kodesub 
			and  year(a.tanggaltransaksi)= '".$resultY."'
			GROUP BY b.daftarlist ORDER BY  b.daftarlist
		");
		
		
		return $q->result_array();
	}
	
}