<section class="content-header">
    <h1><i class='fa-fw fa fa-bar-chart'></i> <?php echo $_translator->_getTranslation('Reportes');?></small></h1>
    <ol class="breadcrumb">
        <li><a href="<?php echo ROOT_HOST?>/Controller/Inicio.php"><i class="fa fa-dashboard"></i><?php echo $_translator->_getTranslation('Inicio')?></a></li>
      <li class="active"><?php echo $_translator->_getTranslation('Reportes');?></li>
    </ol>
</section>
<section class="content">
<div class="box">
  <div class="box-header with-border">
    <h3 class="box-title"></h3>
    <div class="box-tools pull-right"></div><!-- /.box-tools -->
  </div><!-- /.box-header -->
  <div class="box-body">
    <div class='flashmessenger'><?php $flashmessenger->showMessage();?></div>
    <div class="clear"></div>
    <div class="grid-container">
        <?php 
        $login = new Login();
        switch($login->getRole()){
            case '1':?>                
                <a class="grid-item _report" data-reportname="cuentas_por_pagar">
                    <i class="fa fa-signal"></i><br /><?php echo $_translator->_getTranslation('Cuentas por pagar');?>
                </a>        
                <a class="grid-item _report" data-reportname="cuentas_por_pagar_detalles">
                    <i class="fa fa-signal"></i><br /><?php echo $_translator->_getTranslation('Cuentas por pagar detalle');?>
                </a> <?php
                
                break;
        } ?>
    </div> 
    <?php 
    if(isset($_reporte)){ 
        include $_reporte->getTemplateReporteOnScreen();
    } ?>
  </div><!-- /.box-body -->
</div><!-- /.box -->
</section>
 <?php include ROOT."/View/Modal/filtroReportes.php";?>
 <?php //include ROOT."/View/Modal/enviarMailReporte.php";?>
<style>
  .grid-container {
    display: grid;
    grid-template-columns: 25% 25% 25% 25%;
    /*background-color: #2196F3;*/
    padding: 10px;
  }
  .grid-item {
    /*background-color: rgba(255, 255, 255, 0.8);*/
    border: 1px solid #ccc;
    padding: 20px;
    font-size: 1.5rem;
    text-align: center;
    cursor: pointer;
  }
 
  </style>
<script type="text/javascript">
    $("#fechaInicio,#fechaFin").datetimepicker({
            format: 'DD/MM/YYYY'
      });

    $('.linkSendMail').click( function(e) {
        e.preventDefault(); 
        $('#modalSendReportToMail').modal('show');
        $("#optionsFromGet").val(this.href);
        return false; 
    });
    
    $('._report').on('click',function(){setFilterReport(this);});
</script>
