<?php 
 include("dbConfig.php");
 
  $lang = $_POST["lang"];
 include("../languege_filee_hr.php");

 $company_id_sel = $_POST["company_id_sel"];
 $account_type = $_POST["account_type"];
 ?>

  <option value=""> <?php echo $select.$space.$employ; ?></option>
 <?php
 if($account_type=="salf"){
     $sql = "SELECT * FROM accounts_tbl where company_id='".$company_id_sel."' and (account_number like '010208%' or account_number like '010205%' or account_number like '010107%')";
     $result = $conn->query($sql);
      if ($result->num_rows > 0) {?>
          // output data of each row
         <?php  while($row = $result->fetch_assoc()) { 
         
        
         ?>
              <option value="<?php echo $row["account_number"];?>"><?php echo $row["account_name"]."/".$row["account_number"];?></option>
         <?php }
      } else {?>
      <option value="">لا يوجد</option>
        <?php  }?>
 <?php }elseif($account_type=="auhd"){ ?>
     <?php 
     $sql = "SELECT * FROM accounts_tbl where company_id='".$company_id_sel."' and (account_number like '010205%' or account_number like '010106%' or account_number like '010206%')";
 $result = $conn->query($sql);
  if ($result->num_rows > 0) {?>
      // output data of each row
     <?php  while($row = $result->fetch_assoc()) { 
     
    
     ?>
          <option value="<?php echo $row["account_number"];?>"><?php echo $row["account_name"]."/".$row["account_number"];?></option>
     <?php }
  } else {?>
  <option value="">لا يوجد</option>
    <?php  }?>
 <?php }else{ ?>

 <?php } ?>
