Batches & Expiry @can('reports.export') @endcan @php $filtersActive = $productFilter || $batchFilter || $warehouseFilter || $expiryFilter || $quantityFilter || $costFilter; @endphp @if ($filtersActive) @endif
ProductBatchWarehouseQuantityUnit CostExpiry @forelse ($batches as $batch) @empty @endforelse
{{ $batch->product?->name ?? "Deleted product (#{$batch->product_id})" }}
{{ $batch->product?->sku }}
{{ $batch->batch_number }} {{ $batch->warehouse->name }} {{ $batch->quantity }} {{ number_format($batch->unit_cost, 2) }} @if ($batch->expiry_date) $batch->isExpired(), 'bg-amber-50 text-amber-700 dark:bg-amber-500/10 dark:text-amber-400' => ! $batch->isExpired() && $batch->daysUntilExpiry() <= 30, 'bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400' => ! $batch->isExpired() && $batch->daysUntilExpiry() > 30, ])> {{ $batch->expiry_date->format('d M Y') }} @if ($batch->isExpired()) · expired @else · {{ $batch->daysUntilExpiry() }}d left @endif @else — @endif
@if ($filtersActive) @else @endif
@if ($batches->isNotEmpty())
{{ $batches->links() }}
@endif
← Back to stock balances