<? include("../../include/dbconnect.php"); ?>
<html>
<head>
<title>Add New Profit Centre</title>
<body background="../../images/fibermat.gif">
<center>
<table cellpadding=0 cellspacing=4 width=590>
<tr>
<td style="padding:3px;" colspan=2 background="../../images/g11line21.gif"><font face="Arial, Helvetica, sans-serif" ><b>Add New Profit Centre</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" name="regform" action="entry.php">
<?
$result = mysqli_query($conn,"select max(code) from branches order by code ") or die(mysqli_error());
$row = mysqli_fetch_row($result);
$maxcode = $row[0]+1;
// Pull all the data from Cat master & populate it

$result= mysqli_query($conn," select distinct compcode,name from company  order by name")or die( mysqli_error() );


?>
  
    <tr > 
      <td  width="89" height="31" align="left" ><font color="#003366"  face="Verdana, Arial, Helvetica, sans-serif"><b>Company 
        &nbsp;</b></font></td>
      <td width="186" > <select name='compcode'>
          <?php 
	// echo "<option selected value=\" 0\"> Select Company";	  
      while ( $row1= mysqli_fetch_row($result))
      {
	  	{
			echo "<option value=\"$row1[0]\">$row1[1]";
	  	}
  	 }
?>
      </select> </td>

<tr><td ><font face="Arial, Helvetica, sans-serif" ><b>Profit Centre Code</b></font></td><td>
<input  type="text" onKeyPress="return event.keyCode!=13"  size="7"  readonly name="code" value="<?=$maxcode?>"></td>
</tr>
         
 <tr><td><font  face="Arial, Helvetica, sans-serif"><b>Cenvat Starts from Rs.</b></font></td><td>           
 <input  type="text" onKeyPress="return event.keyCode!=13"   size = "50" name="cenvat_starts" value =<?php echo("'$row[6]'");?>></td></tr>




  <tr>
  <td><font  face="Arial, Helvetica, sans-serif"><b>Cenvat Registration No</b></font></td>
  <td>           
 <input  type="text" onKeyPress="return event.keyCode!=13"   size = "50" name="cenvat_regno" value =<?php echo("'$row[7]'");?>></td></tr> 
 
   <tr>
  <td><font  face="Arial, Helvetica, sans-serif"><b>SSI Registration No</b></font></td>
  <td>           
 <input  type="text" onKeyPress="return event.keyCode!=13"   size = "50" name="ssi_no" value =<?php echo("'$row[8]'");?>></td></tr> 
 

<SCRIPT LANGUAGE="JavaScript" src="../../include/CalendarPopup.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
var cal = new CalendarPopup();
</SCRIPT>

		<tr > 


	<td width="367"  align="left"><div align="right"><font  face="Arial, Helvetica, sans-serif">Accounting Year Start   
	  Date &nbsp;</font> </div></td>
		<td width="357" class="small_site_font_black" > 
		<?
		
		$startdt=strftime ("%d/%m/%Y", mktime(0,0,0,date("m"),date("d"),date("Y"))); ?>
		
		<input name="startdt"  type="text" onKeyPress="return event.keyCode!=13"  class="text_box_button" value="<?=$startdt?>" size="10" > 
		<a href="#" onClick="cal.select(document.regform.startdt,'anchor1','dd/MM/yyyy'); return false;"name="anchor1" id="anchor1"><img  src="../../images/cal.gif" border="0"></a>		</td>
		</tr>
		

		<tr > 


	<td width="367"  align="left"><div align="right"><font  face="Arial, Helvetica, sans-serif">Accounting Year End   
	  Date &nbsp;</font> </div></td>
		<td width="357" class="small_site_font_black" > 
		<?
		
		$enddt=strftime ("%d/%m/%Y", mktime(0,0,0,date("m"),date("d"),date("Y"))); ?>
		<input name="enddt"  type="text" onKeyPress="return event.keyCode!=13"  class="text_box_button" value="<?=$enddt?>" size="10" > 
		<a href="#" onClick="cal.select(document.regform.enddt,'anchor1','dd/MM/yyyy'); return false;"name="anchor1" id="anchor1"><img  src="../../images/cal.gif" border="0"></a>		</td>
		</tr>		

<tr><td ><font face="Arial, Helvetica, sans-serif" ><b>Accounting Year</b></font></td><td>
<input  type="text" onKeyPress="return event.keyCode!=13"  size = "30" name="account_year">&nbsp;&nbsp;Format : 2010-11</td>
</tr>


 <tr>
   <td ><font face="Arial, Helvetica, sans-serif" ><b>Service Tax Registration No</b></font></td>
   <td>
<input  type="text" onKeyPress="return event.keyCode!=13"  size = "50" name="service_tax_no"></td>
</tr>

 <tr>
   <td ><font face="Arial, Helvetica, sans-serif" ><b>PAN No:</b></font></td>
   <td>
<input  type="text" onKeyPress="return event.keyCode!=13"  size = "50" name="pan_no"></td>
</tr>

 <tr>
   <td ><font face="Arial, Helvetica, sans-serif" ><b> TAN No</b></font></td>
   <td>
<input  type="text" onKeyPress="return event.keyCode!=13"  size = "50" name="tan_no"></td>
</tr>

 <tr>
   <td ><font face="Arial, Helvetica, sans-serif" ><b> TIN No</b></font></td>
   <td>
<input  type="text" onKeyPress="return event.keyCode!=13"  size = "50" name="tin_no"></td>
</tr>

 <tr>
   <td ><font face="Arial, Helvetica, sans-serif" ><b> TIN No</b></font></td>
   <td>
<input  type="text" onKeyPress="return event.keyCode!=13"  size = "50" name="gstin"></td>
</tr>

 <tr>
   <td ><font face="Arial, Helvetica, sans-serif" ><b>CST No</b></font></td>
   <td>
<input  type="text" onKeyPress="return event.keyCode!=13"  size = "50" name="cst_no"></td>
</tr>




<table cellpading=0 cellspacing=10 width= 50>
<tr> <blockquote> 
<td>
 <input type =submit name=submit value = "Submit"></td><td><input type="reset" name="reset" value="Clear"></td></blockquote>
</tr></tr></table>

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