<?
 session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../ind.php'; </script>";
 return;
}
include("../opendb.php");
include("../test.php");
$re=mysqli_query($db,"select jvno,pno from item_purchase where code='$code' and brcode='$brcode'");
$row=mysqli_fetch_array($re);
mysqli_query($db,"delete from journal2 where jvno='$row[jvno]' and brcode='$brcode'");
mysqli_query($db,"delete from item_purchase where code='$code' and brcode='$brcode'");
log_entry($brcode,$user,$REMOTE_ADDR,"Del item purchase-$pno");
?>
