@extends('layouts.app') @section('title', 'Stock Management') @section('page-title', 'Stock Management') @section('content')
@forelse($stocks as $stock)
@if($stock->images && count($stock->images) > 0) {{ $stock->product_name }} @else @endif

{{ $stock->product_name }}

@if($stock->is_featured) Featured @endif

{{ $stock->product_code }}

₹{{ number_format($stock->price_per_unit, 2) }} per {{ $stock->unit }}
@if($stock->is_available && $stock->available_quantity > 0) Available @elseif($stock->available_quantity <= 0) Out of Stock @else Unavailable @endif
{{ number_format($stock->available_quantity, 2) }} {{ $stock->unit }}
{{ $stock->supplier->business_name }}
@if($stock->category)
{{ $stock->category->name }}
@endif @if($stock->quality_grade)
Quality: Grade {{ $stock->quality_grade }}
@endif
@empty

No stock items found

@if(request()->hasAny(['search', 'availability', 'supplier', 'category'])) No stock items match your current filters. Try adjusting your search criteria. @else Get started by adding your first stock item. @endif

Add First Stock Item
@endforelse
@if($stocks->hasPages())
{{ $stocks->appends(request()->query())->links('pagination::simple-tailwind') }}
@endif
@endsection