@php $meta = [ 'Shop' => $sale->shop?->name, 'Sold By' => $sale->soldBy?->name, 'Sold At' => $sale->sold_at?->format('d M Y H:i'), 'Product Category' => $sale->product?->category?->name ?? '-', ]; $summary = [ ['label' => 'Quantity Sold', 'value' => number_format((float) $sale->quantity, 2)], ['label' => 'Unit Price', 'value' => number_format((float) $sale->unit_price, 2)], ['label' => 'Cash Received', 'value' => number_format((float) $sale->cash_received, 2)], ]; $notes = $sale->notes; $lineTotal = (float) $sale->quantity * (float) $sale->unit_price; @endphp @extends('reports.layout') @section('content')
| Product | Quantity | Unit Price | Line Total | Cash Received |
|---|---|---|---|---|
| {{ $sale->product?->name }} | {{ number_format((float) $sale->quantity, 2) }} | {{ number_format((float) $sale->unit_price, 2) }} | {{ number_format($lineTotal, 2) }} | {{ number_format((float) $sale->cash_received, 2) }} |