<?php

//===GET===


$sql['get_data_detil_klp_laporan'] = "
SELECT 
         
		coaNamaAkun AS coa_nama,
		coaKodeAkun AS coa_kode,
      IFNULL((SELECT bbSaldoAkhir FROM buku_besar_his WHERE bbCoaId = coakellapCoaId AND bbTanggal<='%s' ORDER BY bbhisId DESC LIMIT 0,1),0) AS coa_nominal
      FROM kelompok_laporan_ref
      LEFT JOIN kelompok_jenis_laporan_ref ON kellapJnsId = kelJnsId
      LEFT JOIN coa_kelompok_laporan_ref ON coakellapIdKellap = kellapId
	  LEFT JOIN coa ON coaId=coakellapCoaId
            WHERE 
			coakellapIdKellap = '%s' AND
			kelJnsPrntId = '14'
			
      ORDER BY coa_kode";
	  

?>
