<?php

// Melakukan Pengaturan dan Pemanggilan Script PDF dari Script mPDF
$nama_dokumen='PDF With MPDF'; 
define('_MPDF_PATH','../mpdf/');
require (_MPDF_PATH."mpdf.php");
$mpdf=new mPDF('utf-8', 'A4'); 

ob_start(); 
?>

<?php
session_start ();
// include_once "library/inc.connection.php";
// include_once "library/inc.library.php";

	# Baca variabel URL
$Kodekeluar = $_GET['kode'];
	# Perintah untuk mendapatkan data dari tabel transaksi
$pengeluaranSql = "SELECT pengeluaran.* FROM pengeluaran
WHERE pengeluaran.no_kwitansi='$Kodekeluar' ";
$pengeluaranQry = mysql_query($pengeluaranSql, $koneksidb)  or die ("Query penjualan salah : ".mysql_error());
$pengeluaranRow = mysql_fetch_array($pengeluaranQry);	
$A	=	$pengeluaranRow['no_kwitansi'];
$B	=	$pengeluaranRow['tanggal'];
$C	=	$pengeluaranRow['banyak'];
$D	=	$pengeluaranRow['penerima'];
$E	=	$pengeluaranRow['keterangan'];
$F	=	$pengeluaranRow['no_akun'];

?>


<html>
<head>
	<title> :: Nota Pengeluaran</title>
	<link href="styles/style.css" rel="stylesheet" type="text/css">
</head>
<body>

	<a href="index.php?page=Data-Pengeluaran" style="border:2px;">_</a>

	<table style="border:1px solid grey;">
		<tr>
			<td>
				<table width="700" border="0" >
					<tr >
						<td width="210"  align="center" style="font-size:20px; color:red; "><b>KOMITE MAN 4 BOGOR</b></td>
						<td colspan="2" align="center" width="480" style="padding-top:20px; padding-bottom:0px; font-size:23px;"><b>K W I T A N S I</b></td>
					</tr>
					<tr>
						<td align="center" valign="top" style=" font-size:10px;"> Jl. Stasiun Cigombong Kp. Cijambu <br>Desa Cisalada Telp.0251-8222509</td>
						<td colspan="2" align="center" style="padding-bottom:25px; font-size:15px; text-decoration:underline; color:blue;"><strong>No.  <?php echo ($A); ?></strong></td>

					</tr>
				</table>

				<table border="0" width="700" >


					<tr>

						<td width="210" >Sudah terima dari</td>
						<td width="20">:</td>
						<td width="420" style="border-bottom:1px Solid grey;"><?php echo "Bendahara Komite MAN 4 Bogor"; ?></td>

					</tr>

					<tr>
						<td style="padding-top:10x;" >Uang sebesar</td>
						<td style="padding-top:10x;">:</td>
						<td style="border-bottom:1px Solid grey;  padding-top:10px;"><?php echo Terbilang ($C); ?></i></td>

					</tr>

					<tr>
						<td style="padding-top:10px;">Nomor Akun</td>
						<td style="padding-top:10px;">:</td>
						<td style="border-bottom:1px Solid grey;  padding-top:10px;"><?php echo  ($F); ?></i></td>
					</tr>
					<tr >
						<td style="padding-top:10px;">Untuk pembayaran</td>
						<td style="padding-top:10px;">:</td>
						<td style="border-bottom:1px Solid grey;  padding-top:10px;"><?php echo  ($E); ?></i></td>
					</tr>
					<tr>
						<td style=color:white;>,</td>
					</tr>
					<tr>
						<td style=color:white;>,</td>
					</tr>


				</table>
				<table  width="700" border="0" cellspacing="1" cellpadding="2">
					<TR>
						<td width="300" colspan="3"></td>
						<td style="border-bottom:1px Solid grey;"><?php echo "Cigombong, "; ?></td>
						<td style="border-bottom:1px Solid grey;"><?php echo IndonesiaTgl($B); ?></td>
					</tr>
					<tr>
						<td> </td>
						<td > </td>
						<td width="265"> </td>
						<td  align="left">Penerima, </td>
					</tr>
					<tr>
						<td width="100" align="right" height="40" style="border-bottom:1px Solid grey; border-top:1px solid grey;"> <i>Jumlah Rp.</td>
							<td width="120" align="center" style="border-bottom:1px Solid grey; border-top:1px solid grey;" > <i> <?php echo format_angka($C); ?>  </td>
								<td width="220"> </td>
								<td> </td>
							</tr>
							<tr>
								<td> </td>
								<td> </td>
								<td style=color:white;>,</td>
								<td  align="left">( <?php echo $D; ?> ) </td>
							</tr>
						</table>
					</td>
				</tr>

			</table>


			<?php
$html = ob_get_contents(); //Proses untuk mengambil hasil dari OB..
ob_end_clean();
//Here convert the encode for UTF-8, if you prefer the ISO-8859-1 just change for $mpdf->WriteHTML($html);
$mpdf->WriteHTML(utf8_encode($html));
$mpdf->Output($nama_dokumen.".pdf" ,'I');
exit;
mysql_close($connect_db);

?>