fix: replace narrow no-break space with U+00A0 in PDF number formatting

U+202F (narrow no-break space) is missing from DejaVu Sans in some
DomPDF versions on prod, rendering as '?'. U+00A0 is in Latin-1
Supplement and guaranteed present in all DejaVu Sans builds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mrKamoo
2026-06-19 16:17:37 +02:00
co-authored by Claude Sonnet 4.6
parent 29875be25b
commit 51ac1b8353
+5 -5
View File
@@ -208,9 +208,9 @@
<div class="item-designation">{{ $item['designation'] ?? '' }}</div> <div class="item-designation">{{ $item['designation'] ?? '' }}</div>
<div class="item-type">{{ $item['type'] ?? '' }}</div> <div class="item-type">{{ $item['type'] ?? '' }}</div>
</td> </td>
<td class="col-price">{{ number_format($item['prix_unitaire'] ?? 0, 2, ',', "\u{202F}") }} </td> <td class="col-price">{{ number_format($item['prix_unitaire'] ?? 0, 2, ',', "\xc2\xa0") }} </td>
<td class="col-qty">{{ $item['quantite'] ?? 0 }}</td> <td class="col-qty">{{ $item['quantite'] ?? 0 }}</td>
<td class="col-total">{{ number_format(($item['quantite'] ?? 0) * ($item['prix_unitaire'] ?? 0), 2, ',', "\u{202F}") }} </td> <td class="col-total">{{ number_format(($item['quantite'] ?? 0) * ($item['prix_unitaire'] ?? 0), 2, ',', "\xc2\xa0") }} </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
@@ -227,15 +227,15 @@
<tbody> <tbody>
<tr> <tr>
<td style="border: none; padding: 4px 0; font-weight: bold; font-size: 8.5pt; color: #0f172a; text-align: left;">TOTAL HT :</td> <td style="border: none; padding: 4px 0; font-weight: bold; font-size: 8.5pt; color: #0f172a; text-align: left;">TOTAL HT :</td>
<td style="border: none; padding: 4px 0; font-weight: bold; font-size: 8.5pt; color: #0f172a; text-align: right;">{{ number_format($devis->total_ht, 2, ',', "\u{202F}") }} </td> <td style="border: none; padding: 4px 0; font-weight: bold; font-size: 8.5pt; color: #0f172a; text-align: right;">{{ number_format($devis->total_ht, 2, ',', "\xc2\xa0") }} </td>
</tr> </tr>
<tr> <tr>
<td style="border: none; padding: 4px 0; font-weight: bold; font-size: 8.5pt; color: #0f172a; text-align: left;">TVA ({{ $devis->tva_rate }}%) :</td> <td style="border: none; padding: 4px 0; font-weight: bold; font-size: 8.5pt; color: #0f172a; text-align: left;">TVA ({{ $devis->tva_rate }}%) :</td>
<td style="border: none; padding: 4px 0; font-weight: bold; font-size: 8.5pt; color: #0f172a; text-align: right;">{{ number_format($devis->total_ttc - $devis->total_ht, 2, ',', "\u{202F}") }} </td> <td style="border: none; padding: 4px 0; font-weight: bold; font-size: 8.5pt; color: #0f172a; text-align: right;">{{ number_format($devis->total_ttc - $devis->total_ht, 2, ',', "\xc2\xa0") }} </td>
</tr> </tr>
<tr> <tr>
<td style="border: none; border-top: 2px solid #0f172a; padding: 9px 0 4px 0; font-weight: bold; font-size: 10.5pt; color: #0f172a; text-align: left;">TOTAL TTC :</td> <td style="border: none; border-top: 2px solid #0f172a; padding: 9px 0 4px 0; font-weight: bold; font-size: 10.5pt; color: #0f172a; text-align: left;">TOTAL TTC :</td>
<td style="border: none; border-top: 2px solid #0f172a; padding: 9px 0 4px 0; font-weight: 800; font-size: 10.5pt; color: #0284c7; text-align: right;">{{ number_format($devis->total_ttc, 2, ',', "\u{202F}") }} </td> <td style="border: none; border-top: 2px solid #0f172a; padding: 9px 0 4px 0; font-weight: 800; font-size: 10.5pt; color: #0284c7; text-align: right;">{{ number_format($devis->total_ttc, 2, ',', "\xc2\xa0") }} </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>