<? 
session_start();
$brcode = $_SESSION['brcode'];
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../ind.php'; </script>";
 return;
}

include("../opendb.php");
include("../test.php");

function line()
{
 print "<tr><td colspan=12>";
 for($k=0;$k<=200;$k++)
 print "<b>-</b>";
}
$invno=$_REQUEST['invno'];
$result=mysqli_query($db,"select * from scert where invno='$invno' and brcode='$brcode'");
$row=mysqli_fetch_array($result);

$f=mysqli_query($db,"select * from veh_master where mcode='$row[model_code]' and brcode='$brcode'")or die(mysqli_error());
 $row1=mysqli_fetch_array($f);


$re=mysqli_query($db,"select * from branch where brcode='$brcode'");
$brow=mysqli_fetch_array($re);
$branch=$brow['brname'];
?>

<style>
td,body{font-family:arial;background-color:white;font-size:14}
</style>
<table width=70% BORDER=0>


<tr><td align=center COLSPAN=2><span style={letter-spacing:8}> <font size=5>
    <br> <br> <br> <br> <br><br>
<?
//print "SALE CERTIFICATE ";
?>
</TABLE>

<?

$r=mysqli_query($db,"select * from cust_master where custname='$row[custname]' and branch='$brcode'");
$cus_row=mysqli_fetch_array($r);
?>

<table><tr><td><b>No. <? echo $row['invno'] ?></b></td></tr></table>
<?

line();
print "<br>";


print "Certified that EICHER <b><font size=3> $row[vehconfig]</font></b> has been delivered by us to";
?>

<?
print "<br>Address (Permanent) : <br>";
?>
<blockquote>
<? 
print $row['custname'].'<br>';
print $row['custaddr'].'<br>';  
?>

</blockquote>

<?
print "Address (Temporary) : <br>";

if($cus_row['addrtmp']=='')
{

 print "--------do--------";

}
else

{
?>
<blockquote>
<? print $cus_row[19]?>
</blockquote>
<?
}

?>
</table>
<br><br>
The Vehicle is held under agreement of hire purchase/lease/hypothecation:
<blockquote><b>
<?

 $fff=mysqli_query($db,"select city from fin_master where finname='$row[financer]' and branch='$brcode'")or die(mysqli_error());
 $fi_row=mysqli_fetch_row($fff);

 

print $row['financer'].','.$fi_row[0]?>
</b></blockquote>
<?
line();
print "<br>";
?>
<style>
td,body{font-family:arial;background-color:white;font-size:14}
</style>
The details of the Vehicle are given

<table border=0 width=70%>
<tr><td>1.  Class of Vehicle</TD><TD>: <font size=3><?print $row['class']?></td></tr>
<tr><td>2.  Makers name</TD><TD>:<font size=3> <?print $row['manufacturer']?></td></tr>
<tr><td>3.  Chassis number</TD><TD>:<font size=3> <?print $row['chasis']?></td></tr>
<tr><td>4.  Engine number</TD><TD>:<font size=3> <?print $row['engno']?></td></tr>
<tr><td>5.  Horse power/cubic capacity</TD><TD>:<font size=3> <?print $row['horse']?></td></tr>
<tr><td>6.  Fuel used</TD><TD>:<font size=3> <?print $row['fuel']?></td></tr>
<tr><td>7.  Number of cylinders</TD><TD>:<font size=3> <?print $row['cylinders']?></td></tr>
<tr><td>8.  Month and Year of manufacture</TD><TD>:<font size=3> <?print $row['yearofman']?></td></tr>
<tr><td>9.  Seating capacity (including driver)</TD><TD>:<font size=3> <?print $row['seats']?></td></tr>
<tr><td>10. Unladen weight</TD><TD>:<font size=3> <?print $row['uweight']?></td></tr>
<tr><td>11. Maximum axle weight and - Fro</TD><TD>:<font size=3> <?print $row['fronttyre']?></td></tr>
<tr><td><blockquote>Number and description of tyres</blockquote></TD><TD>:<font size=3> <?print $row['reartyre']?></td></tr>
<tr><td><blockquote>(In case of transport Vehicle)</blockquote></TD><TD>:<font size=3> </td></tr>
<tr><td><blockquote>(a)Front axle</blockquote></TD><TD>:<font size=3> <?print $row['frontaxle']?></td></tr>
<tr><td><blockquote>(b)Rear axle</blockquote></TD><TD>:<font size=3> <?print $row['rearaxle']?></td></tr>
<tr><td><blockquote>(c)Any other axle</blockquote></TD><TD>:<font size=3> <?print $row['otheraxle']?></td></tr>
<tr><td><blockquote>(d)Tandem axle</blockquote></TD><TD>:<font size=3> <?print $row['tandemaxle']?></td></tr>
<tr><td>12. Gross Combination Weight</TD><TD>:<font size=3> <?print $row['gcw']?></td></tr>
<tr><td>13. Colour/colours of body</TD><TD>:<font size=3> <?print $row['color']?></td></tr>
<tr><td>14. Gross vehicle weight</TD><TD>:<font size=3> <?print $row['grosswgt']?></td></tr>
<tr><td>15. Type of Body</TD><TD>:<font size=3> <?print $row['bodytype']?></td></tr>
<tr><td>16. WheelBase</TD><TD>:<font size=3> <?print $row['wheelbase']?></td></tr>
<tr><td>17. Invoice Value</TD><TD>:<font size=3> <?print $row['invvalue']?></td></tr>
</TABLE>
<?
line();
print "<br>";
$entrydt=implode('-', array_reverse(explode('-', $row['entrydt'])));
?>
<table width=80%>
<tr><td> <font size=3><B>Date: <?print $entrydt ?></B></font></td><td align=right> For <?print $branch ?></td></tr>
<tr><td colspan=3 ALIGN=right><BR><BR><BR>Authorised Signatory</td></tr>

</TABLE>
<BR>&nbsp;
