@extends('layouts.app') @section('title', 'تفاصيل فاتورة البيع #'.$sale->id) @section('page_heading', 'تفاصيل فاتورة البيع #'.$sale->id) @section('content')
{{-- Main Content --}}
{{-- Sale Info --}}
معلومات الفاتورة
رقم الفاتورة
#{{ $sale->id }}
التاريخ
{{ $sale->created_at->format('Y-m-d H:i') }}
العميل
{{ $sale->customer?->name ?? 'غير محدد' }}
الهاتف
{{ $sale->customer?->phone ?? '—' }}
{{-- Items --}}
المنتجات
@if($sale->items && $sale->items->isNotEmpty())
@foreach(['المنتج','الكمية','السعر','الإجمالي'] as $h) @endforeach @foreach($sale->items as $item) @endforeach
{{ $h }}
{{ $item->product?->name ?? 'منتج محذوف' }} {{ $item->quantity }} {{ number_format($item->price, 2) }} {{ number_format($item->total, 2) }}
@else
لا توجد منتجات
@endif
{{-- Sidebar --}}
{{-- Summary --}}
الملخص المالي
الإجمالي {{ number_format($sale->total, 2) }}
الخصم {{ number_format($sale->discount, 2) }}
الضريبة {{ number_format($sale->tax, 2) }}
الإجمالي النهائي {{ number_format($sale->final_total, 2) }}
{{-- Actions --}}
الإجراءات
العودة للقائمة طباعة A4 @can('create sale returns') إنشاء مرتجع @endcan
@endsection