<style type="text/css">
.font_hed{
	margin-top: 20px;
	margin-left: 500px;
	font-weight: bold;
	font-size: 16px;
}
._tabHed{
	margin-top: 20px;
	margin-left: 25px;
}
._tabHed tr td{
	font-size: 12px;
}
._isiHead{
	width: 350px;
}
._isiDet{
	border-top: 1px solid #000;
	border-left: 1px solid #000;
	border-bottom: 1px solid #000;
}
._isiDet tr th{
	padding: 3px;
	font-size: 12px;
	text-align: center;
	border-bottom: 1px solid #000;
	border-right: 1px solid #000;
}
._isiDet tr td{
	font-size: 12px;
	border-right: 1px solid #000;
	vertical-align: top;
}
p{
	margin: 3px;
	font-size: 12px;
}
._ttd tr th{
	text-align: center;
	font-size: 12px;
}
._ttd tr td{
	padding-top: 2px;
	padding-left: 8px;
	padding-right: 3px;
	text-align: left;
	font-size: 12px;
}
</style>
<page backtop="65mm" backbottom="5mm" backleft="5mm" backright="5mm">
    <page_header style="height: 100px; margin-left: 20px">
		<div class="font_hed">
			DELIVERI ORDER
		</div>
		<table class="_tabHed">
			<tr>
				<td class="_hedTitle"></td>
				<td class="_spasi"></td>
				<td class="_isiHead">&nbsp;</td>
				<td class="_hedTitle">Tgl. DO</td>
				<td class="_spasi">:</td>
				<td><?php echo date("d/m/Y", strtotime($this->data->data->lpb_tgl)) ?></td>
			</tr>
			<tr>
				<td class="_hedTitle"></td>
				<td class="_spasi"></td>
				<td class="_isiHead">&nbsp;</td>
				<td class="_hedTitle">No.DO</td>
				<td class="_spasi">:</td>
				<td><?php echo $this->data->data->notl ?></td>
			</tr>
			<tr>
				<td class="_hedTitle"></td>
				<td class="_spasi"></td>
				<td class="_isiHead">&nbsp;</td>
				<td class="_hedTitle">Tgl. Pengambilan</td>
				<td class="_spasi">:</td>
				<td><?php echo date("d/m/Y H:i", strtotime($this->data->data->jadwal_ambil)) ?></td>
			</tr>
			<tr>
				<td class="_hedTitle"></td>
				<td class="_spasi"></td>
				<td class="_isiHead">&nbsp;</td>
				<td class="_hedTitle">Customer ID</td>
				<td class="_spasi">:</td>
				<td><?php echo $this->data->data->kd_sub ?></td>
			</tr>
			<tr>
				<td class="_hedTitle" colspan="6">
					&nbsp;
				</td>
			</tr>
			<tr>
				<td class="_hedTitle">Pengirim</td>
				<td class="_spasi"></td>
				<td class="_isiHead">&nbsp;</td>
				<td class="_hedTitle">Penerima</td>
				<td class="_spasi"></td>
				<td class="_isiHead">&nbsp;</td>
			</tr>
			<tr>
				<td class="_hedTitle">Nama</td>
				<td class="_spasi">:</td>
				<td><?php echo $this->data->data->pengirim_nm ?></td>
				<td class="_hedTitle">Nama</td>
				<td class="_spasi">:</td>
				<td><?php echo $this->data->data->nm_sub ?></td>
			</tr>
			<tr>
				<td class="_hedTitle">Alamat</td>
				<td class="_spasi">:</td>
				<td>
					<?php 
					echo $this->data->data->pengirim_alamat; 
					?>
				</td>
				<td class="_hedTitle">Alamat</td>
				<td class="_spasi">:</td>
				<td>
					<?php 
					echo $this->data->data->alamat_kirim; 
					if(!empty($this->data->data->alamat_kirim2)){
						echo '<br>'.$this->data->data->alamat_kirim2; 
					}
					if(!empty($this->data->data->alamat_kirim3)){
						echo '<br>'.$this->data->data->alamat_kirim3; 
					}
					?>
				</td>
			</tr>
			<tr>
				<td class="_hedTitle">No. Telp</td>
				<td class="_spasi">:</td>
				<td>
					<?php 
					echo $this->data->data->pengirim_telp; 
					?>
				</td>
				<td class="_hedTitle">&nbsp;</td>
				<td class="_spasi">:</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td class="_hedTitle" colspan="6">
					&nbsp;
				</td>
			</tr>
		</table>
    </page_header>

	<table cellspacing="0" cellpadding="0" class="_isiDet">
		<thead>
			<tr>
				<th style="width: 110px">No. Kontainer</th>
				<th style="width: 500px">Keterangan</th>
				<th style="width: 100px">1 Unit</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td class="_td" style="padding-left: 10px; padding-top: 10px">
					<?php
					$this->data->data->no_kontainer = trim($this->data->data->no_kontainer);
					if(!empty($this->data->data->no_kontainer)){
						echo $this->data->data->no_kontainer;
					}else{
						echo "SIPU";
					}
					?>
				</td>
				<td class="_td" style="padding-left: 10px; padding-top: 10px">
					<?php
					if(!empty($this->data->ketD)){
						echo '';
					}else{ ?>
						Full Kontainer <?php echo $this->data->data->ukuran ?><br><br>Isi : 
						<?php echo $this->data->data->jenis_barang ?>
					<?php } ?>
				</td>
				<td class="_td" style="padding-left: 10px; padding-top: 10px">
					<?php
					if(!empty($this->data->ketD)){
						echo '';
					}else{ ?>
						1 Unit
					<?php } ?>
				</td>
			</tr>
			<?php 
			for($i = 1; $i <= 30; $i++){
			?>
				<tr>
					<td class="_td">&nbsp;</td>
					<td class="_td">&nbsp;</td>
					<td class="_td">&nbsp;</td>
				</tr>
			<?php } ?>
			<tr>
				<td class="_td">&nbsp;&nbsp;&nbsp;
					Seal No : <?php echo $this->data->data->no_segel ?>
				</td>
				<td class="_td">&nbsp;</td>
				<td class="_td">&nbsp;</td>
			</tr>
			<tr>
				<td class="_td">&nbsp;</td>
				<td class="_td">&nbsp;</td>
				<td class="_td">&nbsp;</td>
			</tr>
		</tbody>
	</table>

	<table class="_ttd" border="0" style="margin-top: 5px;" cellspacing="0" cellpadding="0">
		<tr>
			<td>Note</td>
			<td style="height: 50px">: <?php echo $this->data->data->ket ?></td>
		</tr>
		<tr>
			<td>Sopir</td>
			<td>: <?php echo $this->data->data->lpbm_nm ?></td>
		</tr>
		<tr>
			<td>No. Polisi</td>
			<td>: <?php echo $this->data->data->nopol ?></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>Admin</td>
			<td>: <?php echo $this->data->data->lpbm_usrnm ?></td>
		</tr>
		<tr>
			<td>Printed By</td>
			<td>: <?php echo $this->login['nm_user'] ?></td>
		</tr>
	</table>
	
	<?php
	$text = str_ireplace("/", "_", $this->data->data->notl);
	$font = BASEPATH.'bar/font/arial.ttf';
	$file = BASEPATH.'bar/'.$text.'.png';
	
	$barcode = new phpCode128($this->data->data->notl, 60);
	$barcode->setBorderWidth(0);
	$barcode->setBorderSpacing(5);
	$barcode->setPixelWidth(1);
	$barcode->setEanStyle(false);
	$barcode->setShowText(false);
	$barcode->setAutoAdjustFontSize(false);
	$barcode->setTextSpacing(5);
	$barcode->saveBarcode($file);

	$bar = new Barcode;
	$qrC = $bar->qrCode($this->data->data->notl, 3);
	?>	
	<table style="margin-top: -10px">
		<tr>
			<td style="width: 660px">
				<img src="<?php echo $this->baseUrl.'bar/'.$text.'.png' ?>">
			</td>
			<td>
				<img src="<?php echo $qrC ?>">
			</td>
		</tr>
	</table>
</page>
