<style type="text/css">
#_canvas{
	margin-top: 20px;
	margin-bottom: 20px;
	margin-left: 20px;
	margin-right: 20px;
}
#_tabData{
	border-top: 1px solid #000;
	border-left: 1px solid #000;
}
#_tabData tr td{
	padding: 5px;
	border-right: 1px solid #000;
	border-bottom: 1px solid #000;
	font-size: 10px;
}
._hedJudul{
	font-size: 15px;
	width: 250px;
}
._tabDet{
	width: 100%;
}
._tabDet tr td{
	border: none;
	padding: 0px;
}
._label{
	width: 100px;
}
._spasi{
	width: 3px;
}
p{
	margin: 0px;
	margin-bottom: 3px;
}
._tabIsi{
	width: 100%;
	border: none;
}
._tabIsi tr td{
	padding: 3px;
	border-right: 1px solid #000;
	border-bottom: none;
}
._tabIsi tr th{
	padding: 3px;
	border-right: 1px solid #000;
	border-bottom: 1px solid #000;
}
._tot{
	border-top: 1px solid #000;
}
._isiR{
	text-align: right;
	border-right: none;
}
._ttd tr td{
	text-align: center;
	border: none;
}
._namaTtd{
	margin-top: 50px;
}
</style>

<div id="_canvas">
	<table id="_tabData" cellspacing="0" cellpadding="0">
		<tr>
			<td class="_hedJudul">
				ORDER BELI
			</td>
			<td style="width: 250px">
				<table class="_tabDet">
					<tr>
						<td class="_label">Nomor</td>
						<td class="_spasi">:</td>
						<td class="_isi"><?php echo $this->data->data->no_po ?></td>
					</tr>
					<tr>
						<td class="_label">Tanggal</td>
						<td class="_spasi">:</td>
						<td class="_isi"><?php echo date("d/m/Y", strtotime($this->data->data->tgl_po)) ?></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				<p>Vendor : </p>
				<p><?php echo $this->data->sub->nm_sub ?></p>
				<div style="width: 250px"><?php echo $this->data->sub->alamat ?></div>
				<p><?php echo $this->data->sub->kota ?></p>
				<p><?php echo $this->data->sub->propinsi ?></p>
			</td>
			<td>
				<table class="_tabDet">
					<tr>
						<td class="_label">No. Referensi</td>
						<td class="_spasi">:</td>
						<td class="_isi"><?php echo $this->data->data->noref ?></td>
					</tr>
					<tr>
						<td class="_label">Keterangan</td>
						<td class="_spasi">:</td>
						<td class="_isi"><?php echo $this->data->data->ket ?></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td colspan="2" style="padding: 0px">
				<table class="_tabIsi" cellspacing="0" cellpadding="0">
					<thead>
						<tr>
							<th style="width: 20px">No</th>
							<th style="width: 80px">Kode</th>
							<th style="width: 220px">Nama</th>
							<th style="width: 80px; text-align: right">Qty</th>
							<th style="width: 80px; text-align: right">Harga</th>
							<th class="_isiR" style="width: 110px">Total</th>
						</tr>
					</thead>
					<tbody>
						<?php
						$total = $this->data->data->qty * $this->data->data->harga;
						?>
						<tr>
							<td>1</td>
							<td><?php echo $this->data->data->kd_inv ?></td>
							<td><?php echo $this->data->data->nm_inv ?></td>
							<td align="right"><?php echo number_format($this->data->data->qty, 2) ?></td>
							<td align="right"><?php echo number_format($this->data->data->harga) ?></td>
							<td class="_isiR"><?php echo number_format($total) ?></td>
						</tr>
						<tr>
							<td class="_tot" colspan="3">
								<p>Terbilang : </p>
								<p>
									<?php
									$konversi = new Konversi;
									echo $konversi->conversiAngka($total)
									?>
								</p>
							</td>
							<td class="_tot" colspan="2">Total</td>
							<td class="_tot _isiR"><?php echo number_format($total) ?></td>
						</tr>
					</tbody>
				</table>
			</td>
		</tr>
		<tr>
			<td colspan="2" style="padding: 0px">
				<table class="_ttd">
					<tr>
						<td style="width: 200px">Mengetahui,</td>
						<td style="width: 200px">Menyetujui,</td>
						<td style="width: 200px">Pembuat,</td>
					</tr>
					<tr>
						<td><p class="_namaTtd">(............................)</p></td>
						<td><p class="_namaTtd">(............................)</p></td>
						<td><p class="_namaTtd">(............................)</p></td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</div>
