<?php $PageSecurity = 2;
include('includes/DefineSuppTransClass.php');
include('includes/DefinePOClass.php');
include('includes/SQL_CommonFunctions.inc');
include('includes/session.inc');
include('includes/function_lib.php');
include('includes/fun-HRClass.php');
/* Get opening balance */


					  
							
							

  ?> 

	<div align="center">
  <div style="overflow:auto; width:600px; height:250px">
  <p align="right" style="padding-left:0px; padding-bottom:0px; margin:0px;"><a href="#" onclick="hidedata();" style="font-size:18px; font-weight:bold;border:#000000 solid 2px; padding:2px; text-decoration:none; background-color:#FFFFFF; color:#000000;" title="Close">X</a></p>
  <table width="100%" border="1" cellspacing="0" cellpadding="3" style="border-collapse:collapse;">
 <tr>
        <th><strong>Select</strong></th>
        <th><strong>Item Code</strong></th>
        <th><strong>Item Name </strong></th>
		<th><strong>UOM </strong></th>		
		
		</tr> 
		<?php   
	    $i=0;	 
	    $store_sql = "SELECT id,StockID,item_name,mst_unitid,conv_unit,conv_factor FROM item_master  where item_name like '%".$_REQUEST['site']."%'
		and CompanyId='".$_SESSION['ACGCompanyId']."'";
        $Result=DB_query($store_sql,$db);
	    while($myrow =DB_fetch_array($Result))
	    {  	 		
		 $item_name= $s->GetFieldValue('item_master'," StockID='".$myrow['StockID']."'" ,'item_name');
		 $parameter=$myrow['id'];
		 $unitname= $s->GetFieldValue('unitsofmeasure',"unitid='".$myrow['mst_unitid']."'",'unitname');
         
		 
		
 	  ?> 	  
	   <tr bgcolor="#FFFFFF">
        <td ><?php //echo $myrow['id'];?>
       <a href="javascript:getItemsList1('<?php echo $parameter;?>','<?php echo $myrow['StockID'];?>','<?php echo htmlspecialchars( $myrow['item_name'], ENT_QUOTES);?>','<?php echo $unitname;?>','<?php echo $_REQUEST['data'];?>')"><?php echo $parameter;?></a>	
		<!--<input type="checkbox" name="item_issue[<?php echo $i;?>]" id="row_id_<?php echo $i;?>"  value="<?php echo $parameter;?>" onclick="getItemsList('<?php echo $parameter;?>','<?php echo $myrow['StockID'];?>','<?php echo  $myrow['item_name'];?>','<?php echo $myrow['unit'];?>','<?php echo $unitname;?>','<?php echo $stock;?>','<?php echo $i;?>')"/>--> </td>
        <td > <?php echo $myrow['StockID'];?> </td>
        <td ><?php echo $item_name;?></td>		
		<td ><?php  echo  $unitname;
		?></td>
	     
	    		</tr>
	  <?php $i++; } ?>	
		
	</table>
	</div></div>
	
