<? 
session_start();
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
date_default_timezone_set("Asia/Kolkata");
if(strlen($brcode)<=0)
{
    print "<script> alert('Session timed out'); parent.document.location='../index.php'; </script>";
    return;
}
include("test.php");
include("../opendb.php");
include ("../test.php");
$invno=$_REQUEST['trnsno'];
$invstrtdt=$_REQUEST['invstrtdt'];
$invenddt=$_REQUEST['invenddt'];
$transdist=$_REQUEST['transdist'];
$vehicleno=$_REQUEST['vehno'];
$docno=$_REQUEST['docno'];
$deleterec=$_REQUEST['deleterec'];



if($deleterec!='')
{      
    $id = array();
	$id = $_REQUEST['del'];
    if (count($id) > 0)
  	{
  	    $myJSON.='[';
        foreach ($id as $id2)
     	{
     	    //print "delete from tbl_einvoice where invno='$id2' and brcode='$brcode'";
            mysqli_query($db,"delete from tbl_einvoice where invno='$id2' and brcode='$brcode'");

     	}
  	}
  	
}
print "<script>document.location='sap_del_einvoice.php'</script>";
return;
    
?>
