{% for item in interventions %} {% set class = '' %} {% set client = item.client %} {% if item.status.id == 21 and not item.getValidateDevis().hasArticles() %} {% set class = 'bg-danger' %} {% elseif item.status.id == 21 %} {% set articles = item.getValidateDevis().articles %} {% if articles | length == 2 and articles.first.quantite == 0 and articles.first.isMO() and articles.last.quantite == 0 and articles.last.isFraisKm() %} {% set class = 'bg-danger text-white' %} {% set descr_error = 'Aucune prestation n\' été assigné au devis' %} {% endif %} {% endif %} {% if item.hasReparation() %} {% set rep = item.reparation %} {% set class ="" %} {% if rep.hasLivraisons() %} {% set class ="active" %} {% endif %} {% endif %} {% if app.user.is('dev') %} Modifier {% endif %} {{ item.getFormattedDate() }} {% if client.is('pro') and client.getHeureQuotaNoAssign | length > 0 %}
{{ item.client }}
{% else %} {{ item.client }} {% endif %} Type : {{ item.type | replace({'_':' '}) | capitalize }}
{{ item.numero }} {% if descr_error is defined %} {{ descr_error }} {% endif %} {{ item.description }} {{ item.heure }} H {% if item.montant is null %} N/C {% else %} {{ item.montant }} € {% endif %} {% if item.hasReparation() %}
Intervention
{{ item.status }} {% if item.status.id == 13 %} :
{{ item.pause }} {% endif %}
Réparation ({{ item.reparation }})
{{ item.reparation.status }}
Casier : {{ item.reparation.casier is not empty ? item.reparation.casier : 'N/C' }}
{% else %} {{ item.status }} {% endif %}
info BL edit

{% if item.type | lower in ['demande'] %}
Veuillez assigner un type a cette intervention
{% else %} {% if item.status.id not in [14,4] %} {% if item.status.id != 4 %} non {% endif %} {% if item.status.id == 12 %} tools {% endif %} {% if item.pause | length > 0 %}
{% else %} en attente {% endif %} {% if not item.hasReparation() %} devis {% endif %} {% if item.status.id == 23 %} oui {% elseif item.status.id != 12 %} oui {% endif %} {% endif %} {% endif %}
{% else %} Aucune intervention présente {% endfor %}