
{% block body %}

<td colspan="16"  id="ligneAffichage{{ id }}">
    <div class="informations_facture">
        
    	{# {% if entete.REFUSEE|boolSql == 1  %}<p class="titre_detail"><span>{{ 'Refusée ' | trad }}</span></p>
        {% elseif entete.ATT_SIG|boolSql == 1  %}<p class="titre_detail"><span>{{ 'En attente de signature' | trad }}</span></p>
        {% elseif entete.BON_A_PAY|boolSql == 1  %}<p class="titre_detail"><span>{{ 'Signée ' | trad }}</span></p>
        {% endif %} #}
        	
        <div class="colonne4">
            <div class="informations">
            	<p>
                	<span class="champs_label">{{ 'Réf. Fact. Fourn.' | trad ~ colon() }}</span>
                	<span class="resultat">{{ entete.FACT_FOU }}</span>
                </p>
                <p>
                	<span class="champs_label">{{ 'Fournisseur' | trad ~ colon() }}</span>
                	<span class="resultat">{{ entete.CODE_FOUR }}</span>
                </p>
                <p>
                	<span class="champs_label">{{ 'Société' | trad ~ colon() }}</span>
                	<span class="resultat">{{ entete.CODE_STE }}</span>
                </p>
				<p>
                	<span class="champs_label">{{ 'Ordo.' | trad ~ colon() }}</span>
                	<span class="resultat">{{ entete.ORDO }}</span>
                </p>
            </div>
        </div>
        <div class="colonne4">
            <div class="informations">
                
                <p>
                	<span class="champs_label">{{ 'Emise le' | trad ~ colon() }}</span>
                	<span class="resultat">{{ entete.DATE_FAFO | dateTrad }}</span>
                </p>
                <p>
                	<span class="champs_label">{{ 'Enreg. le' | trad ~ colon() }}</span>
                	<span class="resultat">{{ entete.DATE_ENR | dateTrad }}</span>
                </p>
                <p>
                	<span class="champs_label">{{ 'Echéance' | trad ~ colon() }}</span>
                	<span class="resultat">{{ entete.DTAE_ECH | dateTrad }}</span>
                </p>
                <p>
                	<span class="champs_label">{{ 'Période' | trad ~ colon() }}</span>
                	<span class="resultat">{{ entete.DATE_PER | dateTrad }}</span>
                </p>
            </div>
        </div>
        <div class="colonne4">
            <div class="informations">
            	<p>
            		<span class="champs_label">{{ 'Total HT' | trad ~ colon() }}</span>
                	<span class="resultat">{{ entete.TOTAL_HT | prix }} {{ entete.DEVISE }}</span>
            	</p>
            	<p>
                	<span class="champs_label">{{ 'Total TTC' | trad ~ colon() }}</span>
                	<span class="resultat">{{ entete.TOTAL_TTC | prix }} {{ entete.DEVISE }}</span>
                </p>
            </div>
        </div>
        <div class="colonne4">
            <div class="informations">
            	<p>
            		<span class="champs_label">{{ 'Entête' | trad ~ colon() }}</span>
                	<span class="resultat">
                        {% if entete.ENT_COMPT|boolSql == true %}{{ 'En compta' | trad }}
                        {% elseif entete.ENT_VALID|boolSql == true %}{{ 'Validée' | trad }}
                        {% endif %}
                    </span>
            	</p>
                <p>
                	<span class="champs_label">{{ 'Affectation' | trad ~ colon() }}</span>
                	<span class="resultat">
                	    {% if entete.AFF_COMPT|boolSql == true %}{{ 'En compta' | trad }}
                        {% elseif entete.AFF_VALID|boolSql == true %}{{ 'Validée' | trad }}
                        {% endif %}
                    </span>
            	</p>
                <p>
                	<span class="champs_label">{{ 'Pré-Aff. ?' | trad ~ colon() }}</span>
                	<span class="resultat">
						{% if entete.AFF_TMP|boolSql == true %}Oui{% else %}Non{% endif %}
                   </span>
                </p>
                <p>
                	<span class="champs_label">{{ 'BAP' | trad ~ colon() }}</span>
                	<span class="resultat">
                	    {% if entete.BON_A_PAY|boolSql == true %}
                	        {{ entete.DATE_BAP | dateTrad }}
                	    {% endif %}
                        {% if entete.BAP_COMPT|boolSql == true %}, {{ 'En compta' | trad }}
                        {% endif %}
                   </span>
                </p>
            </div>
        </div>
    </div>
    <table class="table table-hover">
    	<thead>
    		<tr>
    			<th scope="col">{{ 'Désignation Compl.' | trad }}</th>
    			<th scope="col" width="7%">{{ 'Etat Commande' | trad }}</th>
    			<th scope="col" width="7%">{{ 'Etat Cde Fin' | trad }}</th>
    			<th class="montant" scope="col" width="5%">{{ 'TVA' | trad }}</th>
    			<th scope="col" width="8%">{{ 'Type de TVA' | trad }}</th>
    			<th scope="col" width="11%">{{ 'Section d\'imputation' | trad }}</th>
    			<th scope="col" width="11%">{{ 'Code gestion' | trad }}</th>
    			<th scope="col" width="11%">{{ 'Code Complémentaire' | trad }}</th>
    			<th scope="col" width="11%">{{ 'Sous-Compte d\'analyse' | trad }}</th>
            </tr>
        </thead>
        <tbody>
			<tr>
				<td>{{ ligne.CONTMEMO  | convert_encoding('UTF-8', 'ISO-8859-1') }} </td>
				<td>{{ ligne.ETAT_CDE }} </td>
				<td>{{ ligne.ETAT_FIN }} </td>
				<td class="montant">{{ ligne.TAUX_TVA|number_format(2, '.', '') }} </td>
				<td>{{ ligne.TYPE_TVA }} </td>
				<td>{{ ligne.CODE_SI }}</td>
				<td>{{ ligne.ID_CG }}</td>
				<td>{{ ligne.CODE_CDC }}</td>
				<td>{{ ligne.CODE_SCA }}</td>
			</tr>
        </tbody>
    </table>
</td>


<script>
function plusDeLignes(path, id)
{
	$.ajax({
	  	dataType : 'html',
  		url: path,
  		data: {'id' : id, 'affichage' : 'all'},
  		type: "POST",
  		success: function(htmlData){
  			var result = $('<div />').append(htmlData).find('#ligneAffichage'+id).html();
            $('#ligneAffichage'+id).html(result);
  		}
  	});
}

ResizableColumns();
</script>
{% endblock %}
