<?php ob_start(); session_start(); ?>
<?php
include "layouts/db_connect.php";
session_start('ERP');
		 if(isset($_SESSION['code'])) {
	  $code = $_SESSION['code'];
	  $scode = $_SESSION['code'];
	   $mfin = $_SESSION['mfin'];
		$staff = $_SESSION['name'];
		 $postt = $_SESSION['postt'];
	}
	
$idd = $_GET['idd'];
$idd2 = $idd + 1;
$idd3 = $idd + 2;
$idd4 = $idd + 3;

mysqli_query($conn, "DELETE FROM voucher where mfin='$mfin' && id = '$idd'");						
mysqli_query($conn, "DELETE FROM voucher where mfin='$mfin' && id = '$idd2'");
mysqli_query($conn, "DELETE FROM voucher where mfin='$mfin' && id = '$idd3'");
mysqli_query($conn, "DELETE FROM voucher where mfin='$mfin' && id = '$idd4'");

echo "<script>alert('Cancelled successfully');window.location.href='vvoucher.php'</script><br>";

?>


