<style type="text/css">
.font_hed{
	text-align: center;
	font-size: 12px;
	margin-bottom: 5px;
	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 td{
	font-size: 9px
	padding: 5px;
}
._td{
	border-right: 2px solid #000;
	padding: 2px;
	font-size: 9px;
}
._tb{
	border-top: 2px solid #000;
	border-right: 2px solid #000;
	border-bottom: 2px solid #000;
	padding: 2px;
	font-weight: bold;
	vertical-align: top;
	font-size: 9px;
}
._isiDetDiv{
	width: 220px;
}
._tabHed{
	margin-left: 500px;
}
._tabHed tr td{
	font-size: 9px
}
._ttd{
	margin-top: 20px;
	text-align: left;
	font-size: 9px
}
._ttd tr th{
}
._ttd tr td{
	vertical-align: top;
}
</style>
<?php
$sess = SESSION;
$login = $_SESSION[$sess]['login'];
?>
<page backtop="16mm" backbottom="5mm" backleft="5mm" backright="5mm">
    <page_header style="height: 100px; margin-left: 20px">
		<p class="font_hed">
			BUKTI JURNAL MEMORIAL
		</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>
			<tr>
				<td class="_hedTitle">No. Ref</td>
				<td class="_spasi">:</td>
				<td><?php echo $this->data->data->no_ref ?></td>
			</tr>
		</table>
    </page_header>
	<table class="_tableHead">
		<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">Kode Akun</th>
				<th style="width: 450px">Keterangan</th>
				<th style="width: 60px">Debet</th>
				<th style="width: 60px">Credit</th>
			</tr>
		</thead>
		<tbody>
			<?php 
			$no = 1;
			$totalD = 0;
			$totalC = 0;
			foreach($this->data->det as $row){ 
				
				$jumlah = $row->debet + $row->credit;
				$totalD = $totalD + $row->debet;
				$totalC = $totalC + $row->credit;
				
				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($row->debet, 2) ?></td>
				<td class="_td" align="right"><?php echo number_format($row->credit, 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>
					<td class="_td">&nbsp;</td>
				</tr>
			<?php } ?>
			<tr>
				<td class="_tb" colspan="3" align="right">Total</td>
				<td class="_tb" align="right"><?php echo number_format($totalD, 2) ?></td>
				<td class="_tb" align="right"><?php echo number_format($totalC, 2) ?></td>
			</tr>
			<tr>
				<td class="_td" colspan="2">Dibuat</td>
				<td class="_td" colspan="1">Diperiksa</td>
				<td class="_td" colspan="2" style='height:30px'>Disetujui</td>
			</tr>
		</tbody>
	</table>
	
</page>
