{% extends 'pdf/_base.html.twig' %}
{% import 'pdf/_macros.html.twig' as pdf %}
{% block extra_styles %}
table.items { width: 100%; border-collapse: collapse; margin-top: 12px; }
table.items th { background: #0d9488; color: #fff; text-align: left; padding: 6px 8px; font-size: 11px; }
table.items td { padding: 6px 8px; border-bottom: 1px solid #e5e5e5; }
table.tot { width: 45%; margin-left: 55%; margin-top: 12px; border-collapse: collapse; }
table.tot td { padding: 4px 8px; }
table.tot .lbl { color: #555; }
table.tot .grand td { border-top: 2px solid #0d9488; font-weight: bold; font-size: 14px; color: #0d9488; }
{% endblock %}
{% block body %}
{% set addr = [company.address, company.city, company.country]|filter(v => v)|join(' - ') %}
{% set contact = [company.phone, company.email]|filter(v => v)|join(' · ') %}
{{ pdf.docHeader(
company,
'FACTURE',
['N° ' ~ invoice.reference, 'Date : ' ~ (invoice.issuedAt ? invoice.issuedAt|date('d/m/Y H:i') : '')],
[addr, contact]
) }}
Facturé à : {{ invoice.customerName ?: 'Client comptant' }}
Réf. vente : {{ sale ? sale.reference : '' }}
| Désignation | Qté | P.U. TTC | Total TTC |
{% for line in sale ? sale.lines : [] %}
| {{ line.productName }} |
{{ line.quantity }} |
{{ pdf.money(line.unitPriceCents) }} |
{{ pdf.money(line.lineTotalCents) }} |
{% endfor %}
| Sous-total HT | {{ pdf.money(invoice.subtotalCents) }} |
| TVA | {{ pdf.money(invoice.taxCents) }} |
{% if invoice.discountCents > 0 %}
| Remise | - {{ pdf.money(invoice.discountCents) }} |
{% endif %}
| Total TTC | {{ pdf.money(invoice.totalCents) }} |
{% endblock %}