@extends('layouts.app') @section('title', 'Product Report') @section('content')
Select a product to see its sales, purchases and stock history.
| Product | Category | Selling Price | Stock at Opening {{ $day->format('M d') }} |
Stock at Closing {{ $day->format('M d') }} |
Current Stock | Total Sold | Total Purchased | Last Sold | |
|---|---|---|---|---|---|---|---|---|---|
|
{{ $product->name }} SKU: {{ $product->sku }} |
{{ $product->category->name ?? 'โ' }} | {{ formatCurrency($product->selling_price) }} | @php($ds = $dayStock[$product->id] ?? null) @foreach(['opening', 'closing'] as $when)@if($ds && $ds[$when] !== null) {{ number_format($ds[$when], 2) }} @if($ds[$when . '_estimated'])est.@endif @else โ @endif | @endforeach{{ number_format($product->current_stock ?? 0) }} {{ $product->unit->short_name ?? '' }} | {{ number_format($product->total_sold ?? 0) }} | {{ number_format(($product->total_purchased ?? 0) + ($product->total_stock_in ?? 0)) }} | {{ $product->last_sold_at ? \Carbon\Carbon::parse($product->last_sold_at)->format('M d, Y') : 'โ' }} | View | |
| No products found | |||||||||