@extends('layouts.app') @php($canManage = auth()->user()->hasPermission('accounting.manage')) @section('title', 'Journal Entry '.$entry->entry_number) @section('subtitle', $entry->journalLabel()) @section('content') Journals @if ($canManage && $entry->status === 'posted')
@csrf
@endif

{{ $entry->description }}

{{ \App\Models\JournalEntry::STATUSES[$entry->status] ?? ucfirst($entry->status) }}
@foreach ($entry->lines as $line) @endforeach
Account Memo Debit Credit
{{ $line->account?->code }} — {{ $line->account?->name }}
{{ $line->account?->typeLabel() }}
{{ $line->description ?? '—' }} {{ (float) $line->debit > 0 ? money($line->debit) : '—' }} {{ (float) $line->credit > 0 ? money($line->credit) : '—' }}
Totals {{ money($entry->debitTotal()) }} {{ money($entry->creditTotal()) }}
@if (abs($entry->debitTotal() - $entry->creditTotal()) < 0.01)
Entry is balanced.
@endif
@if ($entry->status === 'void')
This entry was voided. Its accounting effect is reversed by a separate posted entry.
@endif

Metadata

Journal{{ $entry->journalLabel() }}
Date{{ $entry->date->format('j M Y') }}
Reference{{ $entry->reference ?? '—' }}
Posted{{ $entry->posted_at?->format('j M Y, g:i A') ?? '—' }}
Recorded by{{ $entry->creator?->name ?? 'System' }}
@if ($entry->source)

Source document

@if ($entry->source instanceof \App\Models\Payment) {{ $entry->source->invoice_number }}
{{ $entry->source->description }} · {{ money($entry->source->totalDue()) }}
@else
{{ class_basename($entry->source_type) }} #{{ $entry->source_id }}
@endif
@endif
@endsection