<div class="box box-primary">
<div class="box-header with-border">
    <h3 class="box-title"><i class="fa fa-th-large"></i> <?php echo $_translator->_getTranslation(ucfirst($_reporte->getTituloReporte()));?></h3>
    <div class="box-tools pull-right">
       <a class="btn btn-default" href="<?php echo $_reporte->getStringToSendGET().'&action=create&output=excel' ?>"><i class="fa fa-file-excel-o"></i> <?php echo $_translator->_getTranslation('Exportar a excel')?></a>  
    </div><!-- /.box-tools -->
</div><!-- /.box-header -->
<div class="box-body">
<?php
$data = $_reporte->getReporte();
if($data == null){
    echo "There is no information";
    exit;
}
$data = $data['data'];
?>
    <div class="col-md-12">
<div class="table-responsive">
<table id="tblReport" class="table table-striped table-bordered table-condensed table-hover font-size-12 datatable_whit_filter_column _hideSearch" style="width:100%">
<thead class="table-header">
<tr>
    <th class="col-md-4 text-center"><?php echo $_translator->_getTranslation('Proveedor');?></th>
    <th class="col-md-2 text-center"><?php echo $_translator->_getTranslation('Compra #');?></th>
    <th class="col-md-2 text-center"><?php echo $_translator->_getTranslation('Fecha de compra');?></th>
    <th class="col-md-2 text-center"><?php echo $_translator->_getTranslation('Total');?></th>
    <th class="col-md-2 text-center"><?php echo $_translator->_getTranslation('Balance');?></th>
</tr>
</thead>
<tfoot>                        
    <th class="filter text-center"><?php echo $_translator->_getTranslation('Proveedor');?></th>
    <th class="filter text-center"><?php echo $_translator->_getTranslation('Compra #');?></th>
    <th class="filter text-center"><?php echo $_translator->_getTranslation('Fecha de compra');?></th> 
    <th class="filter text-center"><?php echo $_translator->_getTranslation('Total');?></th> 
    <th class="filter text-center"><?php echo $_translator->_getTranslation('Balance');?></th> 
</tfoot>
<tbody>
<?php 
foreach($data as $row){?>
    <tr >
    <td class="text-center"><?php echo $row['vendor_name'];?></td>
    <td class="text-center"><?php echo $row['purchase_number'];?></td>
    <td class="text-center"><?php echo $row['purchase_date'];?></td>
    <td class="text-center"><?php echo number_format($row['total'],2);?></td>   
    <td class="text-center"><?php echo number_format($row['balance'],2);?></td>      
    </tr><?php  
}?>                    
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
    $('#tblReport').DataTable({
           paginate:false,
           filter:true,
           bFilter:true,
           bInfo: false,
           aaSorting:[],
           dom: 'Bfrtip',
           buttons: [
               'excel'
           ]
       });
       
       $('#tblReport_filter').hide();
     
</script>