From 6149aee7ac1c8d553b04f2601bfd5e62efa96244 Mon Sep 17 00:00:00 2001 From: marcoitaloesp-ai Date: Tue, 16 Dec 2025 20:33:04 +0000 Subject: [PATCH] v1.43.26 - FIX: Erro 500 em projection-chart --- CHANGELOG.md | 8 ++++++++ VERSION | 2 +- backend/app/Http/Controllers/Api/ReportController.php | 6 +----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f20e71d..4e5b85b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ O formato segue [Keep a Changelog](https://keepachangelog.com/pt-BR/). Este projeto adota [Versionamento SemĆ¢ntico](https://semver.org/pt-BR/). +## [1.43.26] - 2025-12-16 + +### Fixed +- šŸ› **FIX CRITICAL**: Erro 500 em projection-chart por variĆ”vel indefinida + - Removido uso de `$overdueTransactions` (variĆ”vel que nĆ£o existe mais após reescrita) + - SubstituĆ­do por `$overdueImpact` calculado anteriormente + - Linhas 1306-1307: removido `overdue_count` e simplificado `overdue_impact` + ## [1.43.25] - 2025-12-16 ### Fixed diff --git a/VERSION b/VERSION index 218d294..587c490 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.43.25 +1.43.26 diff --git a/backend/app/Http/Controllers/Api/ReportController.php b/backend/app/Http/Controllers/Api/ReportController.php index b1d9a53..55dac6d 100644 --- a/backend/app/Http/Controllers/Api/ReportController.php +++ b/backend/app/Http/Controllers/Api/ReportController.php @@ -1302,11 +1302,7 @@ public function projectionChart(Request $request) 'change' => round($finalBalance - $currentBalance, 2), 'change_percent' => $currentBalance != 0 ? round((($finalBalance - $currentBalance) / abs($currentBalance)) * 100, 1) : 0, 'negative_month' => $negativeMonth, - 'overdue_count' => count($overdueTransactions), - 'overdue_impact' => round(array_reduce($overdueTransactions, function($carry, $tx) { - $amount = $this->convertToPrimaryCurrency(abs($tx->amount), $tx->currency); - return $carry + ($tx->type === 'credit' ? $amount : -$amount); - }, 0), 2), + 'overdue_impact' => round($overdueImpact, 2), ], 'period' => [ 'start' => $today->toDateString(),