@extends('layouts.app') @section('title', 'تفاصيل القيد المحاسبي - DOTS HR Pro') @push('styles') @endpush @section('content') @php $entry = $entry ?? null; $items = $items ?? collect(); @endphp @if(session('success'))
{{ session('success') }}
@endif @if($entry)
{{ $entry->reference_number ?? '-' }}
{{ $entry->date ?? '-' }}
{{ $entry->type ?? '-' }}
{{ number_format($entry->amount ?? 0, 2) }} ر.س
@if(($entry->status ?? '') === 'approved') معتمد @elseif(($entry->status ?? '') === 'pending') قيد المراجعة @elseif(($entry->status ?? '') === 'rejected') مرفوض @else {{ $entry->status ?? '-' }} @endif
{{ $entry->description ?? '-' }}

بنود القيد

@if($items->count() > 0)
@foreach($items as $index => $item) @endforeach
# الحساب البيان مدين دائن
{{ $index + 1 }} {{ $item->account_name ?? $item->account_id ?? '-' }} {{ $item->description ?? '-' }} {{ number_format($item->debit ?? 0, 2) }} {{ number_format($item->credit ?? 0, 2) }}
الإجمالي {{ number_format($items->sum('debit'), 2) }} {{ number_format($items->sum('credit'), 2) }}
@else

لا توجد بنود لهذا القيد

@endif
@else

لم يتم العثور على القيد المحاسبي

@endif @endsection