@php $companySettings = \App\Models\CompanySetting::getSettings(); @endphp @if($companySettings && $companySettings->company_logo && \Illuminate\Support\Facades\Storage::disk('public')->exists($companySettings->company_logo)) @endif
{{ $companySettings->company_name ?? config('app.name') }}
INVOICE
Invoice Number
{{ $invoice->invoice_number ?? 'INV-001' }}
Issue Date
{{ ($invoice->issue_date ?? now())->format('F d, Y') }}
Due Date
{{ ($invoice->due_date ?? now()->addDays(30))->format('F d, Y') }}
@if($invoice->status ?? null)
Status
{{ ucfirst($invoice->status) }}
@endif
@if($invoice->customer ?? null)
{{ $invoice->customer->name }}
@if($invoice->customer->email){{ $invoice->customer->email }}
@endif @if($invoice->customer->phone){{ $invoice->customer->phone }}
@endif @if($invoice->customer->address){{ $invoice->customer->address }}@endif
@endif
@php $companySettings = \App\Models\CompanySetting::getSettings(); @endphp
@if($companySettings && $companySettings->company_name){{ $companySettings->company_name }}
@endif @if($companySettings && $companySettings->company_address){{ $companySettings->company_address }}
@endif @if($companySettings && $companySettings->company_phone){{ $companySettings->company_phone }}
@endif @if($companySettings && $companySettings->company_email){{ $companySettings->company_email }}@endif
@forelse($invoice->items ?? [] as $item) @empty @endforelse
Item Qty Price Amount
{{ $item->description }}
@if($item->notes)
{{ $item->notes }}
@endif
{{ number_format($item->quantity, 2) }} {{ $invoice->currency ?? 'USD' }} {{ number_format($item->unit_price, 2) }} {{ $invoice->currency ?? 'USD' }} {{ number_format($item->quantity * $item->unit_price, 2) }}
No items
Subtotal {{ $invoice->currency ?? 'USD' }} {{ number_format($invoice->subtotal ?? 0, 2) }}
@if(($invoice->tax_amount ?? 0) > 0)
Tax {{ $invoice->currency ?? 'USD' }} {{ number_format($invoice->tax_amount ?? 0, 2) }}
@endif @if(($invoice->discount_amount ?? 0) > 0)
Discount -{{ $invoice->currency ?? 'USD' }} {{ number_format($invoice->discount_amount ?? 0, 2) }}
@endif
Total {{ $invoice->currency ?? 'USD' }} {{ number_format($invoice->total ?? 0, 2) }}
Customer Note
@if($invoice->notes ?? null) {{ $invoice->notes }} @else No notes @endif
Terms
@if($invoice->terms ?? null) {{ $invoice->terms }} @else No terms specified @endif
Payment Method
@php $paymentMethod = null; if (isset($invoice) && is_object($invoice) && !empty($invoice->payment_method)) { $paymentMethod = $invoice->payment_method; } elseif (isset($invoiceData) && is_array($invoiceData) && !empty($invoiceData['payment_method'])) { $paymentMethod = $invoiceData['payment_method']; } $selectedBankAccount = null; if ($paymentMethod && is_string($paymentMethod) && str_starts_with($paymentMethod, 'bank_')) { $bankId = str_replace('bank_', '', $paymentMethod); $selectedBankAccount = \App\Models\BankAccount::find($bankId); } @endphp @if($paymentMethod === 'online')
Online Payment
Payments can be made online via our payment gateway.
@elseif($selectedBankAccount)
{{ $selectedBankAccount->bank_name }}
@if($selectedBankAccount->account_name)
Account: {{ $selectedBankAccount->account_name }}
@endif @if($selectedBankAccount->account_number)
Account #: {{ $selectedBankAccount->account_number }}
@endif @if($selectedBankAccount->iban)
IBAN: {{ $selectedBankAccount->iban }}
@endif @else No payment method specified @endif