@extends('layouts.app') @section('title', 'Sale Details') @section('content')
{{ $sale->customer_name ?: 'Walk-in Customer' }}
{{ $sale->created_at->format('d M, Y') }} {{ $sale->created_at->format('H:i') }}
| Product | Qty | Unit Price | Subtotal |
|---|---|---|---|
{{ $item->product?->name ?? 'Deleted Product' }}@if(isset($item->product->sku)) SKU: {{ $item->product->sku }} @endif @php $itemBatches = $sale->batchAllocations->where('product_id', $item->product_id); @endphp @if($itemBatches->isNotEmpty())
Batch: {{ $itemBatches->map(fn ($a) => ($a->batch->batch_no ?? '?') . ($a->batch?->expiry_date ? ' (exp ' . $a->batch->expiry_date->format('d M Y') . ')' : '') . ' × ' . (float) $a->quantity)->implode(', ') }}
@endif
|
{{ $item->quantity }} | MWK {{ number_format($item->price, 2) }} | MWK {{ number_format($item->subtotal, 2) }} |
| Total | MWK {{ number_format($sale->total_amount, 2) }} | ||
| Product | Orig. Qty | New Qty | Orig. Price | New Price |
|---|---|---|---|---|
| {{ $productName }} | {{ $originalQty }} | {{ $newQty }} | MWK {{ number_format($originalPrice, 2) }} | MWK {{ number_format($newPrice, 2) }} |
Powered by {{ setting('powered_by') }}