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

$data1='';
$data2='';
if($_REQUEST['branch']!='')
{
		// godown Data
	      $sql_store ="select id, StoreCode, StoreName from storetype where Store_Site='".$_REQUEST['branch']."'";
		 $resultStkLocs = DB_query($sql_store,$db);
		 
       $data1.='<option value="0">Select</option>';
		while ($myrow=DB_fetch_array($resultStkLocs))
		{
		if($_REQUEST['store']==$myrow['id']) { $r='selected';} else { $r=''; }
        $data1.='<option value="'.$myrow['id'].'" '.$r.'>'.$myrow['StoreName'].'</option>';
		}
		 
		 // vendor Data
		  echo $sql_vendor ="Select id,vendor_code,vendor_name from suppliers where site='".$_REQUEST['branch']."'";
		 $result_vendor = DB_query($sql_vendor,$db);
		 
       $data2.='<option value="0">Select</option>';
		while ($vendorData=DB_fetch_array($result_vendor))
		{
		if($_REQUEST['vendor']==$vendorData['id']) { $p='selected';} else { $p=''; }
        $data2.='<option value="'.$vendorData['id'].'" '.$p.'>'.$vendorData['vendor_name'].'</option>';
		}
}
echo $data=$data1.'__'.$data2;
?>