Documents — {{ prospection.venueEntity ? prospection.venueEntity.name : prospection.venue }}
{% set quotes = quotesByProspection[prospection.id] ?? [] %} {% if quotes %}
{% for quote in quotes %} {% set convention = conventionsByQuote[quote.id] ?? null %}

Devis {{ quote.number }}
Voir
{% set invoices = can_permission('INVOICE') ? ((documentsByProspection[prospection.id] ?? [])|filter(d => d.type == 'invoice' and d.sourceDocument and d.sourceDocument.id == quote.id)) : [] %} {% for invoice in invoices %}
Facture {{ invoice.number }}
Issue du devis {{ quote.number }}
Voir
{% endfor %} {% if convention %}
Convention
Associée au devis {{ quote.number }}
Voir
{% else %}
Aucune convention pour cette version.
{% endif %}
{% endfor %}
{% else %}

Aucun devis généré pour cette prospection.

{% endif %} {% set allConventions = conventionsByProspection is defined ? (conventionsByProspection[prospection.id] ?? []) : [] %} {% set legacyConventions = allConventions|filter(c => not c.sourceQuote) %} {% if legacyConventions %}
Conventions historiques non liées à un devis
{% for c in legacyConventions %}{{ c.title }}{% endfor %}
{% endif %}