<?php 
include("../../include/dbconnect.php");
?>
<title> Schedules 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 >Enquiry edit</font></td>
</tr><tr valign="top"><td colspan=2>
<font >&nbsp;</font>
</td>
</tr>
</table>
<table border="1" cellspacing="1" cellpadding="3" align="center" width="600" bgcolor="#999999">
        
<form name="form1" method="POST"  action="update.php?record=<?echo($record);?>">

<?php 

$result = mysql_query("select distinct enquiry.record, enquiry.enquiry_refno, enquiry.enquiry_refdt, enquiry.enquiry_open, enquiry.tools_cost, enquiry.quot_sub_dt, enquiry.quot_refno, enquiry.quot_refdt, enquiry.quot_rev_by, enquiry.order_sub_dt, enquiry.diff_order_quot, enquiry.Details_cus, enquiry.order_refno, enquiry.sample_give_dt, enquiry.approv_by, enquiry.amend_dt, enquiry.amend_details, enquiry.amend_comm
 FROM enquiry where record ='$record'") or die(mysql_error());

 $row1=mysql_fetch_row($result);
?>

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

<tr><td width="210"  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Enquiry Ref No </font></td><td width="300"  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="enquiry_refno" value = <?php echo("'$row1[1]'");?>>  </td></tr>
<?
$refdt = $row1[2];
$enqrefdt = substr($refdt,8,2).'-'.substr($refdt,5,2).'-'.substr($refdt,0,4);
?>
<tr><td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Enquiry Ref Date </font></td><td  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="enqrefdt" value = <?php echo ("$enqrefdt") ?> >  </td></tr>

<tr><td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Tools Cost </font></td><td  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="tools_cost" value = <?php echo("'$row1[4]'");?>>  </td></tr>

<?
if ($row1[5]==0)
{
 $qsubdt = date(d).'-'.date(m).'-'.date(Y); 
}
else
{
$qdt = $row1[5];
$qsubdt = substr($qdt,8,2).'-'.substr($qdt,5,2).'-'.substr($qdt,0,4);
}
?>

<tr><td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Quotation to be Submitted on(date) </font></td><td  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="qsubdt" value = <?php echo( "$qsubdt" );?>>  </td></tr>



<tr><td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Quotation Ref No.</font></td><td  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="quot_refno" value = <?php echo("'$row1[6]'");?>>  </td></tr>

<?
if ($row1[5]==0)
{
 $qrefdt = date(d).'-'.date(m).'-'.date(Y); 
}
else
{
$qdt = $row1[5];
$qrefdt = substr($qdt,8,2).'-'.substr($qdt,5,2).'-'.substr($qdt,0,4);
}
?>

<tr><td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Quotation Ref Date</font></td><td  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="qrefdt" value = <?php echo("$qrefdt");?>>  </td></tr>


<tr><td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Reviewed By</font></td><td  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="quot_rev_by" value = <?php echo("'$row1[8]'");?>>  </td></tr>

<?
if ($row1[5]==0)
{
 $odt = date(d).'-'.date(m).'-'.date(Y); 
}
else
{
$oodt = $row1[5];
$odt = substr($oodt,8,2).'-'.substr($oodt,5,2).'-'.substr($oodt,0,4);
}
?>

<tr><td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Order Acceptance received on</font></td><td  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="odt" value = <?php echo("$odt");?>>  </td></tr>

<tr><td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Difference between order / quotation </font></td><td  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="diff_order_quot" value = <?php echo("'$row1[10]'");?>>  </td></tr>

<tr><td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Detaialls of resolution with customer Regret</font></td><td  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="Details_cus" value = <?php echo("'$row1[11]'");?>>  </td></tr>

<tr><td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Order Ref </font></td><td  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="order_refno" value = <?php echo("'$row1[12]'");?>>  </td></tr>

<?
if ($row1[5]==0)
{
 $srefdt = date(d).'-'.date(m).'-'.date(Y); 
}
else
{
$sdt = $row1[5];
$srefdt = substr($sdt,8,2).'-'.substr($sdt,5,2).'-'.substr($sdt,0,4);
}
?>

<tr><td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF"  color="#0033FF">Sample Should be given on</font></td><td  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="srefdt" value = <?php echo("$srefdt");?>>  </td></tr>

<tr><td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Reviewed and Approved by </font></td><td  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="approv_by" value = <?php echo("'$row1[14]'");?>>  </td></tr>


<?
if ($row1[5]==0)
{
 $amddt = date(d).'-'.date(m).'-'.date(Y); 
}
else
{
$dt = $row1[5];
$amddt = substr($adt,8,2).'-'.substr($adt,5,2).'-'.substr($adt,0,4);
}
?>
<tr><td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Amendment Details Date</font></td>
<td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Details of Amendment</font></td>
<td  bgcolor="#FFFFFF"><font class="sbd" face="Arial, Helvetica, sans-serif"  color="#0033FF">Communicated to</font></td>
</tr>
<tr>
<td  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="amddt" value = <?php echo("$amddt");?>>  </td>
<td  bgcolor="#FFFFFF">
<input type="text"    onKeyPress="return event.keyCode!=13"   size='20' name="amend_details" value = <?php echo("'$row1[16]'");?>>  </td>
<td  bgcolor="#FFFFFF">
  <input type ="text" name="amend_comm" size='20' onKeyPress="return event.keyCode!=13" value =<?php echo("'$row1[17]'");?> > </td></tr>

  <tr> 
    <td align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Open Enquiry</b></font></td>
    <td> <input type="radio"    onKeyPress="return event.keyCode!=13"   name="enquiry_open" value = "No" checked> <font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>No 
    </b></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="radio"    onKeyPress="return event.keyCode!=13"   name="enquiry_open" value = "Yes"> <font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Yes
      </b></font>&nbsp;</td>
  </tr>  


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

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