{% extends 'admin/layout.html.twig' %} {% block title %}{{ prospection.venueEntity ? prospection.venueEntity.name : prospection.venue }} — Prospection WTL{% endblock %} {% block admin_body %} {% set venue = prospection.venueEntity %} {% set contact = prospection.targetContact ?: (venue ? venue.primaryContact : null) %}

{{ venue ? venue.name : prospection.venue }}

{% if prospection.status %} {{ prospection.status.name }} {% endif %}

{{ venue ? venue.city : prospection.city }} {% if venue and venue.department %} · {{ venue.department }} {% endif %}

Retour {% if can_permission('PROSPECTION',2) %} Nouvelle prospection Modifier {% endif %} {% if app.user and app.user.superAdmin %}
{% if app.request.query.getBoolean('calendar_delete_failed') %}
{% endif %} {% endif %}
{% if concertDate %}
Date de concert liée
{{ concertDate.eventDate|date('d/m/Y') }}{% if concertDate.startTime %} · {{ concertDate.startTime|date('H:i') }}{% endif %}
{{ concertDate.visibility == 'public' ? 'Publiée sur le site' : (concertDate.visibility == 'scheduled' ? 'Publication programmée' : 'Non publiée') }}{% if concertDate.status == 'cancelled' %} · Annulée{% endif %}
Gérer la date{% if can_permission('CONCERT_FEEDBACK') and concertFeedback %}Consulter le bilan{% elseif can_permission('CONCERT_FEEDBACK',2) and concertDate.status != 'cancelled' and concertDate.eventDate <= date('today') %}Ajouter le bilan{% endif %}
{% endif %} {% if preparationChecklist %}
Préparation administrative
Contrôle automatique des éléments à préparer avant la date.
{{ preparationChecklist.missing == 0 ? 'Complet' : preparationChecklist.missing ~ ' élément(s) manquant(s)' }}
{% for item in preparationChecklist.items %}
{{ item.label }}
{{ item.detail }}
{% endfor %}
{% endif %} {% if prospection.nextAction %}
Prochaine étape
{{ prospection.nextAction }}
{% if prospection.nextActionDate %}
{{ prospection.nextActionDate|date('d/m/Y') }} {% if prospection.nextActionDate < today %} · en retard{% endif %}
{% endif %}
{% endif %} {% if can_permission('PROSPECTION',2) %}

Actions rapides

L'utilisateur connecté est mémorisé automatiquement pour chaque action.

{% set statusCode = prospection.status ? prospection.status.code : null %} {% if statusCode == 'CANCELLED_AFTER_CONFIRMATION' %} {% elseif statusCode not in ['REFUSED','COMPLETED','NOT_RELEVANT'] %} {% if not prospection.agreementDate and not prospection.confirmedDate %}{% endif %} {% if not prospection.agreementDate and not prospection.confirmedDate %}{% endif %} {% if prospection.agreementDate or prospection.confirmedDate %}{% endif %} {% if prospection.confirmedDate %}{% endif %} {% endif %}
{% endif %}
Lieu & contact
Lieu
{{ venue ? venue.name : prospection.venue }}
{{ venue ? venue.city : prospection.city }}
{% if venue and venue.approximateBudget %}
Budget indicatif : {{ venue.approximateBudget|number_format(2,',',' ') }} € HT
{% endif %} {% if prospection.proposedFee %}
Tarif proposé : {{ prospection.proposedFee|number_format(2,',',' ') }} € HT{% if prospection.hatPlanned %} Chapeau prévu{% endif %}
{% endif %} {% if can_permission('SIMULATOR') and can_permission('PROSPECTION',2) %}Calculer ou ajuster le tarif{% endif %}
Contact ciblé
{% if contact %} {{ contact.name }} {% if contact.primaryContact %} Principal {% endif %}
{{ contact.contactType ? contact.contactType.name : '' }}
{{ contact.email ?: '' }} {{ contact.phone ?: '' }}
{% else %}—{% endif %}
{% if venue %}
{% endif %}
Suivi et responsables
Étape Date Réalisée par
Création {{ prospection.createdAt|date('d/m/Y') }} {{ prospection.createdBy ? prospection.createdBy.displayName : '—' }}
Premier contact {{ prospection.firstContactDate ? prospection.firstContactDate|date('d/m/Y') : '—' }} {{ prospection.firstContactBy ? prospection.firstContactBy.displayName : '—' }}
Relance 1
prévue {{ followUp1Due ? followUp1Due|date('d/m/Y') : '—' }}
{{ prospection.followUp1SentDate ? prospection.followUp1SentDate|date('d/m/Y') : '—' }} {{ prospection.followUp1By ? prospection.followUp1By.displayName : '—' }}
Relance 2
prévue {{ followUp2Due ? followUp2Due|date('d/m/Y') : '—' }}
{{ prospection.followUp2SentDate ? prospection.followUp2SentDate|date('d/m/Y') : '—' }} {{ prospection.followUp2By ? prospection.followUp2By.displayName : '—' }}
Proposition {{ prospection.proposalSentDate ? prospection.proposalSentDate|date('d/m/Y') : '—' }} {{ prospection.proposalBy ? prospection.proposalBy.displayName : '—' }}
Décision {% if prospection.confirmedDate %}Programmée le {{ prospection.confirmedDate|date('d/m/Y') }}{% elseif prospection.agreementDate %}Accord obtenu le {{ prospection.agreementDate|date('d/m/Y') }}{% elseif prospection.refusedDate %}Refusée le {{ prospection.refusedDate|date('d/m/Y') }}{% else %}—{% endif %} {{ prospection.decisionBy ? prospection.decisionBy.displayName : '—' }}
Réalisation {{ prospection.performedDate ? prospection.performedDate|date('d/m/Y') : '—' }} {{ prospection.performedBy ? prospection.performedBy.displayName : '—' }}
Documents
Les conventions sont toujours rattachées à une version précise du devis.
{% if can_permission('QUOTE',2) %}{% endif %}
{% set quotes = documents|filter(d => d.type == 'quote') %} {% if quotes %}
{% for quote in quotes %} {% set linkedConvention = (conventions|filter(c => c.sourceQuote and c.sourceQuote.id == quote.id)|first) ?: null %}

Devis {{ quote.number }}
{{ quote.issueDate|date('d/m/Y') }} · {% if quote.sentAt %}envoyé le {{ quote.sentAt|date('d/m/Y H:i') }}{% else %}généré, non marqué envoyé{% endif %}
Voir
{% set invoices = can_permission('INVOICE') ? (documents|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 linkedConvention %}
Convention
Basée sur le devis {{ quote.number }}
Voir{% if can_permission('CONVENTION',2) %}
{% endif %}{% if app.user and app.user.superAdmin %}
{% endif %}
{% else %}
Aucune convention pour cette version.
{% endif %}
{% endfor %}
{% else %}
Aucun devis. Crée d’abord un devis pour pouvoir générer une convention.
{% endif %} {% set legacyConventions = conventions|filter(c => not c.sourceQuote) %} {% if legacyConventions %}
Conventions historiques non liées à un devis
{% for c in legacyConventions %}{{ c.title }}{% endfor %}
{% endif %}
Documents techniques
Fiches génériques ou spécifiques à cette représentation.
{% if can_permission('PROSPECTION', 2) or can_permission('TECHNICAL_SHEET', 2) %}{% endif %}
{% if technicalSheets %}
{% for sheet in technicalSheets %} {% set technicalStateLabels={generated:'Générée',sent:'Envoyée',validated:'Validée',refused:'Refusée',replaced:'Remplacée'} %}
Fiche technique V{{ sheet.version }}
{{ sheet.sourceType == 'template' ? 'Modèle associé sans régénération' : (sheet.sourceType == 'template_customized' ? 'Modèle personnalisé' : 'Fiche spécifique') }} · {{ sheet.createdAt|date('d/m/Y H:i') }}
{% set sheetEvents=technicalSheetHistory|filter(h => h.technicalSheet.id == sheet.id) %}{% if sheetEvents %}
Historique d’état ({{ sheetEvents|length }}){% for h in sheetEvents %}
{{ h.changedAt|date('d/m/Y H:i') }} · {{ technicalStateLabels[h.oldState]|default(h.oldState) }} → {{ technicalStateLabels[h.newState]|default(h.newState) }} · {{ h.actor ? h.actor.displayName : 'Système' }}{% if h.reason %} — {{ h.reason }}{% endif %}
{% endfor %}
{% endif %}
{{ technicalStateLabels[sheet.state] ?? sheet.state }} {% if can_permission('PROSPECTION', 2) or can_permission('TECHNICAL_SHEET', 2) %} {% if sheet.state in ['generated','refused'] %}
{% endif %} {% if sheet.state == 'sent' %}
Refuser
{% endif %} {% if sheet.state != 'replaced' %}
Remplacer
{% endif %} {% endif %} {% if sheet.state == 'generated' and can_permission('TECHNICAL_SHEET', 3) %}
{% endif %}
{% endfor %}
{% else %}
Aucune fiche technique associée à cette prospection.
{% endif %}
Historique
{% for event in events %}
{{ event.label }} {{ event.eventDate|date('d/m/Y') }}
{{ event.actor ? event.actor.displayName : 'Utilisateur non renseigné' }}
{% if event.notes %}
{{ event.notes }}
{% endif %}
{% else %}
Aucun événement.
{% endfor %}
{% if mailLogs %}
Mails envoyés
{% for mail in mailLogs|slice(0,5) %}
{{ mail.subject }}{{ mail.sentAt|date('d/m/Y H:i') }}
À {{ mail.recipient }}{% if mail.template %} · {{ mail.template.name }}{% endif %}
{% endfor %}{% endif %}
{% if concertFeedback and can_permission('CONCERT_FEEDBACK') %}
Bilan de représentation
Observations enregistrées pour la date du {{ concertFeedback.representationDateSnapshot|date('d/m/Y') }}.
Ouvrir la fiche complète {% if can_permission('CONCERT_FEEDBACK',2) %}Modifier{% endif %}
{% include 'admin/concert_feedback/_detail.html.twig' with {feedback:concertFeedback,choices:feedbackChoices,detail_id_prefix:'prospectionFeedback'~concertFeedback.id} only %}
{% endif %} {% if venue %} {% endif %} {% include 'admin/prospection/_technical_sheet_modal.html.twig' %} {% include 'admin/prospection/_quote_modal.html.twig' with {prospection:prospection, quoteLineSettings:quoteLineSettings} %} {% endblock %} {% block javascripts %}{{ parent() }} {% endblock %}