<section class="content">
	<div class="container-fluid">
	<div class="row">
	    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
		    <div class="card">
		        <div class="card-header">
    		<div class="row">
	        	<input type="hidden" id="hdd_fil_cli_id" name="hdd_fil_cli_id" />
	        	<div class=" col-lg-3 col-6">
                  	<label>Documento:</label>
                  	<input name="txt_fil_cli_doc" id="txt_fil_cli_doc" type="text" class="form-control">
                </div>
	        	<div class=" col-lg-5 col-6">
	                <label>Nombres y Apellidos:</label>
	                <input name="txt_fil_cli_nom" id="txt_fil_cli_nom" type="text" class="form-control">
                </div>
                <div class=" col-lg-3 col-6" style="padding-top:30px;">
                	<button href="#" onClick="cliente_tabla()" class="btn btn-primary"><i class="fa fa-search"></i></button>
					<button href="#" onClick="cliente_filtro()" class="btn btn-default">Restablecer</button>
                </div>
        	</div>
        </div>
      </div>
    </div>
  </div>
  </div>
</section>
<script type="text/javascript">
	$(function(){
		$( "#txt_fil_cli_nom" ).autocomplete({
			minLength: 1,
			source: "../cliente/cliente_complete_nom.php",
			select: function(event, ui){			
				$("#hdd_fil_cli_id").val(ui.item.id);							
				$("#txt_fil_cli_doc").val(ui.item.documento);
				$("#txt_fil_cli_dir").val(ui.item.direccion);
				cliente_tabla();		
			}
		});
		
		$( "#txt_fil_cli_doc" ).autocomplete({
			minLength: 1,
			source: "../cliente/cliente_complete_doc.php",
			select: function(event, ui){			
				$("#hdd_fil_cli_id").val(ui.item.id);							
				$("#txt_fil_cli_nom").val(ui.item.nombre);
				$("#txt_fil_cli_dir").val(ui.item.direccion);		
				cliente_tabla();
			}
		});	
		
		cliente_tabla();
	});	
</script>