<?php $PageSecurity = 11;
 //echo $_SERVER['QUERY_STRING'];exit;
 include('includes/SQL_CommonFunctions.inc');
 include('includes/function_lib.php');
 include('includes/session.inc');
 global $db;



	 $q=$_GET['q'];
	  $site=$_GET['site'];
   	$sql=DB_query("select * from direct_po Where vender_id='".$q."' and recive_status='Pending' and site='".$site."' and Approval_status='1'",$db);
   	$num=DB_num_rows($sql);
   	if($num>0)
   	{
   		?>
 	<select  name="Purchase_Order" id="Purchase_Order"   onchange="FiendPurchasenumber(this.value)" > 
	<option value="000">---Select---</option>
	<?php 
	



		while ($rsdesig=DB_fetch_array($sql)){
			
	?>
	<option value="<?php  echo $rsdesig['id'];?>" <?php echo ($PurchaseOrder==$rsdesig['id']?'selected':'')?>><?php echo $rsdesig['pr_no'];?></option>
	<?php }?> 
	</select>
<?php }	
         else{?>
 	<select  name="PO" id="PurchaseOrder" > 
	<option value="000">--No Record--</option>
	</select>
	

 <?php  } ?>