<?php
$this->load->view('includes/header.php');
?>
<script type="text/javascript">
			
			// Sample 2
			$(document).ready(function()
			{
				$('#txt_max_pc_op').blur(function()
				{
					$('#txt_max_pc_op').formatCurrency({ region: 'id-ID' });
				});
			});
		</script>

<?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%">Branch ID</td>
      <td width="1%">:</td>
      <td width="85%"><label for="txt_idcab"></label>
      <input name="txt_idcab" type="text" id="txt_idcab" size="4" maxlength="2" value="<?php echo set_value('txt_idcab', isset($default['txt_idcab']) ? $default['txt_idcab'] : ''); ?>" <?php echo ! empty($default['readonly']) ? $default['readonly'] : ''; ?> />        <label for="txt_uid"><font class="required">*</font></label></td>
    </tr>
    <tr>
      <td>Name</td>
      <td>:</td>
      <td><input name="txt_cabname" type="text" id="txt_cabname" size="50" maxlength="100"  value="<?php echo set_value('txt_cabname', isset($default['txt_cabname']) ? $default['txt_cabname'] : ''); ?>"  /> <font class="required">*</font></td>
    </tr>
    <tr>
      <td>Short Name</td>
      <td>:</td>
      <td><label for="txt_max_pc_op"></label>
      <input name="txt_shortname" type="text" id="txt_shortname" size="10" maxlength="9"   value="<?php echo set_value('txt_shortname', isset($default['txt_shortname']) ? $default['txt_shortname'] : ''); ?>"/>
      <font class="required">*</font></td>
    </tr>
    <tr>
      <td>Status</td>
      <td>:</td>
      <td>
        <label>
          <input name="rg_active" type="radio" id="rg_active_0" value="1" <?php echo set_radio('rg_active', '1', isset($default['rg_active']) && $default['rg_active']=='1'  ? TRUE : FALSE ); ?>/>
          Active</label> 
        <label>
          <input type="radio" name="rg_active" value="0" id="rg_active_1" <?php echo set_radio('rg_active', '0', isset($default['rg_active']) && $default['rg_active']=='0'  ? TRUE : FALSE ); ?> />
          Not active</label></td>
    </tr>
    <tr>
      <td>PIC</td>
      <td>:</td>
      <td><label for="cb_pic">
        <input name="txt_pic" type="text" id="txt_pic" size="50" maxlength="50" value="<?php echo set_value('txt_pic', isset($default['txt_pic']) ? $default['txt_pic'] : ''); ?>"  />
      <font class="required">*</font></label></td>
    </tr>
    <tr>
      <td>Address</td>
      <td>:</td>
      <td><label for="txt_addr"></label>
      <textarea name="txt_addr" id="txt_addr" cols="45" rows="5"><?php echo set_value('txt_addr', isset($default['txt_addr']) ? $default['txt_addr'] : ''); ?></textarea></td>
    </tr>
    <tr>
      <td>Province</td>
      <td>:</td>
      <td><input name="txt_prov" type="text" id="txt_prov" size="50" maxlength="50" value="<?php echo set_value('txt_prov', isset($default['txt_prov']) ? $default['txt_prov'] : ''); ?>"  /></td>
    </tr>
    <tr>
      <td>City</td>
      <td>:</td>
      <td><input name="txt_city" type="text" id="txt_city" size="50" maxlength="50" value="<?php echo set_value('txt_city', isset($default['txt_city']) ? $default['txt_city'] : ''); ?>"  /></td>
    </tr>
    <tr>
      <td>Fax</td>
      <td>:</td>
      <td>
        <input name="txt_fax" type="text" id="txt_fax" size="20" maxlength="20" value="<?php echo set_value('txt_fax', isset($default['txt_fax']) ? $default['txt_fax'] : ''); ?>" />
      </td>
    </tr>
    <tr>
      <td>Phone</td>
      <td>:</td>
      <td><input name="txt_phone" type="text" id="txt_phone" size="20" maxlength="20" value="<?php echo set_value('txt_phone', isset($default['txt_phone']) ? $default['txt_phone'] : ''); ?>" /></td>
    </tr>
    <tr>
      <td>Petty Cash Account UO </td>
      <td>:</td>
      <td><input name="txt_pcglaccuo" type="text" id="txt_pcglaccuo" size="10" maxlength="10" value="<?php echo set_value('txt_pcglaccuo', isset($default['txt_pcglaccuo']) ? $default['txt_pcglaccuo'] : ''); ?>" />
      <font class="required">*</font></td>
    </tr>
    <tr>
      <td>Petty Cash Account OP </td>
      <td>:</td>
      <td><input name="txt_pcglaccop" type="text" id="txt_pcglaccop" size="10" maxlength="10" value="<?php echo set_value('txt_pcglaccop', isset($default['txt_pcglaccop']) ? $default['txt_pcglaccop'] : ''); ?>" />
      <font class="required">*</font></td>
    </tr>
    <tr>
      <td>Petty Cash Bank Account </td>
      <td>:</td>
      <td><input name="txt_pcbankglacc" type="text" id="txt_pcbankglacc" size="10" maxlength="10" value="<?php echo set_value('txt_pcbankglacc', isset($default['txt_pcbankglacc']) ? $default['txt_pcbankglacc'] : ''); ?>" />
      <font class="required">*</font></td>
    </tr>
    <tr>
      <td>Cost Center</td>
      <td>:</td>
      <td><input name="txt_costctr" type="text" id="txt_costctr" size="10" maxlength="10" value="<?php echo set_value('txt_costctr', isset($default['txt_costctr']) ? $default['txt_costctr'] : ''); ?>" />
      <font class="required">*</font></td>
    </tr>
    <tr>
      <td>Storage Max Capacity</td>
      <td>:</td>
      <td><input name="txt_max_stor" type="text" id="txt_max_stor" size="20" maxlength="20" value="<?php echo set_value('txt_max_stor', isset($default['txt_max_stor']) ? $default['txt_max_stor'] : ''); ?>" onblur="this.value=addCommas(this.value)" /> 
        <em>Liter</em> <font class="required">*</font></td>
    </tr>
    <tr>
      <td>Maximun PC OP</td>
      <td>:</td>
      <td><label for="textfield2"></label>
      <input type="text" name="txt_max_pc_op" id="txt_max_pc_op" value="<?php echo set_value('txt_max_pc_op', isset($default['txt_max_pc_op']) ? $default['txt_max_pc_op'] : ''); ?>" />
      <font class="required">*</font></td>
    </tr>
    <tr>
      <td>Vendor Code </td>
      <td>:</td>
      <td><input name="txt_lifnr" type="text" id="txt_lifnr" size="10" maxlength="10" value="<?php echo set_value('txt_lifnr', isset($default['txt_lifnr']) ? $default['txt_lifnr'] : ''); ?>" /> <font class="required">*</font></td>
    </tr>
    <tr>
      <td>Plant </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</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');
	?>

