<?php
session_start();
// ============
include("../../asset/theme/css/myfunc.php");
include("../../php_crud/my_class.php");
$obj=new my_class();
// ============
$branchid = $_SESSION['LOGIN_BRANCH'];


?>


<link rel="stylesheet" href="assets/css/chosen.css" />
<script src="module/finance/js/add_sub_gl_head.js" type="text/javascript"></script>
<style type="text/css">
i{
  cursor:pointer;
}
</style>
   
<div id="create_sub_gl"> 

<?php if($_SESSION['add']=='Y'){ ?>       
  <form class="form-vertical" >
  <legend>Create Sub GL </legend> 
  <div class="row-fluid">   
<div class="span3">
    <div class="control-group">
      <label class="control-label" for="form-field-1">Name<font color="#FF0000">*</font></label>
      <div class="controls">
          <input type="text" class="small" id="sub_gl_name"   />
      </div>

    </div>
</div>


<div class="span3">
<div class="control-group">
	<label class="control-label" for="form-field-1">Select Parent GL<font color="#FF0000">*</font></label>
	<div class="controls">
	   <select class="chzn-select" id="gl_id" data-placeholder="Choose a GL...">
<option value=""></option>
<?php 
foreach($obj->View_All_By_Cond("acc_gl_head_","_br_id='$branchid' AND _status='1' AND gl_head_has_child='0'") as $value)

{
echo "<option value='".$value['gl_head_name']."|".$value['_id']."'>".$value['gl_head_code']."&nbsp; | ".$value['gl_head_name']."</option>";

}
?>

</select>
</div>

</div>
</div>

<div class="span3">
	<div class="control-group">
		<label class="control-label" for="form-field-1">Type<font color="#FF0000">*</font></label>
		<div class="controls">
		   <select id="type_id" onchange="" >
			<option value="">---SELECT---</option>
			<option value="1">Debit</option>
			<option value="2">Credit</option>
		  </select>
    </div>

	</div>
</div>
 </div>



 <div class="row-fluid">                
<div class="span4">
          <div class="control-group">
        <label class="control-label" for="form-field-1">&nbsp;</label>

      <div class="controls">
        <button class="btn btn-small btn-success" type="button" id="btn_save">
          <i class="icon-ok bigger-100"></i>
          Save
        </button>

        &nbsp; &nbsp; &nbsp;
        <button class="btn btn-small btn-danger" type="reset" id="btn_reset">
          <i class="icon-undo bigger-100"></i>
          Reset
        </button>
        </div>
      </div>
</div>
</div>
</div>

</form>

  <?php } ?>
  </div>
 
<div class="sgldata" name="data">
</div>


<script type="text/javascript">
  $(".chzn-select").chosen(); 
</script>


