<?php
$this->load->view('includes/header.php');
echo '<br>';
			/* Display system message */
			$this->fungsi->disp_sys_msg();
			echo validation_errors('<p class="field_error">', '</p>');
?>
<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>

<script type="text/javascript">function startCalc(){interval=setInterval("calc()",1)}function calc(){one=document.form1.vol.value;two=document.form1.fee.value;document.form1.total.value=(one*1)*(two*1)}function stopCalc(){clearInterval(interval)}
</script>
<link href = "https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel = "stylesheet">
<script src = "https://code.jquery.com/jquery-1.10.2.js"></script>
<script src = "https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script>
  $(function() {
    $( "#tanggal" ).datepicker({
      dateFormat:"yy-mm-dd"
    });
    $( "#jatuh_tempo" ).datepicker({
      dateFormat:"yy-mm-dd"
    });
  });
</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>CREATE INVOICE</legend>
<form name="form1" method="post" action="<?php echo $form_action ?>" id="form1">
  <table width="100%" border="0" cellspacing="1" cellpadding="1">
    <tr>
      <td colspan="6" align="center">INVOICE LIMBAH PADAT</td>
    </tr>
    <tr><td>&nbsp;</td></tr>
    <tr>
      <td>Ref</td>
      <td>:</td>
      <td>
        <input type="text" readonly name="ref" value="<?php echo $stba->idstba ?>">
      </td>
      <td>No. Invoice</td>
      <td>:</td>
      <td>
        <input type="text" name="no_invoice">
      </td>
    </tr>
    <tr>
      <td>Tanggal</td>
      <td>:</td>
      <td>
        <input type="text" name="tanggal" id="tanggal">
      </td>
      <td>Jatuh Tempo</td>
      <td>:</td>
      <td>
        <input type="text" name="jatuh_tempo" id="jatuh_tempo">
      </td>
    </tr>

    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>Penghasil</td>
      <td>:</td>
      <td>
        <textarea readonly name="nama_pemusnah"><?php echo $stba->suppname ?></textarea>
      </td>
    </tr>
    <tr>
      <td>Nomor PO</td>
      <td>:</td>
      <td><input type="text" name="ponumber" readonly value="<?php echo $stba->ponumber ?>"></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>Tagihan</td>
      <td>:</td>
      <td><input type="text" readonly name="tagihan_biaya" value="<?php echo number_format($pembayaran->total) ?>"></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>PPn</td>
      <td>:</td>
      <td><input type="text" readonly name="ppn" value="<?php echo number_format($pembayaran->tagihan * 0.10) ?>"></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>Total Tagihan + PPn</td>
      <td>:</td>
      <td><input type="text" readonly name="total_biaya" value="<?php echo number_format($pembayaran->total_tagihan) ?>"></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');
	?>

