<?php include('common/header.php'); ?>
  <!-- Main Sidebar Container -->
<?php include('common/sidenav.php'); ?>


<?php
include('includes/config.php');

$id = $_GET['id'];
$vendorid = $_GET['vendorid'];
$query = "DELETE FROM vendorAdditional_balance WHERE vab_id = '$id'";
$result = $con->query($query);

if ($result) {
   // echo "<script>alert('Record Successfully Deleted');</script>";
    //echo "<script>location.href='vendorbalance.php?id=$vendorid';</script>";
    
     echo "<div class='container'><div class='custom-alert'>Record Successfully Deleted!</div></div>";
        echo "<script>setTimeout(function() { window.location.href='vendorbalance.php?id=$vendorid'; }, 1000);</script>";  	
    
    
} else {
    //echo "<script>alert('Failed to delete record');</script>";
    //echo "<script>location.href='vendorbalance.php?id=$vendorid';</script>";
    
    
     echo "<div class='container'><div class='custom-alert'>Record Successfully Deleted!</div></div>";
        echo "<script>setTimeout(function() { window.location.href='vendorbalance.php?id=$vendorid'; }, 1000);</script>";  	
    
}
?>

<?php include('common/footer.php'); ?>