<html>
<head>
<? 
	session_start();
	include("test.php");
	include("opendb.php");

	//include("calstock.php");

	if(strlen($user)<=0)
		{
 		 print "<script> alert('Invalid User'); document.location='inde.php' </script>";
 		 return;
	}

?>
  	<style>
		body
		   {
			font-size:12px;
                 }

            .blnk{

                 border: 0px solid white;
 
                 border-collapse:none;
             }

            #tbl td{
             border-collapse:collapse;
             }

            #tbl{
              border-collapse:collapse;	
            }

           .blnk a{
                   display:block;
                   width:250px;
                   text-align:center;
                   margin-bottom:15px;
    
           }
	  #add_td
		{

		font-size:12px;
		height:15px;
		}
		p{
 		margin:0px;
 		padding:0px;
 		}
  	</style>
</head>
<body onload='window.print();'>
<br>
<?
 $re=mysqli_query($db,"select *  from gateentry where brcode='$brcode' and jcno='$jcno'");


 
  $res=mysqli_fetch_row($re);


 $re1=mysqli_query($db,"select *  from observation_repo  where brcode='$brcode' and jcno='$res[1]'");
 ?>

       <table border='0' width='100%'>
<tr>
<td align='left' width='33%'> 
<?
$qry=mysqli_query($db,"select * from invoice where invno='$inno'");
$row=mysqli_fetch_array($qry);       
$date = $row[1];
$newDate = date("d-m-Y", strtotime($date));

?>                                    

   <table border='0' width='100%' >

	<tr>
	<td align='left' width='60%' id='add_td'> 
<?
	$qry1=mysqli_query($db,"select * from company_master where brcode='$brcode'");
	$row1=mysqli_fetch_array($qry1);
	 print "<font size='2'><b>".$row1[2]."</b></font><p >".$row1[4].", ".$row1[5].",".$row1[6];
	if(($row1[7]>0)&&($row1[7]!=''))
   		 print "</p><p>Tel: ".$row1[7];
 	if(($row1[8]>0)&&($row1[8]!=''))
  		 print " Fax: ".$row1[8];
	print "</p><p>Email: ".$row1[10];
	if($row1[11]!='')
		print ",".$row1[11]."<br>Web: ".$row1[12];
	else
		print "</p><p>Web: ".$row1[12];
?>
	</td>

	<td align='right'  width='40%'> <img src="images/logo.gif" width="60" height="60" /> </td></tr></table>
       <br>
	<table border='1' width='100%' style='border-collapse:collapse;'><tr>
	<th  align='center'  width='100%' style='border:0px solid white;height:20px;font-size:18px;' id='head'>OBSERVATION REPORT</th></tr></table>
 	<p style='text-align:right;padding:0px;margin:0px;font-size:10px;'>Finance Code:<? echo $row1[13]; ?></p>


	<table  border=1  width='100%' id='tbl' style='margin-top:0px;FONT-SIZE:10PX;'>
 
       <tr>
          <!--<td colspan='6' class='blnk' height=25></td>-->
       </tr>
	
	<tr>
	   <td><b>PLANT</b></td>
          <td>xxx</td> 
          <td>xxxxxx-xxxxxx-xxxx</td> 
          <td width=100><B>R.O: </B><? echo $jcno;?></td> 
          <td colspan=2><b>DATE</b>
          <? echo $res[28];?></td>

          </tr>
           <tr>
          <td class='blnk' colspan='2'><b>Customer name</b></td>
          <td class='blnk'><? echo $res[16];?></td> 
          <td rowspan='5' colspan='3' width='50%'>For any information contact our,</br>Mr.Rajesh/Mr.Abdul Vahid</br>Phone:93205006/93205007</td> </tr>

          <tr>
          <td class='blnk' colspan='2'><b>Contact No.</b></td>
          <td class='blnk'><? echo $res[21];?></td>
          </tr>
     
          <tr>
          <td class='blnk' colspan='2'><b>Vehicle No.</b></td>
          <td class='blnk'><? echo $res[4];?></td>
          </tr>

          <tr>
          <td class='blnk' colspan='2'><b>Model</b></td>
          <td class='blnk'><? echo $res[3];?></td>
          </tr>

          <tr>
          <td class='blnk' colspan='2'><b>Model Name</b></td>
          <td class='blnk'><? echo $res[2];?></td>
          </tr>

          <tr>
           <td colspan='6' >While your vehicle was in our service station ,our techncians noted the following areas which require attention to ensure continued trouble free motoring</td>
          </tr>
   
          <tr align='center'>
           <th width=3%>S.No<th colspan='3' >OBSERVATIONS</td><TD>E/R/D</th><th>Appx.Cost(OMR)</th>
         </tr>
          <?
         $i=1;
         while($res1=mysqli_fetch_row($re1)){
 
          print"<tr><td class='blnk' height='17' align='center'>".$i."</td><td class='blnk' colspan='3'>$res1[2]</td><td class='blnk'>E</td><td class='blnk'></td></TR>";

         $i++;
        }

           for($j=$i;$j<20;$j++){

      print"<tr><td class='blnk' height='17'></td><td class='blnk' colspan='3'></td><td class='blnk'></td><td class='blnk'></td></TR>";
}
           

          ?>
        <tr>
          <td colspan='6' class='blnk' height=40></td>
       </tr>

           
         <tr><td  colspan=2 class='blnk' align='center'><a style="background-color:#D0D0D0;border:1px solid black ;margin-left:20px;width:150px; ">E:Essential/Safety related</a></td>
            <td class='blnk' colspan=2 align='center'> <a  style="border:1 solid black;width:100%;width:150px;">R:Recommended</a></td>
              &nbsp;<td class='blnk' colspan='2' align='center' ><a style=" border:1 solid black;width:70%;width:150px; ">D:Desirable</a></td>
           </tr>

          <tr>
          <td colspan='6'  height=120>

           <font ><b>Note:1. The above Observations are based on Visual inspection .Additional jobs ,if any may be required in course of the repairs .<BR>
                           
                       2. Above quoted costs are approximate .<BR>
                       3.Should You wish to arrange for repairs and/or discuss these observations in detail ,Please Contact our reception.</font><BR><BR>
                       <font ><b>BE WITH US SERVE YOU BETTER</b></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      
                      <font size=2><b>For World Wide Automotive Center</b><br>
  <?
                        for($i=1;$i<150;$i++){

                           print "&nbsp;";
                        }
                       ?>

<b>SIC/FIC</b></font>
               
          </td>
       </tr>     

     </table>        




