<?php
$this->load->view('includes/header.php');
?>
<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.volmnfst.value;two=document.form1.vol.value;document.form1.slsh.value=(one*1)-(two*1)}function stopCalc(){clearInterval(interval)}
</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>OIL PURCHASE USED OIL</legend>
<form name="form1" method="post" action="<?php echo $form_action ?>" id="form1">
  <table width="100%" border="0" cellspacing="1" cellpadding="1">
    <tr>
      <td>JENIS PEMBAYARAN</td>
      <td>&nbsp;</td>
      <td><select name="idtop">
        <option value="0" selected="selected">Cash</option>
        <option value="1">Credit</option>
        <option value="2">Invoice</option>
      </select></td>
      <td colspan="3">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="3" align="center">========== KODE SAMPLE ==========</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>1. Test Bahan Kimia</td>
      <td>:</td>
      <td><select name="qctbk">
        <option value="-" selected="selected">-</option>
        <option value="+">+</option>
      </select></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
   

<tr>
  <td>2. kadar Pencemaran</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>Type</td>
  <td>:</td>
  <td><select name="type">
      <option value="Penghasil" selected="selected">Penghasil</option>
      <option value="Pengumpul">Pengumpul</option>
      <option value="Pengoser">Pengoser</option>
  </select></td>
</tr>

    <tr>
      <td>- Air</td>
      <td>:</td>
      <td><input name="qcair" type="text" id="qcair" size="10" maxlength="50" value="<?php echo set_value('qcair', isset($default['qcair']) ? $default['qcair'] : ''); ?>"  /></td>
      <td>DO No.</td>
      <td>:</td>
      <td><input name="donumb" type="text" id="donumb" size="20" maxlength="50" value="<?php echo set_value('donumb', isset($default['donumb']) ? $default['donumb'] : ''); ?>"  />
          <font class="required">*</font></td>
    </tr>
    <tr>
      <td >- B. Bakar </td>
      <td>:</td>
      <td><input name="qcbakar" type="text" id="qcbakar" size="10" maxlength="50" value="<?php echo set_value('qcbakar', isset($default['qcbakar']) ? $default['qcbakar'] : ''); ?>"  /></td>
      <td>Manifest No.</td>
      <td>:</td>
      <td><label for="mnfst">
        <input name="mnfst" type="text" id="mnfst" size="20" maxlength="20" value="<?php echo set_value('mnfst', isset($default['mnfst']) ? $default['mnfst'] : ''); ?>"  />
        <font class="required">*</font></label></td>
    </tr>
    <tr>
      <td >- Residu</td>
      <td>:</td>
      <td><input name="qcresidu" type="text" id="qcresidu" size="10" maxlength="50" value="<?php echo set_value('qcresidu', isset($default['qcresidu']) ? $default['qcresidu'] : ''); ?>"  /></td>
      <td>Supplier ID</td>
      <td>:</td>
      <td><span class="primary">
        <input type="text" name="idsupp" id="idsupp" size="3" value="<?php ?>"  readonly="readonly" />
        <input type="text" name="nama_supp" size="15" id="nama_supp" value="<?php ?>"  readonly="readonly" />
        </span>
        <input type="button" name="button2" id="button2" value="..." class="button" onclick="window.open('<?php echo base_url();?>index.php/popup/popup_supp/','popuppage','width=900,height=600,scrollbar=yes,scrollbars=yes,top=100,left=100');" /><font class="required">*</font></td>
    </tr>
    <tr>
      <td>3. Berat Jenis</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <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');" /><font class="required">*</font></td>
    </tr>
    <tr>
      <td>- T</td>
      <td>:</td>
      <td><input name="qct" type="text" id="qct" size="10" maxlength="50" value="<?php echo set_value('qct', isset($default['qct']) ? $default['qct'] : ''); ?>"  /></td>
      <td>Vehicle No.</td>
      <td>:</td>
      <td><input name="vnumb" type="text" id="vnumb" size="10" maxlength="50" readonly="readonly" value="<?php echo set_value('vnumb', isset($default['vnumb']) ? $default['vnumb'] : ''); ?>"  />
        <font class="required">*</font></td>
    </tr>
    <tr>
      <?php /*?><td>Supplier ID</td>
      <td>:</td>
      <td><span class="primary">
        <input type="text" name="idsupp" id="idsupp" size="3" value="<?php ?>"  readonly="readonly" />
        <input type="text" name="nama_supp" size="15" id="nama_supp" value="<?php ?>"  readonly="readonly" />
        </span>
        <input type="button" name="button2" id="button2" value="..." class="button" onclick="window.open('<?php echo base_url();?>index.php/popup/popup_supp/','popuppage','width=900,height=600,scrollbar=yes,scrollbars=yes,top=100,left=100');" /></td><?php */?>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</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>
      <?php /*?><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><?php */?>
      <td>Volume Manifest</td>
      <td>:</td>
      <td><input name="volmnfst" type="text" id="volmnfst" size="10" maxlength="50" value="" onFocus="startCalc();" onBlur="stopCalc();" /> 
      (L)<font class="required">*</font></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Volume STB</td>
      <td>:</td>
      <td><input name="vol" type="text" id="vol" size="10" maxlength="50" value="" onfocus="startCalc();" onblur="stopCalc();"  /> 
      (L)<font class="required">*</font></td>
      
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      5
      <td>Selisih Volume Manifest Dan STB</td>
      <td>:</td>
      <td><input name="slsh" type="text" id="slsh" readonly="readonly" size="10" maxlength="50" value="<?php echo set_value('slsh', isset($default['slsh']) ? $default['slsh'] : ''); ?>"  />
        (L)</td>
       <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Keterangan Selisih</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 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');
	?>

