@extends('layouts.admin') @section('title', $product->name) @section('page_title', __('Product') . ' - ' . $product->name) @section('content')
@if($product->image) {{ $product->name }} @else
@endif
{{ $product->name }}

{{ $product->code }}

{{ __('Category') }}: {{ $product->category?->name ?? '-' }}

{{ __('Unit') }}: {{ $product->unit }}

{{ __('Price') }}: {{ number_format((float) $product->price, 2) }}

{{ __('Cost') }}: {{ number_format((float) $product->cost, 2) }}

هامش الربح: {{ $product->profit_margin }}%

الحد الأدنى: {{ $product->min_stock }}

{{ __('Status') }}: @if($product->is_active) {{ __('Active') }} @else {{ __('Inactive') }} @endif

@if($product->description)

{{ $product->description }}

@endif العودة
المخزون في كل مستودع
@forelse($product->stocks()->with('warehouse')->get() as $s) @empty @endforelse
{{ __('Warehouse') }}الكميةالمحجوزالمتاح
{{ $s->warehouse?->name }} {{ $s->quantity }} {{ $s->reserved }} {{ $s->available }}
لا يوجد مخزون مسجل
الإجمالي {{ $product->total_stock }}
آخر 20 حركة مخزون
@forelse($product->stockMovements()->with('warehouse', 'user')->latest()->limit(20)->get() as $m) @php $cls = match ($m->type) { 'in' => 'success', 'out' => 'danger', 'transfer' => 'info', 'adjustment' => 'warning text-dark', default => 'secondary' }; $label = match ($m->type) { 'in' => 'وارد', 'out' => 'صادر', 'transfer' => 'تحويل', 'adjustment' => 'جرد', default => $m->type }; @endphp @empty @endforelse
التاريخالنوع{{ __('Warehouse') }}الكميةقبلبعدالمستخدم
{{ $m->created_at?->format('d/m/Y H:i') }} {{ $label }} {{ $m->warehouse?->name }} {{ $m->quantity }} {{ $m->balance_before }} {{ $m->balance_after }} {{ $m->user?->name ?? '-' }}
لا توجد حركات
@endsection