@php $journalStatus = isset($data->status) ? $data->status : 'DRAFT'; $accountMap = []; foreach ($account_list as $item) { $accountMap[$item['id']] = $item; } $totalDebit = 0; $totalCredit = 0; @endphp

Detail {{ $title }}

{{ isset($data->journal_no) ? $data->journal_no : '' }}
{{ $journalStatus }}
Tanggal Jurnal {{ isset($data->journal_date) ? date('d-m-Y', strtotime($data->journal_date)) : '-' }}
Periode {{ isset($data->period_month) ? $data->period_month . ' / ' . $data->period_year : '-' }}
Keterangan {{ isset($data->description) ? $data->description : '-' }}
Reference {{ isset($data->reference_type) && $data->reference_type ? $data->reference_type : '-' }} @if (isset($data->reference_id) && $data->reference_id) #{{ $data->reference_id }} @endif
Posted At {{ isset($data->posted_at) && $data->posted_at ? date('d-m-Y H:i', strtotime($data->posted_at)) : '-' }}
Reversal Of {{ isset($data->reversal_of_no) && $data->reversal_of_no ? $data->reversal_of_no : '-' }}

@foreach ($details as $row) @php $account = isset($accountMap[$row->account_id]) ? $accountMap[$row->account_id] : null; $totalDebit += (float) $row->debit; $totalCredit += (float) $row->credit; @endphp @endforeach
# Akun Keterangan Debit Credit
{{ $row->line_no }} {{ empty($account) ? $row->account_id : $account['code'] . ' - ' . $account['name'] }} {{ $row->description }} {{ number_format((float) $row->debit, 2) }} {{ number_format((float) $row->credit, 2) }}
Total Debit {{ number_format($totalDebit, 2) }}
Total Credit {{ number_format($totalCredit, 2) }}
@if ($journalStatus == 'POSTED') @endif