<?
session_start();
//include_once('includes/top.php');
include_once('opendb.php');
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
$pcode=$_REQUEST['code'];
$pcode=trim($pcode);
$qry=mysqli_query($db,"select * from partmaster where partcode='$pcode' ");
print "select * from partmaster where partcode='$pcode'";
$res=mysqli_fetch_array($qry);

?>
<center>
<table cellspacing=1 cellpadding=1 bgcolor=black>
<tr><td align=center bgcolor='white'>
<form name='f1' action='<?print $PHP_SELF?>' method='post' >
<table cellspacing=1 cellpadding=3 >
<th colspan=4><font size=3>PART MASTER</th>
<tr><td>Part Code</td><td><input type=text name='pcode'  size=20 value='<? print $res[0]?>' ></td>
    <td>Part Name</td><td><input type=text name='pname'  size=20 value="<? echo $res['partname'];?>" onKeyPress="return handleEnter(this, event)" onKeyup='chkvalue(this.value)'></td></tr>

<tr><td>Activated</td><td><select name='acti' onKeyPress="return handleEnter(this, event)"><option value="<? echo $res['active'];?>" ><? echo $res['active'];?></option>
<option>A</option><option>D</option></select></td>
<td>Location</td><td><input type=text name='pcat'  size=20 value="<? echo $res['location'];?>" onKeyPress="return handleEnter(this, event)"></td>    
    </tr>
<tr><td>Minimum Order Quantity</td><td><input type=text name='minod'  size=20 value="<? echo $res['reordlevel'];?>" onKeyPress="return handleEnter(this, event)"></td><td>Conversion</td><td><input type=text name='conversion'  size=10 value="<? echo $res['cenvat'];?>" onKeyPress="return handleEnter(this, event)"></td>
    </tr>

<tr><td>SaleRate</td><td><input type=text name='srate'  size=10 onKeyPress="return handleEnter(this, event)"></td><td>PurchaseRate</td><td><input type=text name='prate'  size=10></td>
    </tr>


<th colspan=4><input type=submit value='Save' name='save'>
&nbsp;<input type=submit value='Search' name='sea'>
</td></tr>
</table>
</form>
</td></tr>
</table>


