@if (trim($query) === '')
Quick Actions
@can('sales.create') New Sale @endcan @can('quotations.create') New Quotation @endcan @can('sale_orders.create') New Sale Order @endcan @can('purchases.create') New Purchase @endcan @can('products.create') Add Product @endcan @can('customers.create') Add Customer @endcan @can('suppliers.create') Add Supplier @endcan @can('purchases.create') Import Excel @endcan @can('purchases.receive') Receive Stock @endcan @can('inventory.adjust') Stock Adjustment @endcan @can('reports.view') Low Stock @endcan @can('inventory.view') Expiring Products @endcan @can('reports.view') Reports @endcan @can('settings.manage') Settings @endcan @can('ai.use') Ask AI @endcan
@elseif ($history)
{{ $history['product']->name }}
{{ $history['product']->sku }}
In stock
{{ $history['stock_total'] }}
@forelse ($history['stock'] as $row) {{ $row['warehouse'] }}: {{ $row['quantity'] }} @empty No stock in any warehouse. @endforelse
@if ($history['can']['purchases'])Bought {{ $history['purchased'] }}@endif @if ($history['can']['purchases'] && $history['can']['sales']) · @endif @if ($history['can']['sales'])Sold {{ $history['sold'] }}@endif (cancelled entries are not shown)
@if ($history['can']['purchases'])
Purchases
@forelse ($history['purchases'] as $row) {{ \Illuminate\Support\Carbon::parse($row['date'])->format('d M Y') }} · {{ $row['number'] }} · {{ $row['party'] }} +{{ $row['quantity'] }} @ {{ number_format($row['rate'], 2) }} · {{ $row['warehouse'] }} @empty
None.
@endforelse @endif @if ($history['can']['sales'])
Sales
@forelse ($history['sales'] as $row) {{ \Illuminate\Support\Carbon::parse($row['date'])->format('d M Y') }} · {{ $row['number'] }} · {{ $row['party'] }} −{{ $row['quantity'] }} @ {{ $row['free'] ? 'free' : number_format($row['rate'], 2) }} · {{ $row['warehouse'] }} @empty
None.
@endforelse @endif @if ($history['can']['transfers'])
Transfers
@forelse ($history['transfers'] as $row) {{ \Illuminate\Support\Carbon::parse($row['date'])->format('d M Y') }} · {{ $row['number'] }} {{ $row['quantity'] }} {{ $row['from'] }} → {{ $row['to'] }} @empty
None.
@endforelse @endif
@elseif (empty($results))
No results for "{{ $query }}".
@else
@foreach ($results as $group => $items)
{{ $group }}
@foreach ($items as $item) @if (isset($item['history_id']))
{{ $item['label'] }}
@else {{ $item['label'] }} @endif @endforeach @endforeach
@endif
Press Esc to close