<?php

date_default_timezone_set('America/Lima');

session_start();



$y=date('Y');

$m=date('m');

$d=date('d');



$fec1="$d-$m-$y";

$fec2="$d-$m-$y";





require_once("../formatos/formato.php");



?>



<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">

						

						 <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">

						<form name="for_fil_prov" id="for_fil_prov" target="_blank" method="post">

																		

							<div class="col-lg-12 col-xs-12">

								<input type="hidden" id="hdd_fil_pro_id" name="hdd_fil_pro_id" />

								<label for="txt_fil_pro">Proveedor:</label>

								<input type="text" id="txt_fil_pro" name="txt_fil_pro" class="form-control"  /> 

							</div>

						

							  

						</form>	

						</div> 

						

						

						<div style="display: inline-block; white-space: nowrap;padding-top: 30px;" class="col-lg-2 col-sm-3 col-xs-6">		

								<button href="#" onClick="proveedor_tabla()" title="Mostrar busquedas." class="btn btn-primary "><i class="fas fa-search"></i></button>

								<button href="#" onClick="proveedor_filtro()" title="Restablecer filtro." class="btn btn-default">Restablecer</button>

						</div> 

						

					</div>

				</div>

			</div>

		</div>

	</div>

	</div>

</section>



<script type="text/javascript">







	

	$(function(){



	

		$( "#txt_fil_pro" ).autocomplete({

			minLength: 1,

			source: "../proveedor/proveedor_complete_nom.php",

			select: function(event, ui){

				$("#hdd_fil_pro_id").val(ui.item.id);	

				proveedor_tabla();													

			}

		});



		

		$("#txt_fil_pro").keydown(function(e){

			if (e.which == 13){proveedor_tabla();return false;}

		});





		

	});	

</script> 