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