العودة

التقرير النهائي

{{ $department->name }}

الرمز: {{ $department->code }} | التاريخ: {{ now()->format('Y-m-d') }}

@if($department->organization)
{{ $department->organization->name }}
@endif

{{ $items->count() }}

عدد الأصناف

{{ $totalItemsQuantity }}

إجمالي الكمية

@php $totalBarcodes = $items->sum('barcodes_count'); @endphp

{{ $totalBarcodes }}

عدد الباركودات

الموجودات ({{ $items->count() }})

@if($items->count() > 0)
@foreach($items as $index => $item) @php // الحصول على أول باركود للمادة (أو أحدث باركود) $barcode = $item->barcodes()->latest()->first(); $barcodeValue = $barcode ? $barcode->barcode_value : ($item->code ?? '-'); // إزالة "UNIT" من الباركود إذا كان موجوداً if ($barcodeValue && strpos($barcodeValue, '-UNIT-') !== false) { $barcodeValue = str_replace('-UNIT-', '-', $barcodeValue); } @endphp @endforeach
# اسم المادة النوع الشعبة الوحدة الكمية ملاحظات
{{ $index + 1 }} {{ $item->name }} @if($item->type) {{ $item->type->name }} @else - @endif {{ $item->section ? $item->section->name : '-' }} {{ $item->unit ? $item->unit->name : '-' }} {{ $item->quantity }} {{ $item->details ? Str::limit($item->details, 50) : '-' }}
@else
لا توجد مواد في هذا القسم
@endif @include('reports._signatures')

تم إنشاء التقرير في {{ now()->format('Y-m-d H:i:s') }}