{% extends 'layout.twig' %}

{% block body %}
    <div class="contenu clearfix">
        <h1>{{ 'Inventaires' | trad }}</h1>
        {{ ariane() }}
        {% embed '@Stock/Inventaire/Composant/_inventaire.twig' %}
            {% block details %}
                <div class="row">
                    <div class="colonne3 mb-0">
                        <div class="informations mb-0">
                            <p>
                                <span class="champs_label">{{ 'N° d\'inventaire' | trad }}</span>
                                <span class="resultat">{{ inventaire.NO_INV }}</span>
                            </p>
                            <p>
                                <span class="champs_label">{{ 'Ordre de tri liste et saisie des résultats' | trad }}</span>
                                <span class="resultat">{{ listeChoixOrdTri[inventaire.ORD_TRI] }}</span>
                            </p>
                            <p>
                                <span class="champs_label">{{ 'Désignation' | trad }}</span>
                                <span class="resultat">{{ inventaire.DESIGN | visualise }}</span>
                            </p>
                        </div>
                    </div>
                    <div class="colonne3 mb-0">
                        <div class="informations mb-0">
                            <p>
                                <span class="champs_label">{{ 'Magasinier' | trad }}</span>
                                <span class="resultat">{{ utilisateur.NOM ~ ' (' ~ inventaire.MAG ~ ')' }}</span>
                            </p>
                            <p>
                                <span class="champs_label">{{ 'Exclure automatiquement les articles fermés ?' | trad }}</span>
                                <span class="resultat">{{ (inventaire.EXCL_ART == '54' ? 'Oui': 'Non') | trad }}</span>
                            </p>
                        </div>
                    </div>
                    <div class="colonne3 mb-0">
                        <div class="informations mb-0">
                            <p>
                                <span class="champs_label">{{ 'Société' | trad }}</span>
                                <span class="resultat">{{  societe.RAIS_SOC ~ ' (' ~ inventaire.CODE_STE ~ ')' }}</span>
                            </p>
                            <p>
                                <span class="champs_label">
                                    {{ 'Exclure automatiquement les dates de fermeture inférieures à' | trad }}
                                </span>
                                <span class="resultat">{{ inventaire.DATEFERM | dateTrad | visualise }}</span>
                            </p>
                        </div>
                    </div>
                    <div class="colonne">
                        <div class="informations m-0">
                            <p>
                                <span class="champs_label">{{ 'Description' | trad }}</span>
                                <span class="resultat mh-overflow-y">{{ memos.CONTMEMO|nl2br|raw }}</span>
                            </p>
                        </div>
                    </div>
                </div>
            {% endblock %}

            {% block sites %}
                <div class="row">
                    <div class="colonne3">
                        {{ include('@Stock/Composant/_select_multiple.twig', {
                            jsonValues: cahiersInventairesState ?? '[]',
                            isPrincipal: true,
                            name: 'SCINVENT',
                            title: 'Sites de stockage' | trad,
                            path: path('Stock.Inventaire.popupChoixSites'),
                            popupTitle: 'Choix des sites de stockage' | trad,
                            parameters: '{inputName: \'SCINVENT\', divInputs: \'input_SCINVENT\', opened_only: \'true\', editable: \'' ~ editable ~ '\' }'
                        }) }}
                    </div>
                </div>
            {% endblock %}

            {% block boutons %}{% endblock %}
        {% endembed %}
    </div>
{% endblock %}