@extends('layouts.admin_dynamic') @section('content')

Purchase Order

purewellness

PureWelleness

{{ $order->order_date }}

Sales Receipt

Sold By: {{ $order->user->name ?? 'Unknown' }}

Sold To: {{ $order->customer->name ?? 'Walk-in customer' }} ({{ $order->customer->phone ?? 'No phone' }})

@foreach($orderItems as $item) @endforeach
Item Qty Price Discount Total
{{ $item->product->product_name ?? 'Unknown Product' }} {{ number_format($item->quantity, 2) }} KES {{ number_format($item->price, 2) }} {{ number_format($item->discount ?? 0, 2) }}% KES {{ number_format($item->subtotal, 2) }}

Sub Total: KES {{ number_format($order->total_amount, 2) }}

Total: KES {{ number_format($order->total_amount, 2) }}

@if($invoice->creditNotes->count() > 0)

Credit Notes

@foreach($invoice->creditNotes as $creditNote) @endforeach
Credit Note # Date Reason Amount
{{ $creditNote->credit_note_number ?? 'N/A' }} {{ $creditNote->created_at->format('d M Y') }} {{ $creditNote->notes ?? 'Not specified' }} -KES {{ number_format($creditNote->amount, 2) }}
Total Credits -KES {{ number_format($invoice->total_credits, 2) }}
@endif

Due: KES {{ number_format($invoice->balance, 2) }}

Download Receipt {{-- Delete Request --}}
@endsection