<?php


session_start();
if($HTTP_SESSION_VARS['dbName']==""){
header("location:../index.php");
}

include("config.inc.php");

$connection = mysql_connect($config['dbServer'],$config['dbUser'],$config['dbPass'])
		or die("Could not connect to DB");
mysql_select_db($HTTP_SESSION_VARS['dbName'],$connection) or die("Could not find DB");




$string = "delete from purchasesserialno where serial_id = ".$purchasesserialno_id;

$result=mysql_query($string,$connection)		or die(mysql_error());

$string = "update transferdt set TransferDt_Quantity = TransferDt_Quantity - 1 where transferdt_id = ".$tansferdtid;
$result=mysql_query($string,$connection)		or die(mysql_error());




header ("Location: ./ItemSerialNumberPopup.php?type=$type&itemcode=$itemcode&transferdtid=$tansferdtid&edit=$edit&deleted=yes");


?>