<?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_rab2 = "SELECT sum(nominal)as rab FROM rab_tb where kode='$_SESSION[kode]' and thn_ajuan='$_SESSION[tahun]' and februari='1' and perkiraan='$var'";
$rab2 = mysql_query($query_rab2, $sistem) or die(mysql_error());
$row_rab2 = mysql_fetch_assoc($rab2);
$totalRows_rab2 = mysql_num_rows($rab2);

mysql_select_db($database_sistem, $sistem);
$query_saldofeb = "SELECT sum($hitung)as nomin FROM $tb where bulan='Februari' and tahun='$tahun' and kode_unit='$_SESSION[kode]' and no_perkiraan='$var'";
$saldofeb = mysql_query($query_saldofeb, $sistem) or die(mysql_error());
$row_saldofeb = mysql_fetch_assoc($saldofeb);
$totalRows_saldofeb = mysql_num_rows($saldofeb);
?>
