{{ $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

Invoice

{{ $invoice->invoice_number }}
Date: {{ $invoice->txn_date?->toDateString() }}
@if ($invoice->due_date)
Due date: {{ $invoice->due_date->toDateString() }}
@endif @if ($invoice->payment_terms)
Terms: {{ $invoice->payment_terms }}
@endif
@php $snapshot = $invoice->customer_snapshot ?? []; @endphp
Bill to
{{ $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
@foreach ($invoice->lines as $line) @php $itemSnapshot = $line->item_snapshot ?? []; $productName = $itemSnapshot['name'] ?? ''; $rateFormatted = rtrim(rtrim(number_format((float) $line->unit_price, 7, '.', ''), '0'), '.'); @endphp @endforeach
Product/service Description Qty Rate Amount
{{ $productName }} {{ $line->description ?: $productName }} {{ number_format((float) $line->qty, 2) }} {{ $rateFormatted }} {{ number_format((float) $line->line_total, 2) }}
Subtotal {{ number_format((float) $invoice->sub_total, 2) }}
Discount {{ number_format((float) $invoice->discount_total, 2) }}
Tax {{ number_format((float) $invoice->tax_total, 2) }}
Total {{ number_format((float) $invoice->total_amount, 2) }}
Amount due {{ number_format((float) $invoice->balance, 2) }}
@if ($invoice->memo)
Memo
{!! nl2br(e($invoice->memo)) !!}
@endif