Price History Audit
@if($search) @endif
Loading...
@if(!$searched && empty($search)) {{-- Initial State --}}

Price History Audit Trail

Search by style code, order number, or shipment line ID to view price change history.

Style Code
View all price changes for a specific style
Order Number
See price changes related to a customer order
Shipment Line
Track price history for a specific shipment
@elseif($searched && empty($results)) {{-- No Results --}}
No results found for "{{ $search }}" in {{ str_replace('_', ' ', $searchType) }}.
@elseif(!empty($results))
{{-- Search Results Column --}}
Search Results {{ count($results) }}
@foreach($results as $result)
@if($result['type'] === 'style')
{{ $result['label'] }}
{{ $result['customer'] }} {{ $result['design'] }} {{ $result['prices_count'] }} prices
@elseif($result['type'] === 'order')
{{ $result['label'] }}
{{ $result['customer'] }} | {{ $result['order_date'] }} {{ $result['styles'] }} {{ $result['lines_count'] }} lines
@elseif($result['type'] === 'shipment_line')
{{ $result['label'] }}
PO: {{ $result['order_po'] }} {{ $result['style_ref'] }} - {{ $result['colourway'] }} @if($result['rt_invoice']) RT: {{ $result['rt_invoice'] }} @endif
@endif
@endforeach
{{-- Price Audits Column --}}
@if($selectedItemId)
Price Change History {{ $priceAudits->count() }} changes
@if($priceAudits->isEmpty())
No price changes found for this item.
@else
@foreach($priceAudits as $audit)
{{ $audit['event'] }} {{ $audit['style_ref'] }} | {{ $audit['price_name'] }} @if($audit['size'] !== 'All') {{ $audit['size'] }} @endif
{{ $audit['user'] }} {{ $audit['timestamp'] }}
@foreach($audit['changes'] as $change) @endforeach
Field Old Value New Value
{{ str_replace('_', ' ', $change['field']) }} {{ $change['old'] }} {{ $change['new'] }}
@endforeach
@endif
@else
Select an item from the results

Click on a search result to view its price change history.

@endif
@endif