@extends('admin.layouts.master') @section('title', $adjustment->number) @section('page_title', 'جرد: ' . $adjustment->number) @section('breadcrumbs') @endsection @section('content')

{{ $adjustment->number }} @php $sm = ['pending'=>'warning','approved'=>'success','rejected'=>'danger']; @endphp {{ $adjustment->status }}

@can('stock.adjust') @if($adjustment->status === 'pending')
@csrf
@csrf
@endif @endcan
المستودع{{ $adjustment->warehouse?->name }}
السبب{{ $adjustment->reason }}
التاريخ{{ $adjustment->adjusted_at?->format('Y-m-d') }}
أنشئت بواسطة{{ $adjustment->user?->name }}
اعتمدها{{ $adjustment->approver?->name ?? '—' }} ({{ $adjustment->approved_at?->format('Y-m-d H:i') ?? '—' }})
@if($adjustment->notes)
ملاحظات: {!! nl2br(e($adjustment->notes)) !!}
@endif
العناصر
@foreach($adjustment->items as $item) @php $diff = (float) $item->difference; @endphp @endforeach
المنتجرصيد النظامالفعليالفرقتكلفة الوحدةملاحظات
{{ $item->product?->sku }} — {{ $item->product?->name_ar }} {{ number_format((float) $item->system_qty, 3) }} {{ number_format((float) $item->actual_qty, 3) }} {{ ($diff >= 0 ? '+' : '').number_format($diff, 3) }} {{ $item->cost_per_unit !== null ? number_format($item->cost_per_unit, 2) : '—' }} {{ $item->notes ?? '—' }}
@endsection