<? 
session_start();
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../index.php'; </script>";
 return;
}
include("test.php");
include("../opendb.php");
include ("../test.php");
$re1=mysqli_query($db,"select distinct(invno) from spareinvoice where brcode='$brcode'");
?>

<center>
<form action='eway_sprinvoice.php' method='POST' onSubmit="return valid()">
<table cellspacing=1 cellpadding=2 class='form'>
<tr height=21><td colspan=2 align=center bgcolor='steelblue'><FONT COLOR=white><B>Spare Invoice</td></tr>
</td></tr>
<tr><td>Inovice No.</td><td><input type=text name='trnsno' size=40 onKeyPress="return handleEnter(this, event)">
<?
/*
while($row=mysqli_fetch_row($re1))
{
 print "<option>$row[0]</option>";
}
*/
?>
</td></tr>


<tr><td>Transporter Name</td><td><input type=text name='trnspnm' size=40 onKeyPress="return handleEnter(this, event)"></td></tr>
<tr><td>Transporter Id</td><td><input type=text name='transid' size=40 onKeyPress="return handleEnter(this, event)"></td></tr>
<tr><td>Distance</td><td><input type=text name='transdist' size=40 onKeyPress="return handleEnter(this, event)"></td></tr>

<tr><td>Doc. No</td><td><input type=text name='docno' size=40 onKeyPress="return handleEnter(this, event)"></td></tr>

<tr><td>Vehicle No </td><td><input type=text name='vehno' size=40 onKeyPress="return handleEnter(this, event)"></td></tr>






<tr><td colspan=2 align=center bgcolor='lightsteelblue'>
<input type=submit value='Save' name='sv'> <input type=button value='Cancel'>
</td></tr>
</table>
</form>


</td></tr></table>
