@php $items = $invoice->invoiceItems; $home_company = $invoice->homeCompany; $currency = $invoice->getCurrency(); $formatAmount = function($amount) use ($currency) { return ($currency->prefix ?? '') .' '. number_format($amount, 2) .' '. ($currency->suffix ?? ''); }; $related_invoice = $invoice->finalInvoice; @endphp
|
| Bill To | From |
|---|---|
|
{{ $invoice->client_company_name ?: $invoice->client_firstname . ' ' . $invoice->client_lastname }}
@if ($invoice->client_address_1)
{{ $invoice->client_address_1 }}@endif @if ($invoice->client_address_2) {{ $invoice->client_address_2 }} @endif @if ($invoice->client_postcode || $invoice->client_city) {{ $invoice->client_postcode }} {{ $invoice->client_city }} @endif @if ($invoice->client_country) {{ $invoice->client_country }} @endif @if ($invoice->client_tax_id) TAX ID: {{ $invoice->client_tax_id }} @endif |
{{ $invoice->home_company_company_name }}
@if ($invoice->home_company_address_1)
{{ $invoice->home_company_address_1 }}@endif @if ($invoice->home_company_address_2) {{ $invoice->home_company_address_2 }} @endif @if ($invoice->home_company_postcode || $invoice->home_company_city) {{ $invoice->home_company_postcode }} {{ $invoice->home_company_city }} @endif @if ($invoice->home_company_country) {{ $invoice->home_company_country }} @endif @if ($invoice->home_company_tax_local_id) TAX ID: {{ $invoice->home_company_tax_local_id }} @endif |
| Note: This credit note applies to Invoice #{{ $related_invoice->number }} issued on {{ $related_invoice->issue_date->format('j.m.Y') }}. |
| Description | Amount |
|---|---|
|
@foreach (explode("\n", $item->description) as $line)
@if (Str::startsWith(trim($line), '*-'))
{{ trim($line, '*- ') }}
@else
{{ $line }}
@endif
@endforeach
|
{{ $formatAmount($item->amount) }} |
| Subtotal: | {{ $formatAmount($invoice->subtotal) }} |
| {{ $tax['name'] ?: 'Tax' }} ({{ number_format($tax['rate'], 2) }}%) | {{ $formatAmount($tax['amount']) }} |
| Total Tax: | {{ $formatAmount($invoice->tax) }} |
| Grand Total: | {{ $formatAmount($invoice->total) }} |
| Date | Gateway | Transaction ID | Amount |
|---|---|---|---|
| {{ $item->transaction_date->format('j.m.Y') }} | {{ $gateway_name }} | {{ $item->transaction_id }} | {!! formatCurrency($item->amount_gross, $currency) !!} |