<?php
session_start();
include "../conexion.php";
$vend_id=$_GET['vend_id'];
$id=$_GET['vend_id']; 

$sql4=mysqli_query($con,"SELECT * from seriales where venta_detalle_vend_id='$vend_id'");
$result4=mysqli_num_rows($sql4);
if($result4>0)
{
    while ($row4=mysqli_fetch_array($sql4))
{ ?>
    <div class="input-group">
        <input type="text" class="form-control" name="serial[]" value="<?php echo $row4['ser_codigo']; ?>" readonly>
        <span class="input-group-addon">
            <a href="#" id="ser-<?php echo $row4["ser_id"];?>"type='button' title="Eliminar"  ><i class="btn-icon-only icon-remove"></i></a>
        </span>            
    </div> <!-- /.form-group -->
    </br>
<script>
    $("#ser-"+<?php echo $row4["ser_id"];?>).click(function(e){
    e.preventDefault();
    p = confirm("Estas seguro de eliminar?");
    if(p){
    $.get("php_ventas/eliminar_serial.php","ser_id="+<?php echo $row4["ser_id"];?>,
    function(data){
    loadserial();
    loadserial2();
    loadserial3();
    });
    }
    });
</script> 
<?php } }?>