<?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; ?>
      <input type="hidden" name="txt_nocpvform" id="txt_nocpvform" value="<?php echo $nocpvform; ?>"  /></td>
      <td>PO Add By</td>
      <td>:</td>
      <td><?php echo $add_by; ?></td>
    </tr>
    <tr>
      <td width="10%">No. PO</td>
      <td width="1%">:</td>
      <td width="36%"><?php echo $ebeln; ?>
      <input type="hidden" name="txt_po" id="txt_po" value="<?php echo $ebeln; ?>"  />
      <input type="hidden" name="txt_poyear" id="txt_poyear" value="<?php echo $poyear; ?>"  /></td>
      <td width="13%">PO Add Date</td>
      <td width="1%">:</td>
      <td width="39%"><?php echo $add_date; ?></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>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>No. PP</td>
      <td>:</td>
      <td><?php echo $preq_no; ?></td>
      <td>No. MIRO</td>
      <td>:</td>
      <td><?php echo $miro; ?></td>
    </tr>
    <tr>
      <td>No. Vendor</td>
      <td>:</td>
      <td><?php echo $vendor; ?></td>
      <td>MIRO Add By</td>
      <td>:</td>
      <td><?php echo $miraddby; ?></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>MIRO Add Date</td>
      <td>:</td>
      <td><?php echo $miradddate; ?></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>CPV App By</td>
      <td>:</td>
      <td><?php echo $cpvappby; ?></td>
    </tr>
    <tr>
      <td>Rounding Disc</td>
      <td>:</td>
      <td><?php echo $this->fungsi->format_idr($disc); ?></td>
      <td>CPV App Date</td>
      <td>:</td>
      <td><?php echo $cpvappdate; ?></td>
    </tr>
    <tr>
      <td>Total Before Tax</td>
      <td>:</td>
      <td><?php echo $this->fungsi->format_idr($total); ?>
      <input type="hidden" name="txt_total" id="txt_total" 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); ?></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Total After Tax</td>
      <td>:</td>
      <td><?php echo $this->fungsi->format_idr($totalall); ?>
      <input type="hidden" name="txt_total2" id="txt_total2" value="<?php echo $totalall; ?>" /></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 bgcolor="#999999">
      <th colspan="6"><center>
      <strong>POST OUT GOING PAYMENT</strong>
      </center></th>
    </tr>
    <tr>
      <td colspan="3"><strong>HEADER DATA</strong></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Document 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>Account</td>
      <td>:</td>
      <td><?php echo $vendor; ?>
      <input type="hidden" name="txt_vendor" id="txt_vendor" value="<?php echo $vendor; ?>" /></td>
    </tr>
    <tr>
      <td>Posting Date</td>
      <td>:</td>
      <td><input name="txt_budat" type="text" id="txt_budat" size="10" maxlength="10" value="<?php echo date('d.m.Y'); ?>"/></td>
      <td>No. ACC. Doc</td>
      <td>:</td>
      <td><?php echo $mirogl; ?>
      <input type="hidden" name="txt_miro" id="txt_miro" value="<?php echo $mirogl; ?>" /></td>
    </tr>
    <tr>
      <td>Period</td>
      <td>:</td>
      <td><label for="txt_period"></label>
      <input name="txt_period" type="text" id="txt_period" size="2" maxlength="2" value="<?php echo date('m'); ?>" /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Reference</td>
      <td>:</td>
      <td><input name="txt_xblnr" type="text" class="txt_field2" id="txt_xblnr" size="20" maxlength="16" value="<?php echo set_value('txt_xblnr', isset($default['txt_xblnr']) ? $default['txt_xblnr'] : ''); ?>"   />
      <font class="required">*</font></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Doc. header text</td>
      <td>:</td>
      <td><input name="txt_bktxt" type="text" class="txt_field" id="txt_bktxt" size="30" maxlength="25" value="<?php echo set_value('txt_bktxt', isset($default['txt_bktxt']) ? $default['txt_bktxt'] : ''); ?>"   />
      <font class="required">*</font></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="3"><strong>VENDOR ITEM</strong></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Assignment</td>
      <td>:</td>
      <td><input name="txt_zounr" type="text" class="txt_field2" id="txt_zounr"  size="18" maxlength="18" value="<?php echo set_value('txt_zounr', isset($default['txt_zounr']) ? $default['txt_zounr'] : ''); ?>"  />
      <font class="required">*</font></td>
      <td>Amount</td>
      <td>:</td>
      <td><?php echo $this->fungsi->format_idr($totalall); ?></td>
    </tr>
    <tr>
      <td>Text</td>
      <td>:</td>
      <td><input name="txt_sgtxt2" type="text" class="txt_field" id="txt_sgtxt2"  size="50" maxlength="50" value="<?php echo set_value('txt_sgtxt2', isset($default['txt_sgtxt2']) ? $default['txt_sgtxt2'] : ''); ?>"  />
      <font class="required">*</font></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="3"><strong>G/L ACCOUNT ITEM</strong></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Amount</td>
      <td>:</td>
      <td><?php echo $this->fungsi->format_idr($totalall); ?></td>
      <td>Account</td>
      <td>:</td>
      <td><input name="txt_newko2" type="text" class="txt_field2" id="txt_newko2" value="<?php echo $pcglaccuo; ?>" size="17" maxlength="17" readonly="readonly"  />
      <font class="required">*</font></td>
    </tr>
    <tr>
      <td>Assignment :</td>
      <td>:</td>
      <td><input name="txt_zounr2" type="text" class="txt_field" id="txt_zounr2" size="18" maxlength="18" value="<?php echo set_value('txt_zounr2', isset($default['txt_zounr2']) ? $default['txt_zounr2'] : ''); ?>"  />
      <font class="required">*</font></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Text</td>
      <td>:</td>
      <td><input name="txt_sgtxt" type="text" class="txt_field" id="txt_sgtxt" size="50" maxlength="50" value="<?php echo set_value('txt_sgtxt', isset($default['txt_sgtxt']) ? $default['txt_sgtxt'] : ''); ?>"  />
      <font class="required">*</font></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');
	?>

