@extends('layouts.app') @section('title', 'أمر شراء') @section('page_title', 'أمر الشراء ' . $purchase->code) @section('breadcrumb') @endsection @section('page_actions') @if ($purchase->status === 'draft') @can('purchases.edit') تعديل @endcan @endif @can('devices.create') @if ($purchase->status === 'received') تسجيل أرقام IMEI @endif @endcan @endsection @section('content')
  • رقم الأمر{{ $purchase->code }}
  • المورد{{ $purchase->supplier?->name ?? '—' }}
  • التاريخ{{ arabicDate($purchase->date) }}
  • فاتورة المورد{{ $purchase->invoice_ref ?: '—' }}
  • الحالة{!! badge($purchase->status_label, $purchase->status_color) !!}
  • أنشأه{{ $purchase->creator?->name ?? '—' }}
الملخص المالي
  • الإجمالي قبل الخصم{{ currency($purchase->subtotal) }}
  • الخصم- {{ currency($purchase->discount) }}
  • الضريبة{{ currency($purchase->tax) }}
  • الإجمالي{{ currency($purchase->total) }}
  • المدفوع{{ currency($purchase->paid_amount) }}
  • المتبقي {{ currency($purchase->remaining) }}
الأصناف
@foreach ($purchase->items as $item) @endforeach
المنتجالكودالكميةسعر الوحدةالإجمالي
{{ $item->product?->name ?? '—' }} {{ $item->product?->code }} {{ (float) $item->quantity }} {{ currency($item->price) }} {{ currency($item->total) }}
@if ($purchase->deviceUnits->isNotEmpty())
الأجهزة المسجّلة من هذا الأمر ({{ $purchase->deviceUnits->count() }})
@foreach ($purchase->deviceUnits as $device) @endforeach
IMEIالجهازالشريحةالحالة
{{ $device->imei }} {{ $device->product?->name }} {{ $device->sim_number ?: '—' }} {!! badge($device->status_label, $device->status_color) !!}
@endif @if ($purchase->notes)
ملاحظات

{{ $purchase->notes }}

@endif
@endsection