<?php 
$disabled = '';
$login = new Login();
$role = $login->getRole();
if($role == '2'){$disabled = 'disabled';}
?>
<div class="box-header"> 
    <h3><i class='fa-fw fa fa-shopping-basket'></i><?php echo $_translator->_getTranslation(ucfirst($_reporte->getTituloReporte()));?></h3>
    <div class='box-icon dropdown'>
        <i class='icon fa fa-tasks' id="moreOptions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"></i>
        <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="moreOptions">
            <li class="<?php echo $disabled ?>"><a class="<?php echo $disabled ?>" href="<?php echo $_reporte->getStringToSendGET().'&output=excel' ?>"><i class="fa fa-file-excel-o"></i>Exportar a excel</a></li>
            <li><a href="<?php echo $_reporte->getStringToSendGET().'&enviarPorMail' ?>" class="linkSendMail"><i class="fa fa-envelope"></i>Enviar por correo</a></li>
        </ul>
    </div>
</div>
<script type="text/javascript">
    $('a.disabled').click(function(){return false;});
</script>
<?php 
#!= 2 es porque es 1; 1 y 2 tienen acceso a estos reportes
/*
if($role !== '2'){?>
<div class='box-content'>
    <div class='row'>
        <div class="col-lg-12">
            <?php
            $result = $_reporte->getReporte();
            $data = $result['data'];
            if(count($data)<= 0){
                echo $_translator->_getTranslation('No hay resultados para la seleccion.');
                exit;
            }
            ?>            
            <div class="col-lg-3 col-md-6 pull-right">
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-xs-3">
                                <i class="fa fa-desktop fa-5x"></i>
                            </div>
                            <div class="col-xs-9 text-right">
                                <div class="huge"><?php echo $result['ventasGeneradas'];?></div>
                                <div><?php echo $_translator->_getTranslation('Ventas generadas')?></div>
                            </div>
                        </div>
                    </div>
                    <a href="#">
                        <div class="panel-footer">
                            <div class="clearfix"></div>
                        </div>
                    </a>
                </div>
            </div>
            <div class="col-lg-3 col-md-6 pull-right">
                <div class="panel panel-green">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-xs-3">
                                <i class="fa fa-usd fa-5x"></i>
                            </div>
                            <div class="col-xs-9 text-right">
                                <div class="huge"><?php echo $result['ventasMonto'];?></div>
                                <div><?php echo $_translator->_getTranslation('Monto de ventas')?></div>
                            </div>
                        </div>
                    </div>
                    <a href="#">
                        <div class="panel-footer">
                            <div class="clearfix"></div>
                        </div>
                    </a>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12 col-md-12 col-sm-12">
            <div class="table-responsive">
            <table id="tblReport" class="table table-striped table-bordered table-condensed table-hover">
            <thead class="table-header">
            <tr>
                <td class="text-center"><?php echo $_translator->_getTranslation('Num');?></td>
                <td class="text-center"><?php echo $_translator->_getTranslation('Fecha');?></td>
                <td class="text-right"><?php echo $_translator->_getTranslation('Monto');?></td>
                <td class="text-right"><?php echo $_translator->_getTranslation('Descuento');?></td>                
                <td class="text-right"><?php echo $_translator->_getTranslation('Impuestos');?></td>
                <td class="text-right"><?php echo $_translator->_getTranslation('Devoluciones');?></td>
                <td class="text-right"><?php echo $_translator->_getTranslation('Total');?></td>
            </tr>
            </thead>
            <tbody>
            <?php
                foreach($data as $row){?>
                    <tr>
                        <td class="text-center"><?php echo $row['idVenta'];?></td>
                        <td class="text-center"><?php echo $row['fecha'];?></td>
                        <td class="text-right"><?php echo number_format($row['subTotal'],2);?></td>                        
                        <td class="text-right"><?php echo number_format($row['descuento'],2);?></td>                                                
                        <td class="text-right"><?php echo number_format($row['impuestos'],2);?></td>
                        <td class="text-right"><?php echo number_format($row['devoluciones'],2);?></td>
                        <td class="text-right"><?php echo number_format($row['total'],2);?></td>
                    </tr><?php 
                }?>
            </tbody>
            </table>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" language="javascript">
    $('#tblReport').DataTable( {paginate:true,filter:true,fixedHeader: true});
    $('#tblReport')
		.removeClass( 'display' )
		.addClass('table table-striped table-bordered');
</script>
<?php
} */?>