{% extends '@Commercial/commercial/layout.html.twig' %} {% block commercial_title %}Bon de commande {{ order.number ?: 'Brouillon' }}{% endblock %} {% block commercial_content %} {% set currency = order.currency == 'EUR' ? '€' : order.currency %}

Bon de commande {{ order.number ?: 'Brouillon' }}

{{ statusLabel }}Émis le {{ order.issueDate|date('d/m/Y') }}{% if order.expectedExecutionDate %}Exécution le {{ order.expectedExecutionDate|date('d/m/Y') }}{% endif %}
{% if is_granted('SALES_ORDER_EDIT_DRAFT', order) %}Modifier{% endif %} {% if is_granted('SALES_ORDER_DOWNLOAD_PDF', order) %}Voir PDF {% if order.number %}Signature client{% endif %}{% endif %} Retour

Client

{{ order.customerNameSnapshot }}

{{ order.customerAddressSnapshot }}
{{ order.customerPostalCodeSnapshot }} {{ order.customerCitySnapshot }}

{% if order.customerSiretSnapshot %}

SIRET : {{ order.customerSiretSnapshot }}

{% endif %}Contact : {{ order.contactSnapshot.name|default('—') }}{% if order.contactSnapshot.email|default('') %}

{{ order.contactSnapshot.email }}

{% endif %}

Commande

{{ order.subject ?: 'Commande client' }}Référence client : {{ order.customerOrderReference ?: '—' }}{% if order.customerOrderDate %}

Date client : {{ order.customerOrderDate|date('d/m/Y') }}

{% endif %}

Responsable : {{ order.responsibleUser ? order.responsibleUser.prenom ~ ' ' ~ order.responsibleUser.nom : '—' }}

{% if order.sourceDocument %}Devis source : {{ order.sourceDocumentNumberSnapshot ?: 'Sans numéro' }}{% else %}Commande directe, sans devis{% endif %}

Lignes du bon de commande

{% if is_granted('SALES_ORDER_EDIT_DRAFT', order) %}Modifier{% endif %}
{% if order.introText %}
{{ order.introText|striptags|nl2br }}
{% endif %}
LibelléQté / unitéPU HTTVATotal HTTotal TTCRemise
{% for line in order.lines %} {% if line.lineType == 'section' %}
{{ line.label }}
{% elseif line.lineType == 'note' %}
{{ line.label }}{{ line.description|striptags|nl2br }}
{% else %}
{{ line.label }}{% if line.description %}{{ line.description|striptags|nl2br }}{% endif %}{{ line.quantity|number_format(3, ',', ' ') }}{% if line.unit %}{{ line.unit }}{% endif %}{{ canViewAmounts ? line.unitPriceHt|number_format(2, ',', ' ') ~ ' ' ~ currency : 'Masqué' }}{{ canViewAmounts ? line.vatRate|number_format(2, ',', ' ') ~ ' %' : '—' }}{{ canViewAmounts ? line.subtotalHt|number_format(2, ',', ' ') ~ ' ' ~ currency : '—' }}{{ canViewAmounts ? line.totalTtc|number_format(2, ',', ' ') ~ ' ' ~ currency : '—' }}{{ canViewAmounts ? line.discountRate|number_format(2, ',', ' ') ~ ' %' : '—' }}
{% endif %} {% else %}

Aucune ligne.

{% endfor %}

Totaux

{% if canViewAmounts %}
Sous-total HT
{{ order.subtotalHt|number_format(2, ',', ' ') }} {{ currency }}
{% if order.totalDiscountHt > 0 %}
Remises HT
{{ order.totalDiscountHt|number_format(2, ',', ' ') }} {{ currency }}
{% endif %}
TVA
{{ order.totalVat|number_format(2, ',', ' ') }} {{ currency }}
Total TTC
{{ order.totalTtc|number_format(2, ',', ' ') }} {{ currency }}
{% else %}

Les montants ne sont pas accessibles avec vos permissions actuelles.

{% endif %}

Facturation & suivi

{% if canViewAmounts and summary %}

{{ invoicingLabels[summary.invoicingStatus] }}

{% if summary.draftInvoiceCount %}

Une facture brouillon est en préparation.

{% endif %}
Facturé brut
{{ summary.grossInvoicedTtc|number_format(2, ',', ' ') }} {{ currency }}
Avoirs
{{ summary.creditedTtc|number_format(2, ',', ' ') }} {{ currency }}
Facturé net
{{ summary.netInvoicedTtc|number_format(2, ',', ' ') }} {{ currency }}
Reste à facturer
{{ summary.remainingToInvoice|number_format(2, ',', ' ') }} {{ currency }}
{% if canViewPayments %}
Paiements sur les factures
{{ summary.invoicePaymentsReceived|number_format(2, ',', ' ') }} {{ currency }}
Reste dû sur les factures
{{ summary.invoiceBalanceDue|number_format(2, ',', ' ') }} {{ currency }}
{% endif %}
{% else %}

Informations financières masquées.

{% endif %}

Aucun paiement n’est enregistré directement sur le bon de commande.

{% if canViewAmounts and summary %}

Factures liées

{% if canViewPayments %}{% endif %}{% for row in summary.invoices %}{% if canViewPayments %}{% endif %}{% else %}{% endfor %}
FactureStatutTTCPayéReste dûDernier paiement
{% if is_granted('BILLING_DOCUMENT_VIEW', row.document) %}{{ row.document.number ?: 'Brouillon' }}{% else %}{{ row.document.number ?: 'Brouillon' }}{% endif %}{{ row.document.status }}{{ row.document.totalTtc|number_format(2, ',', ' ') }}{{ row.paid|number_format(2, ',', ' ') }}{{ row.due is not null ? row.due|number_format(2, ',', ' ') : '—' }}{{ row.lastPayment ? row.lastPayment|date('d/m/Y') : '—' }}
Aucune facture.
{% endif %}

Conditions de règlement

{{ order.paymentTerms ? order.paymentTerms|nl2br : '—' }}

Notes au client

{{ order.footerNotes ? order.footerNotes|striptags|nl2br : '—' }}

{% if order.internalNotes %}

Notes internes

{{ order.internalNotes|nl2br }}

{% endif %}
{% endblock %}