<?php
include('config.php');
include('code.php');


if(isset($_GET['code']))
$code=$_GET['code'];
if(isset($_GET['bcode']))
$bcode=$_GET['bcode'];


$sql =$link->query("delete from cart where BranchCode='$bcode' and code='$code'");

			echo "<script>location='pos.php'</script>";
//=============================================================================================================================================================================
/*$sql =$link->query("select * from emptystockreport where BranchCode='$bcode' and date='$date'");
$num = mysqli_num_rows($sql);
		if($num<1){
		$result=mysqli_query($link,"select * from empty where BranchCode='$bcode'");
				$prev=0;
				while($reply = mysqli_fetch_array($result)){
					$code=$reply['code'];
					$name=$reply['name'];
					$quan=$reply['quantity'];
					
					$sql =$link->query("insert into emptystockreport values('NULL', '$bcode','$date','$code','$name','$quan','0','0',$mon,$yr,'$officer')");
					
				}
				
				echo "<script>alert('Stock  Succesfully Open')</script>";
			echo "<script>location='dashboard.php'</script>";
}else{
	
	echo "<script>alert('Stock Has Been Opened Today')</script>";
			echo "<script>location='dashboard.php'</script>";
}*/

?>