@extends('client.layouts.app') @section('title', 'عرض القيد') @section('content')

تفاصيل القيد

{{ $manualJournal->branch->branch_name }}

{{ $manualJournal->name }}

{{ $manualJournal->created_at->format('Y-m-d') }}

{{ $manualJournal->description }}

@if ($manualJournal->file) عرض المرفق @else

لا يوجد مرفق

@endif

تفاصيل الحسابات

@foreach($manualJournal->entries as $item) @endforeach
الحساب الوصف مدين دائن مركز التكلفة
{{ $item->chartOfAccount->name }} {{ $item->expense_details }} {{ $item->type == 'مدين' ? number_format($item->amount, 2) : '0' }} {{ $item->type == 'دائن' ? number_format($item->amount, 2) : '0' }} {{ $item->costCenter->name ?? 'غير محدد' }}
إجمالي المدين: {{ number_format($manualJournal->entries->where('type','مدين')->sum('amount'), 2) }}
إجمالي الدائن: {{ number_format($manualJournal->entries->where('type','دائن')->sum('amount'), 2) }}
الفرق: {{ number_format($manualJournal->entries->where('type','مدين')->sum('amount') - $manualJournal->entries->where('type','دائن')->sum('amount'), 2) }}
@endsection