<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<?php
include('../include/session.php');
$quote_no = $_GET['quote_no'];
$report_name = $_GET['report_name'];
	
$table_name2 = $_SESSION['db_prefix']."_quotations";
$quote_query = "SELECT cust_id, type, seller, status, request_date, company_contact, contact_phone, seller, project, project_no, project_description, required_date, project_place FROM $table_name2 WHERE quote_no ='".$quote_no."' ";
$quote_result = mySQL_query($quote_query);
$quote_num = mysql_num_rows($quote_result);


$a1 = mysql_result($quote_result, 0, "cust_id");
$a2 = mysql_result($quote_result, 0, "type");
$a3 = mysql_result($quote_result, 0, "seller");
$a4 = mysql_result($quote_result, 0, "status");
$a5 = mysql_result($quote_result, 0, "request_date");
$a6 = mysql_result($quote_result, 0, "company_contact");
$a7 = mysql_result($quote_result, 0, "contact_phone");
$a8 = mysql_result($quote_result, 0, "project_no");
$a9 = mysql_result($quote_result, 0, "project_description");
$a10 = mysql_result($quote_result, 0, "project");
$a12 = mysql_result($quote_result, 0, "project_place");

$cust_id = $a1;

$table_name3 = $_SESSION['db_prefix']."_customer";
$customer_query = "SELECT account_type, comp_name, name_2, title, bag_box, box_no, postal_place, phone, contact_1, email_1, cell_1, status FROM $table_name3 WHERE cust_id = '".$a1."' ";
$customer_result = mySQL_query($customer_query);
$c0 = mysql_result($customer_result, 0, "account_type");
if ($c0=="corporate") { $c1 = mysql_result($customer_result, 0, "comp_name"); } else { $c1 = mysql_result($customer_result, 0, "title")." ".mysql_result($customer_result, 0, "name_2")." ".mysql_result($customer_result, 0, "comp_name"); }
$c2 = mysql_result($customer_result, 0, "bag_box");
$c3 = mysql_result($customer_result, 0, "box_no");
$c4 = mysql_result($customer_result, 0, "postal_place");
$c5 = mysql_result($customer_result, 0, "phone");
$c6 = mysql_result($customer_result, 0, "contact_1");
$c7 = mysql_result($customer_result, 0, "email_1");
$c8 = mysql_result($customer_result, 0, "status");
$c9 = mysql_result($customer_result, 0, "cell_1");

?>

<!--style sheets-->
<link rel="stylesheet" type="text/css" href="../css/print.css" />

<title>Quotation <?php echo $quote_no ?> for <?php echo $c1 ?></title>
<style>
body {
	font-family:Arial, Helvetica, sans-serif;
	font-size:12px;
}
</style>
</head>

<body   onload="window.print();" onFocus="window.close();" >
<div style="width:800px;">
<?php include('../include/print_report_header.php'); ?>


<div style="width:650px; margin-left:50px; ">
  <br>
<br>
    
<b>Quotation details:</b>
<table width="650" id="table_details_display">
    <tr>
        <td width="123">Sales person:</td>
        <td width="205"><?php echo  $a3 ?></td>
        <td width="109">&nbsp;</td>
        <td width="213">&nbsp;</td>
      </tr>
      <tr>
        <td>Quote no.:</td>
        <td><?php echo "Q".$quote_no ?></td>
        <td>Enquiry  date:</td>
        <td><?php echo date("d-m-Y", strtotime($a5)) ?></td>
      </tr>
    </table>
 


<br />
<br />
<?php 
		include ('../include/customer_block.php');
		?>
<br />
<br />
<br />

<b>Quotation project</b>
<table width="650" id="table_details_display">
    <tr>
      <td width="119">Enquiry date:</td>
      <td width="190"><strong><span class="wizard"><?php echo date("d-m-Y", strtotime($a5)) ?></span></strong></td>
      <td width="108">&nbsp;</td>
      <td width="203">&nbsp;</td>
    </tr>
    <tr>
      <td>Project:</td>
      <td><?php echo  $a10 ?></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Project no:</td>
      <td><?php echo  $a8 ?></td>
      <td>Place:</td>
      <td><?php echo $a12 ?></td>
    </tr>
    <tr>
      <td>Project description:</td>
      <td colspan="3"><?php echo $a9 ?></td>
      </tr>
  </table>
<br />
<br />
<b>Quotation details:</b>
<table width="650" id="table_details_display">
    <tr>
      <td colspan="4"><br />
      <br />
      <br />
      <br />
      <br />
      <br />
      <br />
      <br />
      <br />
      <br />
<br />
      <br />
      <br />
      <br />
      <br />
      <br />
      <br /><br />
<br />
<br />
<br />
<br />
<br />
<br />
</td>
    </tr>
    <tr>
      <td width="119">Quotation made by:<br />
</td>
      <td width="190"></td>
      <td width="108">Date:</td>
      <td width="203">&nbsp;</td>
    </tr>
  </table>
</div>
</body>  

</html>