<?php
date_default_timezone_set('America/Lima');
	$y=date('Y');
	$m=date('m');
	$d=date('d');
	$fec="$d-$m-$y";
?>
<script type="text/javascript">
	function cmb_fil_alm_id()
	{	
		$.ajax({
			type: "POST",
			url: "../almacen/cmb_alm_id.php",
			async:true,
			dataType: "html",                      
			data: ({
				alm_id: '<?php echo $alm_id?>'
			}),
			beforeSend: function() {
				$('#cmb_fil_alm_id').html('<option value="">Cargando...</option>');
			},
			success: function(html){
				$('#cmb_fil_alm_id').html(html);
			}
		});
	}
	$(function() {
		
		$('#txt_fil_notalm_fec1, #txt_fil_notalm_fec2').datepicker({
			format: 'dd-mm-yyyy',
			autoclose:true
		}).on('changeDate', function(e){
			
		}); 
	
		$('#cmb_fil_notalm_tip, #cmb_fil_alm_id').change(function(){
			notaalmacen_tabla();
		});
		
		cmb_fil_alm_id();
		
	});
</script>
<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">
					
<form name="for_fil_notalm" id="for_fil_notalm">
	
		<div class="row">
		
		<div class=" col-lg-2 col-xs-6 form-group">
                  <label>Fecha 1:</label>

                  <div class="input-group">
                    <div class="input-group-prepend">
                      <span class="input-group-text"><i class="far fa-calendar-alt"></i></span>
                    </div>
                    <input name="txt_fil_notalm_fec1" type="text" id="txt_fil_notalm_fec1" value="<?php echo $fec?>" class="form-control" >
                  </div>
                </div>
				
			<div class=" col-lg-2 col-xs-6 form-group">
                  <label>Fecha 2:</label>

                  <div class="input-group">
                    <div class="input-group-prepend">
                      <span class="input-group-text"><i class="far fa-calendar-alt"></i></span>
                    </div>
                    <input name="txt_fil_notalm_fec2" type="text" id="txt_fil_notalm_fec2" value="<?php echo $fec?>" class="form-control" >
                  </div>
                </div>
				
		
		<div class="col-lg-3 col-xs-6">
		<label for="cmb_fil_alm_id">Almacén</label>
		<select name="cmb_fil_alm_id"  class="form-control" id="cmb_fil_alm_id">
		</select>
		</div>
		<div class="col-lg-2 col-xs-6">	
		<label for="cmb_fil_notalm_tip">Tipo:</label>
		<select name="cmb_fil_notalm_tip" class="form-control" id="cmb_fil_notalm_tip">
			<option value="">-</option>
			<option value="1" <?php if($tip==1)echo 'selected'?>>INGRESO</option>
			<option value="2" <?php if($tip==2)echo 'selected'?>>SALIDA</option>
		</select>
		</div>
		
		
		<div class="col-lg-3 col-xs-12" style="padding-top: 30px;">	
		
		<span onClick="notaalmacen_tabla()" style="cursor:pointer;" class="btn btn-primary" id="btn_filtrar" ><i class="fas fa-search"></i></span>
		<span onClick="notaalmacen_filtro()" style="cursor:pointer;" class="btn btn-default" id="btn_resfil" >Restablecer</span>
		</div>
		
		</div>
	
</form>
					
					</div>
				</div>
			</div>
		</div>
	</div>
	</div>
</section>