diff --git a/contabilidad.html b/contabilidad.html
index 897087f..567f162 100644
--- a/contabilidad.html
+++ b/contabilidad.html
@@ -313,15 +313,16 @@
if (data.ok) {
showToast("Cobro actualizado");
- // Actualizar el array local para que los KPIs se recalculen sin recargar de BD
+ // Actualizar el array local usando la nueva regla de negocio
const fIndex = allFinancials.findIndex(f => f.scraped_id === scrapedId);
if (fIndex > -1) {
allFinancials[fIndex].amount = parseFloat(amount || 0);
allFinancials[fIndex].payment_method = method;
- allFinancials[fIndex].is_paid = data.is_paid;
+ // Si nos manda el backend que está pagado o si no es pendiente, es TRUE
+ allFinancials[fIndex].is_paid = method !== 'Pendiente';
}
- // Refrescar lista visualmente
+ // Refrescar lista y KPIs visualmente
renderList();
} else {
showToast("Error al guardar.");