v1.43.26 - FIX: Erro 500 em projection-chart

This commit is contained in:
marcoitaloesp-ai 2025-12-16 20:33:04 +00:00 committed by GitHub
parent d47201bca7
commit 6149aee7ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 6 deletions

View File

@ -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

View File

@ -1 +1 @@
1.43.25
1.43.26

View File

@ -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(),