{{ $company['name'] }}
@if($company['address'])
{{ $company['address'] }}
@endif @if($company['city'])
{{ $company['city'] }} {{ $company['country'] }}
@endif @if($company['phone'])
{{ $company['phone'] }}
@endif @if($company['email'])
{{ $company['email'] }}
@endif @if($company['tax_id'])
{{ __('pdf.tax_id') }}: {{ $company['tax_id'] }}
@endif
{{ __('pdf.invoice') }}
#{{ $invoice->invoice_num ?? $invoice->id }}
@php $statusClass = match(strtolower($invoice->status)) { 'paid' => 'status-paid', 'overdue' => 'status-overdue', 'cancelled', 'canceled' => 'status-cancelled', default => 'status-unpaid', }; @endphp {{ $invoice->status }}

{{ __('pdf.bill_to') }}

@if($invoice->client) {{ $invoice->client->first_name }} {{ $invoice->client->last_name }}
@if($invoice->client->company_name){{ $invoice->client->company_name }}
@endif @if($invoice->client->address1){{ $invoice->client->address1 }}
@endif @if($invoice->client->city){{ $invoice->client->city }}, {{ $invoice->client->state }} {{ $invoice->client->postcode }}
@endif @if($invoice->client->country){{ $invoice->client->country }}
@endif {{ $invoice->client->email }} @endif

{{ __('pdf.invoice_details') }}

@if($invoice->date_paid) @endif @if($invoice->payment_method) @endif
{{ __('pdf.invoice_date') }}:{{ $invoice->date?->format('M d, Y') ?? '-' }}
{{ __('pdf.due_date') }}:{{ $invoice->due_date?->format('M d, Y') ?? '-' }}
{{ __('pdf.date_paid') }}:{{ $invoice->date_paid->format('M d, Y') }}
{{ __('pdf.payment_method') }}:{{ ucfirst($invoice->payment_method) }}
@forelse($invoice->items as $item) @empty @endforelse
{{ __('common.table.description') }} {{ __('pdf.taxed') }} {{ __('common.table.amount') }}
{{ $item->description }} {{ $item->taxed ? __('common.status.yes') : __('common.status.no') }} ${{ number_format((float)$item->amount, 2) }}
{{ __('pdf.no_items') }}
@if((float)$invoice->tax > 0) @endif @if((float)$invoice->credit > 0) @endif
{{ __('pdf.subtotal') }}:${{ number_format((float)$invoice->subtotal, 2) }}
{{ __('pdf.tax') }}:${{ number_format((float)$invoice->tax, 2) }}
{{ __('pdf.credit') }}:-${{ number_format((float)$invoice->credit, 2) }}
{{ __('pdf.total') }}:${{ number_format((float)$invoice->total, 2) }}
@if($invoice->notes)
{{ __('pdf.notes') }}:
{{ $invoice->notes }}
@endif