{{ "Invoice To:" }}

{{ $this->getRecord()->customer?->name }}

@if ($this->getRecord()->customer?->company) {{ $this->getRecord()->customer->company }}
@endif @php $addressLine = collect([ $this->getRecord()->customer?->address, $this->getRecord()->customer?->city, $this->getRecord()->customer?->state, $this->getRecord()->customer?->postcode, ]) ->filter() ->implode(", "); @endphp @if ($addressLine) {{ $addressLine }}
@endif @if ($this->getRecord()->customer?->country) {{ $this->getRecord()->customer->country }} @endif

{{ "Pay To:" }}

{{ $brandSettings->site_name }}

{{ $brandSettings->invoice_company_address }} @if ($brandSettings->invoice_company_address)
@endif {{ collect([$brandSettings->invoice_company_city, $brandSettings->invoice_company_postcode])->filter()->implode(", ") }} @if ($brandSettings->invoice_company_city || $brandSettings->invoice_company_postcode)
@endif {{ $brandSettings->invoice_company_country }}
{{ "Invoice Date:" }}
{{ $this->getRecord()->created_at->appTimezone()->format("l, F jS, Y") }}
@if ($this->getRecord()->isUnpaid() && $this->getRecord()->due_date)
{{ "Due Date:" }}
{{ $this->getRecord()->due_date?->appTimezone()->format("l, F jS, Y") }}
@endif
@foreach ($this->getRecord()->items as $item)
{{ "Item" }}

{{ $item->description }}

{{ "Quantity" }}

{{ $item->quantity }}

{{ "Discount" }}

{{ $this->getRecord()->currency }} {{ get_amount($item->discount) }}

{{ "Amount" }}

{{ $this->getRecord()->currency }} {{ get_amount($item->amount) }}

@if (! $loop->last)
@endif @endforeach
{{ "Sub Total:" }}
{{ $this->getRecord()->currency }} {{ get_amount($this->getRecord()->sub_total) }}
{{ "Discount:" }}
{{ $this->getRecord()->currency }} {{ get_amount($this->getRecord()->discount) }}
{{ "VAT:" }}
{{ $this->getRecord()->currency }} {{ get_amount($this->getRecord()->vat) }}
@if ($this->getRecord()->shipping_amount > 0)
{{ "Shipping:" }}
{{ $this->getRecord()->currency }} {{ get_amount($this->getRecord()->shipping_amount) }}
@endif
{{ "Total:" }}
{{ $this->getRecord()->currency }} {{ get_amount($this->getRecord()->amount) }}
@php $payments = $this->completedPayments; @endphp @if ($payments->isNotEmpty())
@foreach ($payments as $payment)
{{ "Transaction Id" }}

{{ $payment->gateway_transaction_id }}

{{ "Gateway" }}

{{ $payment->gateway?->display_name }}

{{ "Amount" }}

{{ $payment->currency }} {{ get_amount($payment->amount) }}

{{ "Transaction Date" }}

{{ $payment->created_at->appTimezone()->format("M d Y H:i A") }}

@if (! $loop->last)
@endif @endforeach
@endif @if ($this->getRecord()->notes)

{{ $this->getRecord()->notes }}

@endif