@extends('layouts.app') @section('title','Stock Balance') @section('content')
@php $totalValue = $items->sum('value'); $lowStockCount = $items->where('low_stock',true)->count(); @endphp
Total Items
{{ $items->count() }}
Total Stock Value
৳{{ number_format($totalValue,2) }}
Low Stock Items
{{ $lowStockCount }}
@forelse($items as $item) @empty @endforelse
CodeItem NameCategoryUnit InOut BalanceRate ValueStatus
{{ $item['code'] }} {{ $item['name'] }} {{ $item['category'] ?? '-' }} {{ $item['unit'] }} {{ number_format($item['qty_in'],2) }} {{ number_format($item['qty_out'],2) }} {{ number_format($item['balance'],2) }} ৳{{ number_format($item['rate'],2) }} ৳{{ number_format($item['value'],2) }} @if($item['low_stock']) Low Stock @elseif($item['balance'] == 0) Out of Stock @else OK @endif
No stock data found
Total Stock Value ৳{{ number_format($totalValue,2) }}
@endsection