<?php
$this->load->view('includes/header.php');
?>
<script type="text/javascript">

$(function() {
$( "#eta" ).datepicker({
changeMonth: true, // menampilkan dropdown untuk ganti bulan
changeYear: true // menampilkan dropdown untuk ganti Tahun
});
$( "#eta" ).datepicker({ altFormat: 'yy-mm-dd' });
$( "#eta" ).change(function() {
$( "#eta" ).datepicker( "option", "dateFormat","dd.mm.yy" );
});
});

</script>

<script type="text/javascript">

$(function() {
$( "#posting" ).datepicker({
changeMonth: true, // menampilkan dropdown untuk ganti bulan
changeYear: true // menampilkan dropdown untuk ganti Tahun
});
$( "#posting" ).datepicker({ altFormat: 'yy-mm-dd' });
$( "#posting" ).change(function() {
$( "#posting" ).datepicker( "option", "dateFormat","dd.mm.yy" );
});
});

</script>



<?php
if ( ! empty($prev))
	{
?>


<?php
	}
else
{
echo '<font class="title">'.$menu_path.'</font>';
echo '<br>';
			/* Display system message */
			$this->fungsi->disp_sys_msg();
			echo validation_errors('<p class="field_error">', '</p>');
?>
<fieldset>
<legend>DELIVERY NOTE</legend>
<form name="form1" method="post" action="<?php echo $form_action ?>" id="form1">
  <table width="100%" border="0" cellspacing="1" cellpadding="1">
    <tr>      </tr>
    <tr>
      <td>Type</td>
      <td>:</td>
      <td><select name="type">
<option value="Container" >Container</option>
<option value="ISO Tank">ISO Tank</option>
<option value="Truck" selected="selected">Truck</option>
</select>
<!--<select name="type" id="type"  onChange="MM_jumpMenu('self',this,0)">
           					<option <?php if($_GET['tipe']=='Container'){ echo "selected=selected";}?> value="Container">Container</option>
							<option  <?php if($_GET['tipe']=='ISO Tank'){ echo "selected=selected";}?> value="ISO Tank">ISO Tank</option>
							<option  <?php if($_GET['tipe']=='Truck'){ echo "selected=selected";}?>  value="Truck">Truck		</option>
						</select>--></td>
      <td>Driver Name</td>
      <td>:</td>
      <td><input type="text" name="pic" size="8" value="<?php ?>" id="pic" readonly="readonly" /></td>
    </tr>
    <tr>
      <td>Transporter ID</td>
      <td>:</td>
      <td><span class="primary">
        <input type="text" name="idtrans" id="idtrans" size="3" value="<?php ?>"  readonly="readonly" />
        <input type="text" name="nama_trans" size="15" value="<?php ?>" id="nama_trans" readonly="readonly" />
        </span>
          <input type="button" name="button4" id="button4" value="..." class="button" onclick="window.open('<?php echo base_url();?>index.php/popup/popup_trans/','popuppage','width=900,height=600,scrollbar=yes,scrollbars=yes,top=100,left=100');" /></td>
      <td>Capacity Truck</td>
      <td>:</td>
      <td><input name="capacity" type="text" id="capacity" size="10" maxlength="50" value="<?php echo set_value('capacity', isset($default['capacity']) ? $default['capacity'] : ''); ?>"  /></td>
    </tr>
   

<tr>
  <td>Vehicle No.</td>
  <td>:</td>
  <td><input type="text" name="vnumb" size="8" value="<?php ?>" id="vnumb" readonly="readonly" />      </td>
  <td>Manifest No.</td>
  <td>:</td>
  <td><label for="mnfst">
    <input name="mnfst" type="text" id="mnfst" size="20" maxlength="100" value="<?php echo set_value('mnfst', isset($default['mnfst']) ? $default['mnfst'] : ''); ?>"  />
    <font class="required">*</font></label></td>
</tr>

    <tr>
      <td>Volume</td>
      <td>:</td>
      <td><input name="vol" type="text" id="vol" size="10" maxlength="50" value="<?php echo set_value('vol', isset($default['vol']) ? $default['vol'] : ''); ?>"  />
        (L)<font class="required">*
  <input name="totvol" type="hidden" id="totvol" size="10" maxlength="50" value="<?php echo number_format($this->fungsi->get_stock_bal($this->session->userdata('idcab'))); ?>"  />
</font></td>
      <td>Estimate Date</td>
      <td>:</td>
      <td><input type="text" name="eta" id="eta" size="20" value="<?php echo set_value('eta', isset($default['eta']) ? $default['eta'] : ''); ?>" />
          <font class="required">*</font>
        </label></td>
    </tr>
    <tr>
      <td>ISO Tank Numb</td>
      <td>:</td>
      <td><input type="text" name="noiso" id="noiso" size="20" value="<?php echo set_value('noiso', isset($default['noiso']) ? $default['noiso'] : ''); ?>" /></td>
      <td>Posting Date</td>
      <td>:</td>
      <td><input type="text" name="posting" id="posting" size="20" value="<?php echo date('d.m.Y'); ?>" />
        <font class="required">*</font>
        </label></td>
    </tr>
    <tr> 
      <td> Seal Number 1 </td>
	  <td>:</td>
      <td><input name="seal1" type="text" id="seal1" size="10" maxlength="50" value="<?php echo set_value('seal1', isset($default['seal1']) ? $default['seal1'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr><tr> 
      <td> Seal Number 2 </td>
	  <td>:</td>
      <td><input name="seal2" type="text" id="seal2" size="10" maxlength="50" value="<?php echo set_value('seal2', isset($default['seal2']) ? $default['seal2'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>
      <tr> 
      <td> Seal Number 3 </td>
	  <td>:</td>
      <td><input name="seal3" type="text" id="seal3" size="10" maxlength="50" value="<?php echo set_value('seal3', isset($default['seal3']) ? $default['seal3'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>
	  <tr> 
      <td> Seal Number 4 </td>
	  <td>:</td>
      <td><input name="seal4" type="text" id="seal4" size="10" maxlength="50" value="<?php echo set_value('seal4', isset($default['seal4']) ? $default['seal4'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>
    <?php /*?><?php
			if($_GET['tipe']=='ISO Tank')
			{
			echo
			'<tr> 
      <td> Seal Number 1 </td>
	  <td>:</td>
      <td><input name="seal1" type="text" id="seal1" size="10" maxlength="50" value="<?php echo set_value('seal1', isset($default['seal1']) ? $default['seal1'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>
			<tr> 
      <td> Seal Number 2 </td>
	  <td>:</td>
      <td><input name="seal2" type="text" id="seal2" size="10" maxlength="50" value="<?php echo set_value('seal2', isset($default['seal2']) ? $default['seal2'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>';
			?>
                         
            <?php
			}
			
			else if($_GET['tipe']=='Truck')
			{
			echo
			'<tr> 
      <td> Seal Number 1 </td>
	  <td>:</td>
      <td><input name="seal1" type="text" id="seal1" size="10" maxlength="50" value="<?php echo set_value('seal1', isset($default['seal1']) ? $default['seal1'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>
			<tr> 
      <td> Seal Number 2 </td>
	  <td>:</td>
      <td><input name="seal2" type="text" id="seal2" size="10" maxlength="50" value="<?php echo set_value('seal2', isset($default['seal2']) ? $default['seal2'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>';
			echo
			'<tr> 
      <td> Seal Number 3 </td>
	  <td>:</td>
      <td><input name="seal3" type="text" id="seal3" size="10" maxlength="50" value="<?php echo set_value('seal3', isset($default['seal3']) ? $default['seal3'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>
	  <tr> 
      <td> Seal Number 4 </td>
	  <td>:</td>
      <td><input name="seal4" type="text" id="seal4" size="10" maxlength="50" value="<?php echo set_value('seal4', isset($default['seal4']) ? $default['seal4'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>';
			}
			else
			{
				echo
			'<tr> 
      <td> Seal Number 1 </td>
	  <td>:</td>
      <td><input name="seal1" type="text" id="seal1" size="10" maxlength="50" value="<?php echo set_value('seal1', isset($default['seal1']) ? $default['seal1'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr><tr> 
      <td> Seal Number 2 </td>
	  <td>:</td>
      <td><input name="seal2" type="text" id="seal2" size="10" maxlength="50" value="<?php echo set_value('seal2', isset($default['seal2']) ? $default['seal2'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>';
			echo
			'<tr> 
      <td> Seal Number 3 </td>
	  <td>:</td>
      <td><input name="seal3" type="text" id="seal3" size="10" maxlength="50" value="<?php echo set_value('seal3', isset($default['seal3']) ? $default['seal3'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>
	  <tr> 
      <td> Seal Number 4 </td>
	  <td>:</td>
      <td><input name="seal4" type="text" id="seal4" size="10" maxlength="50" value="<?php echo set_value('seal4', isset($default['seal4']) ? $default['seal4'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>';
			echo
			'<tr> 
      <td> Seal Number 5 </td>
	  <td>:</td>
      <td><input name="seal5" type="text" id="seal5" size="10" maxlength="50" value="<?php echo set_value('seal5', isset($default['seal5']) ? $default['seal5'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>
			<tr> 
      <td> Seal Number 6 </td>
	  <td>:</td>
      <td><input name="seal6" type="text" id="seal6" size="10" maxlength="50" value="<?php echo set_value('seal6', isset($default['seal6']) ? $default['seal6'] : ''); ?>"  /></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>'
			; }?><?php */?>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Information</td>
      <td>:</td>
      <td><textarea name="inf" cols="30" rows="5"><?php echo set_value('inf', isset($default['inf']) ? $default['inf'] : ''); ?></textarea></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td width="19%">&nbsp;</td>
      <td width="1%">&nbsp;</td>
      <td width="27%">&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td><input type="submit" name="button" id="button" value="Submit" class="button" /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
   
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>



 <?php
}
if ( ! empty($link))
	{
		echo '<p id="bottom_link">';
		foreach($link as $links)
		{
			echo $links . ' ';
		}
		echo '</p>';
	}
$this->load->view('includes/footer.php');
	?>

