<?php $PageSecurity = 11;
include('includes/session.inc');
include('includes/function_lib.php');
include('includes/SQL_CommonFunctions.inc');
global $db;
$sid=$_REQUEST['sid'];
$data1='';
$data2='';
$sql = "select * from suppliers where id = '".$sid."' ";
$result=DB_query($sql,$db);
$myrow=DB_fetch_array($result);

$data1.="<textarea name='vendor_address' id='vendor_address' readonly='readonly'>".$myrow['adrress1'].' '.$myrow['adrress2'].' '.$myrow['adrress3'].', '.$s->GetFieldValue('city_master','id="'.$myrow['city'].'"','city').', '.$s->GetFieldValue('state_master','id="'.$myrow['state'].'"','state').', '.$s->GetFieldValue('country_master','id="'.$myrow['country'].'"','country').', '.$myrow['pincode']."</textarea>";

if(isset($_REQUEST['pt'])){
$data2.="<select name='po_order' id='po_order'  style='width:150px;' onchange='getitemlist(this.value)'>";
$data2.="<option value='0' >---Select---</option>";
$sql1="select id, pr_no from log_po where vender_id='".$sid."' AND ptype='".$_REQUEST['pt']."' AND store='".$_REQUEST['wh1']."'";
$result1 = DB_query($sql1, $db);
while($myrow1 = DB_fetch_array($result1))
{ 
$data2.="<option value=".$myrow1['id'].">".$myrow1['pr_no']."</option>";
}
$data2.="</select>";
}else{
$data2.="<input type='text' style='width:150px;' name='po_order' id='po_order'>";
}
echo $data=$data1."__".$data2;
