<?php include("../../include/dbconnect.php"); 

$bq=mysqli_query($conn,"select taxtype, description, tax from salestax where taxtype = '$ttype' ") or die(mysqli_error());
$br = mysqli_fetch_row($bq);
$tax_percent = $br[2];


if ( isset($submit) && $submit == "Update")
{
   $result=mysqli_query($conn,"update tpurch set mrp = '$mrp',exp_date = '$exp_date',batch_no = '$batch_no',manufact = '$manufact', compcode = '$compcode',bcode ='$bcode',accthead = '$accthead',  qty ='$qty',rate ='$rate',amount = '$amount',discount_percent = '$discount_percent',tax_type = '$ttype', tax_percent = '$tax_percent' where record ='$record'") or die(mysqli_error());
}
elseif (isset($submit) && $submit == "Delete")

{
$result=mysqli_query($conn,"delete from tpurch where record='$record'") or
die(mysqli_error());
}

?>
<meta http-equiv="refresh" content="0 url=editview.php?mypono=<?=$mypono?>&account_year=<?=$account_year?>&trans_id=<?=$trans_id?>&compcode=<?=$compcode?>&myPurgl=<?=$myPurgl?>">
