<div class="container-title"></div>
<div class="row">
    <?php echo $currentAction = ''?>
    <div class="col-lg-12">
        <ol class="breadcrumb">
            <li><i class="fa fa-dashboard"></i>  <a href="<?php echo ROOT_HOST?>/Controller/Home.php"><?php echo $_translator->_getTranslation('Home')?></a></li>
            <li class="active"><i class="fa fa-shopping-basket"></i> <?php echo $_translator->_getTranslation('Reportes')?></li>
            <?php echo $currentAction?>
        </ol>
    </div>
</div>
<div id="flashmessenger"><?php $flashmessenger->showMessage();?></div>
<div class="box">
    <div class="box-header"> 
        <h3><i class='fa-fw fa fa-shopping-basket'></i><?php echo $_translator->_getTranslation('Reportes');?></h3>
    </div>
    <div class='box-content'>
        <div class="list-reports">
                <div class="row">           
                    <?php 
                    $login = new Login();
                    switch($login->getRole()){
                        case '1';?>
                                <div class="col col-lg-3 box-link-report">
                                    <a href="?action=create&reporte=inventario&output=pantalla">
                                        <div><?php echo $_translator->_getTranslation('Inventario');?></div>
                                    </a>
                                </div>
                                <div class="col col-lg-3  box-link-report">
                                    <span class="_report" data-reportname="ventasPorFecha" data-toggle='modal' data-target='#modalFiltroReportes'>
                                        <div><?php echo $_translator->_getTranslation('Ventas por fecha');?></div>
                                    </span>
                                </div>
                                <div class="col col-lg-3  box-link-report">
                                    <span class="_report" data-reportname="ventasDetalles" data-toggle='modal' data-target='#modalFiltroReportes'>
                                        <div><?php echo $_translator->_getTranslation('Ventas detalles');?></div>
                                    </span>
                                </div>
                                <div class="col col-lg-3  box-link-report">
                                    <span class="_report" data-reportname="ventas_por_producto" data-toggle='modal' data-target='#modalFiltroReportes'>
                                        <div><?php echo $_translator->_getTranslation('Ventas por producto');?></div>
                                    </span>
                                </div><?php
                            break;
   
                        case '3':?>
                                <div class="col col-lg-3 box-link-report">
                                    <a href="?action=create&reporte=inventario&output=pantalla">
                                        <div><?php echo $_translator->_getTranslation('Inventario');?></div>
                                    </a>
                                </div><?php
                            break;
                    } ?>
                            
                    
                </div>
        </div>
    </div>
</div>
 <?php include ROOT."/View/Modal/filtroReportes.php";?>
 <?php include ROOT."/View/Modal/enviarMailReporte.php";?>
<div class="box">
    <?php if(isset($_reporte)){
        include $_reporte->getTemplateReporteOnScreen();
    }
?>
</div>
<script type="text/javascript">
    $("#fechaInicio,#fechaFin").datetimepicker({
            format: 'MM/DD/YYYY'
      });

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