@extends('layouts.layoutMaster') @section('title', 'Journal Detail') @php $breadcrumbs = [ ['url' => route('dashboard'), 'label' => 'Dashboard'], ['url' => route('journal.index'), 'label' => 'Journal'], ['url' => route('journal.show', ['journal' => $model->id]), 'label' => $model->code], ]; @endphp @section('content')
Journal Details
@can('journal.update') Edit @endcan
Code {{ $model->code }}
Date {{ $model->date?->format('d/m/Y') ?? '-' }}
Description {{ $model->description ?: '-' }}
Account Journal Details
@forelse($model->accountJournals as $detail) @empty @endforelse
Account Debit Credit Description
{{ $detail->account->code }} - {{ $detail->account->name }} {{ \App\Helpers\Helpers::formatCurrency($detail->debit, 2) }} {{ \App\Helpers\Helpers::formatCurrency($detail->credit, 2) }} {{ $detail->description ?: '-' }}
No details available
Total: {{ \App\Helpers\Helpers::formatCurrency($model->accountJournals->sum('debit'), 2) }} {{ \App\Helpers\Helpers::formatCurrency($model->accountJournals->sum('credit'), 2) }}
Created: {{ $model->created_at?->format('d/m/Y H:i') ?? '-' }} @if ($model->createdBy) by {{ $model->createdBy->name }} @endif
Last Updated: {{ $model->updated_at?->format('d/m/Y H:i') ?? '-' }} @if ($model->updatedBy) by {{ $model->updatedBy->name }} @endif
@endsection