Dynamic year range in reportes page

This commit is contained in:
2026-02-22 14:03:18 -06:00
parent efcf6cc445
commit 8139dd3950

View File

@@ -63,7 +63,7 @@ if (!empty($waterDebtors['filters']['house_id'])) {
<label class="form-label">Año</label>
<select name="filter_year" class="form-select">
<option value="">Todos los años</option>
<?php for ($y = 2024; $y <= 2025; $y++): ?>
<?php for ($y = 2024; $y <= date('Y') + 1; $y++): ?>
<option value="<?= $y ?>" <?= ($_GET['filter_year'] ?? '') == $y ? 'selected' : '' ?>><?= $y ?></option>
<?php endfor; ?>
</select>