@extends('layouts.app') @section('title', 'الفواتير - '.config('app.name')) @section('breadcrumb') الرئيسية المبيعات الفواتير @endsection @section('content') @php $indexFilterCustomerOptions = collect($customers ?? [])->map(fn ($c) => [ 'value' => $c->id, 'label' => (string) ($c->name ?? $c->display_name ?? ''), ])->values()->all(); @endphp
{{-- عنوان الصفحة والأزرار --}}

الفواتير

{{-- كروت الإحصائيات --}}

إجمالي الفواتير

{{ number_format($totalInvoices) }}

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

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

المستحق

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

المتأخر

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

@if(session('error')) @endif @if($errors->any()) @endif {{-- شريط الفلاتر --}}
الإجمالي {{ $invoices->total() }} مسح
{{-- الجدول --}}
@forelse($invoices as $row) @empty @endforelse
رقم الفاتورة العميل تاريخ الإصدار تاريخ الاستحقاق الإجمالي الرصيد المستحق الحالة الإجراءات
{{ $row->invoice_number }} {{ $row->customer_name }} {{ $row->issue_date }} {{ $row->due_date }} SAR {{ number_format($row->total, 2) }} SAR {{ number_format($row->balance, 2) }} @if($row->status === 'مدفوعة') مدفوعة @elseif($row->status === 'متأخرة') متأخرة @elseif($row->status === 'مستحق') مستحق @elseif($row->status === 'مدفوعة جزئياً') مدفوعة جزئياً @else {{ $row->status }} @endif طباعة @if(!empty($row->record_payment_allowed)) @endif
لا توجد فواتير
@if($invoices->hasPages())
{{ $invoices->links() }}
@endif
{{-- تسجيل دفعة على فاتورة --}} {{-- مودال استيراد فواتير المبيعات --}}
@endsection @push('scripts') @endpush