<?php include("../../include/dbconnect.php");?>
<title>Customer Edit page</title>
<body background="../../images/blater01.gif"  topmargin=0>
<center>
<table cellpadding=0 cellspacing=4 width=590>
<tr>
<td style="padding:3px;" colspan=2 bgcolor="#93BEE2"><font face="Arial, Helvetica, sans-serif" ><b>Edit Customer Details  </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 method="POST" action="update.php"> 
  <?php

$result=mysqli_fetch_array(mysqli_query($conn,"select * from buy where record = '$record' order by name")) or die(mysqli_error());


?>
  <input type="hidden"  name="record1" value = <?php echo($record);?>>
  <input type="hidden"  name="acctmast_record" value = "<?=$result['acctmast_record']?>">  

  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Customer Type</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="buyertype" value = <?php echo("'$result[buyertype]'");?>>
      </font></td>
  </tr>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Customer Name</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="bname" value =<?php echo("'$result[name]'");?>>
      </font></td>
  </tr>

  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Address 1</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="baddress1"  value =<?php echo("'$result[address1]'");?>>
      </font></td>
  </tr>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Address 2</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="baddress2" value =<?php echo("'$result[address2]'");?>>
      </font></td>
  </tr>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>District</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="bcity" value =<?php echo("'$result[city]'");?>>
      </font></td>
  </tr>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>State</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="bstate" value =<?php echo("'$result[state]'");?>>
      </font></td>
  </tr>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Country</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="country" value =<?php echo("'$result[country]'");?>>
      </font></td>
  </tr>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Pin Code</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="10" name="bpin" value =<?php echo("'$result[pin]'");?>>
      </font></td>
  </tr>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>E-mail</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="bemail" value =<?php echo("'$result[email]'");?>>
      </font></td>
  </tr>

  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>PAN No</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="bcst" value =<?php echo("'$result[cst]'");?>>
      </font></td>
  </tr>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>TIN No</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="tin" value =<?php echo("'$result[tin]'");?>>
      </font></td>
  </tr>
  
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>GSTIN </b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="gstin" value =<?php echo("'$result[gstin]'");?>>
      </font></td>
  </tr>
    
  <tr> 
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>TAX TYPE</b></font></font></td>
    <td> 
      <select name="ttype">
      <option value="<?=$result['taxtype']?>"><?=$result['taxtype']?>
      <option value="STATE">Within State
      <option value="INTERSTATE">Inter State
      </option>
      </td>
  </tr>
  </tr>  

  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>State Code</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="10" name="state_code" value =<?php echo("'$result[state_code]'");?>>
      </font></td>
  </tr>
  

  
  
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Incentive (Yes/No)</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="incentive" value =<?php echo("'$result[incentive]'");?>>
      </font></td>
  </tr>


  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Credit Days</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="credit" value =<?php echo("'$result[credit_days]'");?>>
      </font></td>
  </tr>

  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Discount Percentage</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="discount" value =<?php echo("'$result[discount]'");?>>
      </font></td>
  </tr>
    
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Std Code</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="10" name="bstd" value =<?php echo("'$result[std]'");?>>
      </font></td>
  </tr>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Tel No(s)</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="btelno" value =<?php echo("'$result[telno]'");?>>
      </font></td>
  </tr>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Mobile No</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="mobile" value =<?php echo("'$result[mobile]'");?>>
      </font></td>
  </tr>

  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Contact Person</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="contact" value =<?php echo("'$result[contact]'");?>>
      </font></td>
  </tr>
  
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Active</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="active" value =<?php echo("'$result[active]'");?>>
      </font></td>
  </tr>
    
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif"><b>Area Code</b></font></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"    onKeyPress="return event.keyCode!=13"   size="35" name="areacode" value =<?php echo("'$result[areacode]'");?>>
      </font></td>
  </tr>
  <table cellpading=0 cellspacing=10 width= 50>
    <tr> 
      <blockquote> 
        <td> <input type =submit name=submit value = "Update"></td>
        <td><input type =submit name=submit value = "Delete"></blockquote>
  </table>
</table>
<br><br><font size=1><center><a href= "index.html">Return to index page</a></center></font>
                                                                             
</body>
</form>

      
