<?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_rab11 = "SELECT sum(nominal)as rab FROM rab_tb where kode='$_SESSION[kode]' and thn_ajuan='$_SESSION[tahun]' and november='1' and perkiraan='$var'";
$rab11 = mysql_query($query_rab11, $sistem) or die(mysql_error());
$row_rab11 = mysql_fetch_assoc($rab11);
$totalRows_rab11 = mysql_num_rows($rab11);

mysql_select_db($database_sistem, $sistem);
$query_saldonov = "SELECT sum($hitung)as nomin FROM $tb where bulan='November' and tahun='$tahun' and kode_unit='$_SESSION[kode]' and no_perkiraan='$var'";
$saldonov = mysql_query($query_saldonov, $sistem) or die(mysql_error());
$row_saldonov = mysql_fetch_assoc($saldonov);
$totalRows_saldonov = mysql_num_rows($saldonov);
?>
