<style type="text/css">
#body{
	margin: 20px;
	width: 750px;
	font-size: 12px;
}
._hed{
	text-align: center;
	font-weight: bold;
	font-size: 14px;
}
._isiHed{
	margin-top: -13px;
	margin-left: 120px;
}
._tabBody{
	margin-top: 10px;
}
._tabDet{
	border-top: 1px solid #000;
	border-bottom: 1px solid #000;
}
._tabDet tr th{
	padding: 3px;
	font-size: 10px;
	border-bottom: 1px solid #000;
}
._tabDet tr td{
	padding: 3px;
	font-size: 10px;
}
._tot{
	border-top: 1px solid #000;
}
</style>
<?php
$date = new Date;
?>
<div id="body">
	<div class="_hed">D R A F T &nbsp; P E N G I R I M A N</div>
	<table class="_tabBody">
		<tr>
			<td style="width: 375px">
				<div class="_label">No. Pengiriman</div>
				<div class="_isiHed">: <?php echo $this->data->data->nopak ?></div>
				<div class="_label">Tanggal</div>
				<div class="_isiHed">: <?php echo $date->tglIndo($this->data->data->tgl) ?></div>
				<div class="_label">Lokasi</div>
				<div class="_isiHed">: <?php echo $this->data->data->nm_gudang ?></div>
				<div class="_label">Keterangan</div>
				<div class="_isiHed">: <?php echo $this->data->data->ket.' '.$this->data->data->ket2.' '.$this->data->data->ket3 ?></div>
			</td>
			<td>
				<div class="_label">Sales</div>
				<div class="_isiHed">: <?php echo $this->data->data->nm_sales ?></div>
				<div class="_label">Tgl. Jatuh Tempo</div>
				<div class="_isiHed">: <?php echo $date->tglIndo($this->data->data->tgl) ?></div>
				<div class="_label">Sopir</div>
				<div class="_isiHed">: <?php echo $this->data->data->nm_sopir ?></div>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<table class="_tabDet" cellspacing="0" cellpadding="0">
					<thead>
						<tr>
							<th style="width: 10px">No</th>
							<th style="width: 90px">No. Nota</th>
							<th style="width: 130px">Customer</th>
							<th style="width: 150px">Alamat</th>
							<th style="width: 20px">Tgl. Nota</th>
							<th style="width: 20px">C/K</th>
							<th style="width: 50px; text-align: right">Nilai Rp</th>
							<th style="width: 40px">Point</th>
							<th style="width: 100px">Keterangan</th>
						</tr>
					</thead>
					<tbody>
						<?php 
						$no = 1;
						$tot = 0;
						foreach($this->data->det as $r){ 
							$tot = $tot + $r->harga;
						?>
							<tr>
								<td><?php echo $no++ ?></td>
								<td><?php echo $r->nonjl ?></td>
								<td><div style="width: 130px"><?php echo $r->nm_cust ?></div></td>
								<td><div style="width: 150px"><?php echo $r->alamat ?></div></td>
								<td><?php echo date("d/m/Y", strtotime($r->nota_tgl)) ?></td>
								<td align="center"><?php echo (int)$r->top ?></td>
								<td align="right"><?php echo number_format($r->harga) ?></td>
								<td> </td>
								<td> </td>
							</tr>
						<?php 
						} 
						?>
						<tr>
							<td class="_tot" align="right" colspan="6">Total</td>
							<td class="_tot" align="right"><?php echo number_format($tot) ?></td>
							<td class="_tot" colspan="2">&nbsp;</td>
						</tr>
					</tbody>
				</table>
			</td>
		</tr>
	</table>
</div>