@extends('layouts.app') @section('title', $entry->entry_number) @section('content')

{{ $entry->entry_number }}

{{ $entry->description }}

Back @if ($entry->status === 'posted')
@csrf
@endif
@include('components.kpi', ['label' => 'Entry date', 'value' => $entry->entry_date?->format('d M Y') ?: '—']) @include('components.kpi', ['label' => 'Total debit', 'value' => money($entry->total_debit), 'variant' => 'info']) @include('components.kpi', ['label' => 'Total credit', 'value' => money($entry->total_credit), 'variant' => 'info']) @include('components.kpi', ['label' => 'Status', 'value' => title_case_words($entry->status), 'variant' => $entry->status === 'posted' ? 'good' : ''])

Lines

@foreach ($entry->lines as $line) @endforeach
CodeAccountType DebitCreditMemo
{{ $line->account?->code ?: '—' }} {{ $line->account?->name ?: 'Deleted account' }} {{ title_case_words($line->account?->type ?? '—') }} {{ $line->debit > 0 ? money($line->debit) : '' }} {{ $line->credit > 0 ? money($line->credit) : '' }} {{ $line->memo ?: '—' }}
Totals {{ money($entry->total_debit) }} {{ money($entry->total_credit) }} @if (abs($entry->total_debit - $entry->total_credit) < 0.005) Balanced @else Unbalanced @endif

Audit

Posted by
{{ $entry->createdBy?->name ?: 'System' }}
Created
{{ $entry->created_at?->format('d M Y H:i') }}
@if ($entry->reference_type)
Source
{{ class_basename($entry->reference_type) }} #{{ $entry->reference_id }}
@endif
@endsection