@extends('admin.layouts.master') @php $isReceipt = $payment->direction === 'in'; @endphp @section('title', $payment->number) @section('page_title', ($isReceipt ? 'مقبوضات: ' : 'دفعة: ') . $payment->number) @section('breadcrumbs') @endsection @section('content')

{{ $payment->number }} @php $sm = ['draft' => 'secondary', 'posted' => 'success', 'cancelled' => 'danger']; @endphp {{ $payment->status }} {{ $isReceipt ? 'مقبوضات' : 'مدفوعات' }}

PDF @can('payments.edit') @if($payment->status === 'draft')
@csrf
@endif @if($payment->status === 'posted')
@csrf
@endif @endcan
@if($isReceipt) @else @endif
العميل{{ $payment->customer?->name_ar }}
المورد{{ $payment->supplier?->name_ar }}
الحساب{{ $payment->account?->name }}
طريقة الدفع{{ $payment->paymentMethod?->name ?? '—' }}
التاريخ{{ $payment->payment_date?->format('Y-m-d') }}
@if($payment->cheque_number) @endif @if($payment->bank_name)@endif
المبلغ{{ number_format((float) $payment->amount, 2) }} {{ $payment->currency_code }}
المرجع{{ $payment->reference ?? '—' }}
رقم الشيك{{ $payment->cheque_number }} ({{ $payment->cheque_date?->format('Y-m-d') }})
البنك{{ $payment->bank_name }}
@if($payment->notes)
ملاحظات: {!! nl2br(e($payment->notes)) !!}
@endif @if($payment->invoices->isNotEmpty())
التوزيع على الفواتير
@foreach($payment->invoices as $inv) @endforeach
الفاتورةالتاريخالإجماليالمُطبَّق
{{ $inv->number }} {{ $inv->invoice_date?->format('Y-m-d') }} {{ number_format((float) $inv->total, 2) }} {{ number_format((float) $inv->pivot->amount_applied, 2) }}
@endif
@endsection @push('scripts') @include('admin._partials.crud_scripts') @endpush