{{-- Expects: $invoice, $currency, $issueDate, $dueDate, $daysUntilDue, $paymentMethod, $selectedBankAccount, $paymentUrl --}}
@php
$thBg = $thBg ?? '#137fec';
$thText = $thText ?? '#ffffff';
$thBorderBottom = $thBorderBottom ?? '#0d5aa7';
$accent = $accent ?? '#137fec';
$paymentBg = $paymentBg ?? '#eff6ff';
$paymentBorder = $paymentBorder ?? '#bfdbfe';
$paymentTitle = $paymentTitle ?? '#1d4ed8';
$paymentText = $paymentText ?? '#1e3a8a';
@endphp
| Description |
Qty |
Unit |
Tax |
Total |
@forelse($invoice->items ?? [] as $item)
@php
$lineTotal = $item->total ?? (($item->quantity * $item->unit_price) * (1 + ((float) ($item->tax_rate ?? 0)) / 100));
@endphp
|
{{ $item->description }}@if(!empty($item->notes)) — {{ $item->notes }}@endif
|
{{ number_format((float) $item->quantity, 2) }} |
{{ $currency }} {{ number_format((float) $item->unit_price, 2) }} |
{{ number_format((float) ($item->tax_rate ?? 0), 2) }}% |
{{ $currency }} {{ number_format((float) $lineTotal, 2) }} |
@empty
| No items |
@endforelse
|
|
@if(($totalsStyle ?? '') === 'bluebox')
| Subtotal |
{{ $currency }} {{ number_format((float) ($invoice->subtotal ?? 0), 2) }} |
@if((float) ($invoice->tax_amount ?? 0) > 0)
| Tax |
{{ $currency }} {{ number_format((float) ($invoice->tax_amount ?? 0), 2) }} |
@endif
@if((float) ($invoice->discount_amount ?? 0) > 0)
| Discount |
-{{ $currency }} {{ number_format((float) ($invoice->discount_amount ?? 0), 2) }} |
@endif
| Total due |
{{ $currency }} {{ number_format((float) ($invoice->total ?? 0), 2) }} |
@if((float) ($invoice->paid_amount ?? 0) > 0)
| Paid |
{{ $currency }} {{ number_format((float) ($invoice->paid_amount ?? 0), 2) }} |
| Balance due |
{{ $currency }} {{ number_format((float) ($invoice->balance ?? 0), 2) }} |
@endif
@else
| Subtotal |
{{ $currency }} {{ number_format((float) ($invoice->subtotal ?? 0), 2) }} |
@if((float) ($invoice->tax_amount ?? 0) > 0)
| Tax |
{{ $currency }} {{ number_format((float) ($invoice->tax_amount ?? 0), 2) }} |
@endif
@if((float) ($invoice->discount_amount ?? 0) > 0)
| Discount |
-{{ $currency }} {{ number_format((float) ($invoice->discount_amount ?? 0), 2) }} |
@endif
| Total due |
{{ $currency }} {{ number_format((float) ($invoice->total ?? 0), 2) }} |
@if((float) ($invoice->paid_amount ?? 0) > 0)
| Paid |
{{ $currency }} {{ number_format((float) ($invoice->paid_amount ?? 0), 2) }} |
| Balance due |
{{ $currency }} {{ number_format((float) ($invoice->balance ?? 0), 2) }} |
@endif
@endif
|
|
@if(!empty($invoice->notes))
|
Notes
{{ $invoice->notes }}
|
@endif
@if(!empty($invoice->terms))
|
Terms & conditions
{{ $invoice->terms }}
|
@endif
| Payment instructions |
|
Please make payment within {{ $daysUntilDue }} days of the invoice date.
|
@if($paymentMethod === 'online')
|
Payment method: Online payment. Payments via payment gateway.@if($paymentUrl) {{ $paymentUrl }}@endif
|
@elseif($selectedBankAccount)
|
Bank transfer: {{ $selectedBankAccount->bank_name }}
@if($selectedBankAccount->account_name) — {{ $selectedBankAccount->account_name }}@endif
@if($selectedBankAccount->account_number) — {{ $selectedBankAccount->account_number }}@endif
@if($selectedBankAccount->swift_code) — SWIFT {{ $selectedBankAccount->swift_code }}@endif
@if($selectedBankAccount->iban) — IBAN {{ $selectedBankAccount->iban }}@endif
@if($selectedBankAccount->branch_name) — {{ $selectedBankAccount->branch_name }}@endif
@if($selectedBankAccount->currency) ({{ $selectedBankAccount->currency }})@endif
|
@else
|
Payment via bank transfer or agreed methods.
|
@endif
|
|