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

  //Date picker
	$(function() {
		 
		$( "#txt_budat" ).datepicker({
			changeMonth: true,
			changeYear: true
		});
		$( "#txt_budat" ).datepicker( "option", "dateFormat", "dd.mm.yy");
		$( "#txt_budat" ).datepicker( "setDate", "<?php echo date('d.m.Y'); ?>" );
		
		
		$( "#txt_bldat" ).datepicker({
			changeMonth: true,
			changeYear: true
		});
		$( "#txt_bldat" ).datepicker( "option", "dateFormat", "dd.mm.yy" );
		$( "#txt_bldat" ).datepicker( "setDate", "<?php echo date('d.m.Y'); ?>" );
		
		
	});

</script>
<form name="form1" method="post" action="<?php echo $form_action ?>">
  <table width="100%" border="0" cellspacing="1" cellpadding="1">
    <tr>
      <td>Branch</td>
      <td>:</td>
      <td><?php echo $cabname; ?></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td width="10%">No. PO</td>
      <td width="1%">:</td>
      <td width="23%"><?php echo $ebeln; ?>
      <input type="hidden" name="txt_po" id="txt_po" value="<?php echo $ebeln; ?>"  /></td>
      <td width="8%">Add By</td>
      <td width="1%">:</td>
      <td width="57%"><?php echo $add_by; ?></td>
    </tr>
    <tr>
      <td>No. MIGO</td>
      <td>:</td>
      <td><?php echo $migo; ?>
      <input type="hidden" name="txt_migo" id="txt_migo" value="<?php echo $migo; ?>" /></td>
      <td>Add Date</td>
      <td>:</td>
      <td><?php echo $add_date; ?></td>
    </tr>
    <tr>
      <td>No. PP</td>
      <td>:</td>
      <td><?php echo $preq_no; ?></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>No. Vendor</td>
      <td>:</td>
      <td><?php echo $vendor; ?>
      <input type="hidden" name="txt_vendor" id="txt_vendor" value="<?php echo $vendor; ?>" /></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>Price / Liter</td>
      <td>:</td>
      <td><?php echo $this->fungsi->format_idr($net_price); ?></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Total Liter</td>
      <td>:</td>
      <td><?php echo number_format($quantity); ?>
      <input type="hidden" name="txt_qty" id="txt_qty" value="<?php echo $quantity; ?>"  /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Rounding Disc</td>
      <td>:</td>
      <td><?php echo $this->fungsi->format_idr($disc); ?>
      <input type="hidden" name="txt_disc" id="txt_disc" value="<?php echo $disc; ?>"  /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Total Before PPN</td>
      <td>:</td>
      <td><?php echo $this->fungsi->format_idr($total); ?>
      <input type="hidden" name="txt_total2" id="txt_total2" value="<?php echo $total; ?>" /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>PPN</td>
      <td>:</td>
      <td><?php echo $this->fungsi->format_idr($ppn); ?>
      <input type="hidden" name="txt_ppn" id="txt_ppn" value="<?php echo $ppn; ?>" /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Total Amount</td>
      <td>:</td>
      <td><h4><?php echo $this->fungsi->format_idr($totalall); ?></h4>
      <input type="hidden" name="txt_total" id="txt_total" value="<?php echo $totalall; ?>" />
      <input type="hidden" name="txt_inf" id="txt_inf" value="<?php echo $inf; ?>" /></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>Invoice Date</td>
      <td>:</td>
      <td><input name="txt_bldat" type="text" id="txt_bldat" size="10" maxlength="10" value="<?php echo date('d.m.Y'); ?>"/></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Posting Date</td>
      <td>:</td>
      <td><input name="txt_budat" type="text" id="txt_budat" size="10" value="<?php echo date('d.m.Y'); ?>"  maxlength="10" /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Payment Terms</td>
      <td>:</td>
      <td><label for="cb_term"></label>
        <select name="cb_term" id="cb_term" disabled="disabled">
          <option value="Z01">Z01</option>
          <option value="Z14">Z14</option>
          <option value="Z21">Z21</option>
          <option value="Z30">Z30</option>
          <option value="Z31">Z31</option>
          <option value="Z45">Z45</option>
          <option value="Z60">Z60</option>
          <option value="Z61">Z61</option>
          <option value="Z7">Z7</option>
          <option value="Z90">Z90</option>
      </select></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>
</form>
 <?php
if ( ! empty($link))
	{
		echo '<p id="bottom_link">';
		foreach($link as $links)
		{
			echo $links . ' ';
		}
		echo '</p>';
	}
$this->load->view('includes/footer.php');
	?>

