--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:n="fr:gouv:finances:xemelios:internal"
+ xmlns:added="http://projets.admisource.gouv.fr/xemelios/namespaces#added"
+ exclude-result-prefixes="xs added n"
+ version="2.0">
+ <!--
+ Copyright
+ 2012 axYus - www.axyus.com
+ 2012 Christophe Marchand <christophe.marchand@axyus.com>
+
+ This file is part of XEMELIOS.
+
+ XEMELIOS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ XEMELIOS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with XEMELIOS; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ -->
+ <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:character-map>
+
+ <xsl:variable name="resources" select="document('rsa-rec-resources.xml')"/>
+ <xsl:output encoding="UTF-8" method="xhtml" use-character-maps="accents"/>
+ <xsl:decimal-format name="decformat" decimal-separator="," grouping-separator=" " digit="#" pattern-separator=";" NaN="NaN" minus-sign="-"> </xsl:decimal-format>
+
+ <xsl:param name="numLigne"/>
+ <xsl:param name="displayedDocId"/>
+
+ <xsl:variable name="DATE_FORMAT" select="'[D,2]/[M,2]/[Y]'"/>
+ <xsl:variable name="MOIS_FORMAT" select="'[M,2]/[Y]'"/>
+ <xsl:variable name="TIME_FORMAT" select="'[H01]:[m01]:[s01]'"/>
+ <xsl:variable name="MT_FORMAT" select="'0,00'"/>
+
+ <xsl:template match="/">
+ <html>
+ <head>
+ <title>Indus transférés</title>
+ <style media="all">
+ body { font-family: verdana, sans-serif; font-size: 10px; }
+ table.data { width: 100%; border-style: none; border-width: 0px; cellpadding: 0px; cellspacing: 0px; }
+ table.detail { background-color: black; }
+ table { background-color: black; cell-spacing: 1px; cell-padding: 1px; margin: 5px 5px 5px 5px; border-collapse: collapse; }
+ th { background-color: #cccccc; border-style: solid; border-width: 1px; }
+ td { background-color: white; border-style: solid; border-width: 1px; }
+
+ .bold { font-weight: bold; }
+ td { vertical-align: baseline; background-color: white;}
+ td.mt { white-space: nowrap; }
+ tr.bordered { border-color: black; border-width: 1px; border-color: #666666; border-style: solid; }
+ tr.total td { background-color: #cccccc; font-weight: bold; cellspacing-bottom: 3px;}
+ theader tr th { font-weight: bold; background-color: #CCCCCC; }
+ tr.highlighted td { background-color: #FFFF66; }
+ </style>
+ <style type="text/css" media="print">
+ @page { size: 210mm 297mm; @bottom-center { content: "Page " counter(page) " / " counter(pages); } }
+ body { font-family: verdana, sans-serif; font-size: 10px; width: 210mm; margin: 0px; }
+ table { page-break-inside: avoid }
+ tr { page-break-inside: avoid; }
+ table#enteteGauche { width: 110mm; }
+ table#enteteDoite { width: 70mm; }
+ table.maxWidth { width: 180mm; }
+ </style>
+ </head>
+ <body>
+ <table id="flux">
+ <colgroup>
+ <col width="50%"/>
+ <col width="50%"/>
+ </colgroup>
+ <theader>
+ <tr><th colspan="2">Flux</th></tr>
+ </theader>
+ <tbody>
+ <tr>
+ <td class="bold">Application émettrice</td>
+ <td><xsl:value-of select="/n:Racine/n:IdentificationFlux/n:APPLIEME/text()"/> - <xsl:value-of select="/n:Racine/n:IdentificationFlux/n:NUMVERSIONAPPLIEME/text()"/></td>
+ </tr>
+ <tr>
+ <td class="bold">Créé le</td>
+ <td><xsl:value-of select="format-date(/n:Racine/n:IdentificationFlux/n:DTCREAFLUX/text(),$DATE_FORMAT)"/> - <xsl:value-of select="format-time(/n:Racine/n:IdentificationFlux/n:HEUCREAFLUX/text(),$TIME_FORMAT)"></xsl:value-of></td>
+ </tr>
+ <tr>
+ <td class="bold">Mois de référence</td>
+ <td><xsl:value-of select="format-date(/n:Racine/n:IdentificationFlux/n:DTREF/text(),$MOIS_FORMAT)"/></td>
+ </tr>
+ </tbody>
+ </table>
+ <xsl:apply-templates/>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="*"></xsl:template>
+
+ <xsl:template match="n:Racine">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="n:CreancesRSA">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="n:InfosCreanceFoyerRSA">
+ <xsl:call-template name="allocataire">
+ <xsl:with-param name="alloc" select="n:Personne"/>
+ <xsl:with-param name="adr" select="n:DonneesAdministratives/n:Adresse"/>
+ </xsl:call-template>
+ <h2>Indus transférés du mois <xsl:value-of select="format-date(../../n:IdentificationFlux/n:DTREF/text(),$MOIS_FORMAT)"/></h2>
+ <table>
+ <tr>
+ <td class="bold">Montant total</td>
+ <td><xsl:value-of select="format-number(n:Creance/@added:mt-total,'0,00','decformat')"/> €</td>
+ </tr>
+ </table>
+ <table>
+ <theader>
+ <tr>
+ <th>Nature</th>
+ <th>Rang</th>
+ <th>Date de début</th>
+ <th>Date de fin</th>
+ <th>Montant initial</th>
+ <th>Motif indu</th>
+ <th>Origine indu</th>
+ <th>Responsabilité indu</th>
+ <th>Date du dernier mouvement comptable de la CAF/MSA rattaché</th>
+ <th>Montant tranféré au CG</th>
+ <th>Mois initial d'enregistrement comptable de la CAF/MSA du transfert au CG</th>
+ </tr>
+ </theader>
+ <tbody>
+ <xsl:apply-templates select="n:Creance/n:CreancesTransferees"/>
+ </tbody>
+ </table>
+ </xsl:template>
+ <xsl:template match="n:CreancesTransferees">
+ <tr>
+ <td xml:space="preserve"><xsl:value-of select="n:IdentificationCreance/n:NATCRE/text()"/> <xsl:value-of select="n:IdentificationCreance/n:NATCRE/@added:libelle"/></td>
+ <td><xsl:value-of select="n:IdentificationCreance/n:RGCRE/text()"/></td>
+ <td><xsl:value-of select="format-date(n:DetailCreance/n:DDREGUCRE/text(),$DATE_FORMAT)"/></td>
+ <td><xsl:value-of select="format-date(n:DetailCreance/n:DFREGUCRE/text(),$DATE_FORMAT)"/></td>
+ <td style="text-align: right;"><xsl:value-of select="format-number(n:DetailCreance/n:MTINICRE/text(),$MT_FORMAT,'decformat')"/></td>
+ <td><xsl:value-of select="n:DetailCreance/n:MOTIINDU/@added:libelle"/></td>
+ <td><xsl:value-of select="n:DetailCreance/n:ORIINDU/@added:libelle"/></td>
+ <td><xsl:value-of select="n:DetailCreance/n:RESPINDU/@added:libelle"/></td>
+ <td><xsl:value-of select="format-date(n:DetailCreance/n:DTDERCREDCRETRANS/text(),$DATE_FORMAT)"/></td>
+ <td style="text-align: right;"><xsl:value-of select="format-number(n:DetailCreance/n:MTSOLREELCRETRANS/text(),$MT_FORMAT,'decformat')"/></td>
+ <td><xsl:value-of select="format-date(n:DetailCreance/n:MOISMOUCOMPTA/text(),$MOIS_FORMAT)"/></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template name="allocataire">
+ <xsl:param name="alloc"/>
+ <xsl:param name="adr"/>
+ <table id="flux">
+ <colgroup>
+ <col width="50%"/>
+ <col width="50%"/>
+ </colgroup>
+ <theader>
+ <tr><th colspan="2">Allocataire</th></tr>
+ </theader>
+ <tbody>
+ <tr>
+ <td colspan="2" xml:space="preserve"><xsl:if test="string-length($alloc/n:Identification/n:QUAL/text()) gt 0"><xsl:value-of select="concat($alloc/n:Identification/n:QUAL/text(),' ')"/></xsl:if><xsl:value-of select="$alloc/n:Identification/n:PRENOM/text()"/> <xsl:value-of select="$alloc/n:Identification/n:NOM/text()"></xsl:value-of></td>
+ </tr>
+ <tr>
+ <td class="bold" xml:space="preserve">Né<xsl:if test="$alloc/n:Identification/n:SEXE/text()='2'">e</xsl:if> le</td>
+ <td><xsl:value-of select="format-date($alloc/n:Identification/n:DTNAI/text(),$DATE_FORMAT)"/><xsl:if test="string-length($alloc/n:Identification/n:NOMCOMNAI/text())"> à <xsl:value-of select="$alloc/n:Identification/n:NOMCOMNAI/text()"/></xsl:if></td>
+ </tr>
+ <tr>
+ <td class="bold">Matricule CAF/MSA</td>
+ <td><xsl:value-of select="$alloc/../n:IdentificationRSA/n:Organisme/n:MATRICULE/text()"/></td>
+ </tr>
+ <tr>
+ <td class="bold" style="vertical-align: top;">Adresse</td>
+ <td xml:space="preserve">
+ <xsl:if test="string-length($adr/n:COMPLADR/text())+string-length($adr/n:COMPLIDEADR) gt 0"><xsl:if test="string-length($adr/n:COMPLADR/text()) gt 0"><xsl:value-of select="$adr/n:COMPLADR/text()"/></xsl:if> <xsl:value-of select="$adr/n:COMPLIDEADR/text()"/><br/></xsl:if>
+ <xsl:value-of select="$adr/n:NUMVOIE/text()"/> <xsl:value-of select="$adr/n:TYPEVOIE/text()"/> <xsl:value-of select="$adr/n:NOMVOIE/text()"/><br/>
+ <xsl:if test="string-length($adr/n:LIEUDIST/text()) gt 0"><xsl:value-of select="$adr/n:LIEUDIST/text()"/><br/></xsl:if>
+ <xsl:value-of select="$adr/n:CODEPOS/text()"/> <xsl:value-of select="$adr/n:LOCAADR/text()"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file