<style type="text/css">
#first-child{
	color:#fff;
}
<?php
$IDJurusita_proses='xxx';
$id_status_delegasi='xxx';
$diterima_oleh='xxx';
foreach ($valdetil as $key => $val){
	$$key=$val;	
}
$tgl_surat=$this->tanggalhelper->convertDayDate($tgl_surat);
$tgl_delegasi=$this->tanggalhelper->convertDayDate($tgl_delegasi);
$tgl_pengiriman=$this->tanggalhelper->convertDayDate($tgl_pengiriman);
$id_delegasi=$ID;
$id_perkara=$IDPerkara;
if ($delegasi_proses->num_rows >= 1) {
	$edit=TRUE;
	foreach ($delegasi_proses->result() as $row){
		$tgl_resi=$this->tanggalhelper->convertDayDate($row->tgl_resi);
		$nomor_resi=$row->nomor_resi;
		$biaya_pelaksanaan=$row->biaya;

	}
} else{
	$edit=FALSE;
	$tgl_resi='';
	$nomor_resi='';
	$biaya_pelaksanaan='';
}
if ($idalur==2) {
	$namabiaya="Diterima";
}else{
	$namabiaya="Dikirimkan";
}
?>
</style>
		<table id='infoPerkara' style="font-size:12px;width:100%">
			<col width="20%">
			<col width="80%">
			<tbody>
				<tr>
					<?php
					if ($idalur==2){
						if (!empty($IDDelegasi)) {
								echo '<td>[<a href="'.base_url('update_delegasi/'.base64_encode($this->encrypt->encode($idalur)).'/'.base64_encode($this->encrypt->encode($IDDelegasi)).'/'.base64_encode($this->encrypt->encode($id_pn_asal)).'/'.base64_encode($this->encrypt->encode($id_pn_tujuan)).'/edit').'">Edit</a>]</td>';
						}						
					}
					?>
				</tr>
				<tr>
					<td id="first-child">Tanggal Resi</td>
					<td> <?php echo $tgl_resi;?></td>
				</tr>
				<tr>
					<td id="first-child">Biaya yang dikirimkan</td>
					<td><?php 
						if (intval($biaya)!=0) {
							$terbilang=$this->templatehelper->Terbilang($biaya);
						}else{
							$terbilang="";
							$biaya=0;
						}
						echo number_format(strval($biaya),0,",","."). '('.$terbilang.' rupiah)';?>
					</td>
				</tr>
				<tr>
					<td id="first-child">Biaya Pelaksanaan</td>
					<td><?php 
						if (intval($biaya_pelaksanaan)!=0) {
							$terbilang=$this->templatehelper->Terbilang($biaya_pelaksanaan);
						}else{
							$terbilang="";
							$biaya_pelaksanaan=0;
						}
						echo number_format(strval($biaya_pelaksanaan),0,",",".") . '('.$terbilang.' rupiah)';
						?>
					</td>
				</tr>
				<tr>
					<?php
					if ($biaya_pelaksanaan>$biaya) {
							$sisa = $biaya_pelaksanaan-$biaya;
							$terbilang=$this->templatehelper->Terbilang($sisa);
							echo '<td id="first-child">Kekurangan</td>';
							echo '<td><font color="red">'. number_format(strval($sisa),0,",",".").'('.$terbilang.' rupiah)</font></td>';
						}else if ($biaya_pelaksanaan<=$biaya) {
							$sisa = $biaya-$biaya_pelaksanaan;
							$terbilang=$this->templatehelper->Terbilang($sisa);
							echo '<td id="first-child">Sisa</td>';
							echo '<td><font color="blue">'. number_format(strval($sisa),0,",",".").'('.$terbilang.' rupiah)</font></td>';
						}
					?>
					</td>
			</tbody>
		</table>

