@php $meta = [ 'Supplier' => $customerInvoice->shop?->name ?? $companyName, 'Supplier Phone' => $customerInvoice->shop?->phone ?? '-', 'Supplier Address' => $customerInvoice->shop?->address ?? '-', 'Customer' => $customerInvoice->customer?->name, 'Customer Contact' => $customerInvoice->customer?->contact_person ?? '-', 'Customer Phone' => $customerInvoice->customer?->phone ?? '-', 'Customer Address' => $customerInvoice->customer?->address ?? '-', 'Delivery Location' => $customerInvoice->delivery_location, 'Pricing Strategy' => \App\Models\ProductSalePrice::strategyLabel($customerInvoice->pricing_strategy), 'Payment Terms' => $customerInvoice->payment_terms_days > 0 ? $customerInvoice->payment_terms_days.' days' : 'Cash on confirmation', 'Invoice Date' => $customerInvoice->invoice_at?->format('d M Y H:i'), 'Proforma Reference' => $customerInvoice->proformaInvoice?->proforma_number ?? '-', ]; $summary = [ ['label' => 'Lines', 'value' => $customerInvoice->items->count()], ['label' => 'Subtotal', 'value' => number_format((float) $customerInvoice->subtotal, 2)], ['label' => 'Status', 'value' => ucfirst($customerInvoice->status)], ]; $notes = $customerInvoice->notes; @endphp @extends('reports.layout') @section('content')
Invoice Items
@foreach ($customerInvoice->items as $item) @endforeach
Product Category Quantity Unit Price Line Total
{{ $item->product?->name }} {{ $item->product?->category?->name ?? '-' }} {{ number_format((float) $item->quantity, 2) }} {{ number_format((float) $item->unit_price, 2) }} {{ number_format((float) $item->line_total, 2) }}
@endsection