@php
$rawData = $row->raw_data ?? [];
$clientsData = $rawData['clients'] ?? [];
// Sum total income from all clients (primary + co-borrower)
$totalIncome = 0;
foreach ($clientsData as $client) {
$totalIncome += $client['total_income'] ?? 0;
}
@endphp
@if($totalIncome > 0)
{{ number_format($totalIncome, 0, ',', ' ') }}€
@else
-
@endif