<?php
if($jenis=="Pendapatan"){
	$var="$row_rab[perkiraan]";
	$tb="pdp_tb";
	$hitung="debet";
}else{
$var="$row_rabpnl[perkiraan]";
$tb="pnl_tb";
$hitung="kredit";
}

mysql_select_db($database_sistem, $sistem);
$query_rab10 = "SELECT sum(nominal)as rab FROM rab_tb where kode='$_SESSION[kode]' and thn_ajuan='$_SESSION[tahun]' and oktober='1' and perkiraan='$var'";
$rab10 = mysql_query($query_rab10, $sistem) or die(mysql_error());
$row_rab10 = mysql_fetch_assoc($rab10);
$totalRows_rab10 = mysql_num_rows($rab10);

mysql_select_db($database_sistem, $sistem);
$query_saldook = "SELECT sum($hitung)as nomin FROM $tb where bulan='Oktober' and tahun='$tahun' and kode_unit='$_SESSION[kode]' and no_perkiraan='$var'";
$saldook = mysql_query($query_saldook, $sistem) or die(mysql_error());
$row_saldook = mysql_fetch_assoc($saldook);
$totalRows_saldook = mysql_num_rows($saldook);
?>
