@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => '']) {{-- Filter Card --}}
{{-- Total Saham Keseluruhan --}}
TOTAL JUMLAH KEPEMILIKAN SAHAM : {{ number_format($total_saham_keseluruhan ?? 0, 0, ',', '.') }}
@php $grandTotals = []; @endphp @if (!empty($report) || (!empty($lain_lain) && $lain_lain['total_investor'] > 0)) @php $listGroupSections = collect($report)->filter(fn($s) => $s['kategori']->jenis === 'list_group')->values(); $sumRangeSections = collect($report)->filter(fn($s) => $s['kategori']->jenis === 'sum_range')->values(); $sectionIndex = 0; @endphp

{{-- ============ LIST GROUP ============ --}} @if ($listGroupSections->count() > 0)

List Group
@foreach ($listGroupSections as $section) @php $currentIdx = $sectionIndex++; @endphp {{-- Category Accordion --}}
{{-- Category Header --}} {{-- Category Body --}}
@if (!empty($section['investors']))

Total Investor : {{ $section['total_investor'] }}

@foreach ($tanggal_columns as $date) @endforeach @foreach ($tanggal_columns as $date) @endforeach @foreach ($section['investors'] as $investor) @foreach ($tanggal_columns as $date) @endforeach @endforeach @foreach ($tanggal_columns as $date) @php $colTotal = $section['totals'][$date] ?? 0; if (!isset($grandTotals[$date])) $grandTotals[$date] = 0; $grandTotals[$date] += $colTotal; @endphp @endforeach
Nomor SID Nama Investor Kode Pemegang Rekening {{ \Carbon\Carbon::parse($date)->format('d/m/Y') }}
{{ $investor['nomor_sid'] }} {{ $investor['nama_investor'] }} {{ $investor['kode_pemegang_rekening'] ?? '' }} @if ($investor['dates'][$date]['value'] !== null) {{ number_format($investor['dates'][$date]['value'], 0, ',', '.') }} @if ($investor['dates'][$date]['change'] === 'up') @elseif($investor['dates'][$date]['change'] === 'down') @endif @endif
Total {{ number_format($colTotal, 0, ',', '.') }}
@else

Tidak ada data investor untuk kategori ini.

@endif
@endforeach
@endif {{-- ============ SUM RANGE ============ --}} @if ($sumRangeSections->count() > 0)

Sum Range
@foreach ($sumRangeSections as $section) @php $currentIdx = $sectionIndex++; @endphp {{-- Category Accordion --}}
{{-- Category Header --}} {{-- Category Body --}}
@if (!empty($section['investors']))

Total Investor : {{ $section['total_investor'] }}

@foreach ($tanggal_columns as $date) @endforeach @foreach ($tanggal_columns as $date) @endforeach @foreach ($section['investors'] as $investor) @foreach ($tanggal_columns as $date) @endforeach @endforeach @foreach ($tanggal_columns as $date) @php $colTotal = $section['totals'][$date] ?? 0; if (!isset($grandTotals[$date])) $grandTotals[$date] = 0; $grandTotals[$date] += $colTotal; @endphp @endforeach
Nomor SID Nama Investor Kode Pemegang Rekening {{ \Carbon\Carbon::parse($date)->format('d/m/Y') }}
{{ $investor['nomor_sid'] }} {{ $investor['nama_investor'] }} {{ $investor['kode_pemegang_rekening'] ?? '' }} @if ($investor['dates'][$date]['value'] !== null) {{ number_format($investor['dates'][$date]['value'], 0, ',', '.') }} @if ($investor['dates'][$date]['change'] === 'up') @elseif($investor['dates'][$date]['change'] === 'down') @endif @endif
Total {{ number_format($colTotal, 0, ',', '.') }}
@else

Tidak ada data investor untuk kategori ini.

@endif
@endforeach
@endif {{-- ============ LAIN-LAIN ============ --}} @if (!empty($lain_lain) && $lain_lain['total_investor'] > 0)

Lain - Lain
Lain - Lain
TOTAL SAHAM : {{ number_format($lain_lain['total_saham'], 0, ',', '.') }}

Total Investor : {{ $lain_lain['total_investor'] }}

@foreach ($tanggal_columns as $date) @endforeach @foreach ($tanggal_columns as $date) @endforeach @foreach ($tanggal_columns as $date) @php $lainTotal = $lain_lain['totals'][$date] ?? 0; if (!isset($grandTotals[$date])) $grandTotals[$date] = 0; $grandTotals[$date] += $lainTotal; @endphp @endforeach
Keterangan {{ \Carbon\Carbon::parse($date)->format('d/m/Y') }}
Total {{ number_format($lainTotal, 0, ',', '.') }}
@endif {{-- Grand Total --}}
@foreach ($tanggal_columns as $date) @endforeach @foreach ($tanggal_columns as $date) @endforeach
Grand Total {{ number_format($grandTotals[$date] ?? 0, 0, ',', '.') }}
@else

Tidak ada data untuk ditampilkan. Silakan pilih tanggal dan filter.

@endif
@endsection @push('js') @push('css') @endpush @endpush