<?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>

<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.7/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.7/js/select2.min.js"></script>
<script>
  $(document).ready(function() {
      $('#pengirim-security').select2();
  });
</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>BERITA ACARA TERIMA SECURITY</legend><form name="form1" method="post" action="<?php echo $form_action ?>" id="form1">
  <table width="100%" border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td><table width="100%" height="361" border="0" cellpadding="1" cellspacing="1">
      <tr>
        <td>Nomor Berita Acara</td>
        <td>:</td>
        <td><?php echo $no_ba ?></td>
      </tr>
      <tr>
        <td>Tipe Kendaraan</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 width="19%">&nbsp;</td>
        <td width="1%">&nbsp;</td>
        <td width="27%">&nbsp;</td>
      </tr>
      <tr>
        <td>No.Polisi Kendaraan</td>
        <td>:</td>
        <td><input type="text" name="vnumb" size="20" value="<?php ?>" id="vnumb" /></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>Volume Kendaraan</td>
        <td>:</td>
        <td><input name="vol_security" type="text" id="vol_security" size="20" maxlength="50" value="<?php echo set_value('vol_security', isset($default['vol_security']) ? $default['vol_security'] : ''); ?>"  />
          (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>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>Jenis Pengirim</td>
        <td>:</td>
        <td>
          <select name="jenis_pengirim">
            <option value="CABANG">Cabang</option>
            <option value="SUPPLIER">Supplier</option>
            
          </select>
        </td>
        <td width="19%">&nbsp;</td>
        <td width="1%">&nbsp;</td>
        <td width="27%">&nbsp;</td>
      </tr>
      <tr>
        <td>Pengirim</td>
        <td>:</td>
        <td>
          <select name="nama_sup" id="pengirim-security">
            <?php foreach($pengirim_security as $row){ ?>
            <option value="<?php echo $row->pengirim_security_name ?>"><?php echo $row->pengirim_security_name ?></option>
            <?php } ?>
          </select>
        </td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>No. Manifest</td>
        <td>:</td>
        <td><input type="text" name="no_manifest" id="no_manifest" size="20" value="<?php echo set_value('no_manifest', isset($default['no_manifest']) ? $default['no_manifest'] : ''); ?>" /></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td> No. Surat Jalan</td>
        <td>:</td>
        <td><input name="no_sj" type="text" id="no_sj" size="20" maxlength="50" value="<?php echo set_value('no_sj', isset($default['no_sj']) ? $default['no_sj'] : ''); ?>"  /></td>
        <td colspan="3" align="center">&nbsp;</td>
      </tr>
      <tr>
        <td>No. Container / ISO Tank</td>
        <td>:</td>
        <td><input type="text" name="no_iso" size="20" value="<?php ?>" id="driver"  /></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>Transporter</td>
        <td>:</td>
        <td><input type="text" name="trans" size="20" value="<?php ?>" id="driver"  /></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>Keterangan</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><input type="submit" name="button" id="button" value="Submit" class="button" /></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table></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');
	?>

