<?php include("../../include/dbconnect.php"); 
if($cnf=='Yes')
{

$result1="insert into ctrading  (select * from trading where trans_id='$trans_id' and account_year='$account_year')";
//echo "$result1";
	mysqli_query($conn,$result1) or die (mysqli_error());


$result="delete from trading where trans_id='$trans_id' and account_year='$account_year'";
//echo "$result";
		mysqli_query($conn,$result) or die (mysqli_error());
		
$result="delete from ledger where trans_id='$trans_id' and account_year='$account_year'";
//echo "$result";
		mysqli_query($conn,$result) or die (mysqli_error());		
		
$result="delete from stktrans where trans_id='$trans_id' and account_year='$account_year'";
//echo "$result";
		mysqli_query($conn,$result) or die (mysqli_error());			
		
$result="delete from cform where trans_id='$trans_id' and account_year='$account_year'";
//echo "$result";
		mysqli_query($conn,$result) or die (mysqli_error());				
}		
		
?>
<script language="JavaScript">
close();
</script>
<meta http-equiv="refresh" content="0 url=inv_cancel_select.php">
