<?php include("../../include/dbconnect.php"); 




?>
<center>
<h2><font face="Arial, Helvetica, sans-serif"><b>Invoice Cancellation</font></h2>
<?

$result= mysql_query(" select distinct compcode,name from company  order by name")or die( mysql_error() );

?>

<form name='myForm01' method='POST' action="inv_cancel_update.php?compcode=<?=$myCompany?>&pono=<?=$mypono?>&account_year=<?=$account_year?>&dis='T'&pk='T' ">
<table border=0 cellpadding=3 cellspacing=4 width="568" bgcolor="#E6E6FF">


<?


$aresult = mysql_query("select compcode,account_year from company ");
$arow = mysql_fetch_row($aresult);
$compcode = $arow[0];


$account_year = $arow[1];

// Pull all the data from date master & populate it
$stQuery = mysql_query("select  distinct  salesreg.invdate, salesreg.invno from salesreg where salesreg.account_year = '$account_year'  order by invno, invdate") or die(mysql_error());
?>

<tr>
    <td width="74" height="31" align="left" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b> Select Invoice
      </b></font></td><td>
  <font face="Arial, Helvetica, sans-serif">
<SELECT  name='mypono'>
  
  <?
     echo "<option  selected value=\" 0\"> Select Invoice";
    while($row = mysql_fetch_row($stQuery))
    {

		$temp1 = 'InvoiceNo : '.$row[1].'&nbsp;Dt : &nbsp;'.british($row[0]);
		        echo "<option value=\"$row[1]\">$temp1";

		
    }
?>
</SELECT>
</td>
</tr>

<tr>

<td align=center colspan="100%"> <blockquote>
   <input  type =submit name=submit value = "Submit"></blockquote></td> </tr>
</table>
  
</form>

<center>
  <font size="1" face="Arial, Helvetica, sans-serif"><a href="index.html">Return to Index page </a></font> 
</center>
</body>


