{{ date_default_timezone_set('Asia/Jakarta') }} Charity Group Summary
@php $groups_batch = 3; $groups_batch = $id == 1 ? 1 : 5; @endphp @foreach ($groups as $k => $group) @if ($k + 1 >= $groups_batch && $groups_batch + 3 > $k)

{{ $group->rank }} GROUP {{ $group->id }}

{{-- --}} @foreach ($group->receipts as $rank => $r) @php $fullName = $r->full_name; $words = explode(' ', $fullName); $shortName = ''; // Keep the first two words as they are if (count($words) >= 2) { $shortName = $words[0] . ' ' . $words[1]; // Convert the remaining words into initials for ($i = 2; $i < count($words); $i++) { $shortName .= ' ' . strtoupper($words[$i][0]) . '.'; } } else { // If there's only 1 word, just use that $shortName = $fullName; } @endphp {{-- --}} @endforeach
# Name DistancePointsCharity
{{ $rank + 1 }} {{ $shortName }} {{ number_format($r->distance_km, 2) }} KM{{ $r->total_poin }}Rp. {{ number_format($r->total_poin * 1000, 2) }}
Total Rp. {{ number_format($group->grandTotal * 1000, 2) }}
@endif @endforeach