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

$startdt = us($startdt);
$enddt = us($enddt);

if ($submit == "Submit")
{
	if(!empty($code))
	{
		$query="insert into branches values ('$code','$name','$actual_name','$startdt','$enddt','$account_year','$cenvat_starts','$cenvat_regno','$ssi_no','$city','$pin','$phone','$fax','$email','$branch_serial','Yes','$compcode','$service_tax_no','$pan_no','$tan_no','$tin_no','$gstin','$cst_no','$acctcode',NULL)";
		mysqli_query($conn,$query) or 	die(mysqli_error());
		
		$query = "update  company set cenvat_starts ='$cenvat_starts',account_year = '$account_year', cenvat_regno = '$cenvat_regno',servicetax_regno = '$service_tax_no',ssi_no = '$ssi_no',tin = '$tin_no', gstin='$gstin',cst='$cst_no' where compcode = '$compcode'  ";
		mysqli_query($conn,$query)  or   die(mysqli_error());		
	}
}
?>
<meta http-equiv="refresh" content="0 url=index.html">

