<?php
session_start();
include_once('../opendb.php');
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
if(strlen($user)<=0)
{
  print "<script> alert('Session timed out'); parent.document.location='../index.html'; </script>";
  return;
}
?>
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>PSN Eicher</title>
<style>
.cont
	{
	background-color:#3b5998;

	//background:url(images/bg-inner.jpg) #e9e0c3 repeat-x;
  	width: 100%;position: absolute ;
	height:99%;
    	/* Optional - just for DIV)*/
    	//border: solid 1px #000000;
	-moz-box-shadow: 0px 5px 5px #888;
	-webkit-box-shadow: 0px 5px 5px #888;
	box-shadow: 0px 5px 10px #888;
    }
.tble1 input {
background-color:transparent;
border: 0px solid;
height:20px;
//width:160px;
color:black;
}
.tble1
{
border-collapse:collapse;

}	



</style>



<link type="text/css" href="includes/style1.css" rel="stylesheet" />
      <link type="text/css" href="css/form1.css" rel="stylesheet" />



<body >

<?

  $qry=mysqli_query($db,"select distinct(grno) from sparepurchase where brcode='$brcode' and jvno='0' and taxtype='VAT' and porderno!='VE100' order by grno desc");
?>




<table align='center'>
<form name='f1' action='purchase_edit.php' onsubmit="return validateForm()"  >
           <tr><td> <b>Invoice Number:</b></td><td>
<select id="cid"  name='inno' >
          <option>-Select-</option>
           <?
           while($row=mysqli_fetch_array($qry))
             {
                print "<option>$row[0]</option>";
             }
             ?>
             </select>
</td><td ><input type='submit' name='edit' value='OpenPage' ></td></tr>
</table>







</body>