{% 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 | Actions |
|---|---|---|---|---|---|
|
{{ quote.ref|default('DEV-' ~ quote.id|upper) }}
ID: #{{ quote.id }}
|
{# 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', 'refusée': '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', 'refusée': 'Refusé', 'signed': 'Signé', 'signée': 'Signé' } %} {% set currentStatus = quote.state|lower %} {% if currentStatus == 'created_waitsign' %} {% elseif currentStatus == 'signed' or currentStatus == 'signée' %} {% endif %} {{ statusLabels[currentStatus] ?? currentStatus }} | {# MONTANT #}{{ (quote|totalQuoto)|number_format(2, ',', ' ') }}€ | {# ACTIONS #}
{# Renvoyer lien de signature #}
{% if quote.state == "created_waitsign" and quote.state == "wait-send" %}
{% endif %}
{# Modifier : Interdit si signé #}
{% if quote.state != "signed" and quote.state != "signée" %}
{% endif %}
{# PDF Conditionnel #}
{% if quote.state == "signed" or quote.state == "signée" %}
{# PDF Signé #}
{# Certificat Audit #}
Créer le contrat
{% else %}
{# PDF Brouillon #}
{% endif %}
{# Delete : Interdit si signé #}
{% if quote.state != "signed" and quote.state != "signée" %}
{% else %}
|
|
Aucun devis trouvé |
|||||