@php /** @var \App\Domain\Inventory\Models\StockOpname $opname */ $isDraft = $opname->status->value === 'draft'; $uncounted = $items->whereNull('counted_quantity')->count(); @endphp

{{ __('Stock Opname') }} - {{ $opname->opname_number }}

{{ $opname->warehouse->name }} ยท {{ __('Started') }} {{ $opname->started_at->format('Y-m-d H:i') }} @if ($opname->creator) {{ __('by') }} {{ $opname->creator->name }} @endif

{{ __('Back to sessions') }}
@if (session('status'))
{{ session('status') }}
@endif @if (session('error'))
{{ session('error') }}
@endif
@if ($isDraft) {{ __(':count product(s) still need a counted quantity.', ['count' => $uncounted]) }} @else {{ __('Completed :date by :name.', ['date' => $opname->completed_at?->format('Y-m-d H:i'), 'name' => $opname->completer?->name ?? __('โ€”')]) }} @endif
@can(\App\Domain\Inventory\Support\InventoryPermissions::OPNAME_COMPLETE) @if ($isDraft)
@csrf 0)>{{ __('Complete Opname') }}
@endif @endcan
@if ($isDraft) @endif @forelse ($items as $item) @if ($isDraft) @endif @empty @endforelse
{{ __('Product') }} {{ __('SKU') }} {{ __('System Qty') }} {{ __('Counted Qty') }} {{ __('Variance') }}{{ __('Actions') }}
{{ $item->product->name }} {{ $item->product->sku }} {{ number_format($item->system_quantity) }} {{ $item->isCounted() ? number_format($item->counted_quantity) : __('โ€”') }} @if ($item->variance === null) {{ __('โ€”') }} @elseif ($item->variance === 0) 0 @elseif ($item->variance > 0) +{{ number_format($item->variance) }} @else {{ number_format($item->variance) }} @endif
@csrf @method('PATCH')
{{ __('No active products to count.') }}