fix: correct PDF invoice address separator and translate label

- Replace ``<br>`` with ``\n`` in ``InvoicePDF::makeAddress()`` so
  dompdf renders line breaks instead of showing raw HTML tags.
- Translate ``order number`` to ``Numéro de commande`` in the custom
  fields passed to the invoice builder.

The amount-in-words was already in English because the container
lacked French ICU data (``icu-data-full``); that was fixed at
runtime, not in code.
This commit is contained in:
Valentin Lab
2026-02-09 08:53:38 +01:00
parent ed3909782b
commit 1bf920c123

View File

@@ -19,7 +19,7 @@ class InvoicePDF
$invoice = Invoices::getFull($id); $invoice = Invoices::getFull($id);
$customFields = []; $customFields = [];
if ($orderRef = optional($invoice->order)->ref) { if ($orderRef = optional($invoice->order)->ref) {
$customFields['order number'] = $orderRef; $customFields['Numéro de commande'] = $orderRef;
} }
$customer = new Party([ $customer = new Party([
@@ -61,7 +61,7 @@ class InvoicePDF
trim(($address->zipcode ?? '').' '.($address->city ?? '')), trim(($address->zipcode ?? '').' '.($address->city ?? '')),
]); ]);
return implode('<br>', $lines); return implode("\n", $lines);
} }
public static function makeItems($details) public static function makeItems($details)