{% extends 'admin/layout.html.twig' %} {% block title %}{{ document.number }} — {{ document.prospection.artisticProject.name }}{% endblock %} {% block admin_body %}

{{ document.type == 'quote' ? 'Devis' : 'Facture' }} {{ document.number }}

Émis le {{ document.issueDate|date('d/m/Y') }} · {{ document.createdBy ? document.createdBy.displayName : 'Utilisateur inconnu' }}

{% if document.generatedDocumentId %} Télécharger le PDF figé Voir le PDF {% endif %} Retour au dossier
{% if document.type == 'quote' %}
1. GénéréPDF figé disponible
{% if document.sentAt %}{% else %}2{% endif %}
2. Envoyé{{ document.sentAt ? 'Envoyé le '~document.sentAt|date('d/m/Y') : 'À envoyer au lieu' }}
{% if existingInvoice %}{% else %}3{% endif %}
3. Facturé{{ existingInvoice ? existingInvoice.number : 'Après validation du devis' }}
{% if not document.sentAt and document.generatedDocumentId and can_permission('PROSPECTION',2) %}Envoyer ce devis{% endif %}
{% endif %}
{% if document.prospection.artisticProject.code == 'WTL' %}Walk The Line{% else %}
{{ document.prospection.artisticProject.publicName ?: document.prospection.artisticProject.name }}
{% endif %}

{{ document.type == 'quote' ? 'DEVIS' : 'FACTURE' }}

{{ document.number }}
Émetteur
{{ snapshot.association.name ?? '' }} {% if snapshot.association.address_line ?? false %}
{{ snapshot.association.address_line }}
{{ snapshot.association.postal_code ?? '' }} {{ snapshot.association.city ?? '' }}
{% else %}
{{ snapshot.association.address ?? '' }}
{% endif %} {% if snapshot.association.siret ?? false %}
SIRET : {{ snapshot.association.siret }}
{% endif %}
Client
{{ snapshot.venue.name ?? '' }} {% if snapshot.venue.address_line ?? false %}
{{ snapshot.venue.address_line }}
{{ snapshot.venue.postal_code ?? '' }} {{ snapshot.venue.city ?? '' }}
{% else %}
{{ snapshot.venue.address ?? '' }}
{% endif %}
{% for line in snapshot.lines ?? [] %} {% else %} {% endfor %}
PrestationQtéPU HTTVATotal HT
{{ line.label }}{% if line.note %}
{{ line.note }}
{% endif %}
{{ line.quantity|number_format(2,',',' ') }} {{ line.price_ht|number_format(2,',',' ') }} € {{ line.vat_rate|number_format(2,',',' ') }} % {{ line.total_ht|number_format(2,',',' ') }} €
Prestation artistique {{ document.prospection.artisticProject.publicName ?: document.prospection.artisticProject.name }}1{{ document.amountHt|number_format(2,',',' ') }} €{{ document.vatRate|number_format(2,',',' ') }} %{{ document.amountHt|number_format(2,',',' ') }} €
Total HT{{ document.amountHt|number_format(2,',',' ') }} €
TVA totale{{ (snapshot.vat_amount ?? (document.amountTtc-document.amountHt))|number_format(2,',',' ') }} €
Total TTC{{ document.amountTtc|number_format(2,',',' ') }} €
{% if snapshot.mentions ?? false %}
{{ snapshot.mentions }}
{% endif %} {% if snapshot.footer ?? false %}
{{ snapshot.footer }}
{% endif %}
{% if document.type == 'invoice' %}
Encaissement
Le statut est calculé à partir des paiements enregistrés.
{% if invoicePaymentStatus == 'PAID' %}Payée{% elseif invoicePaymentStatus == 'PARTIAL' %}Partiellement payée{% else %}À encaisser{% endif %}
Total facture
{{ document.amountTtc|number_format(2,',',' ') }} €
Déjà encaissé
{{ invoicePaid|number_format(2,',',' ') }} €
Reste
{{ invoiceRemaining|number_format(2,',',' ') }} €
{% if invoiceRemaining > 0.009 and can_permission('PAYMENT',2) %}{% endif %} {% if invoicePayments %}
{% for p in invoicePayments %}{% endfor %}
DateCompteModeRéférenceMontantActions
{{ p.paymentDate|date('d/m/Y') }}{{ p.financialAccount ? p.financialAccount.name : '—' }}{{ p.paymentMethod ? p.paymentMethod.name : '—' }}{{ p.reference ?: '—' }}{{ p.amount|number_format(2,',',' ') }} €{% if can_permission('PAYMENT',2) %}
{% else %}Lecture seule{% endif %}
{% endif %}
{% include 'admin/accounting/_payment_modal.html.twig' with {invoice:document,payment_remaining:invoiceRemaining,financial_accounts:financialAccounts,payment_methods:paymentMethods,payment_modal_id:'paymentModal'} only %} {% for p in invoicePayments %}{% endfor %} {% endif %} {% if document.type == 'quote' and not existingInvoice and document.status != 'converted' and can_permission('INVOICE',2) %}
{% elseif document.type == 'quote' and existingInvoice %}
Ce devis a déjà donné naissance à la facture {{ existingInvoice.number }}.
{% endif %} {% endblock %}