@extends('backEnd.layouts.master') @section('title', 'Stock Report') @section('css') @endsection @section('content')
{{-- HEADER --}}

Stock Report

Live inventory status and valuation.

Export CSV
{{-- STATS OVERVIEW --}}
{{-- Total Products --}}
Total Items

{{ $products->total() }}

{{-- Use total() for pagination count --}}
{{-- Total Stock Qty --}}
Stock Quantity

{{ number_format($totalStockQty) }}

{{-- Total Stock Value --}}
Inventory Value

৳{{ number_format($totalStockValue, 2) }}

৳
{{-- STOCK TABLE --}}
Current Inventory List
@forelse($products as $p) @php $purchasePrice = $p->purchase_price ?? 0; $salePrice = $p->new_price ?? $p->old_price ?? 0; $stock = $p->stock ?? 0; $stockValue = $purchasePrice * $stock; @endphp @empty @endforelse
# Product Name In Stock Purchase Cost Selling Price Total Value
{{ $loop->iteration + ($products->currentPage() - 1) * $products->perPage() }} {{ $p->name }} {{ $stock }} ৳{{ number_format($purchasePrice, 2) }} ৳{{ number_format($salePrice, 2) }} ৳{{ number_format($stockValue, 2) }}

No products found

{{-- Pagination --}}
Showing {{ $products->firstItem() }} to {{ $products->lastItem() }} of {{ $products->total() }} entries
{{ $products->links('pagination::bootstrap-4') }}
@endsection @section('script') @endsection