@extends('layouts.app') @section('content')
Stock Transfer
Back to Stock
Instructions: Scan products to add to transfer list. Select source and target locations, then complete the transfer.
@if($product)
@csrf
Barcode: {{ $product->product_barcode }}
Name: {{ $product->product_name }}
Available: Loading... @ {{ session('location_name') }}
@else
Product not found. Please scan a valid barcode.
@endif
Recent Transfers (Transfer ID: {{ $transferId }})
@php $transfers = \App\Models\StockDetail::where('stock_transfer_id', $transferId) ->with(['badge', 'location']) ->orderBy('stock_id', 'desc') ->get() ->groupBy(function($item) { return $item->stock_systemid . '-' . $item->stock_badge_id . '-' . $item->stock_qty; }); @endphp @forelse($transfers as $group) @php $outRecord = $group->where('stock_type', 0)->first(); $inRecord = $group->where('stock_type', 1)->first(); $product = DB::table('product_details')->where('product_systemid', $outRecord->stock_systemid)->first(); @endphp @empty @endforelse
Time Product Badge From → To Qty
{{ $outRecord->stock_addtime->format('Y-m-d h:i A') }} {{ $product->product_name ?? 'N/A' }} {{ $outRecord->badge->price_name ?? 'N/A' }} @if($outRecord->location) {{ $outRecord->location->ld_name }} @endif → @if($inRecord && $inRecord->location) {{ $inRecord->location->ld_name }} @endif {{ number_format($outRecord->stock_qty, 3) }}
No transfers yet. Scan products to start transferring.
@foreach($products as $prod) @endforeach @if(session('success')) @endif @endsection