--- /dev/null
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY nbsp " ">
+<!ENTITY egrave "è">
+<!ENTITY euro "€">
+<!ENTITY agrave "à">
+<!ENTITY eacute "é">
+]>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.xemelios.org/namespaces#cg-1.0" xmlns:n="http://www.xemelios.org/namespaces#cg-1.0" xmlns:added="http://projets.admisource.gouv.fr/xemelios/namespaces#added" version="2.0">
+ <xsl:character-map name="accents">
+ <xsl:output-character character="à" string="&#224;"/>
+ <xsl:output-character character="é" string="&#233;"/>
+ <xsl:output-character character="è" string="&#232;"/>
+ <xsl:output-character character="ê" string="&#234;"/>
+ <xsl:output-character character="ë" string="&#235;"/>
+ <xsl:output-character character="î" string="&#238;"/>
+ <xsl:output-character character="ï" string="&#239;"/>
+ <xsl:output-character character="ô" string="&#244;"/>
+ <xsl:output-character character="ù" string="&#249;"/>
+ <xsl:output-character character="°" string="&#176;"/>
+ </xsl:character-map>
+ <xsl:output method="xhtml" indent="yes" use-character-maps="accents" encoding="ISO-8859-1"/>
+ <xsl:decimal-format name="decformat" decimal-separator="," grouping-separator=" " digit="#" pattern-separator=";" NaN="NaN" minus-sign="-"/>
+
+ <!-- Inclusion des XSL externes -->
+ <xsl:include href="../../common-xsl/Title.xsl"/>
+ <xsl:include href="../../common-xsl/Style.xsl"/>
+ <xsl:include href="../../common-xsl/Error.xsl"/>
+ <xsl:include href="../../common-xsl/Navigate.xsl"/>
+ <xsl:include href="./common-xsl/Header.xsl"/>
+ <xsl:include href="../../common-xsl/Number.xsl"/><xsl:include href="../../common-xsl/Footer.xsl"/>
+
+ <!-- Paramètres Web -->
+ <xsl:param name="is.web">-1</xsl:param>
+ <xsl:param name="context.path"/>
+
+ <!-- Paramètres d'entrée -->
+ <xsl:param name="show.formulaire"/>
+ <xsl:param name="browser-destination"/>
+
+ <!-- Paramètres d'entrée de la liste de résultat -->
+ <xsl:param name="intitule">0</xsl:param>
+
+ <!-- Paramètres d'erreur -->
+ <xsl:param name="error.message">nomessage</xsl:param>
+
+ <!-- Variables -->
+ <xsl:variable name="page-format" select="paysage"/>
+ <xsl:variable name="NumPage" select="/n:CompteGestion/n:SP_BilanPassif/n:PageSP_BilanPassif/n:Pied/@NumPage"/>
+ <xsl:variable name="isLastPage" select="/n:CompteGestion/n:SP_BilanPassif/n:PageSP_BilanPassif/@added:isLastPage"/>
+ <xsl:variable name="Entete">
+ <xsl:copy-of select="/n:CompteGestion/n:Entete"/>
+ </xsl:variable>
+
+
+ <!-- pour eviter les sorties parasites de tags non matches -->
+ <xsl:template match="*"/>
+
+ <xsl:template match="/n:CompteGestion">
+ <html>
+ <head>
+ <!--title>
+ <xsl:choose>
+ <xsl:when test="$Entete//n:Nomenclature/@V='M21'">Gestion Patrimoniale et Financière</xsl:when>
+ <xsl:when test="$Entete//n:Nomenclature/@V='M31'">BILAN -PASSIF (avant affectation du résultat)</xsl:when>
+ <xsl:otherwise>Situation Patrimoniale - Bilan Passif</xsl:otherwise>
+ </xsl:choose>
+ </title-->
+ <xsl:call-template name="title">
+ <xsl:with-param name="Entete" select="//n:Entete"/>
+ <xsl:with-param name="etat">
+ <xsl:choose>
+ <xsl:when test="$Entete//n:Nomenclature/@V='M21'">Gestion Patrimoniale et Financière</xsl:when>
+ <xsl:when test="$Entete//n:Nomenclature/@V='M31'">BILAN -PASSIF (avant affectation du résultat)</xsl:when>
+ <xsl:otherwise>Situation Patrimoniale - Bilan Passif</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:call-template name="style"/>
+ </head>
+ <body width="100%">
+ <xsl:if test="$error.message!='nomessage'">
+ <xsl:attribute name="onload">javascript:showDialog('<xsl:value-of select="$error.message"/>');</xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="Error"><!--xsl:with-param name="error.message" select="$error.message"/--></xsl:call-template>
+ <xsl:call-template name="navigate">
+ <xsl:with-param name="docId">cg-colloc</xsl:with-param>
+ <xsl:with-param name="etatId">SP_BilanPassif</xsl:with-param>
+ <xsl:with-param name="elementId">PageSP_BilanPassif</xsl:with-param>
+ <xsl:with-param name="sous.elementId">LigneSP_BilanPassif</xsl:with-param>
+ <xsl:with-param name="NumPage" select="$NumPage"/>
+ <xsl:with-param name="isLastPage" select="$isLastPage"/>
+ <xsl:with-param name="Entete" select="$Entete"/>
+ <xsl:with-param name="show.formulaire" select="$show.formulaire"/>
+ <xsl:with-param name="show.formulaire.compte" select="0"/>
+ <xsl:with-param name="show.depense.recette" select="0"/>
+ <xsl:with-param name="is.web" select="$is.web"/>
+ <xsl:with-param name="context.path" select="$context.path"/>
+ </xsl:call-template>
+ <xsl:call-template name="header">
+ <xsl:with-param name="Entete" select="$Entete"/>
+ <xsl:with-param name="Titre">
+ <xsl:choose>
+ <xsl:when test="$Entete//n:Nomenclature/@V='M21'">COMPTE FINANCIER <xsl:value-of select="$Entete//n:Exercice/@V"/></xsl:when>
+ <xsl:when test="$Entete//n:Nomenclature/@V='M31'">BILAN -PASSIF (avant affectation du résultat)</xsl:when>
+ <xsl:otherwise>Situation Patrimoniale - Bilan Passif</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ <xsl:with-param name="Titre.Plus">
+ <xsl:choose>
+ <xsl:when test="$Entete//n:Nomenclature/@V='M21'"><h2>GESTION PATRIMONIALE ET FINANCIERE</h2></xsl:when>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:call-template name="mainTable">
+ <xsl:with-param name="el" select="/n:CompteGestion/n:SP_BilanPassif/n:PageSP_BilanPassif"/>
+ </xsl:call-template>
+ <p>
+ <xsl:call-template name="footer"><xsl:with-param name="num.page" select="$NumPage"/><xsl:with-param name="tracabilite"><xsl:copy-of select="//n:Tracabilite"/></xsl:with-param></xsl:call-template>
+ </p>
+
+ <xsl:call-template name="navigate">
+ <xsl:with-param name="docId">cg-colloc</xsl:with-param>
+ <xsl:with-param name="etatId">SP_BilanPassif</xsl:with-param>
+ <xsl:with-param name="elementId">PageSP_BilanPassif</xsl:with-param>
+ <xsl:with-param name="sous.elementId">LigneSP_BilanPassif</xsl:with-param>
+ <xsl:with-param name="NumPage" select="$NumPage"/>
+ <xsl:with-param name="isLastPage" select="$isLastPage"/>
+ <xsl:with-param name="Entete" select="$Entete"/>
+ <xsl:with-param name="show.formulaire" select="$show.formulaire"/>
+ <xsl:with-param name="show.formulaire.compte" select="0"/>
+ <xsl:with-param name="show.depense.recette" select="0"/>
+ <xsl:with-param name="is.web" select="$is.web"/>
+ <xsl:with-param name="context.path" select="$context.path"/>
+ </xsl:call-template>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template name="mainTable">
+ <xsl:param name="el" />
+
+ <xsl:if test="$Entete//n:Nomenclature/@V='M21'"><h3 style="text-align: left;">BILAN</h3></xsl:if>
+ <table width="100%" class="bordered" id="main">
+ <colgroup>
+ <xsl:choose>
+ <xsl:when test="$Entete//n:Nomenclature/@V='M31' and $el/@Modele='504'">
+ <col width="20%"/>
+ <col width="30%"/>
+ <col width="10%"/>
+ <col width="10%"/>
+ <col width="10%"/>
+ <col width="10%"/>
+ <col width="10%"/>
+ </xsl:when>
+ <xsl:when test="$Entete//n:Nomenclature/@V='M31' and ($el/@Modele='505' or $el/@Modele='506')">
+ <col width="20%"/>
+ <col width="40%"/>
+ <col width="10%"/>
+ <col width="10%"/>
+ <col width="10%"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <col width="15%"/>
+ <col width="25%"/>
+ <col width="30%"/>
+ <col width="30%"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </colgroup>
+ <thead>
+ <xsl:choose>
+ <xsl:when test="$Entete//n:Nomenclature/@V='M31' and $el/@Modele='504'">
+ <tr class="titre">
+ <td rowspan="2" class="bold titre bordureRight center">N° de compte</td>
+ <td rowspan="2" colspan="3" class="bold titre bordureRight center">PASSIF</td>
+ <td colspan="2" class="bold titre bordureRight bordureBottom center">Exercice <xsl:value-of select="/n:CompteGestion/n:Entete/n:Infos/n:Collectivite/@Exercice"/></td>
+ <td rowspan="2" class="bold titre bordureRight center">Exercice <xsl:value-of select="/n:CompteGestion/n:Entete/n:Infos/n:Collectivite/@Exercice - 1"/></td>
+ </tr>
+ <tr>
+ <td class="bold titre bordureRight center">Détail</td>
+ <td class="bold titre bordureRight center">Totaux partiels</td>
+ </tr>
+ <tr>
+ <td class="titre bordureBottom bordureRight center">1</td>
+ <td class="titre bordureBottom bordureRight center" colspan="3">2</td>
+ <td class="titre bordureBottom bordureRight center">3</td>
+ <td class="titre bordureBottom bordureRight center">4</td>
+ <td class="titre bordureBottom bordureRight center">5</td>
+ </tr>
+ </xsl:when>
+ <xsl:when test="$Entete//n:Nomenclature/@V='M31' and ($el/@Modele='505' or $el/@Modele='506')">
+ <tr class="titre">
+ <td rowspan="2" class="bold titre bordureRight center">N° de compte</td>
+ <td rowspan="2" class="bold titre bordureRight center">PASSIF</td>
+ <td colspan="2" class="bold titre bordureRight bordureBottom center">Exercice <xsl:value-of select="/n:CompteGestion/n:Entete/n:Infos/n:Collectivite/@Exercice"/></td>
+ <td rowspan="2" class="bold titre bordureRight center">Exercice <xsl:value-of select="/n:CompteGestion/n:Entete/n:Infos/n:Collectivite/@Exercice - 1"/></td>
+ </tr>
+ <tr>
+ <td class="bold titre bordureRight center">Détail</td>
+ <td class="bold titre bordureRight center">Totaux partiels</td>
+ </tr>
+ <tr>
+ <td class="titre bordureBottom bordureRight center">1</td>
+ <td class="titre bordureBottom bordureRight center">2</td>
+ <td class="titre bordureBottom bordureRight center">3</td>
+ <td class="titre bordureBottom bordureRight center">4</td>
+ <td class="titre bordureBottom bordureRight center">5</td>
+ </tr>
+ </xsl:when>
+ <xsl:otherwise>
+ <tr class="titre">
+ <td colspan="2" class="bold titre bordered center">PASSIF</td>
+ <td class="bold titre bordered center">Exercice <xsl:value-of select="/n:CompteGestion/n:Entete/n:Infos/n:Collectivite/@Exercice"/></td>
+ <td class="bold titre bordered center">Exercice <xsl:value-of select="/n:CompteGestion/n:Entete/n:Infos/n:Collectivite/@Exercice - 1"/></td>
+ </tr>
+ </xsl:otherwise>
+ </xsl:choose>
+ </thead>
+ <tbody>
+ <xsl:choose>
+ <xsl:when test="$Entete//n:Nomenclature/@V='M21'">
+ <xsl:call-template name="donnees.M21">
+ <xsl:with-param name="el" select="$el"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$Entete//n:Nomenclature/@V='M31'">
+ <xsl:call-template name="donnees.M31">
+ <xsl:with-param name="el" select="$el"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="$el/n:LigneEnteteSP_BilanPassif">
+ <tr>
+ <xsl:element name="td">
+ <xsl:attribute name="rowspan"><xsl:value-of select="count(../n:LigneSP_BilanPassif[not(contains(lower-case(@IntituleRubriqueP),'total'))])+1"/></xsl:attribute>
+ <xsl:attribute name="class">bold titre2 bordered center</xsl:attribute>
+ <xsl:value-of select="@Titre4"/> <xsl:value-of select="@Titre5"/> <xsl:value-of select="@Titre6"/>
+ </xsl:element>
+ </tr>
+ <xsl:call-template name="donnees">
+ <xsl:with-param name="el" select="$el"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </tbody>
+ </table>
+ </xsl:template>
+
+ <xsl:template name="donnees">
+ <xsl:param name="el"/>
+
+ <xsl:for-each select="$el/n:LigneSP_BilanPassif">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="$intitule != '0' and @IntituleRubriqueP=$intitule">
+ <xsl:attribute name="id">highlighted</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2) = 0">
+ <xsl:attribute name="id">colorised1</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="id">colorised2</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="contains(lower-case(@IntituleRubriqueP),'total') and position()!=count(../n:LigneSP_BilanPassif)">
+ <td class="libelleLigne bordered bold" colspan="2"><xsl:value-of select="@IntituleRubriqueP"/></td>
+ <td class="montant bordered bold">
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="@N_FP"/>
+ </xsl:call-template>
+ </td>
+ <td class="montant bordered bold">
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="@N_1FP"/>
+ </xsl:call-template>
+ </td>
+ </xsl:when>
+ <xsl:when test="contains(lower-case(@IntituleRubriqueP),'total') and position()=count(../n:LigneSP_BilanPassif)">
+ <td class="libelleLigne borderedBold bold" colspan="2"><xsl:value-of select="@IntituleRubriqueP"/></td>
+ <td class="montant borderedBold bold">
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="@N_FP"/>
+ </xsl:call-template>
+ </td>
+ <td class="montant borderedBold bold">
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="@N_1FP"/>
+ </xsl:call-template>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td class="libelleLigne bordureRight"><xsl:value-of select="@IntituleRubriqueP"/></td>
+ <td class="montant bordureRight">
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="@N_FP"/>
+ </xsl:call-template>
+ </td>
+ <td class="montant bordureRight">
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="@N_1FP"/>
+ </xsl:call-template>
+ </td>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </tr>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="donnees.M21">
+ <xsl:param name="el"/>
+
+ <xsl:for-each select="$el/n:LigneSP_BilanPassif">
+ <xsl:choose>
+ <xsl:when test="position()=2 or position()=5 or position()=15 or position()=19 or position()=22">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="$intitule != '0' and @IntituleRubriqueA=$intitule">
+ <xsl:attribute name="id">highlighted</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="((position()-1) mod 2) = 0">
+ <xsl:attribute name="id">colorised1</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="id">colorised2</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="position()=2">
+ <td class="bordureRight bordureTop bold bold">RESERVES:</td>
+ <td class="montant bordureRight bordureTop bold"> </td>
+ <td class="montant bordureRight bordureTop bold"> </td>
+ </xsl:when>
+ <xsl:when test="position()=5">
+ <td class="bordureRight bordureTop bold bold">REPORT A NOUVEAU :</td>
+ <td class="montant bordureRight bordureTop bold"> </td>
+ <td class="montant bordureRight bordureTop bold"> </td>
+ </xsl:when>
+ <xsl:when test="position()=15">
+ <td class="bordureRight bordureTop bold bold">DETTES FINANCIERES:</td>
+ <td class="montant bordureRight bordureTop bold"> </td>
+ <td class="montant bordureRight bordureTop bold"> </td>
+ </xsl:when>
+ <xsl:when test="position()=19">
+ <td class="bordureRight bordureTop bold bold">DETTES D'EXPLOITATION:</td>
+ <td class="montant bordureRight bordureTop bold"> </td>
+ <td class="montant bordureRight bordureTop bold"> </td>
+ </xsl:when>
+ <xsl:when test="position()=22">
+ <td class="bordureRight bordureTop bold bold">DETTES DIVERSES:</td>
+ <td class="montant bordureRight bordureTop bold"> </td>
+ <td class="montant bordureRight bordureTop bold"> </td>
+ </xsl:when>
+
+ </xsl:choose>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
+
+ <tr>
+ <xsl:choose>
+ <xsl:when test="$intitule != '0' and @IntituleRubriqueP=$intitule">
+ <xsl:attribute name="id">highlighted</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2) = 0">
+ <xsl:attribute name="id">colorised1</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="id">colorised2</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="position()=1">
+ <td rowspan="13" class="bordureRight bordureBottom center bold">CAPITAUX<br/><br/><br/><br/>PROPRES</td>
+ </xsl:if>
+ <xsl:if test="position()=12">
+ <td rowspan="2" class="bordureRight bordureBottom center bold">PROVISIONS POUR<br/>RISQUES ET CHARGES</td>
+ </xsl:if>
+ <xsl:if test="position()=14">
+ <td rowspan="15" class="bordureRight bordureBottom center bold">DETTES</td>
+ </xsl:if>
+ <xsl:if test="position()=26">
+ <td rowspan="4" class="bordureRight bordureBottom center bold">COMPTES DE<br/>REGULARISATION</td>
+ </xsl:if>
+
+ <td>
+ <xsl:choose>
+ <xsl:when test="position()=9 or position()=10"><xsl:attribute name="class">bordureRight bold</xsl:attribute></xsl:when>
+ <xsl:when test="position()=11 or position()=14 or position()=26 or position()=29"><xsl:attribute name="class">borderedBold bold center</xsl:attribute></xsl:when>
+ <xsl:otherwise><xsl:attribute name="class">bordureRight</xsl:attribute></xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="position()=1">APPORTS</xsl:when>
+ <xsl:when test="position()=2">   . Excédents affectés à l'investissement</xsl:when>
+ <xsl:when test="position()=3">   . Réserve de trésorerie</xsl:when>
+ <xsl:when test="position()=4">   . Réserves de compensensation</xsl:when>
+ <xsl:when test="position()=5">   . Report à nouveau excédentaire</xsl:when>
+ <xsl:when test="position()=6">   . Report à nouveau déficitaire</xsl:when>
+ <xsl:when test="position()=7">RESULTATDE L'EXERCICE<br/>(EXCEDENT OU DEFICIT)</xsl:when>
+ <xsl:when test="position()=8">SUBVENTIONS D'INVESTISSEMENT</xsl:when>
+ <xsl:when test="position()=9">PROVISIONS REGLEMENTEES</xsl:when>
+ <xsl:when test="position()=10">DROITS DE L'FFECTANT</xsl:when>
+ <xsl:when test="position()=11">TOTAL I</xsl:when>
+ <xsl:when test="position()=12">PROVISIONSPOUR RISQUES</xsl:when>
+ <xsl:when test="position()=13">PROVISIONSPOUR CHARGES</xsl:when>
+ <xsl:when test="position()=14">TOTAL II</xsl:when>
+ <xsl:when test="position()=15">. Emprunts obligataires</xsl:when>
+ <xsl:when test="position()=16">. Emprunts auprès des établissements de crédit</xsl:when>
+ <xsl:when test="position()=17">. Emprunts et dettes financières divers</xsl:when>
+ <xsl:when test="position()=18">. Crédits et lignes de trésorerie</xsl:when>
+ <xsl:when test="position()=19">. Avances reçues</xsl:when>
+ <xsl:when test="position()=20">. Dettes fournisseurs et comptes rattachés</xsl:when>
+ <xsl:when test="position()=21">. Dettes fiscales et sociales</xsl:when>
+ <xsl:when test="position()=22">. Dettes sur immobilisations et comptes rattachés</xsl:when>
+ <xsl:when test="position()=23">. Fonds déposés par les hospitaliers et hébergés</xsl:when>
+ <xsl:when test="position()=24">. Autres</xsl:when>
+ <xsl:when test="position()=25">. Produits constatés d'avance</xsl:when>
+ <xsl:when test="position()=26">TOTAL III</xsl:when>
+ <xsl:when test="position()=27">RECETTES A CLASSER ET A REGULARISER CREDIT</xsl:when>
+ <xsl:when test="position()=28">ECART DE CONVERSION PASSIF</xsl:when>
+ <xsl:when test="position()=29">TOTAL GENERAL</xsl:when>
+ </xsl:choose>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="position()=11 or position()=14 or position()=26 or position()=29"><xsl:attribute name="class">borderedBold bold montant</xsl:attribute></xsl:when>
+ <xsl:otherwise><xsl:attribute name="class">montant bordureRight</xsl:attribute></xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="@N_FP"/>
+ </xsl:call-template>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="position()=11 or position()=14 or position()=26 or position()=29"><xsl:attribute name="class">borderedBold bold montant</xsl:attribute></xsl:when>
+ <xsl:otherwise><xsl:attribute name="class">montant bordureRight</xsl:attribute></xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="@N_1FP"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="donnees.M31">
+ <xsl:param name="el"/>
+
+ <xsl:variable name="comptes.libelles">
+ <ComptesLibelles>
+ <Type Modele="504">
+ <CompteLibelle Compte="10" Libelle="DOTATIONS ET RESERVES"/>
+ <CompteLibelle Compte="102" Libelle="Dotations"/>
+ <CompteLibelle Compte="103" Libelle="Autres fonds propres-autres compléments de dotation, dons et legs en capital"/>
+ <!--CompteLibelle Compte="106" Libelle="Réserves :"/-->
+ <CompteLibelle Compte="1067" Libelle="Excédents d'exploitationaffectés à l'investissement"/>
+ <CompteLibelle Compte="10685" Libelle="Plus-valuesnettes sur cessions immobilières"/>
+ <CompteLibelle Compte="10687" Libelle="Réserve pour couverture du financement des immo. non amortissables"/>
+ <CompteLibelle Compte="10688" Libelle="Réserves diverses"/>
+ <CompteLibelle Compte="11" Libelle="Report à nouveau (a)"/>
+ <CompteLibelle Compte="12" Libelle="Résultat de l'exercice (a)"/>
+ <CompteLibelle Compte="13" Libelle="Subventions d'investissement"/>
+ <CompteLibelle Compte="131" Libelle="Subventions d'équipement"/>
+ <CompteLibelle Compte="132" Libelle="Participation empl. à l'effortde constr."/>
+ <CompteLibelle Compte="138" Libelle="Autres subventions d'investissement"/>
+ <CompteLibelle Compte="145" Libelle="PROVISIONS REGLEMENTEES -amortissements dérogatoires"/>
+ <!--CompteLibelle Compte="" Libelle="( I ).."/-->
+ <CompteLibelle Compte="15" Libelle="PROVISIONS"/>
+ <CompteLibelle Compte="151" Libelle="Provisions pour risques"/>
+ <CompteLibelle Compte="1572" Libelle="Provisions pour gros entretien"/>
+ <CompteLibelle Compte="153-158" Libelle="Autres provisions pour charges"/>
+ <!--CompteLibelle Compte="" Libelle="( II )..."/-->
+ </Type>
+ <Type Modele="505">
+ <CompteLibelle Compte="16" Libelle="DETTES FINANCIERES (1) (2)"/>
+ <CompteLibelle Compte="162" Libelle="Participation des employeurs à l'effortde construction"/>
+ <CompteLibelle Compte="163" Libelle="Emprunts obligataires"/>
+ <CompteLibelle Compte="1641" Libelle="Caisse des dépôts et Consignations"/>
+ <CompteLibelle Compte="1642" Libelle="C.G.L.L.S."/>
+ <CompteLibelle Compte="1643" Libelle="Crédit Foncier de France"/>
+ <CompteLibelle Compte="1644" Libelle="Caisse d'Epargne"/>
+ <CompteLibelle Compte="1645" Libelle="Crédit Agricole"/>
+ <CompteLibelle Compte="1646" Libelle="Crédit Local de France -Dexia"/>
+ <CompteLibelle Compte="1648" Libelle="Autres établissements de crédit"/>
+ <CompteLibelle Compte="1651" Libelle="Dépôts de garantie des locataires"/>
+ <CompteLibelle Compte="1654" Libelle="Redevances (location-accession)"/>
+ <CompteLibelle Compte="1658" Libelle="Autres dépôts"/>
+ <CompteLibelle Compte="166" Libelle="Participation des salariés aux résultats"/>
+ <CompteLibelle Compte="167 (sauf 1677)" Libelle="Autres avances"/>
+ <CompteLibelle Compte="1677" Libelle="Dettes consécutives à la mise en jeu de la garantie des emprunts"/>
+ <CompteLibelle Compte="168 (sauf 1688)" Libelle="Autres emprunts et dettes assimilées"/>
+ <CompteLibelle Compte="16881" Libelle="Intérêts courus non échus sur emprunts en cours d'amortissement"/>
+ <CompteLibelle Compte="16882" Libelle="Intérêts courus capitalisables"/>
+ <CompteLibelle Compte="16883" Libelle="Intérêts compensateurs"/>
+ <CompteLibelle Compte="518 -519" Libelle="Crédits et lignes de trésorerie"/>
+ <CompteLibelle Compte="229" Libelle="Droits des locataires acquéreurs, droits des affectants"/>
+ </Type>
+ <Type Modele="506">
+ <CompteLibelle Compte="419" Libelle="Locataires, acquéreurs, emprunteurs, loc.-acq.,et org. payeurs d'APL"/>
+ <CompteLibelle Compte="4191" Libelle="Avances"/>
+ <CompteLibelle Compte="4195" Libelle="Locataires -Excédents d'acomptes"/>
+ <CompteLibelle Compte="" Libelle="DETTES D'EXPLOITATION"/>
+ <CompteLibelle Compte="401-4031-4081-40711(b) -40721(b)" Libelle="Fournisseurs"/>
+ <CompteLibelle Compte="402-4032-4082-40712(b) -40722(b)" Libelle="Fournisseurs de stocks immobiliers"/>
+ <CompteLibelle Compte="42-43-44" Libelle="Dettes fiscales, sociales et autres"/>
+ <CompteLibelle Compte="" Libelle="DETTES DIVERSES"/>
+ <CompteLibelle Compte="404-405-4084-40714(b) -40724(b)" Libelle="Fournisseurs d'immobilisations"/>
+ <CompteLibelle Compte="46 (sauf 461)" Libelle="Créanciers divers"/>
+ <CompteLibelle Compte="461 (sauf 4615)" Libelle="Opérations pour le compte de tiers"/>
+ <CompteLibelle Compte="4615" Libelle="Opérations d'aménagement"/>
+ <CompteLibelle Compte="47 (sauf 477 et 47822)" Libelle="Comptes transitoires ou d'attente"/>
+ <CompteLibelle Compte="487" Libelle="Produits constatés d'avance :"/>
+ <CompteLibelle Compte="4871-4878" Libelle="Au titre de l'exploitationet autres"/>
+ <CompteLibelle Compte="4872" Libelle="Produits des ventes sur lots en cours"/>
+ <CompteLibelle Compte="4873" Libelle="Rémunération des frais de gestion PAP"/>
+ <CompteLibelle Compte="" Libelle="( III )..."/>
+ <CompteLibelle Compte="477-4782" Libelle="Différences de conversion ou d'indexation -Passif ( IV )..."/>
+ <CompteLibelle Compte="" Libelle="TOTAL GENERAL ( I + II + III + IV )"/>
+ </Type>
+ </ComptesLibelles>
+ </xsl:variable>
+
+ <xsl:variable name="Modele" select="$el/@Modele"/>
+
+ <xsl:for-each select="$el/n:LigneSP_BilanPassif">
+ <xsl:variable name="pos" select="position()"/>
+
+ <xsl:choose>
+ <xsl:when test="$Modele eq '504' and ($pos eq 1 or $pos eq 8 or $pos eq 9 or $pos eq 10 or $pos eq 14 or $pos eq 15 or $pos eq 16)">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="$intitule != '0' and @IntituleRubriqueA=$intitule">
+ <xsl:attribute name="id">highlighted</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2) = 0">
+ <xsl:attribute name="id">colorised1</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="id">colorised2</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight" colspan="2"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ </tr>
+ </xsl:when>
+ <xsl:when test="$Modele eq '504' and $pos eq 4">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="$intitule != '0' and @IntituleRubriqueA=$intitule">
+ <xsl:attribute name="id">highlighted</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2) = 0">
+ <xsl:attribute name="id">colorised1</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="id">colorised2</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight" colspan="2"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ </tr>
+ <tr>
+ <xsl:choose>
+ <xsl:when test="$intitule != '0' and @IntituleRubriqueA=$intitule">
+ <xsl:attribute name="id">highlighted</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2) = 0">
+ <xsl:attribute name="id">colorised1</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="id">colorised2</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="bordureRight bold">106</td>
+ <td class="bordureRight bold" colspan="2">Réserves :</td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ </tr>
+ </xsl:when>
+ <xsl:when test="$Modele eq '504' and $pos eq 11">
+ <tr>
+ <td class="bordureRight"> </td>
+ <td> </td>
+ <td class="bordureRight bordureBottom bold center">Montant brut</td>
+ <td class="bordureRight bordureBottom bold center">Inscrit au résultat</td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ </tr>
+ </xsl:when>
+ <xsl:when test="$Modele eq '505' and $pos eq 4">
+ <tr>
+ <td class="bordureRight bold">164</td>
+ <td class="bordureRight bold">Emprunts auprès des établissements de crédit :</td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ </tr>
+ </xsl:when>
+ <xsl:when test="$Modele eq '505' and $pos eq 11">
+ <tr>
+ <td class="bordureRight bold">165</td>
+ <td class="bordureRight bold">Dépôts et cautionnements reçus :</td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ </tr>
+ </xsl:when>
+ <xsl:when test="$Modele eq '505' and $pos eq 14">
+ <tr>
+ <td class="bordureRight bold"> </td>
+ <td class="bordureRight bold">Emprunts et dettes financières diverses :</td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ </tr>
+ </xsl:when>
+
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="$Modele eq '504'">
+ <xsl:if test="$pos = 15">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="$intitule != '0' and @IntituleRubriqueA=$intitule">
+ <xsl:attribute name="id">highlighted</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2) = 0">
+ <xsl:attribute name="id">colorised1</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="id">colorised2</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="bordureRight bold"> </td>
+ <td class="bordureRight bold" colspan="2"> </td>
+ <td class="bordureRight bold montant">(I)..</td>
+ <td>
+ <xsl:attribute name="class">bordered montant bold</xsl:attribute>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="$el/n:LignePiedSP_BilanPassif[1]/@NetN"/>
+ </xsl:call-template>
+ </td>
+ <td>
+ <xsl:attribute name="class">bordered montant bold</xsl:attribute>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="$el/n:LignePiedSP_BilanPassif[1]/@TotalPartiel"/>
+ </xsl:call-template>
+ </td>
+ <td>
+ <xsl:attribute name="class">bordered montant bold</xsl:attribute>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="$el/n:LignePiedSP_BilanPassif[1]/@NetN_1"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ <tr>
+ <xsl:choose>
+ <xsl:when test="$intitule != '0' and @IntituleRubriqueA=$intitule">
+ <xsl:attribute name="id">highlighted</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2) = 0">
+ <xsl:attribute name="id">colorised1</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="id">colorised2</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <!--xsl:choose>
+ <xsl:when test="not($el/@Modele='503' and position()=6)"-->
+ <td>
+ <xsl:choose>
+ <xsl:when test="$el/@Modele='504' and (position()=1 or position()=8 or position()=9 or position()=10 or position()=14 or position()=15)"><xsl:attribute name="class">bordureRight bold</xsl:attribute></xsl:when>
+ <xsl:otherwise><xsl:attribute name="class">bordureRight</xsl:attribute></xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="$comptes.libelles//n:Type[@Modele=$Modele]/n:CompteLibelle[position()=$pos]/@Compte"/>
+ </td>
+ <!--/xsl:when>
+ </xsl:choose-->
+
+ <xsl:choose>
+ <xsl:when test="$el/@Modele='504' and (position()=11 or position()=12 or position()=13)">
+ <td><xsl:value-of select="$comptes.libelles//n:Type[@Modele=$Modele]/n:CompteLibelle[position()=$pos]/@Libelle"/></td>
+ <td class="bordureRight montant"><xsl:call-template name="number"><xsl:with-param name="num" select="@Brut"/></xsl:call-template></td>
+ <td class="bordureRight montant"><xsl:call-template name="number"><xsl:with-param name="num" select="@Ress"/></xsl:call-template></td>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$el/@Modele='504' and (position()=1 or position()=8 or position()=9 or position()=10 or position()=14 or position()=15)">
+ <td class="bordureRight bold" colspan="2"><xsl:value-of select="$comptes.libelles//n:Type[@Modele=$Modele]/n:CompteLibelle[position()=$pos]/@Libelle"/></td>
+ <td class="bordureRight"> </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td class="bordureRight" colspan="2"><xsl:value-of select="$comptes.libelles//n:Type[@Modele=$Modele]/n:CompteLibelle[position()=$pos]/@Libelle"/></td>
+ <td class="bordureRight"> </td>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td>
+ <xsl:choose>
+ <xsl:when test="$el/@Modele='504' and (position()=1 or position()=8 or position()=9 or position()=10 or position()=14 or position()=15)"><xsl:attribute name="class">bordureRight bold montant</xsl:attribute></xsl:when>
+ <xsl:otherwise><xsl:attribute name="class">bordureRight montant</xsl:attribute></xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="@NetN"/>
+ </xsl:call-template>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="$el/@Modele='504' and (position()=1 or position()=8 or position()=9 or position()=10 or position()=14 or position()=15)"><xsl:attribute name="class">bordureRight bold montant</xsl:attribute></xsl:when>
+ <xsl:otherwise><xsl:attribute name="class">bordureRight montant</xsl:attribute></xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="@TotalPartiel"/>
+ </xsl:call-template>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="$el/@Modele='504' and (position()=1 or position()=8 or position()=9 or position()=10 or position()=14 or position()=15)"><xsl:attribute name="class">bordureRight bold montant</xsl:attribute></xsl:when>
+ <xsl:otherwise><xsl:attribute name="class">bordureRight montant</xsl:attribute></xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="@NetN_1"/>
+ </xsl:call-template>
+ </td>
+ <!--/xsl:otherwise>
+ </xsl:choose-->
+ </tr>
+ <xsl:if test="$pos = 18">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="$intitule != '0' and @IntituleRubriqueA=$intitule">
+ <xsl:attribute name="id">highlighted</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2) = 0">
+ <xsl:attribute name="id">colorised1</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="id">colorised2</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="bordureRight bold"> </td>
+ <td class="bordureRight bold" colspan="2"> </td>
+ <td class="bordureRight bold montant">(II)...</td>
+ <td>
+ <xsl:attribute name="class">bordered montant bold</xsl:attribute>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="$el/n:LignePiedSP_BilanPassif[2]/@NetN"/>
+ </xsl:call-template>
+ </td>
+ <td>
+ <xsl:attribute name="class">bordered montant bold</xsl:attribute>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="$el/n:LignePiedSP_BilanPassif[2]/@TotalPartiel"/>
+ </xsl:call-template>
+ </td>
+ <td>
+ <xsl:attribute name="class">bordered montant bold</xsl:attribute>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="$el/n:LignePiedSP_BilanPassif[2]/@NetN_1"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$Modele eq '505' and ($pos eq 1 or $pos eq 21 or $pos eq 22)">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="$intitule != '0' and @IntituleRubriqueA=$intitule">
+ <xsl:attribute name="id">highlighted</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2) = 0">
+ <xsl:attribute name="id">colorised1</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="id">colorised2</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ </tr>
+ </xsl:when>
+ <xsl:when test="$Modele eq '506' and ($pos eq 4 or $pos eq 8 or $pos eq 14 or $pos eq 19 or $pos eq 20)">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="$intitule != '0' and @IntituleRubriqueA=$intitule">
+ <xsl:attribute name="id">highlighted</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2) = 0">
+ <xsl:attribute name="id">colorised1</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="id">colorised2</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="$Modele eq '506' and $pos eq 9">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="$intitule != '0' and @IntituleRubriqueA=$intitule">
+ <xsl:attribute name="id">highlighted</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2) = 0">
+ <xsl:attribute name="id">colorised1</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="id">colorised2</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight bold">Dettes sur immobilisations et comptes rattachés :</td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ </tr>
+ </xsl:when>
+ <xsl:when test="$Modele eq '506' and $pos eq 10">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="$intitule != '0' and @IntituleRubriqueA=$intitule">
+ <xsl:attribute name="id">highlighted</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2) = 0">
+ <xsl:attribute name="id">colorised1</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="id">colorised2</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight bold">Autres dettes :</td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ <td class="bordureRight"> </td>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
+ <tr>
+ <xsl:choose>
+ <xsl:when test="$intitule != '0' and @IntituleRubriqueA=$intitule">
+ <xsl:attribute name="id">highlighted</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2) = 0">
+ <xsl:attribute name="id">colorised1</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="id">colorised2</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="not($el/@Modele='506' and position()=20)">
+ <td>
+ <xsl:choose>
+ <xsl:when test="$el/@Modele='505' and (position()=1 or position()=21 or position()=22)"><xsl:attribute name="class">bordureRight bold</xsl:attribute></xsl:when>
+ <xsl:when test="$el/@Modele='506' and (position()=1 or position()=4 or position()=8 or position()=14 or position()=18 or position()=19 or position()=20)"><xsl:attribute name="class">bordureRight bold</xsl:attribute></xsl:when>
+ <xsl:otherwise><xsl:attribute name="class">bordureRight</xsl:attribute></xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="$comptes.libelles//n:Type[@Modele=$Modele]/n:CompteLibelle[position()=$pos]/@Compte"/>
+ </td>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="$el/@Modele='505' and (position()=1 or position()=21 or position()=22)">
+ <td class="bordureRight bold"><xsl:value-of select="$comptes.libelles//n:Type[@Modele=$Modele]/n:CompteLibelle[position()=$pos]/@Libelle"/></td>
+ </xsl:when>
+ <xsl:when test="$el/@Modele='506' and (position()=1 or position()=4 or position()=8 or position()=14)">
+ <td class="bordureRight bold"><xsl:value-of select="$comptes.libelles//n:Type[@Modele=$Modele]/n:CompteLibelle[position()=$pos]/@Libelle"/></td>
+ </xsl:when>
+ <xsl:when test="$el/@Modele='506' and (position()=18 or position()=19)">
+ <td class="bordureRight bold montant"><xsl:value-of select="$comptes.libelles//n:Type[@Modele=$Modele]/n:CompteLibelle[position()=$pos]/@Libelle"/></td>
+ </xsl:when>
+ <xsl:when test="$el/@Modele='506' and position()=20">
+ <td class="bordered bold montant" colspan="2"><xsl:value-of select="$comptes.libelles//n:Type[@Modele=$Modele]/n:CompteLibelle[position()=$pos]/@Libelle"/></td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td class="bordureRight"><xsl:value-of select="$comptes.libelles//n:Type[@Modele=$Modele]/n:CompteLibelle[position()=$pos]/@Libelle"/></td>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td>
+ <xsl:choose>
+ <xsl:when test="$el/@Modele='505' and (position()=1 or position()=21 or position()=22)"><xsl:attribute name="class">bordureRight bold montant</xsl:attribute></xsl:when>
+ <xsl:when test="$el/@Modele='506' and (position()=1 or position()=4 or position()=8 or position()=14)"><xsl:attribute name="class">bordureRight bold montant</xsl:attribute></xsl:when>
+ <xsl:when test="$el/@Modele='506' and (position()=18 or position()=19 or position()=20)"><xsl:attribute name="class">bordered bold montant</xsl:attribute></xsl:when>
+ <xsl:otherwise><xsl:attribute name="class">bordureRight montant</xsl:attribute></xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="@NetN"/>
+ </xsl:call-template>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="$el/@Modele='505' and (position()=1 or position()=21 or position()=22)"><xsl:attribute name="class">bordered bold montant</xsl:attribute></xsl:when>
+ <xsl:when test="$el/@Modele='506' and (position()=1 or position()=4 or position()=8 or position()=14)"><xsl:attribute name="class">bordered bold montant</xsl:attribute></xsl:when>
+ <xsl:when test="$el/@Modele='506' and (position()=18 or position()=19 or position()=20)"><xsl:attribute name="class">bordered bold montant</xsl:attribute></xsl:when>
+ <xsl:otherwise><xsl:attribute name="class">bordureRight montant</xsl:attribute></xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="@TotalPartiel"/>
+ </xsl:call-template>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="$el/@Modele='505' and (position()=1 or position()=21 or position()=22)"><xsl:attribute name="class">bordered bold montant</xsl:attribute></xsl:when>
+ <xsl:when test="$el/@Modele='506' and (position()=1 or position()=4 or position()=8 or position()=14)"><xsl:attribute name="class">bordered bold montant</xsl:attribute></xsl:when>
+ <xsl:when test="$el/@Modele='506' and (position()=18 or position()=19 or position()=20)"><xsl:attribute name="class">bordered bold montant</xsl:attribute></xsl:when>
+ <xsl:otherwise><xsl:attribute name="class">bordureRight montant</xsl:attribute></xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="@NetN_1"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:transform>