@extends('layouts.dashboard') @section('title','Warehouse Request') @section('page-title','Warehouse Request') @section('content')

{{ $record->reference }}

Paper Series: {{ $record->series_number }} · One request · {{ $documents->count() }} Focus STI {{ $documents->count()===1?'document':'documents' }} · {{ $record->destination_name }}

LIVE OPERATIONS{{ strtoupper(str_replace('_',' ',$record->status)) }}← All Warehouse Orders+ New Order
@if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif @if(in_array($record->status,['reserved','awaiting_str'],true) && $documents->every(fn($d)=>!$d->str_number))
Change Salesman / Showroom Destination · Keep SERIES & STI
@endif @if($record->status==='reserved' && $documents->every(fn($d)=>!$d->sti_number))
Edit allocation · Same SERIES
@endif

Combined Warehouse Picking Order

Salesman / Receiver: {{ $record->receiver_name ?: $record->destination_name }} · Destination: {{ $record->destination_name }} @if(filled($record->customer_name)) · Customer: {{ $record->customer_name }} @endif · {{ $record->created_at }}

@if($record->status!=='cancelled' && $documents->every(fn($d)=>filled($d->sti_number))) ⬇ Download Excel ⬇ Download Image (PNG) @else Enter Focus STI number for every used warehouse first. @endif
Exports contain only source warehouses actually used by this request. Focus STI numbers are manual; none are generated by SNYT.
@if($record->unavailable_items->isNotEmpty())

Not Available · Both warehouses

These products remain on the picking sheet, but they do not reserve or deduct warehouse stock.

@foreach($record->unavailable_items as $item)@endforeach
SKUBarcodeProductRequested but unavailableDIPWiWU-DIP
{{ $item->sku }}{{ $item->barcode }}{{ $item->name }}{{ $item->quantity }}Not AvailableNot Available
@endif @foreach($documents as $document)

{{ $document->warehouse_name }}

{{ $loop->iteration }} / {{ $documents->count() }}{{ ucfirst(str_replace('_',' ',$document->status)) }}

Source: {{ $document->warehouse_code }} · {{ $document->items->count() }} item rows · {{ number_format($document->items->sum('quantity')) }} pcs

Focus STI Number
{{ $document->sti_number ?: 'Not entered' }}
@if($document->str_number)
STR: {{ $document->str_number }}
@endif
@if(auth()->user()->isAdmin() && in_array($document->status,['reserved','sti_entered'],true) && !$document->str_number && !$document->posted_at)
@csrf
@endif @if(in_array($document->status,['reserved','sti_entered'],true))
Before STR: Change the quantity or remove an unavailable product below. The STI number stays the same. Changes here do not automatically update Focus — edit the same STI there before confirming STR.
@endif
@foreach($document->items as $item) @endforeach
#ProductCategorySKU · Copy individually into FocusBarcodeQty
{{ $loop->iteration }}
@if($item->main_image)@endif
{{ $item->name }}
WhatsApp line {{ $item->original_line }}
{{ $item->category?:'Uncategorized' }}
{{ $item->sku }}
{{ $item->barcode }} @if(in_array($document->status,['reserved','sti_entered'],true))
@csrf
@else {{ number_format($item->quantity) }} @endif
{{ $document->warehouse_name }} Total{{ number_format($document->items->sum('quantity')) }}

Step 1 · Create STI in Focus

Copy each SKU separately using its button above; enter the quantity beside it in Focus, then return here and enter the real Focus STI number for {{ $document->warehouse_name }}.

@if($document->status!=='received' && $document->status!=='cancelled')
@csrf
@else

{{ $document->sti_number?:'Not entered' }}

@endif

Step 2 · Confirm STR

Only after the physical transfer is registered in Focus. Confirming records quantities in the warehouse order register, exactly once.

@if($document->status==='received') ✓ Transfer confirmed

{{ $document->posted_at }}

@elseif($document->sti_number && $document->status!=='cancelled') @if(auth()->user()->isAdmin())
@csrf
@else

Admin must confirm STR.

@endif @else

Waiting for Focus STI number.

@endif
@endforeach

Combined Order Summary

One request, one picking sheet, each warehouse has its own Focus STI.

{{ number_format($documents->sum(fn($d)=>$d->items->sum('quantity'))) }} pcs

{{ $documents->count() }} source warehouse(s)

@if($isShowroom)

Showroom outbound tracking only: sales and live showroom on-hand are not managed. The source DIP / WIWU-DIP balance is adjusted when STR is confirmed.

@elseif($destStock->isNotEmpty())
Receiver's recorded stock after posted STRs
@foreach($destStock as $row)@endforeach
SKUProductReceived Qty
{{ $row->sku }}{{ $row->name }}{{ $row->quantity }}
@endif @if(!in_array($record->status,['cancelled','received','partially_received'],true))
@csrf
@endif
@endsection