<?php 
session_start(); 
require_once('../conexion.php');
require_once('../include/sesiones.php');
$tarifa_select=$_POST['tarifa_select'];
$cot_id3=$_POST['cot_id3'];
$sql=mysqli_query($con, "SELECT * from cotizacion_detalle where cotizacion_cot_id='$cot_id3' and cotd_tipo='articulo' and empresa='$empresa'");
while ($row=mysqli_fetch_array($sql))
{
    $cotd_id=$row["cotd_id"];
    $cotd_art_id=$row['cotd_art_id'];

    $sql2=mysqli_query($con, "SELECT * from precio where articulos_art_id='$cotd_art_id' and tarifas_tar_id='$tarifa_select'");
    $row2=mysqli_fetch_array($sql2);
    $pre_precio=$row2['pre_precio'];

    $sql3=mysqli_query($con,"UPDATE cotizacion_detalle Set cotd_precio='$pre_precio' Where cotd_id='$cotd_id'") or die(mysqli_error($con)); 
}
echo '<div class="alert alert-success alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <strong>Precios!</strong> Modificado correctamente.
      </div>';
?>  