<?php $PageSecurity = 11;
include('includes/session.inc');
include('includes/SQL_CommonFunctions.inc');
include('includes/function_lib.php');
if($_REQUEST['site']!='')
{	
$data4=0;
$salesorder=DB_query("SELECT * FROM salesorder WHERE id ='".$_REQUEST['site']."'",$db);
$salesorder_data=DB_fetch_array($salesorder);
$order_qty=DB_query("select Quantity from salesorder_details where masterid='".$_REQUEST['site']."'",$db);
while($order=DB_fetch_array($order_qty))
{
$data4=$data4+$order['Quantity'];
}
$client="SELECT c_name FROM clientmaster where client_code='".$salesorder_data['client']."'";
$query=DB_query($client,$db);
$clientdata=DB_fetch_array($query);
$clientname=$clientdata['c_name'];
$data1=$salesorder_data['orderDate'];
$data3=$salesorder_data['PORefNo'];
echo  $data=$data1."__".$clientname."__".$data3."__".$data4;   
 } ?>
