<?php 

session_start();
if($_SESSION["sistema"]!= "1"){ header("location: ../login/index.php"); exit();}



?>


<style type="text/css">
select{
cursor:pointer;	
}

</style>



<div class="content-header" >
      <div class="container-fluid">
        <div class="row mb-2">
		 <div class="col-sm-6">
			<h1>
			Caja General de Ventas
			<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" >Consulta</li>
				<li class="breadcrumb-item active">Caja General de Ventas</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">
		    <div class="card">
		        <div class="card-header">
		          <button id="btn_actualizar" class="btn btn-default">Actualizar</button>		        
		        </div>
		    </div>
		</div>
	</div>
	</div>
</section>




	<!-- formulario de mensaje -->
			<div class="modal " id="div_mensaje_dialog" role="dialog" data-keyboard="false" data-backdrop="static" tabindex="-1"  style="padding:0px; overflow-y:scroll;">
			<div class="modal-dialog modal-md"  role="document" >

			<div class="modal-content" style="padding:0px;">

			<div class="modal-body div_mensaje"  >

			
		
			
			</div>
			<br />
			<br />
			</div>
			</div>
			</div>		
			

			
		<!-- busqueda de registros -->	
		<div id="div_compra_filtro"></div>
		<!-- tabla de registros -->	
		<div id="div_compra_tabla"></div>


</div>

	<script type="text/javascript">
	
		function ventageneral_cst_filtro()
		{
			$.ajax({
				type: "POST",
				url: "../ventageneral_cst/ventageneral_cst_filtro.php",
				async:true,
				dataType: "html",                      
			data: ({ }),
			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_compra_filtro').html(div);
			},
			success: function(html){
				$('#div_compra_filtro').html(html);
			},
			complete: function(){
				
			}
		});
		}

		function ventageneral_cst_tabla()
		{
			$('#div_mensaje_dialog').modal('show');
			$('body').css('overflow-y','hidden');
			$.ajax({
				type: "POST",
				url: "../ventageneral_cst/ventageneral_cst_tabla.php",
				async:true,
				dataType: "html",                      
				data: $("#for_fil_com").serialize(), 
				beforeSend: function() {
							var divmen = "<center> <br> <span class='spinner-border spinner-border-lg mr-2'></span> <span style='font-size:1.5rem;'>PROCESANDO PETICIÓN</span></center>";	
					
				$('.div_mensaje').html(divmen);
					$('#div_compra_tabla').addClass("ui-state-disabled");
				},
				success: function(html){
					$('#div_compra_tabla').html(html);
				},
				complete: function(){			
					$('#div_compra_tabla').removeClass("ui-state-disabled");
					
					//$('#div_mensaje_dialog').modal('hide');
					$('.modal').modal('hide');
					$('.in').removeClass('modal-backdrop');	
			}
			});     
		}
	
		$(function() { 

		$('#btn_actualizar').click(function() {
			$("#contenido").load("../ventageneral_cst/ventageneral_cst_vista.php");
		});
 
		$("#div_mensaje_dialog").on('hidden.bs.modal', function () {
		   	$('body').css('overflow-y','scroll');
		});
 
		$("body").addClass('sidebar-collapse');
 
		ventageneral_cst_filtro(); 
		
		setTitle("CAJA GENERAL - "+nombreEmpresa);	

		});
	</script>
	<script src="../../admin/dist/js/uploadifive/jquery.uploadifive.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="../../admin/dist/js/uploadifive/uploadifive.css"> 

<link rel="stylesheet" href="../../admin/dist/js/colorbox/example1/colorbox.css">
<script src="../../admin/dist/js/colorbox/jquery.colorbox-min.js"></script>

