@extends('layouts.app') @section('title', 'مدفوعات الموردين - '.config('app.name')) @section('breadcrumb') الرئيسية المشتريات مدفوعات الموردين @endsection @section('content') @php $supplierFilterOptions = $suppliers->map(fn ($s) => [ 'value' => $s->id, 'label' => trim($s->getLocalizedDisplayName().' ('.($s->code ?? $s->id).')'), ])->all(); $paymentMethodFilterOptions = collect($paymentMethods)->map(fn ($label, $value) => [ 'value' => $value, 'label' => $label, ])->values()->all(); @endphp

مدفوعات الموردين

إجمالي السندات

{{ number_format($totalPayments) }}

إجمالي المبالغ

SAR {{ number_format($totalAmount, 2) }}

هذا الشهر

SAR {{ number_format($thisMonthAmount, 2) }}

طريقة الدفع
المورد
@forelse($payments as $payment) @php $allocatedInvoice = $payment->purchaseInvoices->first(); $allocatedAmount = $allocatedInvoice ? (float) ($allocatedInvoice->pivot->amount ?? 0) : 0; @endphp @empty @endforelse
المرجع المورد التاريخ طريقة الدفع المبلغ الفاتورة
{{ $payment->reference ?: ('PMT-'.$payment->id) }} {{ $payment->supplier?->getLocalizedDisplayName() ?? '—' }} {{ $payment->date?->format('Y-m-d') }} {{ $paymentMethods[$payment->payment_method] ?? ($payment->payment_method ?? '—') }} SAR {{ number_format((float) $payment->amount, 2) }} @if($allocatedInvoice) {{ $allocatedInvoice->reference ?: ('PINV-'.$allocatedInvoice->id) }} ({{ number_format($allocatedAmount, 2) }}) @else ذمة عامة @endif
لا توجد مدفوعات للموردين
@if($payments->hasPages())
{{ $payments->links() }}
@endif
@endsection