@php $signatureDataUri = $signatureDataUri ?? null; $pdfLocale = $pdfLocale ?? 'de'; $pdfLabels = $pdfLabels ?? []; $fmt = static fn (?string $v) => $v !== null && $v !== '' ? $v : null; $euro = static fn ($amount) => number_format((float) $amount, 2, ',', ' ') . ' €'; $issuerLines = array_values(array_filter($issuer['lines'] ?? [])); $duePercent = $invoice->percent_current_due !== null ? (float) $invoice->percent_current_due : null; $dueAmount = $duePercent !== null ? round((float) $invoice->total_amount * ($duePercent / 100), 2) : null; $pctLabel = $duePercent !== null ? rtrim(rtrim(number_format($duePercent, 2, '.', ''), '0'), '.') : ''; $currentDueText = $dueAmount !== null ? trans('invoices_pdf.current_due', ['pct' => $pctLabel], $pdfLocale) : null; $brandWord = mb_strtolower((string) ($issuer['brand'] ?? 'carrot'), 'UTF-8'); @endphp
{{ $brandWord }}
@if($fmt($issuer['name'] ?? null))

{{ $issuer['name'] }}

@endif @foreach ($issuerLines as $line)

{{ $line }}

@endforeach @if($fmt($issuer['email'] ?? null))
{{ $issuer['email'] }}
@endif @if($fmt($issuer['phone'] ?? null))

{{ $issuer['phone'] }}

@endif

{{ $pdfLabels['document_title'] ?? 'Rechnung' }}

{{ $pdfLabels['invoice_no'] ?? '№.' }}: {{ $invoice->invoice_number }}

{{ $pdfLabels['date_label'] ?? 'Datum' }}: {{ $invoice->invoice_date->format('d.m.Y') }}


{{ $pdfLabels['invoice_to'] ?? 'Rechnung an' }}

{{ $invoice->client_name }}

@if($fmt($invoice->client_street))

{{ $invoice->client_street }}

@endif @if($fmt($invoice->client_zip_city))

{{ $invoice->client_zip_city }}

@endif

{{ $pdfLabels['project'] ?? 'Project' }}

{{ $invoice->project_title }}

{{ $pdfLabels['billing'] ?? 'Abrechnung' }}

{{ $fmt($invoice->project_subtitle) ? $invoice->project_subtitle : ($pdfLabels['dash'] ?? '—') }}

{{ $pdfLabels['services_overview'] ?? 'Leistungsübersicht' }}

@foreach ($invoice->line_items as $index => $row) @endforeach
{{ $pdfLabels['pos'] ?? 'Pos.' }} {{ $pdfLabels['service'] ?? 'Leistung' }} {{ $pdfLabels['qty'] ?? 'Menge' }} {{ $pdfLabels['amount_eur'] ?? 'Betrag, €' }}
{{ $index + 1 }} {{ $row['description'] ?? '' }} {{ $row['quantity'] ?? '1' }} {{ $euro($row['line_total'] ?? 0) }}

{{ $pdfLabels['total_project'] ?? 'Gesamtprojekt' }}: {{ $euro($invoice->total_amount) }}

@if($dueAmount !== null && $currentDueText)

{{ $currentDueText }}: {{ $euro($dueAmount) }}

@endif

{{ $pdfLabels['payment_terms_heading'] ?? 'Zahlungsbedingungen' }}


{{ $issuer['payment_terms'] }}

{{ $pdfLabels['bank_heading'] ?? 'Bankverbindung:' }}

{{ $issuer['bank_name'] }}
{{ $pdfLabels['iban_label'] ?? 'IBAN' }}: {{ $issuer['iban'] }}
{{ $pdfLabels['account_holder_label'] ?? 'Kontoinhaber' }}: {{ $issuer['account_holder'] }}
@if($fmt($issuer['vat_note'] ?? null))

{{ $issuer['vat_note'] }}

@endif @if(!empty($issuer['notice_lines']))

{{ $pdfLabels['hint_title'] ?? 'Hinweis' }}

@foreach ($issuer['notice_lines'] as $line) @if($fmt($line))

{{ $line }}

@endif @endforeach @endif

{{ $pdfLabels['closing'] ?? 'Mit freundlichen Grüßen' }}

@if($signatureDataUri) @endif @if($fmt($issuer['name'] ?? null))

{{ $issuer['name'] }}

@endif