<?php 
include("../../include/dbconnect.php");
?>
<title> Purchase details edit</title>
<body bgcolor="#ffffff"  topmargin=0>
<center>
<table cellpadding=0 cellspacing=4 width=590>
<tr>
<td style="padding:3px;" colspan=2 bgcolor="#93BEE2"><font ><b>Purchase  details edit</b></font></td>
</tr><tr valign="top"><td colspan=2>
<font >&nbsp;</font>
</td>
</tr>
</table>
<table border=0 cellpadding=3 cellspacing=4 width="590">
<form name="form1" method="POST"  action="update.php?record=<?echo($record);?>">
<?php 

$result=mysql_query("select record,date,prodcode,opbal,prqty,selqty,clbal,invno,rate from stktrans where record = '$record' ") or die(mysql_error());
$row1=mysql_fetch_row($result);
?>

<table border="0" cellspacing="1" cellpadding="4" align="center" width="500" bgcolor="#999999">
        

<input type="hidden" name="record" value="<? echo($row1[0]); ?>">


<tr><td  bgcolor="#FFFFFF"><font class="sbd"><b>Date </b></font></td><td  bgcolor="#FFFFFF">
<input type="text" size="40" name="date" value = <?php echo("'$row1[1]'");?>>  </td></tr>



<tr><td  bgcolor="#FFFFFF"><font class="sbd"><b>Opening Balance  </b></font></td><td  bgcolor="#FFFFFF">
<input type="text" maxlength=8 size="10" name="opbal" value = <?php echo($row1[3]);?>></td></tr>


<tr><td  bgcolor="#FFFFFF"><font class="sbd"><b>Produced Qty</b></font></td><td  bgcolor="#FFFFFF">
<input type="text" size="40" name="prqty" value = <?php echo("'$row1[4]'");?>>  </td></tr>

<tr><td  bgcolor="#FFFFFF"><font class="sbd"><b>Consumed Qty </b></font></td><td  bgcolor="#FFFFFF">
<input type="text" size="40" name="selqty" value = <?php echo("'$row1[5]'");?>>  </td></tr>

<tr><td  bgcolor="#FFFFFF"><font class="sbd"><b>Closing Balance</b></font></td><td  bgcolor="#FFFFFF">
<input type="text" size="40" name="clbal" value = <?php echo("'$row1[6]'");?>>  </td></tr>

<tr><td  bgcolor="#FFFFFF"><font class="sbd"><b>Bill No</b></font></td><td  bgcolor="#FFFFFF">
<input type="text" size="40" name="bill_no" value = <?php echo("'$row1[7]'");?>>  </td></tr>

<tr><td  bgcolor="#FFFFFF"><font class="sbd"><b>Rate</b></font></td><td  bgcolor="#FFFFFF">
<input type="text" size="40" name="rate" value = <?php echo("'$row1[8]'");?>>  </td></tr>



<tr>
<td align=right>
 <blockquote>  <input  type =submit name=submit value = "Update"></td> <td><input type =submit name=submit value = "Delete"></blockquote>
</table>

<br><br><font size=1><center><a href="/wilson/stores.html">Return to Index page</center></font>
</body>
</form>
