Add VAT number handling in order processing and invoice templates

This commit is contained in:
“VeLiTi”
2026-01-27 18:36:21 +01:00
parent f7a91737bc
commit f7733b4113
14 changed files with 81 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
<?php
$payment_method = 'payment_method_'.$invoice_data['header']['payment_method'];
$message = '
<!DOCTYPE html>
@@ -30,11 +31,28 @@ $message = '
5061 JR OISTERWIJK<br>
Nederland
</td>
<td width="50%" style="vertical-align: top; text-align: right;">
<!-- Contact details if needed -->
<td width="50%" style="vertical-align: top; text-align: left;">
<strong style="color: #2c5f5d; font-size: 14px;">contact-details</strong><br>
Ralf Adams<br>
+31 13 8221480<br>
ralfadams@totalsafetysolutions.nl
</td>
</tr>
</table>
<!-- Customer -->
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin-bottom: 25px;">
<tr>
<td width="50%" style="vertical-align: top; font-size: 13px; line-height: 1.5;">
<strong style="color: #2c5f5d; font-size: 14px;">Customer</strong><br>
'.$invoice_data['customer']['name'].'<br>
'.$invoice_data['customer']['street'].'<br>
'.$invoice_data['customer']['zip'].', '.$invoice_data['customer']['city'].'<br>
'.$invoice_data['customer']['country'].'
</td>
</tr>
</table>
<!-- Invoice Details -->
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin-bottom: 25px; font-size: 13px;">
@@ -49,6 +67,10 @@ $message = '
<td style="padding: 3px 0;"><strong>Invoice Number:</strong></td>
<td style="padding: 3px 0;">' . htmlspecialchars($order_id) . '</td>
</tr>
<tr>
<td style="padding: 3px 0;"><strong>Your Vat Number:</strong></td>
<td style="padding: 3px 0;">' . htmlspecialchars($invoice_data['customer']['vat_number'] ?? '') . '</td>
</tr>
</table>
</td>
<td width="50%" style="vertical-align: top; padding-left: 10px;">
@@ -61,6 +83,10 @@ $message = '
<td style="padding: 3px 0;"><strong>Order number:</strong></td>
<td style="padding: 3px 0;">' . htmlspecialchars($order_id) . '</td>
</tr>
<tr>
<td style="padding: 3px 0;"><strong>Payment Methodr:</strong></td>
<td style="padding: 3px 0;">' . (${$payment_method} ?? $invoice_data['header']['payment_method'] ). '</td>
</tr>
</table>
</td>
</tr>