{{-- Sweet Works ERP | app/Modules/Warehouse/Resources/Views/lots/show.blade.php | v1.1 | 29/09/2026 --}} {{-- v1.1 — Ajustes de VB-2: agrega aviso "N de M ubicaciones retenidas" cuando el lote de negocio tiene más de una fila física (Retener/Liberar ahora opera sobre todas las filas del batch). --}} {{-- v1.0 — Ventana Estructural VB-2 (Punto 3): detalle del lote — no existía ninguna pantalla de lote antes de esta entrega. Botones Retener/Liberar protegidos por @can, con modal de motivo obligatorio. Estatus/tipo de existencia/origen muestran name + color del catálogo (regla 6). --}} @extends('layouts.vertical', ['pageTitle' => __('warehouse.lot-detail') . ' — ' . $lot->lot_number]) @section('page-title')

{{ __('warehouse.lot-detail') }} {{ $lot->lot_number }}

{{ __('warehouse.back-to-inventory') }}
@endsection @section('content')

{{ __('warehouse.lot-detail') }}

{{ $lot->lotStatus?->name ?? '—' }}
@if($lot->block_reason) @endif
{{ __('warehouse.lot-number') }}{{ $lot->lot_number }}
{{ __('warehouse.product') }}{{ $lot->product?->product_name ?? '—' }}
{{ __('warehouse.warehouse') }}{{ $lot->warehouse?->name ?? '—' }}
{{ __('warehouse.zone') }}{{ $lot->zone?->code }} {{ $lot->zone?->name }}
{{ __('warehouse.bin-code') }}{{ $lot->location?->code ?? '—' }}
{{ __('warehouse.quantity') }}{{ number_format($lot->quantity, 2) }}
{{ __('warehouse.available') }}{{ number_format($lot->quantity_available, 2) }}
{{ __('warehouse.reserved') }}{{ number_format($lot->quantity_reserved, 2) }}
{{ __('warehouse.unit-cost-lbl') }}${{ number_format($lot->unit_cost, 4) }}
{{ __('warehouse.entry-date') }}{{ $lot->entry_date?->format('d/m/Y') }}
{{ __('warehouse.origin') }}{{ $lot->originType?->name ?? '—' }}
{{ __('warehouse.stock-type') }} {{ $lot->stockType?->name ?? '—' }}
{{ __('warehouse.reason') }}{{ $lot->block_reason }}

{{ __('warehouse.status-history') }}

@forelse($lot->statusLogs as $log)
{{ $log->fromStatus?->name }} {{ $log->toStatus?->name }}
{{ $log->created_at->format('d/m/Y H:i') }} — {{ $log->user?->name }}
{{ $log->reason }}
@empty
{{ __('warehouse.no-status-history') }}
@endforelse

{{ __('warehouse.lot-status') }}

@if($businessLotSiblingsCount > 1)
{{ __('warehouse.locations-on-hold', ['held' => $onHoldSiblingsCount, 'total' => $businessLotSiblingsCount]) }}
@endif
@can('warehouse.lots.hold') @endcan @can('warehouse.lots.release') @endcan
{{-- Modal de motivo — Retener/Liberar --}} @endsection @section('scripts') @endsection