v1.43.26 - FIX: Erro 500 em projection-chart
This commit is contained in:
parent
d47201bca7
commit
6149aee7ac
@ -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/).
|
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
|
## [1.43.25] - 2025-12-16
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@ -1302,11 +1302,7 @@ public function projectionChart(Request $request)
|
|||||||
'change' => round($finalBalance - $currentBalance, 2),
|
'change' => round($finalBalance - $currentBalance, 2),
|
||||||
'change_percent' => $currentBalance != 0 ? round((($finalBalance - $currentBalance) / abs($currentBalance)) * 100, 1) : 0,
|
'change_percent' => $currentBalance != 0 ? round((($finalBalance - $currentBalance) / abs($currentBalance)) * 100, 1) : 0,
|
||||||
'negative_month' => $negativeMonth,
|
'negative_month' => $negativeMonth,
|
||||||
'overdue_count' => count($overdueTransactions),
|
'overdue_impact' => round($overdueImpact, 2),
|
||||||
'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),
|
|
||||||
],
|
],
|
||||||
'period' => [
|
'period' => [
|
||||||
'start' => $today->toDateString(),
|
'start' => $today->toDateString(),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user