<?php 
    require '../../conexion.php';

    $documentos = consultas::get_datos("select * from v_cobros where id_cliente=".$_REQUEST['vcliente']." and id_doc = 1 and id_cobro not in(select id_cobro from remision_nota_venta where nr_estado != 'ANULADO')");    
?>
                <label class="control-label">N° Comprobante de Venta</label>
                <select name="vid_cobro" id="vid_cliente" class="select2 form-control" required="" style="width: 100%">
                    <option value="">Seleccione un comprobante</option>
                    <?php if (!empty($documentos)) {
                        foreach ($documentos as $doc) { ?>
                            <option value="<?php echo $doc['id_cobro']; ?>">
                                <?php echo $doc['nro_documento']; ?></option>
                            <?php
                        }
                    } else {
                        ?>
                        <option value="">No existen registros</option>
                    <?php } ?>
                </select>                
<script type="text/javascript">    
    $(".select2").select2();
</script>