<script type="text/javascript">	
	window.print();
</script>

<?php
	include '../../inc/inc.koneksi.php';	
		
	$tgllap =date('d-m-Y');
		
	$query2	= mysql_query("SELECT * FROM company");
	$r2			= mysql_fetch_assoc($query2);
	$kop1 		= $r2[nama1];
	$kop2 		= $r2[nama2];
	$kop3 		= $r2[nama3];
	
	echo "<table width='500'>
		<tr>
			<td style='font:arial 11px'><b>$kop1</b></td>
		</tr>
		<tr>
			<td style='font:arial 11px'>$kop2</td>
		</tr>
		<tr>
			<td style='font:arial 11px'>$kop3</td>
		</tr>
	</table>
		
	<table width='500'>
		<tr>
			<td align='center' style='font:arial 14px'><b>DAFTAR AKUN BUKU BESAR</td>		
		</tr>
		<tr>
			<td align='center' style='font:arial 14px'><b>PER TANGGAL $tgllap</b></td>
		</tr>
	</table>
	<br>
	
	<table width='500' border='1' style='border-collapse:collapse;font:12px arial'>
		<tr>			
			<th>Kode</th>
			<th>Nama Akun</th>
			<th>Level</th>
			<th>D/K</th>			
		</tr>";
		
		$query1= "SELECT * FROM gol_akun ORDER BY nogol";
	
		$data1	= mysql_query($query1);
		$jml=1;		
		while($r1=mysql_fetch_array($data1)){
			$nogol=$r1[nogol];
			
			echo "<tr>
				<td><b>$r1[nogol]</b></td>			
				<td><b>$r1[nagol]</b></td>
			</tr>";
		
			$sql	= "SELECT * FROM akun_bb WHERE nogol='$nogol' ORDER BY noakun";
			$query = mysql_query($sql);
					
			while($r_data=mysql_fetch_array($query)){
				echo "<tr>
					<td>$r_data[noakun]</td>
					<td>$r_data[naakun]</td>
					<td align='center'>$r_data[level]</td>
					<td align='center'>$r_data[kode]</td>
				</tr>";				
				$jml++;
			}	
		}
		echo "</table>
		<table>
			<tr>
				<td>Jumlah Data : $jml</td>
			</tr>
		</table>";
?>
<script type="text/javascript">	
	history.back();
</script>