Mejorar Balance General con detalle de conceptos especiales y filtro por año
This commit is contained in:
@@ -58,3 +58,64 @@
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<?php if (!empty($conceptDetails['concepts'])): ?>
|
||||
<h3 style="text-align: center; margin-bottom: 10px;">Detalle de Conceptos Especiales</h3>
|
||||
<?php if (!empty($conceptDetails['year'])): ?>
|
||||
<p style="text-align: center; font-size: 9pt; margin-bottom: 15px;">Año: <?= $conceptDetails['year'] ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<table style="margin-bottom: 10px;">
|
||||
<thead style="background-color: #0d6efd; color: white;">
|
||||
<tr>
|
||||
<th>Concepto</th>
|
||||
<th>Esperado</th>
|
||||
<th>Recaudado</th>
|
||||
<th>Pendiente</th>
|
||||
<th>Gastos</th>
|
||||
<th>Balance</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($conceptDetails['concepts'] as $cd): ?>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<strong><?= htmlspecialchars($cd['concept']['name']) ?></strong>
|
||||
<?php if (!empty($cd['concept']['description'])): ?>
|
||||
<br><small style="color: #666;"><?= htmlspecialchars($cd['concept']['description']) ?></small>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>$<?= number_format($cd['expected'], 2) ?></td>
|
||||
<td class="text-success">$<?= number_format($cd['collected'], 2) ?></td>
|
||||
<td class="text-warning">$<?= number_format($cd['pending'], 2) ?></td>
|
||||
<?php if (!Auth::isLector()): ?>
|
||||
<td class="text-danger">$<?= number_format($cd['expenses'], 2) ?></td>
|
||||
<td class="text-end fw-bold <?= $cd['balance'] >= 0 ? 'text-success' : 'text-danger' ?>">
|
||||
$<?= number_format($cd['balance'], 2) ?>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td colspan="2">-</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<tfoot style="background-color: #343a40; color: white; font-weight: bold;">
|
||||
<tr>
|
||||
<td style="text-align: left;">TOTALES:</td>
|
||||
<td>$<?= number_format($conceptDetails['totals']['expected'], 2) ?></td>
|
||||
<td>$<?= number_format($conceptDetails['totals']['collected'], 2) ?></td>
|
||||
<td>$<?= number_format($conceptDetails['totals']['pending'], 2) ?></td>
|
||||
<?php if (!Auth::isLector()): ?>
|
||||
<td>$<?= number_format($conceptDetails['totals']['expenses'], 2) ?></td>
|
||||
<td class="text-end <?= $conceptDetails['totals']['balance'] >= 0 ? 'text-success' : 'text-danger' ?>">
|
||||
$<?= number_format($conceptDetails['totals']['balance'], 2) ?>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td colspan="2">-</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user