feat: Implementar página dedicada de gráficos para análisis de pagos de agua
- Crear nueva página /graficos con 4 tipos de gráficos interactivos - Agregar compatibilidad con tema oscuro en selectores - Implementar exportación a PDF profesional con encabezados - Agregar campo 'Monto Real del Recibo' a configuración mensual - Crear migración para nueva columna real_amount en monthly_bills - Mejorar filtros con botones interactivos en lugar de select múltiple - Agregar resumen ejecutivo con estadísticas detalladas - Optimizar espacio visual y responsividad de gráficos - Integrar Chart.js y jsPDF para funcionalidad avanzada - Corregir problemas de carga de datos y filtros dinámicos
This commit is contained in:
@@ -36,10 +36,11 @@ class MonthlyBill {
|
||||
|
||||
if ($existing) {
|
||||
$db->execute(
|
||||
"UPDATE monthly_bills SET total_amount = ?, amount_per_house = ?, due_date = ? WHERE id = ?",
|
||||
"UPDATE monthly_bills SET total_amount = ?, amount_per_house = ?, real_amount = ?, due_date = ? WHERE id = ?",
|
||||
[
|
||||
$data['total_amount'],
|
||||
$amountPerHouse,
|
||||
$data['real_amount'] ?? null,
|
||||
$data['due_date'] ?? null,
|
||||
$existing['id']
|
||||
]
|
||||
@@ -47,13 +48,14 @@ class MonthlyBill {
|
||||
return $existing['id'];
|
||||
} else {
|
||||
$db->execute(
|
||||
"INSERT INTO monthly_bills (year, month, total_amount, amount_per_house, due_date)
|
||||
VALUES (?, ?, ?, ?, ?)",
|
||||
"INSERT INTO monthly_bills (year, month, total_amount, amount_per_house, real_amount, due_date)
|
||||
VALUES (?, ?, ?, ?, ?, ?)",
|
||||
[
|
||||
$data['year'],
|
||||
$data['month'],
|
||||
$data['total_amount'],
|
||||
$amountPerHouse,
|
||||
$data['real_amount'] ?? null,
|
||||
$data['due_date'] ?? null
|
||||
]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user