@extends('admin.admin_dashboard') @section('admin') <<<<<<< HEAD
{{-- Account Details --}}
Account Details
Back

{{ $account->code }}

{{ $account->name }}

{{ ucfirst($account->type) }}

{{ $account->parent?->full_name ?: '—' }}

{{-- Totals --}} @php $totalDebit = $account->lines->sum('debit'); $totalCredit = $account->lines->sum('credit'); @endphp
Current Account Totals
Total Debit: {{ number_format($totalDebit) }} | Total Credit: {{ number_format($totalCredit) }} | Balance: {{ number_format($totalDebit - $totalCredit) }}
{{-- Journal Entries --}}
Journal Entries
@if(empty($accountLines))

No journal entries found.

@else
@foreach ($accountLines as $line) {{-- ✅ SHOW MEMO --}} @endforeach
DateReferenceMemoDebitCreditBalance
{{ optional($line->entry_date)->format('Y-m-d') ?? '—' }} {{ $line->reference ?? '—' }}{{ $line->memo ?? '—' }} {{ number_format($line->debit) }} {{ number_format($line->credit) }} {{ number_format($line->running_balance) }}
@endif
{{-- Journal Modal --}} {{-- Line Template --}}
======= @php use App\Support\AccountingAmounts; @endphp
Chart of accounts @can('general.journals.add') New general journal @endcan
Code
{{ $account->code }}
Type
{{ $account->type }}
Total debit (−)
{{ AccountingAmounts::formatDebit($ledger['total_debit']) }}
Total credit (+)
{{ AccountingAmounts::formatCredit($ledger['total_credit']) }}
GL report
@if($activeTab === 'general_journal') @include('accounting.partials.ledger-table', [ 'lines' => $generalJournal['lines'], 'openingBalance' => $generalJournal['opening_balance'], 'closingBalance' => $generalJournal['closing_balance'], 'emptyMessage' => 'No general journal entries for this account.', 'tableId' => 'account-gj-table', ]) @else @include('accounting.partials.ledger-table', [ 'lines' => $ledger['lines'], 'openingBalance' => $ledger['opening_balance'], 'closingBalance' => $ledger['closing_balance'], 'emptyMessage' => 'No journal entries found for this account.', 'tableId' => 'account-ledger-table', ]) @endif
{{-- Journal modal for non-GJ entries --}}
@push('scripts') @endpush >>>>>>> origin/main @endsection