@extends('layouts.app') @section('title', 'تفاصيل الفاتورة') @section('content')

📄 تفاصيل الفاتورة

{{ $invoice['invoice_number'] ?? 'الفاتورة' }}

معلومات الفاتورة

رقم الفاتورة: {{ $invoice['invoice_number'] ?? '-' }}
التاريخ: {{ isset($invoice['invoice_date']) ? \Carbon\Carbon::parse($invoice['invoice_date'])->format('Y-m-d') : '-' }}
الحالة: {{ $invoice['status'] ?? '-' }}

بيانات العميل

الاسم:

{{ $invoice['customer_name'] ?? '-' }}

رقم العميل:

{{ $invoice['customer_code'] ?? '-' }}

البريد الإلكتروني:

{{ $invoice['customer_email'] ?? '-' }}

الهاتف:

{{ $invoice['customer_phone'] ?? '-' }}

الملخص المالي

المجموع الفرعي: {{ number_format($invoice['subtotal'] ?? 0, 2) }} ريال
الخصم: {{ number_format($invoice['discount_amount'] ?? 0, 2) }} ريال
الضريبة: {{ number_format($invoice['tax_amount'] ?? 0, 2) }} ريال
الإجمالي: {{ number_format($invoice['total_amount'] ?? 0, 2) }} ريال
المدفوع: {{ number_format($invoice['paid_amount'] ?? 0, 2) }} ريال
المتبقي: {{ number_format(($invoice['total_amount'] ?? 0) - ($invoice['paid_amount'] ?? 0), 2) }} ريال

بنود الفاتورة

@forelse($invoice['line_items'] ?? [] as $item) @empty @endforelse
البند الوصف الكمية السعر الوحدة الخصم % المبلغ
{{ $item['line_number'] ?? '-' }} {{ $item['description'] ?? '-' }} {{ number_format($item['quantity'] ?? 0, 2) }} {{ number_format($item['unit_price'] ?? 0, 2) }} {{ $item['discount_percentage'] ?? 0 }}% {{ number_format($item['line_total'] ?? 0, 2) }}
لا توجد بنود لهذه الفاتورة
@if(count($invoice['payments'] ?? []) > 0)

سجل الدفعات

@foreach($invoice['payments'] as $payment) @endforeach
تاريخ الدفع طريقة الدفع المرجع المبلغ
{{ isset($payment['payment_date']) ? \Carbon\Carbon::parse($payment['payment_date'])->format('Y-m-d') : '-' }} {{ $payment['payment_method'] ?? '-' }} {{ $payment['reference_number'] ?? '-' }} {{ number_format($payment['amount'] ?? 0, 2) }}
@endif
@endsection