{{-- Action Bar --}} {{-- Tabs Navigation --}}
{{-- ================================================ --}} {{-- SECTION 1: Jurnal Keuangan --}} {{-- ================================================ --}}

{{ $tenant->name ?? '' }}

Jurnal Keuangan

{{ \Carbon\Carbon::parse($record->date)->locale('id')->translatedFormat('F - Y') }}

Saldo Akhir: {{ number_format($record->total_balance, 2, ',', '.') }}
@if(count($transactions) > 0)
@foreach($transactions as $index => $t) @endforeach
No Tgl Uraian Posting Debet Credit
{{ $index + 1 }} {{ $t['date'] }} {{ $t['description'] }} {{ $t['posting'] }} {{ $t['debet'] ? number_format($t['debet'], 2, ',', '.') : '-' }} {{ $t['credit'] ? number_format($t['credit'], 2, ',', '.') : '-' }}
@else
Tidak ada transaksi.
@endif
{{-- ================================================ --}} {{-- SECTION 2: Posting Keuangan --}} {{-- ================================================ --}}

{{ $tenant->name ?? '' }}

Posting Keuangan

{{ \Carbon\Carbon::parse($record->date)->locale('id')->translatedFormat('F - Y') }}

@foreach($revenue_sections as $section_name => $section_data)
{{ $section_name }} Total: {{ number_format($section_data['total'], 2, ',', '.') }}
@if(count($section_data['items']) > 0) @foreach($section_data['items'] as $item) @endforeach @else @endif
Tgl Uraian Jumlah
{{ date('d', strtotime($item['date'])) }} {{ $item['description'] }} {{ number_format($item['amount'], 2, ',', '.') }}
-
@endforeach
{{-- ================================================ --}} {{-- SECTION 3: Laba Rugi (Profit & Loss) --}} {{-- ================================================ --}}

{{ $tenant->name ?? '' }}

Laba Rugi

{{ \Carbon\Carbon::parse($record->date)->locale('id')->translatedFormat('F - Y') }}

Laba Rugi (Profit and Loss Statement)
{{-- Pendapatan --}}
Pendapatan
@foreach($profit_loss['details']['revenue'] as $name => $data) @endforeach
{{ $name }} {{ number_format($data['total'], 2, ',', '.') }}
{{ number_format($profit_loss['revenue'], 2, ',', '.') }}
{{-- Pengeluaran --}}
Pengeluaran
@foreach($profit_loss['details']['expense'] as $name => $data) @endforeach
{{ $name }} {{ number_format($data['total'], 2, ',', '.') }}
{{ number_format($profit_loss['expense'], 2, ',', '.') }}
{{-- Laba Rugi Result --}}
Laba Rugi {{ number_format($profit_loss['revenue'] - $profit_loss['expense'], 2, ',', '.') }}
{{-- ================================================ --}} {{-- SECTION 4: Arus Kas (Cash Flow) --}} {{-- ================================================ --}}

{{ $tenant->name ?? '' }}

Arus Kas (Cash Flow)

{{ \Carbon\Carbon::parse($record->date)->locale('id')->translatedFormat('F - Y') }}

Arus Kas (Cash Flow)
KAS AWAL BULAN {{ number_format($cash_flow['beginning_cash'], 2, ',', '.') }}
{{-- Pendapatan --}}
PENDAPATAN
@foreach($profit_loss['details']['revenue'] as $name => $data) @endforeach
{{ $name }} {{ number_format($data['total'], 2, ',', '.') }}
Total Pemasukan {{ number_format($cash_flow['income'], 2, ',', '.') }}
{{-- Pengeluaran --}}
PENGELUARAN
@foreach($profit_loss['details']['expense'] as $name => $data) @endforeach
{{ $name }} {{ number_format($data['total'], 2, ',', '.') }}
Total Pengeluaran {{ number_format($cash_flow['expense'], 2, ',', '.') }}
{{-- Kas Akhir --}}
Kas Akhir Bulan {{ number_format($cash_flow['ending_cash'], 2, ',', '.') }}
{{-- ================================================ --}} {{-- SECTION 5: Neraca (Balance Sheet) --}} {{-- ================================================ --}}

{{ $tenant->name ?? '' }}

Neraca (Balance Sheet)

{{ \Carbon\Carbon::parse($record->date)->locale('id')->translatedFormat('F - Y') }}

Neraca (Balance Sheet)
{{-- Aktiva --}}
AKTIVA
@php $assetsTotal = 0; @endphp @foreach($balance_sheet['assets'] as $name => $value) @php $assetsTotal += $value; @endphp @endforeach
{{ $name }} {{ number_format($value, 2, ',', '.') }}
Total Aktiva {{ number_format($assetsTotal, 2, ',', '.') }}
{{-- Pasiva --}}
PASIVA
@php $liabilitiesTotal = 0; @endphp @foreach($balance_sheet['liabilities'] as $name => $value) @php $liabilitiesTotal += $value; @endphp @endforeach
{{ $name }} {{ number_format($value, 2, ',', '.') }}
Total Pasiva {{ number_format($liabilitiesTotal, 2, ',', '.') }}