/home/dvjjulio/softtrash/storage/framework/views/39541a4e3c711c59df43949cdf1a1d9c
<style>
table{
font-size: 10px;
width: 100%;
}
thead, tbody, tr, td, th { display: block; }
tr:after {
content: ' ';
display: block;
visibility: hidden;
clear: both;
}
thead th {
height: 100%;
/*text-align: left;*/
}
tbody {
height: 600px;
overflow-y: auto;
}
thead {
/* fallback */
}
tbody td, thead th {
width: 4.5%;
float: left;
}
</style>
<div class="block-title">
<h2><strong>Manifiesto Residuos Unidad (<?php echo e((isset($year))? $year : date('Y')); ?>)</strong> </h2>
<div class="block-options pull-right">
<button onclick="Metrica.tableFilter(this)" id="filter" class="btn btn-default btn-xs btn-filter"><span class="glyphicon glyphicon-filter"></span> Filter</button>
</div>
</div>
<div class="row">
<div class="filterable">
<table class="table table-borderless table-striped table-vcenter table-responsive">
<thead>
<tr class="filters">
<th class="text-left" style="width: 150px;font-size:12px"><input type="text" class="form-control text-center" placeholder="Cliente" disabled></th>
<th class="text-left" style="width: 100px;font-size:12px"><input type="text" class="form-control text-center" placeholder="Cuota" disabled></th>
<th class="text-left" style="width: 40px;font-size:12px"><input type="text" class="form-control text-center" placeholder="Unidad" disabled></th>
<th class="text-left" style="width: 50px;font-size:12px"><input type="text" class="form-control text-center" placeholder="Fiscal" disabled></th>
<th class="text-left" style="width: 50px;font-size:12px"><input type="text" class="form-control text-center" placeholder="Precio" disabled></th>
<th class="text-right" style="font-size:12px">1</th>
<th class="text-right" style="font-size:12px">2</th>
<th class="text-right" style="font-size:12px">3</th>
<th class="text-right" style="font-size:12px">4</th>
<th class="text-right" style="font-size:12px">5</th>
<th class="text-right" style="font-size:12px">6</th>
<th class="text-right" style="font-size:12px">7</th>
<th class="text-right" style="font-size:12px">8</th>
<th class="text-right" style="font-size:12px">9</th>
<th class="text-right" style="font-size:12px">10</th>
<th class="text-right" style="font-size:12px">11</th>
<th class="text-right" style="font-size:12px">12</th>
<th class="text-right" style="font-size:12px">Total General</th>
</tr>
</thead>
<tbody>
<?php if(isset($residuos)): ?>
<?php foreach($residuos as $value): ?>
<tr>
<td class="text-left" style="width: 150px;padding:0px"><?php echo e($value->nombre_comercial); ?></td>
<td class="text-center" style="width: 100px;padding:0px"><?php echo e($value->cuota); ?></td>
<td class="text-center" style="width: 40px;padding:0px"><?php echo e($value->unidad); ?></td>
<td class="text-center" style="width: 50px;padding:0px"><?php echo e(($value->fiscal == "")? "NA" : $value->fiscal); ?></td>
<td class="text-center" style="width: 50px;padding:0px"><?php echo e(($value->pu != 0)? number_format($value->pu, 2) : 0); ?></td>
<td class="text-right" style="padding:0px"><?php echo e(($value->mes_1 != 0 )? number_format($value->mes_1, 2) :0); ?></td>
<td class="text-right" style="padding:0px"><?php echo e(($value->mes_2 != 0 )? number_format($value->mes_2, 2) :0); ?></td>
<td class="text-right" style="padding:0px"><?php echo e(($value->mes_3 != 0 )? number_format($value->mes_3, 2) :0); ?></td>
<td class="text-right" style="padding:0px"><?php echo e(($value->mes_4 != 0 )? number_format($value->mes_4, 2) :0); ?></td>
<td class="text-right" style="padding:0px"><?php echo e(($value->mes_5 != 0 )? number_format($value->mes_5, 2) :0); ?></td>
<td class="text-right" style="padding:0px"><?php echo e(($value->mes_6 != 0 )? number_format($value->mes_6, 2) :0); ?></td>
<td class="text-right" style="padding:0px"><?php echo e(($value->mes_7 != 0 )? number_format($value->mes_7, 2) :0); ?></td>
<td class="text-right" style="padding:0px"><?php echo e(($value->mes_8 != 0 )? number_format($value->mes_8, 2) :0); ?></td>
<td class="text-right" style="padding:0px"><?php echo e(($value->mes_9 != 0 )? number_format($value->mes_9, 2) :0); ?></td>
<td class="text-right" style="padding:0px"><?php echo e(($value->mes_10 != 0 )? number_format($value->mes_10, 2) :0); ?></td>
<td class="text-right" style="padding:0px"><?php echo e(($value->mes_11 != 0 )? number_format($value->mes_11, 2) :0); ?></td>
<td class="text-right" style="padding:0px"><?php echo e(($value->mes_12 != 0 )? number_format($value->mes_12, 2) :0); ?></td>
<td class="text-right" style="padding:0px"><?php echo e(number_format($value->total)); ?></td>
</tr>
<?php endforeach; ?>
<tr class="info" style="font-weight:bold">
<td class="text-center" style="width: 150px;padding:0px;height:30px">Total por mes</td>
<td class="text-center" style="width: 100px;padding:0px;height:30px"> </td>
<td class="text-center" style="width: 40px;padding:0px;height:30px"> </td>
<td class="text-center" style="width: 50px;padding:0px;height:30px"> </td>
<td class="text-center" style="width: 50px;padding:0px;height:30px"> </td>
<?php foreach($meses as $mes): ?>
<td class="text-right" style="padding:0px;height:30px"><?php echo e(number_format($mes[0])); ?></td>
<?php endforeach; ?>
<td class="text-right" style="padding:0px;height:30px"><?php echo e(number_format($total)); ?></td>
</tr>
<?php else: ?>
<tr><td colspan="14">No hay información disponible</td></tr>
<?php endif; ?>
</tbody>
</div>
</div>
<script type="text/javascript">
$('.filterable .filters input').keyup(function(e){
/* Ignore tab key */
var code = e.keyCode || e.which;
if (code == '9') return;
/* Useful DOM data and selectors */
var $input = $(this),
inputContent = $input.val().toLowerCase(),
$panel = $input.parents('.filterable'),
column = $panel.find('.filters th').index($input.parents('th')),
$table = $panel.find('.table'),
$rows = $table.find('tbody tr');
/* Dirtiest filter function ever ;) */
var $filteredRows = $rows.filter(function(){
var value = $(this).find('td').eq(column).text().toLowerCase();
return value.indexOf(inputContent) === -1;
});
/* Clean previous no-result if exist */
$table.find('tbody .no-result').remove();
/* Show all rows, hide filtered ones (never do that outside of a demo ! xD) */
$rows.show();
$filteredRows.hide();
/* Prepend no-result row if all rows are filtered */
if ($filteredRows.length === $rows.length) {
$table.find('tbody').prepend($('<tr class="no-result text-center"><td colspan="'+ $table.find('.filters th').length +'">No result found</td></tr>'));
}
});
</script>