{% block body %}
<td colspan="12">
    <h5>{{  'Détail Entête' | trad }}</h5>
        <div class="colonne3">
            <div class="informations">
                <p>
                    <span class="champs_label">{{ 'Société' | trad }}</span>
                    <span class="resultat">{{ commande.CODE_STE | societeTrad }}</span>
                </p>
                <p>
                    <span class="champs_label">{{ 'Date de validation' | trad }}</span>
                    <span class="resultat">{{ commande.DATE_VAL | dateTrad }}</span>
                </p>
                <p>
                    <span class="champs_label">{{ 'SectImp' | trad }}</span>
                    <span class="resultat">{{ commande.SECTIMP }}</span>
                </p>
                <p>
                    <span class="champs_label">{{ 'Emetteur' | trad }}</span>
                    <span class="resultat">
                        {{- commande.CentreEmet.RAIS_SOC|default() -}}
                    </span>
                </p>
                <p>
                    <span class="champs_label">{{ 'Ac. cadre' | trad }}</span>
                    <span class="resultat">{{ commande.ACC_CADRE }}</span>
                </p>
            </div>
        </div>
        <div class="colonne3">
            <div class="informations">
                <p>
                    <span class="champs_label">{{ 'Livraison' | trad }}</span>
                    <span class="resultat">
                        {{- commande.CentreLiv.RAIS_SOC|default() -}}
                    </span>
                </p>
                <p>
                    <span class="champs_label">{{ 'Facturation' | trad }}</span>
                    <span class="resultat">
                        {{- commande.CentreFact.RAIS_SOC|default() -}}
                    </span>
                </p>
                <p>
                    <span class="champs_label">{{ 'Date période' | trad }}</span>
                    <span class="resultat">{{ commande.DTE_PER | dateTrad }}</span>
                </p>
                <p>
                    <span class="champs_label">{{ 'Date A/R' | trad }}</span>
                    <span class="resultat">{{ commande.DTE_AR | dateTrad }}</span>
                </p>
            </div>
        </div>
        <div class="colonne3 last">
            <div class="informations">
                <p>
                    <span class="champs_label">{{ 'Modèle'  | trad }}</span>
                    <span class="resultat">{{ commande.MODELE }}</span>
                </p>
                <p>
                    <span class="champs_label">{{ 'Type' | trad }}</span>
                    <span class="resultat">{{ commande.TYP_DOC }}</span>
                </p>
                <p>
                    <span class="champs_label">{{ 'Z.I. Num.' | trad }}</span>
                    <span class="resultat">{{ commande.ZNLIBNUM }}</span>
                </p><p>
                    <span class="champs_label">{{ 'Remise' | trad }}</span>
                    <span class="resultat">{{ commande.REM_GLOB }}</span>
                </p>
            </div>
        </div>
{% if listeLigneCommande %}
    <h5>{{ 'Lignes de la commande' | trad }}</h5>
    <table class="table table-hover">
        <thead>
            <tr>
                <th>{{ 'Article' | trad }}</th>
                <th></th>
                <th class="align-right">{{ 'Quantité' | trad }}</th>
                <th class="align-left">{{ 'Unité' | trad }}</th>
                <th class="align-center">{{ 'DA' | trad }}</th>
                <th class="align-right">{{ 'Prix Unitaire' | trad }}</th>
                <th class="align-right">{{ 'Remise' | trad }}</th>
                <th class="align-center">{{ 'Date de livraison' | trad }}</th>
            </tr>
        </thead>
        <tbody>
            {% for ligneCommande in listeLigneCommande %}
                <tr id="ligne_commande{{ ligneCommande.POSTE }}{{ commande.NO_CDE }}">
                    <td>{{ ligneCommande.DESIGNAT }} {% if ligneCommande.CODE_ART and ligneCommande.CODE_ART != ' ' %}({{ ligneCommande.CODE_ART }}) {% endif %}</td>
                    <td class="ss_detail" onClick='SSDetail(this);'></td>
                    <td class="align-right">{{ ligneCommande.QTE_COM }}</td>
                    <td class="align-left">{{ ligneCommande.UNITE }}</td>
                    <td class="align-center">{{ ligneCommande.NUM_DA }} / {{ ligneCommande.NO_POS_DA }}</td>
                    <td class="align-right">{{ ligneCommande.PX_UNIT     | tva}}</td>
                    <td class="align-right">{{ ligneCommande.REMISE }}</td>
                    <td class="align-center">{{ ligneCommande.DLIV_CONT | dateTrad }}</td>
                </tr>                        				
                <tr id="ligne_commande{{ ligneCommande.POSTE }}{{ commande.NO_CDE }}detail" class="view-details hide_detail" >
                    <td colspan="12">
                        <div class="colonne2">
                            <div class="informations">
                                <p>
                                    <span class="champs_label">{{ 'Site' | trad }}</span>
                                    <span class="resultat">{{ ligneCommande.SITE_STK }}</span>
                                </p>
                                <p>
                                    <span class="champs_label">{{ 'SectImp' | trad }}</span>
                                    <span class="resultat">{{ ligneCommande.SI }}</span>
                                </p>
                                <p>
                                    <span class="champs_label">{{ 'CodeComp' | trad }}</span>
                                    <span class="resultat">{{ ligneCommande.CDC }}</span>
                                </p><p>
                                    <span class="champs_label">{{ 'SCptAna' | trad }}</span>
                                    <span class="resultat">{{ ligneCommande.SCA }}</span>
                                </p>
                            </div>
                        </div>
                        <div class="colonne2 last">
                            <div class="informations">
                                <p>
                                    <span class="champs_label">{{ 'Prix d\'origine brut' | trad }}</span>
                                    <span class="resultat">{{ ligneCommande.QTE_COM*ligneCommande.PX_UNIT | tva}} {{ commande.DEVISE }}</span>
                                </p>
                                <p>
                                    <span class="champs_label">{{ 'Prix d\'origine' | trad }}</span>
                                    <span class="resultat">{{ (ligneCommande.QTE_COM*ligneCommande.PX_UNIT)*(1+(ligneCommande.TVA/100)) | tva}} {{ commande.DEVISE }}</span>
                                </p>
                            </div>
                        </div>
                        
                        <div class="single">
                            <div class="informations">
                                <p>
                                    <span class="champs_label">{{ 'Désignation complémentaire' | trad }}</span>
                                    <span class="resultat" style="text-align: left;">{{ ligneCommande.DESIGNCOMP }}</span>
                                </p>                       				
                            </div>
                        </div>
                    
                    </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% endif %}
</td>
{% endblock %}