@extends('dashboard.layouts.app') @section('content') @include('components.alert')
Back
Cost Center

{{ $costCenter->title }}

Code
{{ $costCenter->code }}
Journal Entries For This Cost Center

Includes draft, posted, and cancelled journal entries linked to this cost center.

{{ method_exists($journalEntries, 'total') ? $journalEntries->total() : $journalEntries->count() }} Entry(s)
@forelse($journalEntries as $entry) @php $debit = $entry->lines->sum('debit'); $credit = $entry->lines->sum('credit'); $status = $entry->status ?? 'draft'; $statusClass = match ($status) { 'posted' => 'ui-pill--success', 'cancelled' => 'ui-pill--neutral', 'draft' => 'ui-pill--warn', default => 'ui-pill--neutral', }; @endphp @empty @endforelse
Entry Date Type Status Creator Debit Credit Action
#{{ $entry->id }}
Ref: {{ $entry->reference_no ?: '-' }}
{{ $entry->description ?: '-' }}
{{ strtoupper($entry->type ?? 'manual') }} {{ strtoupper($status) }}
{{ $entry->creator->full_name ?? $entry->creator->name ?? 'System' }}
{{ number_format($debit, 2) }} {{ number_format($credit, 2) }}
Review
No journal entries found.

No journal entries found for this cost center.

@if($journalEntries instanceof \Illuminate\Pagination\LengthAwarePaginator)
{{ $journalEntries->appends(request()->except('page'))->links('pagination::bootstrap-5') }}
@endif
@endsection