<?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>');
?>
<form name="form1" method="post" action="<?php echo $form_action ?>">
  <table width="100%" border="0" cellspacing="1" cellpadding="1">
    <tr>
      <td width="14%"> Supplier Name</td>
      <td width="1%">:</td>
      <td width="85%"><input name="suppname" type="text" id="suppname" size="30" maxlength="100"  value="<?php echo set_value('suppname', isset($default['suppname']) ? $default['suppname'] : ''); ?>"  /><font class="required">*</font></td>
    </tr>
    <tr>
      <td>Status</td>
      <td>:</td>
      <td>
        <label>
          <input name="status" type="radio" id="status_0" value="1" <?php echo set_radio('status', '1', isset($default['status']) && $default['status']=='1'  ? TRUE : FALSE ); ?>/>
          Active</label> 
        <label>
          <input type="radio" name="status" value="0" id="status_1" <?php echo set_radio('status', '0', isset($default['status']) && $default['status']=='0'  ? TRUE : FALSE ); ?> />
          Not active</label></td>
    </tr>
    <tr>
      <td>PIC</td>
      <td>:</td>
      <td><label for="pic">
        <input name="pic" type="text" id="pic" size="30" maxlength="50" value="<?php echo set_value('pic', isset($default['pic']) ? $default['pic'] : ''); ?>"  />
      <font class="required">*</font></label></td>
    </tr>
    <tr>
      <td>No. Ijin</td>
      <td>:</td>
      <td><label for="noijin"><input name="noijin" type="text" id="noijin" size="30" maxlength="20" value="<?php echo set_value('noijin', isset($default['noijin']) ? $default['noijin'] : ''); ?>" />
        <font class="required"> *</font></label></td>
    </tr>
    <tr>
      <td>Address</td>
      <td>:</td>
      <td><label for="addr"></label>
      <textarea name="addr" id="addr" cols="45" rows="5"><?php echo set_value('addr', isset($default['addr']) ? $default['addr'] : ''); ?></textarea></td>
    </tr>
    <tr>
      <td>City</td>
      <td>:</td>
      <td><input name="city" type="text" id="txt_city" size="30" maxlength="50" value="<?php echo set_value('city', isset($default['city']) ? $default['city'] : ''); ?>"  /></td>
    </tr>
    <tr>
      <td>Province</td>
      <td>:</td>
      <td><input name="prov" type="text" id="prov" size="30" maxlength="50" value="<?php echo set_value('prov', isset($default['prov']) ? $default['prov'] : ''); ?>"  /></td>
    </tr>
    <tr>
      <td>Fax</td>
      <td>:</td>
      <td>
        <input name="fax" type="text" id="fax" size="20" maxlength="20" value="<?php echo set_value('fax', isset($default['fax']) ? $default['fax'] : ''); ?>" />      </td>
    </tr>
    <tr>
      <td>Phone</td>
      <td>:</td>
      <td><input name="phone" type="text" id="phone" size="20" maxlength="20" value="<?php echo set_value('phone', isset($default['phone']) ? $default['phone'] : ''); ?>" /></td>
    </tr>
    <tr>
      <td>Mobile</td>
      <td>:</td>
      <td><input name="mobile" type="text" id="mobile" size="20" maxlength="20" value="<?php echo set_value('mobile', isset($default['mobile']) ? $default['mobile'] : ''); ?>" /></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td><input name="kelompok" type hidden="hidden" id="kelompok" size="20" maxlength="20" value="<?php echo set_value('kelompok', isset($default['kelompok']) ? $default['kelompok'] : 'sup'); ?>" /></td>
    </tr>
    <tr>
      <td>Pass</td>
      <td>:</td>
      <td><input name="pass" type="text" id="pass" size="20" maxlength="20" value="<?php echo set_value('pass', isset($default['pass']) ? $default['pass'] : ''); ?>" /></td>
    </tr>
    <tr>
      <td>Dengan PPN</td>
      <td>: </td>
      
      <td><select name="ppn" id="ppn">
        <option value="0"  <?php if(isset($default['ppn']))
									{ 
									if($default['ppn']=="0"){ echo set_select('ppn', '0', TRUE); }
									 }
									 else
									 {
									if($_POST['ppn']=="0"){ echo set_select('ppn', '0', TRUE); }	 
									 }?> 
         >Tidak</option>
        <option value="1" <?php if(isset($default['ppn']))
									{ 
									if($default['ppn']=="1"){ echo set_select('ppn', '1', TRUE); }
									 }
									 else
									 {
									if($_POST['ppn']=="1"){ echo set_select('ppn', '1', TRUE); }	 
									 }?>  >Ya</option>
      </select></td>
    </tr>
    <tr>
      <td>Jenis Pembayaran</td>
      <td>:</td>
      
      <td><select name="idtop" id="idtop">
       <option value="0" <?php if(isset($default['idtop']))
									{ 
									if($default['idtop']=="0"){ echo set_select('idtop', '0', TRUE); }
									 }
									 else
									 {
									if($_POST['idtop']=="0"){ echo set_select('idtop', '0', TRUE); }	 
									 }?>>Cash</option>
       <option value="1" <?php if(isset($default['idtop']))
									{ 
									if($default['idtop']=="1"){ echo set_select('idtop', '1', TRUE); }
									 }
									 else
									 {
									if($_POST['idtop']=="1"){ echo set_select('idtop', '1', TRUE); }	 
									 }?>>Credit</option>
      </select></td>
    </tr>
    <?php /*?><tr>
      <td>Jenis Pembayaran</td>
      <td>:</td>
      <td><select name="idtop">
      <option value="0" <?php echo set_option('idtop', '0', isset($default['idtop']) && $default['idtop']=='0'  ? TRUE : FALSE ); ?>>Credit</option>
        <option value="1" <?php echo set_option('idtop', '1', isset($default['idtop']) && $default['idtop']=='1'  ? TRUE : FALSE ); ?>>Credit</option>
      </select></td>
    </tr><?php */?>
    <tr>
      <td>Vendor Code (SAP)</td>
      <td>:</td>
      <td><input name="codevendor" type="text" id="codevendor" size="20" maxlength="10" value="<?php echo set_value('codevendor', isset($default['codevendor']) ? $default['codevendor'] : ''); ?>" /></td>
    </tr>
    <tr>
      <td>Longitude</td>
      <td>:</td>
      <td><input name="long" type="text" id="long" size="20" maxlength="20" value="<?php echo set_value('long', isset($default['long']) ? $default['long'] : ''); ?>" /></td>
    </tr>
    <tr>
      <td>Latitude</td>
      <td>:</td>
      <td><input name="lat" type="text" id="lat" size="20" maxlength="20" value="<?php echo set_value('lat', isset($default['lat']) ? $default['lat'] : ''); ?>" /></td>
    </tr>
    <!--<tr>
      <td>Plant (SAP)</td>
      <td>:</td>
      <td><input name="txt_werks" type="text" id="txt_werks" value="1000" size="4" maxlength="4" readonly="readonly" /> <font class="required">*</font></td>
    </tr>
    <tr>
      <td>Storage Code (SAP)</td>
      <td>:</td>
      <td><input name="txt_lgort" type="text" id="txt_lgort" size="4" maxlength="4" value="<?php echo set_value('txt_lgort', isset($default['txt_lgort']) ? $default['txt_lgort'] : ''); ?>" />
      <font class="required">*</font></td>
    </tr>-->
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td><input type="submit" name="button" id="button" value="Submit" class="button" /></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');
	?>

