{{ trans('inventory::modules.stock.lowStockItems') }}
{{ $summary['totals']['low_stock'] ?? 0 }}
{{ trans('inventory::modules.stock.outOfStock') }}
{{ $summary['totals']['out_of_stock'] ?? 0 }}
{{ trans('inventory::modules.stock.expiringBatchesLabel') }}
{{ $summary['totals']['expiring_batches'] ?? 0 }}
@php
$branchesSummary = $summary['branches'] ?? [];
@endphp
@forelse($branchesSummary as $branchSummary)
@php
$branch = $branchSummary['branch'] ?? null;
$lowStock = collect($branchSummary['low_stock'] ?? []);
$outOfStock = collect($branchSummary['out_of_stock'] ?? []);
$expiringBatches = collect($branchSummary['expiring_batches'] ?? []);
$hasAny = $lowStock->isNotEmpty() || $outOfStock->isNotEmpty() || $expiringBatches->isNotEmpty();
@endphp
@if($hasAny)
{{ $branch?->name ?? trans('inventory::modules.stock.selectBranch') }}
{{ trans('inventory::modules.stock.branch_summary_subtitle') }}
@if($lowStock->isNotEmpty())
{{ trans('inventory::modules.stock.lowStockItems') }}
| {{ trans('inventory::modules.inventoryItem.name') }} |
{{ trans('inventory::modules.stock.currentStock') }} |
{{ trans('inventory::modules.stock.minStock') }} |
{{ trans('inventory::modules.itemCategory.itemCategoryName') }} |
@foreach($lowStock as $item)
| {{ $item->name }} |
{{ (float) $item->current_stock }} {{ $item->unit?->name }} |
{{ (float) $item->threshold_quantity }} |
{{ $item->category?->name ?? '-' }} |
@endforeach
@endif
@if($outOfStock->isNotEmpty())
{{ trans('inventory::modules.stock.outOfStock') }}
| {{ trans('inventory::modules.inventoryItem.name') }} |
{{ trans('inventory::modules.inventoryItem.category') }} |
@foreach($outOfStock as $item)
| {{ $item->name }} |
{{ $item->category?->name ?? '-' }} |
@endforeach
@endif
@if($expiringBatches->isNotEmpty())
{{ trans('inventory::modules.stock.expiringBatchesLabel') }}
| {{ trans('inventory::modules.batchRecipe.batchInventory') }} |
{{ trans('inventory::modules.batchRecipe.quantity') }} |
{{ trans('inventory::modules.stock.expirationDate') }} |
{{ trans('inventory::modules.stock.stockStatus') }} |
@foreach($expiringBatches as $batch)
| {{ $batch->batchRecipe?->name ?? '-' }} |
{{ (float) $batch->remaining_quantity }} |
{{ optional($batch->expiry_date)->format('M d, Y') }} |
{{ trans('inventory::modules.stock.expiringSoonBadge') }}
|
@endforeach
@endif
{{ trans('inventory::modules.stock.noStockItemsFound') }}