@extends('admin.layouts.master') @section('title', 'كارت الصنف — ' . $product->name_ar) @section('css') @endsection @section('content')
{{-- ===== PRODUCT HERO ===== --}}
كارت الصنف

{{ $product->name_ar }}

@if($product->sku) {{ $product->sku }} @endif @if($product->category) {{ $product->category->name_ar }} @endif @if($product->material) {{ $product->material->name_ar }} @endif @if($product->thickness) سُمك: {{ $product->thickness->name_ar }} @endif @if($product->size) مقاس: {{ $product->size->name_ar }} @endif @if($product->color) {{ $product->color->name_ar }} @endif @if($product->type) {{ $product->type->name_ar }} @endif @if($product->unit) {{ $product->unit->name_ar }} @endif
@can('stock_movements.view') كل حركات الصنف @endcan رجوع للأرصدة
{{-- Service flags --}} @if($product->supports_cutting_service || $product->supports_forming_service || $product->allows_fractional_sale)
@if($product->supports_cutting_service) يدعم خدمة القطع @endif @if($product->supports_forming_service) يدعم خدمة التشكيل @endif @if($product->allows_fractional_sale) يُباع بالكسور @endif
@endif
{{-- ===== WAREHOUSE SELECTOR (multiple warehouses) ===== --}} @if($warehouses->count() > 1)
اختر المخزن:
@foreach($warehouses as $wh) @endforeach
@else @endif {{-- ===== KPI CARDS ===== --}}
الرصيد الحالي
{{ number_format((float) $balance, 2) }}
{{ $product->unit?->name_ar ?? '' }}
إجمالي الوارد
{{ number_format($movementsStats['in_qty'], 2) }}
{{ $product->unit?->name_ar ?? '' }}
إجمالي الصادر
{{ number_format($movementsStats['out_qty'], 2) }}
{{ $product->unit?->name_ar ?? '' }}
@php $statusClass = $balance <= 0 ? 'text-danger' : ($balance < $product->minimum_stock_quantity ? 'text-warning' : 'text-success'); $statusIconBg = $balance <= 0 ? 'bg-danger-subtle' : ($balance < $product->minimum_stock_quantity ? 'bg-warning-subtle' : 'bg-success-subtle'); $statusText = $balance <= 0 ? 'نفد المخزون' : ($balance < $product->minimum_stock_quantity ? 'عجز في الرصيد' : 'رصيد طبيعي'); $statusIcon = $balance <= 0 ? 'ti-cube-off' : ($balance < $product->minimum_stock_quantity ? 'ti-alert-triangle' : 'ti-circle-check'); @endphp
الحالة
{{ $statusText }}
حد التنبيه: {{ number_format((float)$product->minimum_stock_quantity, 2) }}
{{-- ===== MOVEMENTS TABLE ===== --}}
سجل حركات الصنف
آخر 500 حركة — يُحدَّث تلقائيًا عند تغيير المخزن.
0 حركة
التاريخ نوع الحركة الاتجاه الكمية الرصيد بعد الحركة تكلفة الوحدة رقم المرجع بواسطة ملاحظات
@endsection @section('js') @endsection