{% extends 'base_douchette.html.twig' %} {% import 'macros/macro.html.twig' as macro %} {% block title %} {{ parent() }} Recherche un article en location {% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block body %} {{ parent() }}
{{ form_start(form, {'attr' : {'id' : 'articleForm', 'class' : 'spinner_form form-inline'}}) }} Menu {{ form_widget(form.codebar) }} {{ form_end(form) }}
{% if article %}
{% if bonLivraisons %}

L'article est présent dans {{ bonLivraisons|length }} bon{% if bonLivraisons|length > 1 %}s{% endif %} de livraison

{% for bonLivraison in bonLivraisons %}
{{ bonLivraison.documentNumber }} - {{ bonLivraison.createdAt|date('d/m/Y') }} - {{ bonLivraison.dealStatus }} - {{ bonLivraison.dealId }} - {{ bonLivraison.customerName }}

{% set articleAReceptionner = 0 %} {# On affiche la liste des articles de LOC uniquement #} {% for BlArticle in bonLivraison.articles if (('LOC_' in BlArticle.id) and ('TRANSPORT' not in BlArticle.id)) %} {% if not BlArticle.receptionAt %} {# On compte le nombre d'article restant à receptionner #} {% set articleAReceptionner = articleAReceptionner + 1 %}
{{ BlArticle.id }}
{% else %}
{{ BlArticle.id }} - Récéptionné le {{ BlArticle.receptionAt|date('d/m/Y') }}
{% endif %} {% endfor %} {# On stocke le nombre d'article restant à receptionner #}
{% endfor %} {% else %}

Aucun bon de livraison en cours de location

{% if article.isReserved %}
L'article est réservé
Date de début de réservation :{% if article.reservedStartLocationAt %}{{ article.reservedStartLocationAt|date('d/m/Y') }}{% endif %}
Date de fin de réservation :{% if article.reservedEndLocationAt %}{{ article.reservedEndLocationAt|date('d/m/Y') }}{% endif %}
{% elseif article.isReparation %}
L'article est en réparation
{% elseif article.isMaintenance %}
L'article est en maintenance
{% endif %} {% endif %}
{% endif %}
{% endblock %} {% block javascripts %} {{ parent() }} {% if article %} {% endif %} {% endblock %}