{{ $company['name'] }}

{{ $company['address'] }}

Phone: {{ $company['phone'] }} | Email: {{ $company['email'] }}

Website: {{ $company['website'] }} | Tax ID: {{ $company['tax_id'] }}

PURCHASE ORDER

PO Number: {{ $purchase->invoice_no }}

Date: {{ $purchase->purchase_date->format('F d, Y') }}

Status: {{ strtoupper($purchase->status) }}

Supplier Information

{{ $purchase->supplier->name }}

{{ $purchase->supplier->address ?? 'No address provided' }}

Phone: {{ $purchase->supplier->phone ?? 'N/A' }}

Email: {{ $purchase->supplier->email ?? 'N/A' }}

@if($purchase->supplier->tax_number)

Tax Number: {{ $purchase->supplier->tax_number }}

@endif

Order Details

Purchase Date: {{ $purchase->purchase_date->format('F d, Y') }}

@if($purchase->expected_delivery_date)

Expected Delivery: {{ $purchase->expected_delivery_date->format('F d, Y') }}

@endif @if($purchase->reference_number)

Reference: {{ $purchase->reference_number }}

@endif

Payment Status: {{ ucfirst($purchase->payment_status) }}

@if($purchase->payment_method)

Payment Method: {{ ucfirst($purchase->payment_method) }}

@endif
@foreach($purchase->items as $index => $item) @endforeach @if($purchase->discount_amount > 0) @endif @if($purchase->paid_amount > 0) @endif
# Item Description Type Quantity Unit Price Tax % Tax Amount Total
{{ $index + 1 }} @if($item->item_type === 'product') {{ $item->product->name ?? 'Product #' . $item->product_id }} @if($item->batch_number)
Batch: {{ $item->batch_number }} @endif @if($item->expiry_date)
Expires: {{ $item->expiry_date->format('M d, Y') }} @endif @else {{ $item->description }} @endif
{{ ucfirst($item->item_type) }} {{ $item->quantity }} KES {{ number_format($item->unit_price, 2) }} {{ $item->tax_percent }}% KES {{ number_format($item->tax_amount, 2) }} KES {{ number_format($item->total, 2) }}
Subtotal: KES {{ number_format($purchase->subtotal, 2) }}
Tax: KES {{ number_format($purchase->tax_amount, 2) }}
Discount: KES {{ number_format($purchase->discount_amount, 2) }}
Grand Total: KES {{ number_format($purchase->grand_total, 2) }}
Amount Paid: KES {{ number_format($purchase->paid_amount, 2) }}
Balance Due: KES {{ number_format($purchase->grand_total - $purchase->paid_amount, 2) }}
@if($purchase->notes || $purchase->terms_conditions)
@if($purchase->notes)

Notes

{{ $purchase->notes }}

@endif @if($purchase->terms_conditions)

Terms & Conditions

{{ $purchase->terms_conditions }}

@endif
@endif

Prepared By:

{{ $purchase->creator->name ?? 'N/A' }}

Date: {{ $purchase->created_at->format('M d, Y') }}

@if($purchase->approved_at)

Approved By:

{{ $purchase->approver->name ?? 'N/A' }}

Date: {{ $purchase->approved_at->format('M d, Y') }}

@endif