{{ $company->name }}

@if ($company->address)
{!! nl2br(e($company->address)) !!}
@endif @if ($company->phone)
{{ $company->phone }}
@endif @if ($company->email)
{{ $company->email }}
@endif @if ($company->tax_number)
Tax: {{ $company->tax_number }}
@endif

Purchase order

{{ $purchaseOrder->po_number }}
Date: {{ $purchaseOrder->po_date?->toDateString() }}
@if ($purchaseOrder->expected_delivery_date)
Expected delivery: {{ $purchaseOrder->expected_delivery_date->toDateString() }}
@endif
@php $snapshot = $purchaseOrder->vendor_snapshot ?? []; @endphp
Vendor
{{ $snapshot['name'] ?? '' }}
@if (! empty($snapshot['email']))
{{ $snapshot['email'] }}
@endif @if (! empty($snapshot['phone']))
{{ $snapshot['phone'] }}
@endif @if (! empty($snapshot['address']))
{!! nl2br(e($snapshot['address'])) !!}
@endif
@if ($purchaseOrder->ship_to)
Ship to
{!! nl2br(e($purchaseOrder->ship_to)) !!}
@endif @foreach ($purchaseOrder->lines as $line) @php $itemSnapshot = $line->item_snapshot ?? []; $productName = $itemSnapshot['name'] ?? ''; @endphp @endforeach
Product/service Description Qty Rate Amount
{{ $productName }} {{ $line->description ?: $productName }} {{ number_format((float) $line->quantity, 2) }} {{ number_format((float) $line->unit_price, 2) }} {{ number_format((float) $line->line_total, 2) }}
Subtotal {{ number_format((float) $purchaseOrder->sub_total, 2) }}
Discount {{ number_format((float) $purchaseOrder->discount_total, 2) }}
Tax {{ number_format((float) $purchaseOrder->tax_total, 2) }}
Total {{ number_format((float) $purchaseOrder->total_amount, 2) }}
@if ($purchaseOrder->memo)
Memo
{!! nl2br(e($purchaseOrder->memo)) !!}
@endif