<?php

$table_name = $_SESSION['db_prefix']."_orders";
$order_query = "SELECT * FROM $table_name WHERE order_no = '".$order_no."' ";
echo '<br>*****'.$order_query;
$order_result = mySQL_query($order_query);
//$order_no = mysql_result($order_result, 0, "order_no");
$cust_id = mysql_result($order_result, 0, "cust_id");



$orderTT ="<table id=table_tool_tip width=300 ><tr><td  width=100>order no:</td><td width=175>".$order_no."</td></tr><tr><td valign=top>Project no /place:</td><td>".$b9."&nbsp;".$b10."</td></tr><tr><td>Project description:</td><td>".$b11."</td></tr><tr><td>Designer:</td><td>".$b12."</td></tr><tr><td>order value:</td><td>P ".number_format($b13, 2, '.', ',')."</td></tr><tr><td>Delivery date:</td><td>".$b14."</td></tr></table><br><b>Click for order progress.</b>";


?>
<table width="650" id="table_details_display">
  <tr>
    <td width="116" align="left" valign="top"><?php if($quote=='yes') { echo 'Quote no:';} else {echo 'order no:'; }?></td>
    <td width="182" align="left" valign="top"><?php if ($order_no!=0) { echo $order_no; } ?>&nbsp;</td>
    <td width="100" align="left" valign="top">Project:</td>
    <td align="left" valign="top"><?php if ($quote=='yes') { echo $b9a.' '.$b10a; } else { echo $b9.' '.$b10 ; } ?></td>
  </tr>
  <tr>
    <td align="left" valign="top"><?php if($quote=='yes') { echo 'Quote type:';} else {echo 'order type:'; }?></td>
    <td align="left" valign="top"><?php if ($quote_type=='trusses') { echo 'Truss / Tiles installations'; }
	                                    if ($quote_type=='tiles') { echo 'Tiles & Accessories'; }  ?></td>
    <td align="left" valign="top">&nbsp;</td>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top">Order date:</td>
    <td align="left" valign="top"><?php if ($order_date!='') {echo date("d-m-Y", strtotime($order_date)); } ?></td>
    <td align="left" valign="top">Delivery date:</td>
    <td align="left" valign="top"><?php if ($del_date!='') { echo date("d-m-Y", strtotime($del_date)); } ?></td>
  </tr>
  <tr>
    <td align="left" valign="top"><?php if ($quote=='yes') {echo 'Quote value:';} else { echo 'order value';} ?></td> 
    <td align="left" valign="top"><?php if ($quote=='yes') {echo number_format($quote_value, 2, '.', ',');} else { if ($order_no!=0) { echo number_format($value, 2, '.', ',');}} ?></td>
    <td align="left" valign="top">Sales rep:</td>
    <td align="left" valign="top"><?php echo $seller?></td>
  </tr>
  <tr>
    <td align="left" valign="top">Additional info:</td>
    <td colspan="3" align="left" valign="top"><?php echo $quote_note ?></td>
  </tr>
</table>
