<?php
ob_start();
ini_set('session.gc_maxlifetime', 14400);
session_set_cookie_params(14400);
session_start();

if (!isset($_SESSION["nombre"]))
{
    header("Location: ../../login/login.php");
}
else
{
    require '../header.php';

if($_SESSION['consultac']==1){

?>

            <div class="content-wrapper">
                <!-- Breadcrumb Section -->
                <section class="content-header">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-sm-12">
                                <nav aria-label="breadcrumb">
                                    <ol class="breadcrumb">
                                        <li class="breadcrumb-item">
                                            <a href="#"><i class="fas fa-home"></i> Panel</a>
                                        </li>
                                        <li class="breadcrumb-item active" aria-current="page">
                                            <a href="finanzas.php">
                                                <i class="module-icon"></i> Reportes
                                            </a>
                                        </li>
                                    </ol>
                                </nav>
                            </div>
                          
                            <div class="col-sm-12" style="margin-top: 20px;">
                                <div class="card  ">
                                    <div class="card-header bg-primary">
                                        <h3 class="card-title">
                                            <i class="fas fa-search"></i>
                                            Finanzas
                                        </h3>
                                    </div>
                                    <div class="card-body" style="display: block;">
                                        <div class="container-fluid">
                                            <div class="row">
                                            <div class="col-12 col-sm-12 col-md-3">
                                                </div>
                                                <div class="col-12 col-sm-12 col-md-2">
                                                    <div class="form-group">
                                                        <br>
                                                        <input name="anio" id="anio" class="form-control" type="number" placeholder="Ingresar el Año" required>
                                                    </div>
                                                </div>
                                                <div class="col-12 col-sm-12 col-md-2">
                                                    <div class="form-group">
                                                        <br>
                                                        <select name="mes" id="mes" class="form-control"  required>
                                                        <option value="">Seleccione mes</option>
                                                        <option value="01">Enero</option>
                                                        <option value="02">Febrero</option>
                                                        <option value="03">Marzo</option>
                                                        <option value="04">Abril</option>  
                                                        <option value="05">Mayo</option>
                                                        <option value="06">Junio</option>  
                                                        <option value="07">Julio</option>
                                                        <option value="08">Agosto</option>  
                                                        <option value="09">Setiembre</option>
                                                        <option value="10">Octubre</option>   
                                                        <option value="11">Noviembre</option>
                                                        <option value="12">Diciembre</option> 
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="form-group col-lg-3 col-md-3 col-sm-3 col-xs-12">
                                                    <br>
                                                    <button class="btn btn-success btn-flat " style="margin-bottom:-10px" onclick="mostrar_finanza(event)"> <i class="fa-solid fa-magnifying-glass"></i> Consultar</button>
                                                </div>
                                                <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                                    <button class="btn btn-primary btn-flat" style="margin-bottom:-10px" onclick="generarExcel_Finanza()"><i class="fa fa-table"></i> Excel Finanza</button>
                                                </div>
                                                <div class="form-group col-lg-6 col-md-6 col-sm-6 col-xs-6">
                                                    <div class="card-body" style="display: block;">
                                                        <div class="container-fluid">
                                                            <table style="width:100%;" class="table table-bordered" id="ingreso">
                                                                <thead>
                                                                <tr  height="40"  bgcolor="#F3F3F3"><th   style="text-align: center" colspan="11">INGRESOS</th>
                                                                </tr> 
                                                                <tr style="background-color:#0d9e06;text-align: center"> 
                                                                <th style="color:#ffffff;text-align: center; height:30px;font-size:18px;background-color:#0d9e06" >Item</th>                 
                                                                <th style="color:#ffffff;text-align: center;font-size:18px;background-color:#0d9e06">Concepto</th>             
                                                                <th style="color:#ffffff;text-align: center;font-size:18px;background-color:#0d9e06">Monto</th> 
                                                                </tr>
                                                                </thead>
                                                                <tbody>
                                                                </tbody>
                                                                <tfoot>
                                                                </tfoot>
                                                            </table>
                                                        </div>
                                                    </div>                                          
                                                </div>
                                                <div class="form-group col-lg-6 col-md-6 col-sm-6 col-xs-6">
                                                    <div class="card-body" style="display: block;">
                                                        <div class="container-fluid">
                                                            <table style="width:100%;" class="table table-bordered" id="egreso">
                                                                <thead>
                                                                <tr  height="40"  bgcolor="#F3F3F3"><th   style="text-align: center" colspan="11"   >EGRESOS</th>
                                                                </tr> 
                                                                <tr style="background-color:#0d9e06;text-align: center"> 
                                                                <th style="color:#ffffff;text-align: center; height:30px;font-size:18px;background-color:#0d9e06" >Item</th>                 
                                                                <th style="color:#ffffff;text-align: center;font-size:18px;background-color:#0d9e06">Concepto</th>             
                                                                <th style="color:#ffffff;text-align: center;font-size:18px;background-color:#0d9e06">Monto</th> 
                                                                </tr>
                                                                </thead>
                                                                <tbody>
                                                                </tbody>
                                                            </table>
                                                        </div>
                                                    </div>                                          
                                                </div>

                                                <div class="form-group col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                                </div>

                                                <div class="form-group col-lg-6 col-md-6 col-sm-6 col-xs-6">
                                                    <div class="card-body" style="display: block;">
                                                        <div class="container-fluid">
                                                            <table style="width:100%;" class="table table-bordered" id="resumen">
                                                                <thead>
                                                                <tr  height="40"  bgcolor="#F3F3F3"><th   style="text-align: center" colspan="11" >RESUMEN</th>
                                                                </tr> 
                                                                <tr style="background-color:#ee3232;text-align: center"> 
                                                                <th style="color:#ffffff;text-align: center; height:30px;font-size:18px;background-color:#ee3232" >#</th>                 
                                                                <th style="color:#ffffff;text-align: center;font-size:18px;background-color:#ee3232">Concepto Totales</th>             
                                                                <th style="color:#ffffff;text-align: center;font-size:18px;background-color:#ee3232">Monto Totales</th> 
                                                                </tr>
                                                                </thead>
                                                                <tbody>
                                                                </tbody>
                                                            </table>
                                                        </div>
                                                    </div>                                          
                                                </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </section>                
                    </div>

           

               
<?php
}
require '../footer.php';
?>
<script type="text/javascript" src="../../scripts/finanzas.js"></script>
<?php 
}
ob_end_flush();
?>