total; $gross_total = $invoice->total_gross; $is_credit = $net_total < 0; // Check if any position has a discount to conditionally show the discount column $hasDiscount = false; foreach($invoice->positions as $p) { if (($p->discount ?? 0) > 0) { $hasDiscount = true; break; } } $gesamtrabatt = $invoice->gesamtrabatt ?? 0; $subtotal = 0; foreach($invoice->positions as $p) { $subtotal += $p->price_total ?? 0; } // Group positions by position_group $groupedPositions = []; $hasGroups = false; foreach($invoice->positions as $p) { if (!empty($p->position_group)) { $hasGroups = true; } } // If no positions have groups, put all in default (no group header will be shown) if (!$hasGroups) { $groupedPositions['_default'] = $invoice->positions; } else { foreach($invoice->positions as $p) { $group = $p->position_group ?? 'Sonstige'; if (!isset($groupedPositions[$group])) { $groupedPositions[$group] = []; } $groupedPositions[$group][] = $p; } } $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]); ?> Rechnung

Ihre Xinon vom invoice_date)?>

einleitender_text ?? ''): ?>

einleitender_text))?>

$positions): ?> amount ?? 0, 3, ",", "."); $unit = htmlspecialchars($p->unit ?? 'Stk.'); $price = number_format($p->price ?? 0, 2, ",","."); $discount = $p->discount ?? 0; $price_total = number_format($p->price_total ?? 0, 2, ",","."); $price_gross = number_format($p->price_gross ?? 0, 2, ",","."); $vatrate = number_format($p->vatrate ?? 0, 0, ",","."); ?> "> 0): ?> $vat_total): ?> 0): ?>
Leistung / Produkt Preis Menge Rabatt % Netto € Ust. % Brutto €
product_name ?? '')?> product_info) && $p->product_info): ?>
product_info)?>
matchcode) && $p->matchcode): ?>
matchcode)?>
% %
Zwischensumme:
Gesamtrabatt %: -
Gesamt Netto:
USt. %:
Gesamt Brutto:
tax_text): ?>

tax_text?>

Gutschrift! Bitte nicht überweisen.

billing_type == "sepa"): ?>

BITTE NICHT EINZAHLEN – DER BETRAG WIRD AUTOMATISCH VON IHREM KONTO ABGEBUCHT!

Zahlungsinformationen:

Bitte überweisen Sie den Rechnungsbetrag bis zum invoice_date))->modify("+14 days")->format("d.m.Y")?> auf folgendes Konto:

IBAN:
BIC:
Bank:

Verwendungszweck: invoice_number ?? "VORSCHAU"?>

Wichtig: Bitte geben Sie den oben angeführten Verwendungszweck bei der Überweisung an, damit wir Ihre Zahlung eindeutig zuordnen können.