@php $meta = [ 'Customer' => $customerOrder->customer?->name, 'Shop' => $customerOrder->shop?->name, 'Recorded By' => $customerOrder->createdBy?->name, 'Customer LPO' => $customerOrder->lpo_number, 'LPO Date' => $customerOrder->lpo_date?->format('d M Y'), 'Pricing Strategy' => \App\Models\ProductSalePrice::strategyLabel($customerOrder->pricing_strategy), 'Payment Terms' => $customerOrder->payment_terms_days > 0 ? $customerOrder->payment_terms_days.' days' : 'Cash on confirmation', 'Proforma Reference' => $customerOrder->proformaInvoice?->proforma_number ?? '-', ]; $summary = [ ['label' => 'Lines', 'value' => $customerOrder->items->count()], ['label' => 'Subtotal', 'value' => number_format((float) $customerOrder->subtotal, 2)], ['label' => 'Status', 'value' => ucfirst(str_replace('_', ' ', $customerOrder->status))], ]; $notes = $customerOrder->notes; @endphp @extends('reports.layout') @section('content')
| Product | Category | Ordered Qty | Delivered Qty | Available Stock | Shortage | Unit Price | Line Total |
|---|---|---|---|---|---|---|---|
| {{ $item->product?->name }} | {{ $item->product?->category?->name ?? '-' }} | {{ number_format((float) $item->quantity_ordered, 2) }} | {{ number_format((float) $item->quantity_delivered, 2) }} | {{ number_format((float) $item->available_quantity, 2) }} | {{ number_format((float) $item->shortage_quantity, 2) }} | {{ number_format((float) $item->unit_price, 2) }} | {{ number_format((float) $item->line_total, 2) }} |