<?php 
include("../../include/dbconnect.php");
?>
<title> Purchase Order details edit</title>
<style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
<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 Order  details edit</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="abc" method="POST"  action="pupdate.php?record=<?echo($record);?>">
<?php 

$result = mysqli_query($conn,"SELECT distinct purch.record,product.prodname,purch.qty,purch.taxamt,purch.netamt,purch.remarks FROM purch,product WHERE purch.record = '$record' and purch.prodcode = product.prodcode ") or die(mysqli_error());
$row1=mysqli_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  face="Arial, Helvetica, sans-serif">Product Name </font></td><td  bgcolor="#FFFFFF">
<input type="text" onKeyPress="return event.keyCode!=13"   size="40" name="prodname" readonly value = <?php echo("'$row1[1]'");?>>  </td></tr>

<tr><td bgcolor="#FFFFFF"><font  face="Arial, Helvetica, sans-serif">Quantity</font></td><td  bgcolor="#FFFFFF">
<input type="text" onKeyPress="return event.keyCode!=13"   maxlength=12 size="10" name="qty" value = <?php echo("'$row1[2]'");?>></td></tr>

<tr>
  <td height="36"  bgcolor="#FFFFFF"><span class="style1">Issue / Receipt  </span></td>
  <td  bgcolor="#FFFFFF">
    <span class="style1">
<input type="text" onKeyPress="return event.keyCode!=13"   maxlength=20 size="40" name="taxamt" value = <?php echo(round($row1[3],0));?>>
1=&gt;Issue,2=&gt;Receipt,3=>Conversion,4=>Damage</span></td>
</tr>

<tr><td  bgcolor="#FFFFFF"><font  face="Arial, Helvetica, sans-serif">Remarks </font></td><td  bgcolor="#FFFFFF">
<input type="text" onKeyPress="return event.keyCode!=13"   maxlength=20 size="40" name="remarks" value = <?php echo($row1[5]);?>></td></tr>


<tr> <blockquote>
<td align=right>
  <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= "index.html">Return to index page</center></font>
                                                                             
</body>
</form>
