@extends('layouts.app') @section('content')

Items / Products

New Item
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
Clear
@php $rawItems = $items->where('type', 'raw'); $finishItems = $items->where('type', 'finish'); $lowStockItems = $items->filter(fn($i) => $i->current_stock <= $i->minimum_stock && $i->minimum_stock > 0); @endphp
RAW Materials
{{ $rawItems->count() }}
FINISH Products
{{ $finishItems->count() }}
Low Stock Items
{{ $lowStockItems->count() }}
Total Items
{{ $items->count() }}
@forelse($items as $item) @empty @endforelse
Code Item Name Type Unit Purchase Price Sale Price Stock Status Actions
{{ $item->code }} {{ $item->name }} {{ $types[$item->type] ?? strtoupper($item->type) }} {{ $item->unit }} Rs. {{ number_format($item->purchase_price, 2) }} Rs. {{ number_format($item->sale_price, 2) }} {{ number_format($item->current_stock, 2) }} {{ $item->unit }} @if($item->current_stock <= $item->minimum_stock && $item->minimum_stock > 0) @endif @if($item->is_active) Active @else Inactive @endif
@csrf @method('DELETE')

No items found. Create your first item

Total: {{ $items->count() }} items
@endsection