<?php

include '../../../script/conexion.php';

$id_compra = $_POST['id_compra'];
$id = $_POST['id'];

$sql1 = "DELETE FROM alm_compra_detalle WHERE id='$id'";
if ($conn->query($sql1) === TRUE) {
    echo '<script language = javascript>
                        self.location = "../compra-detalle.php?id_compra=' . $id_compra . '"
                </script>';
} else {
    echo "Error: " . $sql1 . "<br>" . $conn->error;
}
