<?php
session_start();
include "../conexion.php";
include('../include/sesiones.php');

$cot_id=limpiar($_GET['id']);
$can=mysqli_query($con,"SELECT * FROM cotizacion_detalle where cotizacion_cot_id='$cot_id'") or die(mysqli_error($con));  
$dato=mysqli_fetch_array($can);
$cotd_id=$dato['cotd_id'];

$borrar_sql=mysqli_query($con,"DELETE FROM cotizacion_detalle_lote WHERE cotd_id_detalle='$cotd_id'") or die(mysqli_error($con)); 
$borrar_sql=mysqli_query($con,"DELETE FROM cotizacion_sabores_combo WHERE cot_id='$cot_id'") or die(mysqli_error($con));
$borrar_sql=mysqli_query($con,"DELETE FROM cotizacion_detalle_combo WHERE cot_id='$cot_id'") or die(mysqli_error($con));
$borrar_sql=mysqli_query($con,"DELETE FROM cotizacion_sabores_producto WHERE cot_id='$cot_id'") or die(mysqli_error($con));
$borrar_sql=mysqli_query($con,"DELETE FROM cotizacion_detalle WHERE cotizacion_cot_id='$cot_id'") or die(mysqli_error($con));
$borrar_sql=mysqli_query($con,"DELETE FROM cotizacion WHERE cot_id='$cot_id'") or die(mysqli_error($con));

    echo '<div class="alert alert-danger alert-dismissable">
    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
    <strong>Reserva!</strong> Eliminada correctamente.
    </div>';
?>