@extends('layouts.app') @section('title', 'بيانات المنتج') @section('page_title', $product->name) @section('breadcrumb') @endsection @section('page_actions') @can('products.edit') تعديل @endcan @if ($product->track_serial) @can('devices.view') عرض الأجهزة @endcan @endif @endsection @section('content')
@if ($product->image_url) @else
@endif

{{ $product->name }}

{{ $product->code }}
{!! badge($product->type_label, 'primary') !!} {!! badge($product->is_active ? 'نشط' : 'موقوف', $product->is_active ? 'success' : 'secondary') !!}
  • الاسم بالإنجليزية{{ $product->name_en ?: '—' }}
  • التصنيف{{ $product->category?->name ?? '—' }}
  • الوحدة{{ $product->unit }}
  • سعر الشراء{{ currency($product->purchase_price) }}
  • سعر البيع{{ currency($product->sale_price) }}
  • هامش الربح {{ currency((float) $product->sale_price - (float) $product->purchase_price) }}
  • نسبة الضريبة{{ (float) $product->tax_rate }}%
  • الكمية بالمخزون {!! badge((int) $product->stock_qty, $product->is_low_stock ? 'danger' : 'success') !!} (حد الطلب: {{ (int) $product->min_qty }})
  • تتبّع بالـ IMEI {!! badge($product->track_serial ? 'نعم' : 'لا', $product->track_serial ? 'info' : 'secondary') !!}
  • الضمان{{ $product->warranty_months ? $product->warranty_months . ' شهر' : '—' }}
  • @if ($product->subscription_months)
  • مدة الاشتراك{{ $product->subscription_months }} شهر
  • @endif
@if ($product->description)
{{ $product->description }}
@endif
@if ($product->track_serial)
توزيع حالات الأجهزة
@foreach (\App\Models\DeviceUnit::STATUSES as $key => $label)
{{ $unitsByStatus[$key] ?? 0 }}
{{ $label }}
@endforeach
@endif
آخر حركات المخزون
@forelse ($movements as $m) @empty @endforelse
التاريخالنوعالكميةالرصيد بعدهاالبيانالمستخدم
{{ arabicDate($m->created_at, true) }} {!! badge($m->type_label, $m->type === 'in' ? 'success' : ($m->type === 'out' ? 'danger' : 'warning')) !!} {{ (int) $m->quantity }} {{ (int) $m->balance_after }} {{ $m->note }} {{ $m->user?->name ?? '—' }}
لا توجد حركات مخزون
@endsection