<style type="text/css">
.font_hed{
	text-align: left;
	font-size: 12px;
	margin-bottom: 5px;
	margin-left: 500px;
	font-weight: bold;
}
.font12{
	font-size: 9px;
	margin-bottom: -10px;
}
._tableHead{
	margin-top: 10px;
	margin-left: 20px;
}
._tableHead tr td{
	text-align: left;
	vertical-align: top;
	font-size: 9px
}
._label{
	width: 100px;
}
._spasi{
	width: 10px;
}
._isi{
	width: 250px;
}
._isiDet{
	margin-top: 10px;
	border-top: 2px solid #000;
	border-bottom: 2px solid #000;
	border-left: 2px solid #000;
}
._isiDet{
	vertical-align: top;
}
._isiDet tr th{
	text-align: center;
	border-bottom: 2px solid #000;
	border-right: 2px solid #000;
	padding: 2px;
	font-size: 9px;
}
._isiDet tr th{
	font-size: 9px
}
._isiDet tr td{
	font-size: 9px;
	padding: 5px;
}
._td{
	border-right: 2px solid #000;
	padding: 2px;
}
._tb{
	border-top: 2px solid #000;
	border-right: 2px solid #000;
	padding: 2px;
	font-weight: bold;
	vertical-align: top;
}
._isiDetDiv{
	width: 320px;
}
._tabHed{
	margin-left: 500px;
}
._tabHed tr td{
	font-size: 9px;
}
._ttd{
	margin-top: 5px;
	text-align: center;
	font-size: 9px
}
._ttd tr th{
	padding: 5px;
}
._ttd tr td{
	vertical-align: bottom;
	padding: 5px;
}
</style>
<?php
$sess = SESSION;
$login = $_SESSION[$sess]['login'];
?>
<page backtop="14mm" backbottom="5mm" backleft="5mm" backright="5mm">
    <page_header style="height: 100px; margin-left: 20px">
		<p class="font_hed">
			<?php echo strtoupper($this->data->mode) ?>
		</p>
		<table class="_tabHed">
			<tr>
				<td class="_hedTitle">No.Jurnal</td>
				<td class="_spasi">:</td>
				<td><?php echo $this->data->data->nojnl ?></td>
			</tr>
			<tr>
				<td class="_hedTitle">Tgl. Dibuat</td>
				<td class="_spasi">:</td>
				<td><?php echo date("d/m/Y", strtotime($this->data->data->tgl)) ?></td>
			</tr>
		</table>
    </page_header>
	<table class="_tableHead">
		<tr>
			<td class="_label"><?php echo $this->data->jenM ?></td>
			<td class="_spasi">:</td>
			<td class="_isi"><div class="_isi"><?php echo $this->data->data->nmbank.' ('.$this->data->data->kdbank.')' ?>&nbsp;</div></td>
		</tr>
		<?php
		if(!empty($this->data->data->kdsub)){
		?>
			<tr>
				<td class="_label">Sub Bank</td>
				<td class="_spasi">:</td>
				<td class="_isi"><div class="_isi"><?php echo $this->data->data->nmsub.' ('.$this->data->data->kdsub.')' ?>&nbsp;</div></td>
			</tr>
		<?php 
		} 
		?>
		<tr>
			<td class="_label">Keterangan</td>
			<td class="_spasi">:</td>
			<td class="_isi"><div class="_isi"><?php echo $this->data->data->ket_jurnal ?>&nbsp;</div></td>
		</tr>
	</table>
	<table cellspacing="0" cellpadding="0" class="_isiDet">
		<thead>
			<tr>
				<th>No</th>
				<th style="width: 60px">Akun</th>
				<th>Keterangan</th>
				<th style="width: 100px">Nilai</th>
			</tr>
		</thead>
		<tbody>
			<?php 
			$no = 1;
			$total = 0;
			foreach($this->data->det as $row){ 
			
				$nilai = $row->debet + $row->credit;
				$total = $total + $nilai;
				
				if(empty($row->ket)){
					$row->ket = $row->nmac;
				}
				
			?>
			<tr>
				<td class="_td"><?php echo $no++ ?></td>
				<td class="_td"><?php echo $row->kdac ?></td>
				<td class="_td"><div class="_isiDetDiv"><?php echo $row->ket ?></div></td>
				<td class="_td" align="right"><?php echo number_format($nilai, 2) ?></td>
			</tr>
			<?php 
			} 
			$sisa = 5 - $no;
			for($i = 1; $i <= $sisa; $i++){
			?>
				<tr>
					<td class="_td">&nbsp;</td>
					<td class="_td">&nbsp;</td>
					<td class="_td">&nbsp;</td>
					<td class="_td">&nbsp;</td>
				</tr>
			<?php } ?>
			<tr>
				<td class="_tb" colspan="3">
					<div style="width: 600px;">
					Terbilang : <i><?php 
					$konversi = new Konversi;
					echo $konversi->conversiAngka($total) ?></i>
					</div>
				</td>
				<td class="_tb" align="right"><?php echo number_format($total, 2) ?></td>
			</tr>
		</tbody>
	</table>
	<table class="_ttd" border="1" cellspacing="0" cellpadding="0">
		<tr>
			<th style="width: 90px;">Dibuat</th>
			<th style="width: 90px;">Diperiksa</th>
			<th style="width: 198px;">Disetujui</th>
			<th style="width: 120px;">Diterima</th>
		</tr>
		<tr>
			<td style="height: 40px">&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>TT & Nama Terang</td>
		</tr>
	</table>
</page>
