<?php $PageSecurity = 2;
include('includes/DefineSuppTransClass.php');
include('includes/DefinePOClass.php');
include('includes/SQL_CommonFunctions.inc');
include('includes/session.inc');

//echo "SELECT id, StoreName,storecode FROM storetype where Store_Site = '".$_GET['site']."'";
  $store_sql = "SELECT id, StoreName,StoreCode FROM storetype where Store_Site = '".$_REQUEST['site']."'";
	
	$data1='';
		$data1.="<select name='store'  style='width:100%' id='store'    >";
								
 			$store_result = DB_query($store_sql,$db);
			while($store_row = DB_fetch_array($store_result))
			{
				
				$p='';
				if($store_row['id'] == $_POST['store'])
				$p="selected";
			
			
		$data1.="<option value=".$store_row['id']." ".$p.">".$store_row['StoreName']."</option>";
			 }
			
			$data1.="</select>";
			
			
		$data2='';	
		$data2.="<select name='received_by' style='width:100%' id='received_by' onchange='Get_Employee(this.value)' >'";
	    $data2.="<option value='0'>Select</option>";
	
	$floor_sql=DB_query("SELECT id,emp_name FROM empmaster WHERE CompanyId='".$_SESSION['ACGCompanyId']."' AND emp_site='".$_REQUEST['site']."' ORDER BY emp_name",$db);
	while($floor_row=DB_fetch_array($floor_sql))
	{
			     
	
	
	$data2.="<option value=".$floor_row['id']." >".$floor_row['emp_name']."</option>";
		
	}
	
    $data2.="</select>";	
	
	
	$data3='';	
		
		
		$data3.="<select name='job_card_no' style='width:100%' id='job_order_no' onchange='Get_jobcard(this.value)' >'";
	    $data3.="<option value='0'>Select</option>";
	
	$floor_sql=DB_query("Select * from job_card where site = '".$_REQUEST['site']."' order by id ASC",$db);
	while($floor_row=DB_fetch_array($floor_sql))
	{
			     
	$data3.="<option value=".$floor_row['id']." >".$floor_row['job_card_no']."</option>";
		
	}
	
    $data3.="</select>";
    
    $data4='';	
		
		
	$data4.="<select name='vendor' id='vendor' style='width:100%' >'";
	$data4.="<option value='0'>Select</option>";
	
	$vendor_sql=DB_query("select id,vendor_name from suppliers where site='".$_REQUEST['site']."'",$db);
	while($vendor_row=DB_fetch_array($vendor_sql))
	{		     
	$data4.="<option value=".$vendor_row['id']." >".$vendor_row['vendor_name']."</option>";
		
	}
	
    $data4.="</select>";
			
			
			
			
echo $data=$data1."__".$data2."__".$data3."__".$data4;			
	?>