<?php
session_start();
require_once ("../../config/Cado.php");
require_once ("../ingreso/cIngreso.php");
$oIngreso = new cIngreso();
require_once ("../egreso/cEgreso.php");
$oEgreso = new cEgreso();
require_once("../cuentas/cCuentas.php");
$oCuentas = new cCuentas();
require_once("../formatos/formato.php");
require_once("../formatos/mysql.php");
$oMysql = new cMysql();




?>
<div id="div_caja_filtror" > </div>


<section class="content">
	<div class="container-fluid">
	<div class="row">
	    <div class="col-lg-12 col-md-12 col-sm-12 col-12" style="padding:0%;" >
		    <div class="card">
				<div class="col-lg-12 col-md-12 col-sm-12 col-12" >
	
								<div id="div_tabla_resumen"> </div>
								
					
			</div>
			</div>
			</div>
		</div>
	</div>
</section>



<script type="text/javascript">
	
	function flujocaja_filtror()
	{
		$.ajax({
			type: "POST",
			url: "../flujocaja/flujocaja_filtro2.php",
			async:true,
			dataType: "html",                      
			data: ({
			}),
			beforeSend: function() {
				
			},
			success: function(html){
				$('#div_caja_filtror').html(html);
			},
			complete: function(){
				
			}
		});
	}
	
	function resumen_tabla()
	{
		$.ajax({
			type: "POST",
			url: "../flujocaja/caja_tabla_resumen.php",
			async:true,
			dataType: "html",                      
			data: $("#for_fil_cajr").serialize(),
			beforeSend: function() {
				$('#div_tabla_resumen').addClass("ui-state-disabled");
			},
			success: function(html){
				$('#div_tabla_resumen').html(html);
			},
			complete: function(){	
				$('#div_tabla_resumen').removeClass("ui-state-disabled");
			}
		});     
	}
	
	
 function flujocaja_ticket_datos(fec1,fec2,usu_id){
		
		$.ajax({
			type: "POST",
			url: "../flujocaja/flujocaja_ticket_datos.php",
			async:true,
			dataType: "json",                      
			data: ({ 
			fec1:fec1,
			fec2:fec2,
			usu_id:usu_id
			}),
			beforeSend: function() {
				
			},
			success: function(data){
				 //console.log(data); 
				
				if(data!=""){					
					flujocaja_ticket_impresion(data,data.imp_doc);
				}else{
					
				}
			}
		});
	
}




function flujocaja_ticket_impresion(data,url){	

	$.ajax({
		type: "POST",
		url: url,
		async:true,
		dataType: "html",                      
		data: data,
		beforeSend: function()
		{
			
		},
		success: function(html){
				
			
		}
	});
}
	
	
	$(function() {
	
		flujocaja_filtror();	
	});
</script> 