@extends('admin.layouts.master') @section('title', 'تفاصيل التحصيل') @section('content')
{{-- Header --}}

تفاصيل التحصيل: {{ $collection->payment_number }}

عرض شامل لبيانات التحصيل والعلاقات المرتبطة به.

@can('customer_collections.update') تعديل @endcan رجوع
{{-- KPI Row --}}
رقم التحصيل
{{ $collection->payment_number }}
قيمة التحصيل
{{ number_format((float) $collection->amount, 2) }} ج.م
تاريخ التحصيل
{{ $collection->payment_date?->format('Y-m-d') ?? '-' }}
طريقة التحصيل
{{ $methodMeta['label'] }}
{{-- بيانات العميل --}}
بيانات العميل
الاسم: {{ $collection->customer?->name_ar ?? '-' }}
الهاتف: {{ $collection->customer?->phone ?? '-' }}
نوع العميل: @php $ct = $collection->customer?->customer_type_name ?? '-'; @endphp {{ $ct }}
مديونية العميل الحالية: {{ number_format($customerBalance, 2) }} ج.م
{{-- بيانات الفاتورة المرتبطة --}}
الفاتورة المرتبطة
@if($collection->salesInvoice)
الإجمالي: {{ number_format((float) $collection->salesInvoice->grand_total, 2) }} ج.م
المدفوع: {{ number_format((float) $collection->salesInvoice->paid_amount, 2) }} ج.م
المتبقي: {{ number_format((float) $collection->salesInvoice->remaining_amount, 2) }} ج.م
@else
غير مرتبط بفاتورة محددة.
@endif
{{-- بيانات الحساب والتفاصيل --}}
تفاصيل عملية التحصيل
حساب التحصيل {{ $collection->paymentAccount?->name_ar ?? '-' }} @if($collection->paymentAccount) {{ ['cash_box'=>'خزنة نقدية','bank'=>'بنكي','instapay'=>'Instapay','wallet'=>'محفظة'][$collection->paymentAccount->account_type] ?? '-' }} @endif
رقم المرجع {{ $collection->reference_number ?: '-' }}
مرجع العملية البنكية {{ $collection->transaction_reference ?: '-' }}
تم الإنشاء بواسطة {{ $collection->creator?->name ?? '-' }}
وقت التسجيل {{ $collection->created_at?->format('Y-m-d H:i') ?? '-' }}
ملاحظات
{{ $collection->notes_ar ?: 'لا توجد ملاحظات.' }}
@endsection