{% extends 'layout.twig' %}

{% block body %}
    <div class="contenu clearfix">
        <h1>{{ 'Bons d\'Entrée' | trad }}</h1>

        {{ ariane() }}
        <div class="tab-content" id="tab-content">
            <form method="post" name="sbe_ente">
                <h3 class="mb-base">
                    {{ strBuild('Visualisation du bon d\'entrée N° @1@' | trad, [bonEntree.NO_BE]) }}
                </h3>
                <details open class="block_edition clearfix">
                    <summary class="titre_block">
                        {{ strBuild('Entête du bon d\'entrée N°@1@' | trad, [bonEntree.NO_BE]) }}
                    </summary>
                    <div style="padding:15px;">
                        <div class="clearfix mb-0">
                            <div class="colonne3">
                                <div class="informations mb-0">
                                    <p>
                                        <span class="champs_label">{{ 'N° de bon d\'entrée' | trad }}</span>
                                        <span class="resultat">{{ bonEntree.NO_BE }}</span>
                                    </p>
                                    <p>
                                        <span class="champs_label">{{ 'Société' | trad }}</span>
                                        <span class="resultat">{{ societe.RAIS_SOC ~ ' (' ~ bonEntree.CODE_STE ~ ')' }}</span>
                                    </p>
                                    <p>
                                        <span class="champs_label">{{ 'Type' | trad }}</span>
                                        <span class="resultat">{{ listeFiltreType[bonEntree.TYPE_BE] }}</span>
                                    </p>
                                    <p>
                                        <span class="champs_label">{{ 'Origine' | trad }}</span>
                                        <span class="resultat">{{ bonEntree.ORIGINE | visualise }}</span>
                                    </p>
                                </div>
                            </div>
                            <div class="colonne3">
                                <div class="informations mb-0">
                                    <p>
                                        <span class="champs_label">{{ 'Créé le' | trad }}</span>
                                        <span class="resultat">{{ bonEntree.DTE_CREAT | dateTrad }}</span>
                                    </p>
                                    <p>
                                        <span class="champs_label">{{ 'Validé le' | trad }}</span>
                                        <span class="resultat">{{ bonEntree.DTE_VALID | dateTrad | visualise }}</span>
                                    </p>
                                    <p>
                                        <span class="champs_label">{{ 'Proposition de réappro N°' | trad }}</span>
                                        <span class="resultat">{{ bonEntree.BE_NOPR | visualise  }}</span>
                                    </p>
                                    <p>
                                        <span class="champs_label">{{ 'Provenance' | trad }}</span>
                                        <span class="resultat">
                                            {{ (provenance.RS ~ ' (' ~ bonEntree.PROV ~ ')') | visualise }}
                                        </span>
                                    </p>
                                </div>
                            </div>
                            <div class="colonne3">
                                <div class="informations mb-0">
                                    <p>
                                        <span class="champs_label">{{ 'Magasinier' | trad }}</span>
                                        <span class="resultat">{{ utilisateur.NOM ~ ' (' ~ bonEntree.MAG ~ ')' }}</span>
                                    </p>
                                    <p>
                                        <span class="champs_label">{{ 'Site' | trad }}</span>
                                        <span class="resultat">{{ siteStock.DESIGN ~ ' (' ~ bonEntree.SITE ~ ')'  }}</span>
                                    </p>
                                    {% if is_prix_visible() %}
                                        <p>
                                            <span class="champs_label">{{ 'Total BE' | trad }}</span>
                                            <span class="resultat text-right">{{ bonEntree.TOT_BE | prix ~ ' ' ~ bonEntree.DEVISE }}</span>
                                        </p>
                                    {% endif %}
                                </div>
                            </div>
                            {% if CSExist('SDS_ENTE') %}
                                {{ VisualisationCS('SBE_ENTE', autoCompletCodeEnr(bonEntree.NO_BE)) }}
                            {% endif %}
                        </div>
                    </div style="padding:15px;">
                </details>
            </form>
        </div>
        {{ include('@Stock/LigneBonEntree/Composant/_table.twig', { lignesBonEntree: lignesBonEntree, bonEntree: bonEntree }) }}
    </div>
{% endblock %}