{{-- New-Unity ERP | app/Modules/Warehouse/Resources/Views/inventory/kardex.blade.php | v1.0 | 09/07/2026 23:51:00 --}} {{-- v1.0 — Kardex de movimientos por producto: entradas, salidas, saldo y costeo. --}} @extends('layouts.vertical', ['pageTitle' => __('warehouse.kardex')]) @section('page-title')

{{ __('warehouse.kardex') }} {{ __('warehouse.movement-history-by-product') }}

@can('warehouse.edit') @endcan {{ __('warehouse.back-to-inventory') }}
{{-- Modal Ajuste de Inventario --}} @section('scripts') @endsection @endsection @section('content') {{-- Info del producto --}} @if($inventory->isNotEmpty())
@foreach($inventory as $item)
{{ $item->zone->code }} — {{ $item->warehouse->code }}
{{ number_format($item->quantity_available, 2) }}
{{ __('warehouse.available-cap') }}
${{ number_format($item->avg_unit_cost, 2) }}
{{ __('warehouse.avg-cost') }}
@endforeach
@endif {{-- Lotes activos FIFO --}} @if($lots->isNotEmpty())

{{ __('warehouse.active-lots-fifo') }}

{{ $lots->count() }} {{ __('warehouse.lots-lower') }}
{!! __('warehouse.fifo-note') !!}
@foreach($lots as $i => $lot) @endforeach
# {{ __('warehouse.lot-number') }} {{ __('warehouse.pallet') }} {{ __('warehouse.zone') }} {{ __('warehouse.location') }} {{ __('warehouse.available-cap') }} {{ __('warehouse.reserved') }} {{ __('warehouse.unit-cost-lbl') }} {{ __('warehouse.entry-date') }} {{ __('warehouse.status') }}
@if($i === 0) {{ __('warehouse.next') }} @else {{ $i + 1 }} @endif {{ $lot->lot_number }} {{ $lot->pallet_code ?? '—' }} {{ $lot->zone->code }} {{ $lot->location->code ?? '—' }} {{ number_format($lot->quantity_available, 2) }} {{ number_format($lot->quantity_reserved, 2) }} ${{ number_format($lot->unit_cost, 4) }} {{ $lot->entry_date->format('d/m/Y') }} {{ ucfirst($lot->status) }}
@endif {{-- Kardex de movimientos --}}

{{ __('warehouse.movement-history-kardex') }}

@forelse($movements as $movement) @empty @endforelse
{{ __('warehouse.date') }} {{ __('warehouse.type') }} {{ __('warehouse.reference') }} {{ __('warehouse.lot') }} {{ __('warehouse.zone') }} {{ __('warehouse.quantity') }} {{ __('warehouse.unit-cost-lbl') }} {{ __('warehouse.total') }} {{ __('warehouse.balance') }} {{ __('warehouse.user') }}
{{ $movement->created_at->format('d/m/Y H:i') }} {{ $movement->type_label }} {{ $movement->reference_number ?? $movement->reference_type }} {{ $movement->lot->lot_number ?? '—' }} {{ $movement->zone->code ?? '—' }} {{ in_array($movement->movement_type, ['OUT','RESERVE','ADJUSTMENT_OUT','TRANSFER_OUT']) ? '-' : '+' }}{{ number_format($movement->quantity, 2) }} ${{ number_format($movement->unit_cost, 4) }} ${{ number_format($movement->total_cost, 2) }} {{ number_format($movement->balance_after, 2) }} {{ $movement->createdBy->name ?? '—' }}
{{ __('warehouse.no-movements') }}
{{ $movements->links() }}
{{-- Modal Ajuste de Inventario --}} @section('scripts') @endsection @endsection