' . htmlspecialchars($lbl_invoice) . '

Customer

'.$invoice_data['customer']['name'].'

'.$invoice_data['customer']['street'].'

'.$invoice_data['customer']['zip'].', '.$invoice_data['customer']['city'].'

'.$invoice_data['customer']['country'].'

contact-details

sales@totalsafetysolutions.nl

Invoice Date
: ' . htmlspecialchars(date('d-m-Y', strtotime($invoice_date))) . '
Invoice Number
: ' . htmlspecialchars($invoice_identifcation_number) . '
Your Vat Number
: ' . htmlspecialchars($invoice_data['customer']['vat_number'] ?? '') . '
Reference
: Online order
Order number
: ' . htmlspecialchars($order_id) . '
Payment Method
: ' . (${$payment_method} ?? $invoice_data['header']['payment_method'] ). '
'; foreach ($items as $item) { $line_total = $item['price'] * $item['quantity']; $pdf .= ''; } $pdf .= '
Item code Description Quantity Price Total
110.600.000 ' . htmlspecialchars($item['name']); if ($item['serial_number'] !== 'N/A') { $pdf .= '
Serial: ' . htmlspecialchars($item['serial_number']) . ''; } if ($item['license_key'] !== 'Pending') { $pdf .= '
License: ' . htmlspecialchars($item['license_key']) . ''; } $pdf .= '
' . htmlspecialchars($item['quantity']) . ' € ' . number_format($item['price'], 2) . ' € ' . number_format($line_total, 2) . '
' . htmlspecialchars($lbl_subtotal) . '
€ ' . number_format($subtotal, 2) . '
'; if ($tax_amount > 0) { $tax_percentage = ($subtotal > 0) ? round(($tax_amount / $subtotal) * 100, 2) : 0; $vat_label = htmlspecialchars($lbl_tax) . ' (' . $tax_percentage . '%)'; if (!empty($vat_note)) { $vat_label .= ' (' . htmlspecialchars($vat_note) . ')'; } $pdf .= '
' . $vat_label . '
€ ' . number_format($tax_amount, 2) . '
'; } else { $vat_label = htmlspecialchars($lbl_tax) . ' (0%)'; if (!empty($vat_note)) { $vat_label .= ' (' . htmlspecialchars($vat_note) . ')'; } $vat_amount_display = !empty($vat_note) ? '€ 0.00' : 'included'; $pdf .= '
' . $vat_label . '
' . $vat_amount_display . '
'; } $pdf .= '
' . htmlspecialchars($lbl_total) . '
€ ' . number_format($payment_amount, 2) . '
';