{% extends 'dashboard/base.twig' %} {% block title %}Catalogue Devis{% endblock %} {% block title_header %}Gestion des Devis & Offres{% endblock %} {% block actions %}
{% endblock %} {% block body %}| Référence | Client | Date | Statut | Total HT | Caution | Actions |
|---|---|---|---|---|---|---|
|
{{ quote.ref|default('DEV-' ~ quote.id|upper) }}
{{ quote.num }}
|
{# CLIENT #}
{{ quote.customer.surname|upper }} {{ quote.customer.name }}
{{ quote.customer.phone|default(quote.customer.email) }}
|
{# DATE #}
{{ quote.createa|date('d/m/Y') }} | {# STATUT DYNAMIQUE #}
{% set statusClasses = {
'draft': 'text-slate-400 bg-slate-500/10 border-slate-500/20',
'created_waitsign': 'text-amber-400 bg-amber-500/10 border-amber-500/20',
'wait-send': 'text-amber-400 bg-amber-500/10 border-amber-500/20',
'refused': 'text-rose-400 bg-rose-500/10 border-rose-500/20',
'signed': 'text-emerald-400 bg-emerald-500/10 border-emerald-500/20',
'signée': 'text-emerald-400 bg-emerald-500/10 border-emerald-500/20'
} %}
{% set statusLabels = {
'draft': 'Brouillon',
'created_waitsign': 'Attente Signature',
'wait-send': 'Envoi en cours',
'refused': 'Refusé',
'signed': 'Signé',
'signée': 'Signé'
} %}
{% if status == 'created_waitsign' or status == 'wait-send' %}
{% elseif status == 'signed' or status == 'signée' %}
{% elseif status == 'refused' %}
{% endif %}
{{ statusLabels[status] ?? status }}
{# AFFICHAGE RAISON REFUS #}
{% if status == 'refused' and reason %}
{{ reason }} |
{# MONTANT #}
{% if quote.orderSession and quote.orderSession.promotion %}
{{ (quote|totalQuotoHT)|number_format(2, ',', ' ') }}€
{{ (quote|totalQuotoBeforeDiscount)|number_format(2, ',', ' ') }}€
Promo -{{ quote.orderSession.promotion.percentage }}%
{% else %}
{{ (quote|totalQuotoHT)|number_format(2, ',', ' ') }}€
{% endif %}
|
{# CAUTION #}
{{ (quote|totalCaution)|number_format(2, ',', ' ') }}€ | {# ACTIONS #}
{# Renvoyer lien de signature (Autorisé aussi si refusé pour relancer) #}
{% if status == "created_waitsign" or status == "wait-send" %}
{% endif %}
{# Modifier : Interdit uniquement si signé #}
{% if status != "signed" and status != "refused" %}
{% endif %}
{# PDF Conditionnel #}
{% if status == "signed" or status == "signée" %}
{# PDF Signé #}
{% if quote.contrats is null %}
{# ÉTAT : AUCUN CONTRAT #}
Contrat
{% else %}
{# ÉTAT : CONTRAT EXISTANT #}
Contrat
{% endif %}
{% else %}
{# PDF Brouillon / Attente #}
{% endif %}
{# Delete : Interdit si signé #}
{% if status != "signed" and status != "signée" %}
{% endif %}
|
|
Aucun devis trouvé |
||||||