@extends('layouts.app') @section('title', $location->name) @push('styles') @endpush @section('content') @php $typeBadge = [ 'warehouse' => 'badge-warehouse', 'store' => 'badge-store', 'pickup_point' => 'badge-pickup', ][$location->type ?? 'warehouse'] ?? 'badge-warehouse'; $typeLabel = str_replace('_', ' ', $location->type ?? 'warehouse'); @endphp @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
Total Products {{ number_format($stats['total_products'] ?? 0) }}
Total Quantity {{ number_format($stats['total_quantity'] ?? 0) }}
Low Stock {{ number_format($stats['low_stock'] ?? 0) }}
Orders Fulfilled {{ number_format($stats['orders'] ?? 0) }}

Manage Stock

@csrf

Stock at this Location

@if(isset($stocks) && $stocks->count())
@foreach($stocks as $stock) @php $qty = $stock->quantity ?? 0; $reserved = $stock->reserved ?? 0; $available = $qty - $reserved; $threshold = $stock->low_stock_threshold ?? 0; $isLow = $qty <= $threshold; @endphp @endforeach
Product Quantity Reserved Available Low Threshold Bin Last Restocked
{{ optional($stock->product)->name ?? '—' }}
@if(!empty(optional($stock->product)->sku))
{{ $stock->product->sku }}
@endif
{{ number_format($qty) }} {{ number_format($reserved) }} {{ number_format($available) }} {{ number_format($threshold) }} {{ $stock->bin_location ?? '—' }} {{ $stock->last_restocked_at ? \Carbon\Carbon::parse($stock->last_restocked_at)->diffForHumans() : '—' }}
{{ $stocks->withQueryString()->links() }}
@else

No stock recorded at this location yet.

@endif
@if(!$location->is_primary)
@csrf @method('DELETE')
Delete Location
Permanently remove this location and its stock records. This cannot be undone.
@endif @endsection