{{-- New-Unity ERP | purchases/costs/history.blade.php | v1.0 | 26/06/2026 --}} @extends('layouts.vertical') @section('content')

{{ __('purchases.price-history') }}

{{ __('purchases.back') }}
{{-- Filtros --}}
{{ __('purchases.clear') }}
{{-- Tabla --}}
@forelse($history as $h) @empty @endforelse
{{ __('purchases.product') }} {{ __('purchases.supplier') }} {{ __('purchases.type') }} {{ __('purchases.movement-col') }} {{ __('purchases.previous-cost') }} {{ __('purchases.new-price') }} {{ __('purchases.col-total-cost') }} {{ __('purchases.source-col') }} {{ __('purchases.reason-col') }} {{ __('purchases.user-col') }} {{ __('purchases.date') }}
{{ $h->product?->product_name ?? '—' }}
{{ $h->product?->sku }}
{{ $h->supplier?->commercial_name ?? $h->supplier?->name ?? __('purchases.generic-short') }} {{ $h->costTypeLabel() }} {{ $h->directionLabel() }} ${{ number_format($h->cost_previous, 4) }} ${{ number_format($h->cost_new, 4) }} {{ $h->currency }} ${{ number_format($h->total_cost_new, 4) }} {{ $h->sourceLabel() }} @if($h->change_reason) {{ Str::limit($h->change_reason, 40) }} @else @endif {{ $h->user?->name ?? __('purchases.system') }} {{ $h->created_at->format('d-m-Y H:i') }}
{{ __('purchases.no-price-history-found') }}
@if($history->hasPages()) @endif
@endsection