<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: 400px;
}
._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">
				LEMBAR PENERIMAAN BARANG
			</td>
			<td style="width: 300px">
				<table class="_tabDet">
					<tr>
						<td class="_label">Nomor</td>
						<td class="_spasi">:</td>
						<td class="_isi"><?php echo $this->data->data->nolpb ?></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)) ?></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				<p>Vendor : </p>
				<p><?php echo $this->data->sub->nm_sub ?></p>
				<div style="width: 380px"><?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">Nomor SJ</td>
						<td class="_spasi">:</td>
						<td class="_isi"><?php echo $this->data->data->nosj ?></td>
					</tr>
					<tr>
						<td class="_label">Tgl. SJ</td>
						<td class="_spasi">:</td>
						<td class="_isi"><?php echo date("d/m/Y", strtotime($this->data->data->tglsj)) ?></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: 100px">Kode</th>
							<th style="width: 410px">Nama</th>
							<th style="width: 60px; text-align: right">Qty</th>
							<th style="width: 30px">Sat</th>
							<th class="_isiR" style="width: 30px">Skala</th>
						</tr>
					</thead>
					<tbody>
						<?php 
						$no = 1;
						$total = 0;
						foreach($this->data->det as $row){ 
							$row->total = $row->qty * $row->harga;
							$total = $total + $row->total;
						?>
							<tr>
								<td><?php echo $no++ ?></td>
								<td><?php echo $row->kd_inv ?></td>
								<td><?php echo $row->nm_inv ?></td>
								<td align="right"><?php echo number_format($row->qty, 2) ?></td>
								<td><?php echo $row->satuan ?></td>
								<td class="_isiR"><?php echo number_format($row->skala) ?></td>
							</tr>
						<?php 
						} 
						$max = 3;
						$sis = $max - count($this->data->det);
						for($i = 1; $i <= $sis; $i++){
						?>
							<tr>
								<td>&nbsp;</td>
								<td>&nbsp;</td>
								<td>&nbsp;</td>
								<td>&nbsp;</td>
								<td>&nbsp;</td>
								<td class="_isiR">&nbsp;</td>
							</tr>
						<?php } 
						?>
					</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>