<section class="content">
	<div class="container-fluid">
	<div class="row">
	    <div class="col-lg-12 col-md-12 col-sm-12 col-12">
		    <div class="card">
		        <div class="card-header">
				
					<div  id="filtroregistros">
						<form id="for_fil_pro" method="POST">
						
						
							<div class="row">
							
						<div class="col-lg-2 col-6">
							<label>Busqueda:</label>
							<input name="txt_fil_pro_dat1" autocomplete="off" type="text" id="txt_fil_pro_dat1" class="form-control">
						</div>

						<div class="col-lg-2 col-6">
							<label>-</label>
							<input name="txt_fil_pro_dat2" autocomplete="off" type="text" id="txt_fil_pro_dat2" class="form-control">
						</div>

						<div class="col-lg-2 col-6">
							<label>Laboratorio:</label>
							<input name="txt_fil_mar" type="text" autocomplete="off"  id="txt_fil_mar" class="form-control">
						</div>
						
                        	
							<div class="col-lg-2  col-ms-4 col-6">
								<label>Almacén:</label>
								<select name="cmb_fil_alm_id" autocomplete="off" id="cmb_fil_alm_id" class="form-control input-sm"  ></select>
							</div>	
							
							<div class="col-lg-2 col-sm-2 col-6">
							<label>N° Filas:</label>
							<select name="cmb_fil_lim" id="cmb_fil_lim" style="cursor:pointer;" class="form-control">
								<option value="">-Todos-</option>
								<option value="20">20</option>
								<option value="50" selected="selected">50</option>
								<option value="100">100</option> 
								<option value="500">500</option>
							</select>
						</div>
						
						
							<div class="col-lg-2 col-6" style="display: inline-block; white-space: nowrap;padding-top:30px;">
								<span onClick="stockvalorizado_tabla()" class="btn btn-primary btn-sm" ><i class="fa fa-search"></i></span>
								<span onClick="stockvalorizado_filtro()" class="btn btn-default btn-sm">RESTABLECER</span>
							</div>
						
							</div>	
							
						</form>
						
					</div>
					
				</div>
			</div>
		</div>
	</div>
	</div>
</section>
<script type="text/javascript">
	
	

	
	function cmb_fil_alm_id()
	{	
		$.ajax({
			type: "POST",
			url: "../almacen/cmb_alm_id.php",
			async:false,
			dataType: "html",                      
			data: ({
				alm_id: '<?php echo $alm_id?>'
			}),
			beforeSend: function() {
			//$('#cmb_fil_pro_alm').html('<option value="">Cargando...</option>');
		},
		success: function(html){
			$('#cmb_fil_alm_id').html(html);
			$('#cmb_fil_alm_id').val(1);
		},
		complete: function(){
		}
	});
	}
	$(function() {
		
		cmb_fil_alm_id();
		stockvalorizado_tabla();
		
		$("#txt_fil_pro_nom").focus();
		$( "#txt_fil_pro_nom" ).autocomplete({
			minLength: 1,
			source: "../producto/producto_complete_nom.php",
			select: function() {
				stockvalorizado_tabla();
			}
		});
		
		
		$( "#txt_fil_pro_dat1" ).keydown(function(e){
			if(e.which==13)
			{
				
				stockvalorizado_tabla();
				e.preventDefault();
			
			}
		});
		
			$( "#txt_fil_pro_dat2" ).keydown(function(e){
			if(e.which==13)
			{
				
				stockvalorizado_tabla();
				e.preventDefault();
			
			}
		});
		
		
			$( "#txt_fil_pro_dat3" ).keydown(function(e){
			if(e.which==13)
			{
				
				stockvalorizado_tabla();
				e.preventDefault();
			
			}
		});
		
		$( "#txt_fil_pro_dat4" ).keydown(function(e){
			if(e.which==13)
			{
				
				stockvalorizado_tabla();
				e.preventDefault();
			
			}
		});
		
		
		$( "#txt_fil_mar" ).keydown(function(e){
			if(e.which==13)
			{
				
				stockvalorizado_tabla();
				e.preventDefault();
			
			}
		});
		
		
		
		
		
	});
</script>