@extends('layouts.app') @section('title', 'Voucher #'.optional($voucher)->voucher_number) @section('breadcrumbs') @endsection @section('content')

{{ $voucher->voucher_number ?? 'N/A' }}

{{ ucfirst($voucher->voucher_type ?? '') }} Voucher | {{ optional($voucher->voucher_date)->format('d M Y') ?? '' }}

Back
Voucher #{{ $voucher->voucher_number ?? 'N/A' }}
Date{{ optional($voucher->voucher_date)->format('d M Y') ?? 'N/A' }}
Type{{ ucfirst($voucher->voucher_type ?? '') }}
Status
@forelse($voucher->lines ?? [] as $line) @empty @endforelse
AccountDescriptionDebitCredit
{{ $line->ledgerAccount->code ?? '' }} - {{ $line->ledgerAccount->name ?? 'N/A' }} {{ $line->description ?? '' }} {{ $line->debit > 0 ? number_format($line->debit, 2) : '-' }} {{ $line->credit > 0 ? number_format($line->credit, 2) : '-' }}
No entries
Total{{ number_format($voucher->total_debit ?? 0, 2) }}{{ number_format($voucher->total_credit ?? 0, 2) }}
@if($voucher->narration)
Narration:

{{ $voucher->narration }}

@endif
Approval Status

{{ ucfirst($voucher->status ?? 'draft') }}

{{ $voucher->status === 'posted' ? 'Approved by '.$voucher->approver->name ?? 'System' : 'Awaiting approval' }}
Audit Trail
@forelse($voucher->auditLogs ?? [] as $log)

{{ $log->action ?? '' }}

{{ $log->created_at?->diffForHumans() ?? '' }}
@empty

No audit entries

@endforelse
@endsection