@extends('layouts.master') @section('title') سند استلام مجمّع — فاتورة شراء {{ $orderId }} @endsection @section('content') @include('financial_years.partials.alerts') @php $fmt = fn ($v) => rtrim(rtrim(number_format((float) $v, 4, '.', ''), '0'), '.'); @endphp
| فاتورة الشراء | {{ $orderId }} | المورد | {{ $supplier ?? '-' }} |
|---|---|---|---|
| رقم فاتورة المورد | {{ $purchase->Purchase_invoice_number ?? '-' }} | أمين المستودع | {{ $receipts->map(fn ($r) => $r->receiver->name ?? null)->filter()->unique()->implode('، ') ?: '-' }} |
| أرقام القيود | {{ $receipts->pluck('dely_record')->filter()->unique()->implode('، ') ?: '-' }} | ملاحظات | {{ $receipts->pluck('notes')->filter()->unique()->implode(' — ') ?: '-' }} |
| # | الصنف | الكمية في الفاتورة | إجمالي المستلم | مرتجع قبل الاستلام | المتبقي | تكلفة الوحدة | القيمة |
|---|---|---|---|---|---|---|---|
| {{ $i + 1 }} | {{ $l->product_name }} | {{ $fmt($l->ordered) }} | {{ $fmt($l->qty) }} | @if ($l->returned > 0){{ $fmt($l->returned) }}@else - @endif | {{ $l->remaining > 0 ? $fmt($l->remaining) : '-' }} | {{ number_format($l->unit_cost, 2) }} | {{ number_format($l->value, 2) }} |
| الإجمالي | {{ $fmt($L->sum('ordered')) }} | {{ $fmt($L->sum('qty')) }} | {{ $L->sum('returned') > 0 ? $fmt($L->sum('returned')) : '-' }} | {{ $L->sum('remaining') > 0 ? $fmt($L->sum('remaining')) : '-' }} | {{ number_format($L->sum('value'), 2) }} | ||
| رقم السند | التاريخ | النوع | أمين المستودع | الكمية | القيمة | رقم القيد |
|---|---|---|---|---|---|---|
| {{ $r->id }} | {{ $r->created_at->format('Y-m-d H:i') }} | {{ $r->type === 'full' ? 'كلي' : 'جزئي' }} | {{ $r->receiver->name ?? '-' }} | {{ $fmt($r->items->sum('qty')) }} | {{ number_format($r->total_value, 2) }} | {{ $r->dely_record ?: '-' }} |