<?php 
session_start();
include('../includes/dbcon.php');

$str=" ";

$error=0;

$edate=date("Y-m-d");
$userid=$_SESSION['hrm_id'];

$item_id= trim($_POST['itemid']);
$inv_no= trim($_POST['invref']);
echo $inv_no;


if (!empty($inv_no)){

	if (!empty($item_id)){
		////////////////////////////////
//echo $item_id;

		if (mysqli_query($con,"delete from inv_temp_detail where invd_id=$inv_no and  item_id=$item_id ")or die(mysqli_error($con)))
				{
				
				//echo "<script type='text/javascript'>alert('Successfully Deleted!');</script>";
				echo "<script>document.location='srg_new1.php?inv_no=$inv_no '</script>";
				
				}


		///////////////////////////////////////

	}
}




	

?>