<script type="text/javascript">
    $( "#cvearticulo" ).autocomplete({

        source: function (request, response) {
            $.ajax({
                url: '<?php echo site_url('captura/busca_cveArticulo'); ?>',
                dataType: "json",
                data: {
                    term : request.term
                },
                success: function(data) {
                    response(data);
                }
            });
        },
        minLength: 2,
        select: function( event, ui ) {

            window.location.replace('<?php echo site_url('cliente/inventario_articulo'); ?>' + '/' + ui.item.id);
            return false;
    
        }
    });
</script>