<div class="content-header" >
      <div class="container-fluid">
        <div class="row mb-2">
		 <div class="col-sm-6">
			<h1>
			Kardex
			<small>modulo</small>
			</h1>
		</div>	
		
		<div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
				<li class="breadcrumb-item" >Inicio</li>
				<li class="breadcrumb-item" >Almacen</li>
				<li class="breadcrumb-item active">Kardex</li>
            </ol>
          </div>
		</div>
	</div>
</div>
<section class="content">
	<div class="container-fluid">
	<div class="row">
	    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding:0px;" >
		    <div class="card">
		        <div class="card-header">	
		          <button id="btn_actualizar" class="btn btn-default">Actualizar</button>		        
		        </div>
		    </div>
		</div>
	</div>
	</div>
</section>
<!-- Filter content -->
<div id="div_kardex_filtro"></div>
<div class="">
<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="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding:5px;">
					
	
<div id="div_kardex_datos"></div>
<div id="div_kardex_tabla"></div>
				
				</div>
			</div>
		</div>
	</div>
	</div>
</section>
</div>
<script type="text/javascript">
	$("#btn_actualizar").click(function(){			
		$("#contenido").load("../kardex/kardex_vista.php");		
	});
function kardex_filtro()
{
	$.ajax({
		type: "POST",
		url: "../kardex/kardex_filtro.php",
		async:true,
		dataType: "html",                      
		//data: ({
			//producto: $('#txt_fil_pro').val()
		//}),
		beforeSend: function() {
			var div = "<center> <br> <span class='spinner-border spinner-border-lg mr-2'></span> <span style='font-size:1.5rem;'>PROCESANDO PETICIÓN</span></center>";		
			$('#div_kardex_filtro').html(div);
        },
		success: function(html){
			$('#div_kardex_filtro').html(html);
		},
		complete: function(){
			//catalogo_kardex_tabla();
		}
	});
}
function kardex_datos(catid,codbar,marid){	
	
	$.ajax({
		type: "POST",
		url: "../kardex/kardex_producto_datos.php",
		async:true,
		dataType: "html",                      
		data: $("#for_fil_kardex").serialize(),
		beforeSend: function() {
			//$('#div_catalogo_venta_filtro').html('Cargando....');
			var div = "<center> <br> <span class='spinner-border spinner-border-lg mr-2'></span> <span style='font-size:1.5rem;'>PROCESANDO PETICIÓN</span></center>";		
			$('#div_kardex_datos').html(div);
			
        },
		success: function(html){
			$('#div_kardex_datos').html(html);
		},
		complete: function(){
		kardex_tabla();
		}
	});
}
function kardex_tabla(){	
	$.ajax({
		type: "POST",
		url: "../kardex/kardex_producto_tabla.php",
		async:true,
		dataType: "html",                      
		data: $("#for_fil_kardex").serialize(),
		beforeSend: function() {
			var div = "<center> <br> <span class='spinner-border spinner-border-lg mr-2'></span> <span style='font-size:1.5rem;'>PROCESANDO PETICIÓN</span></center>";		
			
			$('#div_kardex_tabla').html(div);
			
        },
		success: function(html){			
			$('#div_kardex_tabla').html(html);
		},
		complete: function(){			
			
		}
	});     
}
$(function() {
	kardex_filtro();
	
	
		
		setTitle("KARDEX DE PRODUCTOS- "+nombreEmpresa);
});
</script>