--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY nbsp " ">
+<!ENTITY amp "&">
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ef="urn:DGFIP:EtatsFrais"
+ xmlns:inv="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
+ xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
+ xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
+ xmlns:cec="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
+ xmlns:added="http://projets.admisource.gouv.fr/xemelios/namespaces#added"
+ xmlns:ano="http://projets.admisource.gouv.fr/xemelios/namespaces#anomally"
+ xmlns:dgfip="urn:DGFIP:EtatFrais:OrdreMission" version="2.0">
+
+ <!-- XSL version SPL -->
+
+ <xsl:output encoding="ISO-8859-1" method="xhtml" indent="no"/>
+
+ <xsl:param name="line.ID" select="NOT_SET"/>
+ <xsl:param name="anoId"/>
+ <!-- id de l'anomalie a mettre en surbrillance -->
+
+ <xsl:param name="collectivite"/>
+ <xsl:param name="collectivite-lib"/>
+ <xsl:param name="budget"/>
+ <xsl:param name="budget-lib"/>
+
+ <xsl:param name="presentation" select="'normal'"/>
+ <!-- valid values are 'normal' and 'src' -->
+
+ <xsl:variable name="pays" select="document('./resources/iso_3166-1_list_fr.xml')"/>
+ <xsl:variable name="SituationsFamille" select="document('./resources/situationsFamiliales.xml')"/>
+ <xsl:variable name="TypesFrais" select="document('./resources/typesFrais.xml')"/>
+ <xsl:variable name="TypesEtatFrais" select="document('./resources/typesEtatFrais.xml')"/>
+ <xsl:variable name="NaturesOM" select="document('./resources/naturesOM.xml')"/>
+ <xsl:variable name="TypesPersonnes" select="document('./resources/typesPersonnes.xml')"/>
+ <xsl:variable name="TypesFaitsGenerateurs"
+ select="document('./resources/typesFaitGenerateurs.xml')"/>
+ <xsl:variable name="DureesOM" select="document('./resources/dureesOM.xml')"/>
+
+ <xsl:decimal-format name="decformat" decimal-separator="," grouping-separator=" " digit="#"
+ pattern-separator=";" NaN="NaN" minus-sign="-"> </xsl:decimal-format>
+
+ <xsl:variable name="tags-ano">
+ <xsl:for-each select="//ano:Anomalie[@ano:anoId = $anoId]/ano:node">
+ <xsl:element name="node">
+ <xsl:attribute name="id" select="./@ano:id"/>
+ </xsl:element>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:template match="/added:DocEtatsFrais">
+ <xsl:choose>
+ <xsl:when test="$presentation = 'normal'">
+ <html>
+ <head>
+ <title>Etat de Frais</title>
+ <style type="text/css" media="print">
+ .invoiceDiv {
+ width: 100%;
+ }
+ tr {
+ page-break-inside: avoid;
+ }
+ table {
+ -fs-table-paginate: paginate;
+ }
+ .anomalie {
+ display: none;
+ }</style>
+ <style type="text/css" media="screen">
+ .invoiceDiv {
+ width: 75%;
+ }
+ th {
+ color: white;
+ background-color: #999999;
+ }
+ .highlighted {
+ background-color: #FFFF66;
+ }</style>
+ <style type="text/css" media="all">
+ body, p, th, td {
+ font-size: 12;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ }
+ table {
+ border-collapse: collapse;
+ }
+ anomalie {
+ background-color: #FFFF66;
+ }
+ .titre0 {
+ font-weight: bold;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 24;
+ }
+ .center {
+ text-align: center;
+ }
+ .top {
+ vertical-align: top;
+ }
+ .gras {
+ font-weight: bold;
+ }
+ .right {
+ text-align: right;
+ }
+ .left {
+ text-align: left;
+ }
+ .bordered {
+ border-style: solid;
+ border-width: 1px;
+ border-color: black;
+ v
+ padding: 10px;
+ }
+ .collapsed {
+ border-collapse: collapse;
+ border-spacing: 0px;
+ }
+ .titre1 {
+ margin-top: 12px;
+ margin-bottom: 0px;
+ font-wieght: bold;
+ font-size: 16;
+ }
+ .nosign {
+ list-style-type: none;
+ }
+ td {
+ background-color: inherited;
+ }</style>
+ </head>
+ <body>
+ <center>
+ <xsl:apply-templates/>
+ </center>
+ </body>
+ </html>
+ </xsl:when>
+ <xsl:when test="$presentation = 'src'">
+ <html>
+ <head>
+ <title>Source XML de FEN058</title>
+ <style type="text/css">
+ span {
+ font-family: monospace;
+ font-size: 12px;
+ }
+ .expander-content {
+ padding-left: 1em;
+ }
+ .text {
+ color: black;
+ }
+ .expander {
+ text-align: center;
+ vertical-align: top;
+ width: 1em;
+ display: inline-block;
+ margin-left: -1em;
+ }
+ body {
+ font-family: monospace;
+ font-size: 12px;
+ }
+ #top > .expander-open, #top > .expander-closed {
+ margin-left: 1em;
+ }
+ .expander-closed > .expander-content {
+ display: none;
+ }
+ .comment {
+ font-family: monospace;
+ font-size: 12px;
+ white-space: pre;
+ }
+ #top > .expander-open {
+ font-family: monospace;
+ font-size: 12px;
+ white-space: pre;
+ }
+ *|*:root {
+ background-color: white;
+ }
+ #viewsource {
+ font-family: monospace;
+ font-size: 12px;
+ font-weight: normal;
+ color: black;
+ white-space: pre;
+ }
+ #viewsource.wrap {
+ white-space: pre-wrap;
+ }
+ pre {
+ font: inherit;
+ color: inherit;
+ white-space: inherit;
+ margin: 0;
+ }
+ .start-tag {
+ color: purple;
+ font-weight: bold;
+ font-size: 12px;
+ }
+ .end-tag {
+ color: purple;
+ font-weight: bold;
+ font-size: 12px;
+ }
+ .comment {
+ color: green;
+ font-style: italic;
+ }
+ .cdata {
+ color: #CC0066;
+ }
+ .doctype {
+ color: steelblue;
+ font-style: italic;
+ }
+ .pi {
+ color: orchid;
+ font-style: italic;
+ }
+ .entity {
+ color:#FF4500;
+ font-weight: normal;
+ }
+ .text {
+ font-weight: normal;
+ }
+ .attribute-name {
+ color: black;
+ font-weight: bold;
+ }
+ .attribute-value {
+ color: blue;
+ font-weight: normal;
+ }
+ .summary {
+ display: block;
+ background-color: #FFFFCC;
+ width: 90%;
+ border: solid;
+ border-width: 1pt;
+ font-family: sans-serif;
+ }
+ .popup {
+ font-weight: normal;
+ }
+ .markupdeclaration {
+ color: steelblue;
+ font-style: italic;
+ }
+ .error, .error > .start-tag, .error > .end-tag,
+ .error > .comment, .error > .cdata, .error > .doctype,
+ .error > .pi, .error > .entity, .error > .attribute-name,
+ .error > .attribute-value {
+ color: red;
+ font-weight: bold;
+ }</style>
+ </head>
+ <body>
+ <!--p>Paramètres<br/>
+ collectivite: <xsl:value-of select="$collectivite"/><br/>
+ collectivite-lib: <xsl:value-of select="$collectivite-lib"/><br/>
+ budget: <xsl:value-of select="$budg"/><br/>
+ budget-lib: <xsl:value-of select="$budget-lib"/>
+ </p-->
+ <xsl:for-each select="./*">
+ <xsl:call-template name="displaySrc">
+ <xsl:with-param name="el" select="."/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <xsl:if test="count(//ano:Anomalie) > 0">
+ <hr/>
+ <xsl:for-each select="//ano:Anomalie">
+ <xsl:call-template name="anomalie">
+ <xsl:with-param name="ano" select="."/>
+ <xsl:with-param name="invoiceId" select="../@ano:unique-id"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:if>
+ </body>
+ </html>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="//ef:EtatsFrais/ef:Invoice">
+ <xsl:variable name="this.invoice" select="."/>
+ <xsl:variable name="extension"
+ select="./cec:UBLExtensions/cec:UBLExtension[cec:ExtensionURI='DGFIP:EtatFrais:OrdreMission']/cec:ExtensionContent/dgfip:EtatFraisExtension"/>
+ <div class="invoiceDiv">
+ <table width="100%">
+ <colgroup>
+ <col width="33%" style="text-align: center;"/>
+ <col width="34%" style="text-align: center;"/>
+ <col width="33%" style="text-align: center;"/>
+ </colgroup>
+ <tbody>
+ <tr>
+ <td/>
+ <td class="center titre0">ETAT DES FRAIS</td>
+ <td class="top right">OM n° <xsl:value-of
+ select="$extension/dgfip:OrdreMission/dgfip:ID"/><br/> Edf n°
+ <xsl:value-of select="./cbc:ID"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <xsl:variable name="agentExt" select="$extension/dgfip:OrdreMission/dgfip:Agent"/>
+ <xsl:variable name="agent" select="./cac:AccountingSupplierParty/cac:Party"/>
+ <table width="100%">
+ <colgroup>
+ <col width="50%"/>
+ <col width="50%"/>
+ </colgroup>
+ <tbody>
+ <tr>
+ <td colspan="2">Exposés par <span class="gras">
+ <xsl:if test="$agent/cac:Person/cbc:Title">
+ <xsl:value-of
+ select="concat($agent/cac:Person/cbc:Title/text(),' ')"/>
+ </xsl:if>
+ <xsl:value-of
+ select="concat($agent/cac:Person/cbc:FirstName/text(),' ')"/>
+ <xsl:value-of select="$agent/cac:Person/cbc:FamilyName/text()"/>
+ </span>
+ </td>
+ </tr>
+ <tr>
+ <td>Grade : <span class="gras">
+ <xsl:value-of select="$agentExt/dgfip:Grade"/>
+ </span></td>
+ <td>Entité émettrice : <span class="gras">
+ <xsl:value-of
+ select="./cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID"
+ />
+ </span>
+ <xsl:if
+ test="./cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName/text()">
+ <br/>
+ <xsl:value-of
+ select="./cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName/text()"
+ />
+ </xsl:if>
+ <xsl:if
+ test="./cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cac:RegistrationAddress/cac:AddressLine/cbc:Line/text()">
+ <xsl:for-each
+ select="./cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cac:RegistrationAddress/cac:AddressLine/cbc:Line">
+ <br/>
+ <xsl:value-of select="./text()"/>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:if
+ test="./cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cac:RegistrationAddress/cbc:PostalZone/text() or ./cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cac:RegistrationAddress/cbc:CityName/text()">
+ <br/>
+ <xsl:value-of
+ select="./cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cac:RegistrationAddress/cbc:PostalZone/text()"
+ /> <xsl:value-of
+ select="./cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cac:RegistrationAddress/cbc:CityName/text()"
+ />
+ </xsl:if>
+ </td>
+ </tr>
+ <tr>
+ <td>en résidence à <span class="gras">
+ <xsl:value-of
+ select="$agent/cac:AgentParty/cac:PhysicalLocation/cac:Address/cbc:CityName/text()"
+ />
+ </span></td>
+ <td>à l'occasion d'un déplacement à <span class="gras">
+ <xsl:value-of
+ select="$extension/dgfip:OrdreMission/dgfip:LieuDeplacement/@Commune"/>
+ <xsl:if
+ test="string-length($extension/dgfip:OrdreMission/dgfip:LieuDeplacement/@CodPays) > 0"
+ > (<xsl:call-template name="libPays">
+ <xsl:with-param name="cod"
+ select="$extension/dgfip:OrdreMission/dgfip:LieuDeplacement/@CodPays"
+ />
+ </xsl:call-template>) </xsl:if>
+ </span>
+ </td>
+ </tr>
+ <tr>
+ <!-- correction ici -->
+ <td colspan="2">Identifiant <span class="gras">
+ <xsl:value-of
+ select="./cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID"
+ />
+ </span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p> </p>
+
+ <table width="100%" style="bordered collapsed" cellpadding="0" cellspacing="0">
+ <colgroup>
+ <col width="25%"/>
+ <col width="25%"/>
+ <col width="25%"/>
+ <col width="25%"/>
+ </colgroup>
+ <thead>
+ <tr>
+ <th class="bordered" colspan="2">Départ de la résidence administrative/familiale</th>
+ <th class="bordered" colspan="2">Arrivée à la résidence administrative/familiale</th>
+ </tr>
+ <tr>
+ <th class="bordered">Date Ordre de mission</th>
+ <th class="bordered">Heure</th>
+ <th class="bordered">Date Ordre de mission</th>
+ <th class="bordered">Heure</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="bordered" align="center">
+ <xsl:call-template name="format-date">
+ <xsl:with-param name="datebrute"
+ select="$extension/dgfip:OrdreMission/dgfip:DateDepart"/>
+ <xsl:with-param name="formataffichage">date</xsl:with-param>
+ </xsl:call-template>
+ </td>
+ <td class="bordered" align="center">
+ <xsl:call-template name="format-date">
+ <xsl:with-param name="datebrute"
+ select="$extension/dgfip:OrdreMission/dgfip:DateDepart"/>
+ <xsl:with-param name="formataffichage">heure</xsl:with-param>
+ </xsl:call-template>
+ </td>
+ <td class="bordered" align="center">
+ <xsl:call-template name="format-date">
+ <xsl:with-param name="datebrute"
+ select="$extension/dgfip:OrdreMission/dgfip:DateRetour"/>
+ <xsl:with-param name="formataffichage">date</xsl:with-param>
+ </xsl:call-template>
+ </td>
+ <td class="bordered" align="center">
+ <xsl:call-template name="format-date">
+ <xsl:with-param name="datebrute"
+ select="$extension/dgfip:OrdreMission/dgfip:DateRetour"/>
+ <xsl:with-param name="formataffichage">heure</xsl:with-param>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p> </p>
+
+ <table width="100%" style="bordered collapsed" cellpadding="0" cellspacing="0">
+ <!-- modification -->
+ <colgroup>
+ <col width="60%"/>
+ <col width="10%"/>
+ <col width="10%"/>
+ <col width="10%"/>
+ <col width="10%"/>
+
+ </colgroup>
+ <thead>
+ <tr>
+ <th class="bordered">Frais</th>
+ <th class="bordered">Imputation</th>
+ <!--th class="bordered">Centre Couts</th-->
+ <th class="bordered">Quantité</th>
+ <th class="bordered">Prix unitaire</th>
+ <th class="bordered">Prix Total</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- Ordre d'affichage des lignes :
+ 1) Hotel (catégorie = HOTEL, NUITEE)
+ 2) Repas (catégorie = REPAS)
+ 3) Transports (catégorie = PARKING, VOITURE, 2_ROUES, TAXI, PEAGE, TRAIN, AVION, CAR, BATEAU, AUTRE_TRANSPORT_COMMUN, ABONNEMENT)
+ 4) Divers (catégorie = AUTRE, AVANCE_FRAIS)
+ -->
+ <xsl:for-each
+ select="./cac:InvoiceLine[cac:Item/cac:BuyersItemIdentification/cbc:ID = 'HOTEL'
+ or cac:Item/cac:BuyersItemIdentification/cbc:ID = 'NUITEE']">
+ <xsl:call-template name="invoiceLine">
+ <xsl:with-param name="line" select="."/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <xsl:for-each
+ select="./cac:InvoiceLine[cac:Item/cac:BuyersItemIdentification/cbc:ID = 'REPAS']">
+ <xsl:call-template name="invoiceLine">
+ <xsl:with-param name="line" select="."/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <xsl:for-each
+ select="./cac:InvoiceLine[cac:Item/cac:BuyersItemIdentification/cbc:ID = 'PARKING'
+ or cac:Item/cac:BuyersItemIdentification/cbc:ID = 'VOITURE'
+ or cac:Item/cac:BuyersItemIdentification/cbc:ID = '2_ROUES'
+ or cac:Item/cac:BuyersItemIdentification/cbc:ID = 'TAXI'
+ or cac:Item/cac:BuyersItemIdentification/cbc:ID = 'PEAGE'
+ or cac:Item/cac:BuyersItemIdentification/cbc:ID = 'TRAIN'
+ or cac:Item/cac:BuyersItemIdentification/cbc:ID = 'AVION'
+ or cac:Item/cac:BuyersItemIdentification/cbc:ID = 'CAR'
+ or cac:Item/cac:BuyersItemIdentification/cbc:ID = 'BATEAU'
+ or cac:Item/cac:BuyersItemIdentification/cbc:ID = 'AUTRE_TRANSPORT_COMMUN'
+ or cac:Item/cac:BuyersItemIdentification/cbc:ID = 'ABONNEMENT']">
+ <xsl:call-template name="invoiceLine">
+ <xsl:with-param name="line" select="."/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <xsl:for-each
+ select="./cac:InvoiceLine[cac:Item/cac:BuyersItemIdentification/cbc:ID = 'AUTRE'
+ or cac:Item/cac:BuyersItemIdentification/cbc:ID = 'AVANCE_FRAIS']">
+ <xsl:call-template name="invoiceLine">
+ <xsl:with-param name="line" select="."/>
+ </xsl:call-template>
+ </xsl:for-each>
+
+ </tbody>
+ </table>
+
+<br/>
+ <table width="40%" style="bordered collapsed" cellpadding="0" cellspacing="0"
+ align="left">
+ <colgroup>
+ <col width="60%"/>
+ <col width="40%"/>
+ </colgroup>
+ <tbody>
+
+ <tr>
+ <td colspan="2">Sous-totaux</td>
+ </tr>
+
+ <tr>
+ <td class="bordered">Frais de séjour</td>
+ <td class="bordered">
+ <xsl:if
+ test="string(number($extension/dgfip:EtatFrais/dgfip:TotalIndemnitesSejour/text()))!='NaN'">
+ <xsl:call-template name="number">
+ <xsl:with-param name="num"
+ select="$extension/dgfip:EtatFrais/dgfip:TotalIndemnitesSejour"
+ />
+ </xsl:call-template>
+ </xsl:if>
+ </td>
+ </tr>
+ <tr>
+ <td class="bordered">Frais de transport</td>
+ <td class="bordered">
+ <xsl:if
+ test="string(number($extension/dgfip:EtatFrais/dgfip:TotalFraisTransport/text()))!='NaN'">
+ <xsl:call-template name="number">
+ <xsl:with-param name="num"
+ select="$extension/dgfip:EtatFrais/dgfip:TotalFraisTransport"/>
+ </xsl:call-template>
+ </xsl:if>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <br/>
+
+ <table width="40%" style="bordered collapsed" cellpadding="0" cellspacing="0"
+ align="right">
+ <colgroup>
+ <col width="60%"/>
+ <col width="40%"/>
+ </colgroup>
+ <tbody>
+ <tr>
+ <td class="bordered">Total des droits</td>
+ <xsl:variable name="currentNodeId"
+ select="./cac:LegalMonetaryTotal/cbc:LineExtensionAmount/@ano:node-id"/>
+ <td class="bordered right">
+ <xsl:if test="count($tags-ano/node[@id = $currentNodeId]) > 0">
+ <xsl:attribute name="style">background-color: #FFFF66;</xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num"
+ select="./cac:LegalMonetaryTotal/cbc:LineExtensionAmount/text()"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="bordered">Montant des avances</td>
+ <xsl:variable name="currentNodeId"
+ select="./cac:LegalMonetaryTotal/cbc:PrepaidAmount/@ano:node-id"/>
+ <td class="bordered right">
+ <xsl:if test="count($tags-ano/node[@id = $currentNodeId]) > 0">
+ <xsl:attribute name="style">background-color: #FFFF66;</xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="number">
+ <xsl:with-param name="num"
+ select="./cac:LegalMonetaryTotal/cbc:PrepaidAmount/text()"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="bordered">Total à verser</td>
+ <td class="bordered right gras">
+ <xsl:choose>
+ <xsl:when
+ test="string(number(./cac:LegalMonetaryTotal/cbc:PrepaidAmount/text()))='NaN'">
+ <xsl:call-template name="number">
+ <xsl:with-param name="num"
+ select="./cac:LegalMonetaryTotal/cbc:LineExtensionAmount"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="total.a.verser"
+ select="number(./cac:LegalMonetaryTotal/cbc:LineExtensionAmount)
+ - number(./cac:LegalMonetaryTotal/cbc:PrepaidAmount)"/>
+ <xsl:value-of
+ select="format-number($total.a.verser,'# ###,00;-# ###,00','decformat')"
+ />
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ </tbody>
+
+ </table>
+
+
+ <p> </p>
+ <p> </p>
+
+ <table width="40%" style="bordered collapsed" cellpadding="0" cellspacing="0"
+ align="left">
+ <colgroup>
+ <col width="100%"/>
+ </colgroup>
+ <tr>
+ <td class="bordered">
+ <xsl:choose>
+ <xsl:when test="./cac:PaymentMeans/cbc:PaymentMeansCode/text() = 'V'">
+ <p class="titre1" align="center">Paiement par virement</p>
+ <p class="titre1"> </p>
+ <xsl:choose>
+ <xsl:when
+ test="(./cac:PaymentMeans/cbc:PaymentChannelCode/text() = 'IBAN') and (substring(./cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID/text(), 1, 2) = 'FR')"
+ > Compte n° : <xsl:value-of
+ select="substring(./cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID,15,11)"
+ /><br/> Agence : <xsl:value-of
+ select="./cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cbc:ID"
+ /><br/> Code banque : <xsl:value-of
+ select="substring(./cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID,5,5)"
+ /><br/> Code guichet : <xsl:value-of
+ select="substring(./cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID,10,5)"
+ /><br/> Clé : <xsl:value-of
+ select="substring(./cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID,26,2)"
+ /><br/>
+ </xsl:when>
+ <xsl:when
+ test="(./cac:PaymentMeans/cbc:PaymentChannelCode/text() = 'IBAN') and (substring(./cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID/text(), 1, 2) != 'FR')">
+ <p>IBAN : <span class="gras">
+ <xsl:value-of
+ select="./cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID"
+ />
+ </span></p>
+ </xsl:when>
+ <xsl:when
+ test="./cac:PaymentMeans/cbc:PaymentChannelCode/text() = 'BBAN'"
+ > Compte bancaire : <span class="gras">
+ <xsl:value-of
+ select="./cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID"
+ />
+ </span><br/> Code banque : <span class="gras">
+ <xsl:value-of
+ select="./cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cbc:ID"
+ />
+ </span><br/> Agence : <xsl:value-of
+ select="./cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cbc:Name"
+ /><br/> Clé pays : <span class="gras">
+ <xsl:value-of
+ select="./cac:PaymentMeans/cac:PayeeFinancialAccount/cac:Country/cbc:IdentificationCode"
+ />
+ </span><br/> Clé : <span class="gras">
+ <xsl:value-of
+ select="./cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:PaymentNote"
+ />
+ </span>
+ </xsl:when>
+ <xsl:otherwise>Définition du compte bancaire non
+ reconnue</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="./cac:PaymentMeans/cbc:PaymentMeansCode/text() = 'C'"
+ >Paiement par chèque</xsl:when>
+ <xsl:when test="./cac:PaymentMeans/cbc:PaymentMeansCode/text() = 'O'"
+ >Paiement en devise étrangère</xsl:when>
+ <xsl:otherwise>Mode de paiement non reconnu</xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ </table>
+
+ <xsl:variable name="valideurEF" select="$extension/dgfip:EtatFrais/dgfip:Valideur"/>
+ <p>Fait le <xsl:call-template name="format-date">
+ <xsl:with-param name="datebrute" select="./cbc:IssueDate"/>
+ </xsl:call-template></p>
+ <p>Vu et certifié par :</p>
+ <span class="gras">
+ <xsl:if test="$valideurEF/cac:Person/cbc:Title">
+ <xsl:value-of select="concat($valideurEF/cac:Person/cbc:Title/text(),' ')"/>
+ </xsl:if>
+ <xsl:value-of select="concat($valideurEF/cac:Person/cbc:FirstName/text(),' ')"/>
+ <xsl:value-of select="concat($valideurEF/cac:Person/cbc:FamilyName/text(),' ')"/>
+ <br/>
+ <xsl:value-of select="concat($valideurEF/cac:Person/cbc:JobTitle/text(),' : ')"/>
+ <xsl:value-of select="$valideurEF/cac:Person/cbc:OrganizationDepartment/text()"/>
+ </span>
+
+ <p> </p>
+ <p> </p>
+ <p> </p>
+ <p> </p>
+
+ <hr/>
+ <hr/>
+
+ <p class="titre0">Informations complémentaires</p>
+
+ <p class="titre1">Etat de frais</p>
+ <table width="100%" style="bordered collapsed" cellpadding="0" cellspacing="0">
+ <colgroup>
+ <col width="20%"/>
+ <col width="80%"/>
+ </colgroup>
+ <tr>
+ <td class="bordered">Type d'état de frais</td>
+ <td class="bordered">
+ <xsl:call-template name="libTypeEtatFrais">
+ <xsl:with-param name="cod" select="./cbc:InvoiceTypeCode"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ <tr>
+ <td class="bordered">Valideur de l'EF</td>
+ <td class="bordered">
+ <xsl:if test="$valideurEF/cac:Person/cbc:Title">
+ <xsl:value-of
+ select="concat($valideurEF/cac:Person/cbc:Title/text(),' ')"/>
+ </xsl:if>
+ <xsl:value-of
+ select="concat($valideurEF/cac:Person/cbc:FirstName/text(),' ')"/>
+ <xsl:value-of select="$valideurEF/cac:Person/cbc:FamilyName/text()"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="bordered">Identifiant de l'utilisateur ayant validé l'EF</td>
+ <td class="bordered">
+ <xsl:value-of select="$valideurEF/cac:PartyIdentification/cbc:ID"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="bordered">Devise de l’état de frais</td>
+ <td class="bordered"><xsl:value-of
+ select="./cac:LegalMonetaryTotal/cbc:LineExtensionAmount/@currencyID"
+ /> </td>
+ </tr>
+ <xsl:if test="exists($extension/dgfip:EtatFrais/dgfip:IdRef)">
+ <tr>
+ <td class="bordered">Nom original du fichier</td>
+ <td class="bordered">
+ <xsl:value-of select="$extension/dgfip:EtatFrais/dgfip:IdRef/text()"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="exists($extension/dgfip:EtatFrais/dgfip:SiretBP)">
+ <tr>
+ <td class="bordered">SIRET du budget principal de la collectivité</td>
+ <td class="bordered">
+ <xsl:value-of select="$extension/dgfip:EtatFrais/dgfip:SiretBP/text()"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="exists($extension/dgfip:EtatFrais/dgfip:CodeBud)">
+ <tr>
+ <td class="bordered">Code budget</td>
+ <td class="bordered">
+ <xsl:value-of select="$extension/dgfip:EtatFrais/dgfip:CodeBud/text()"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="exists($extension/dgfip:EtatFrais/dgfip:ComptableAssignataire/text())">
+ <tr>
+ <td class="bordered">Comptable assignataire</td>
+ <td class="bordered">
+ <xsl:value-of
+ select="$extension/dgfip:EtatFrais/dgfip:ComptableAssignataire/text()"
+ />
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+
+ <p class="titre1">Agent</p>
+ <table width="100%" style="bordered collapsed" cellpadding="0" cellspacing="0">
+ <colgroup>
+ <col width="20%"/>
+ <col width="80%"/>
+ </colgroup>
+ <tr>
+ <td class="bordered">Identifiant AMM</td>
+ <td class="bordered">
+ <xsl:value-of select="$agent/cac:PartyIdentification/cbc:ID"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="bordered">Type de personne</td>
+ <td class="bordered">
+ <xsl:call-template name="libTypePersonne">
+ <xsl:with-param name="cod" select="$agentExt/dgfip:TypePersonne/text()"
+ />
+ </xsl:call-template>
+ </td>
+ </tr>
+ <tr>
+ <td class="bordered">Identifiants tiers</td>
+ <td class="bordered">Type tiers : <xsl:value-of
+ select="$agentExt/dgfip:AgentChorus/dgfip:TypeTiers"/>
+ <br/> Identifiant fonctionnel du tiers : <xsl:value-of
+ select="$agentExt/dgfip:AgentChorus/dgfip:IdFoncTiers"/>
+ <br/> Identifiant Chorus du tiers : <xsl:value-of
+ select="$agentExt/dgfip:AgentChorus/dgfip:IdChorusTiers"/><br/>
+ </td>
+ </tr>
+ <tr>
+ <td class="bordered">Nom de l'agent</td>
+ <td class="bordered">
+ <xsl:if test="$agent/cac:Person/cbc:Title">
+ <xsl:value-of select="concat($agent/cac:Person/cbc:Title/text(),' ')"/>
+ </xsl:if>
+ <xsl:value-of select="concat($agent/cac:Person/cbc:FirstName/text(),' ')"/>
+ <xsl:value-of select="$agent/cac:Person/cbc:FamilyName/text()"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="bordered">Résidence familiale</td>
+ <td class="bordered">
+ <xsl:for-each
+ select="$agent/cac:AgentParty/cac:PostalAddress/cac:AddressLine/cbc:Line">
+ <br/>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ <br/>
+ <xsl:value-of select="$agent/cac:AgentParty/cac:PostalAddress/cbc:PostalZone"/>
+ <br/>
+ <xsl:value-of select="$agent/cac:AgentParty/cac:PostalAddress/cbc:CityName"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="bordered">Résidence administrative</td>
+ <td class="bordered">
+ <xsl:for-each
+ select="$agent/cac:AgentParty/cac:PhysicalLocation/cac:Address/cac:AddressLine/cbc:Line">
+ <br/>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ <br/>
+ <xsl:value-of
+ select="$agent/cac:AgentParty/cac:PhysicalLocation/cac:Address/cbc:PostalZone"/>
+ <br/>
+ <xsl:value-of
+ select="$agent/cac:AgentParty/cac:PhysicalLocation/cac:Address/cbc:CityName"
+ />
+ </td>
+ </tr>
+ <tr>
+ <td class="bordered">Situation de famille</td>
+ <td class="bordered"><xsl:call-template name="libSitFam">
+ <xsl:with-param name="cod"
+ select="$agentExt/dgfip:SituationFamille/text()"/>
+ </xsl:call-template> </td>
+ </tr>
+ <tr>
+ <td class="bordered">Nombre d'enfants</td>
+ <td class="bordered"><xsl:value-of select="$agentExt/dgfip:NbEnfants"
+ /> </td>
+ </tr>
+ </table>
+
+ <p class="titre1">Ordre de mission</p>
+ <table width="100%" style="bordered collapsed" cellpadding="0" cellspacing="0">
+ <colgroup>
+ <col width="20%"/>
+ <col width="80%"/>
+ </colgroup>
+ <tr>
+ <td class="bordered">Nature du déplacement</td>
+ <td class="bordered">
+ <xsl:call-template name="libNatureOM">
+ <xsl:with-param name="cod"
+ select="$extension/dgfip:OrdreMission/dgfip:NatureOM"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ <tr>
+ <td class="bordered">Motif du déplacement</td>
+ <td class="bordered">
+ <xsl:value-of
+ select="$extension/dgfip:OrdreMission/dgfip:MotifDeplacement/text()"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="bordered">Fait générateur de la dépense</td>
+ <td class="bordered">
+ <xsl:call-template name="libTypeFaitGenerateur">
+ <xsl:with-param name="cod"
+ select="$extension/dgfip:OrdreMission/dgfip:FaitGenerateur/dgfip:Type/text()"
+ />
+ </xsl:call-template>
+ <xsl:if
+ test="$extension/dgfip:OrdreMission/dgfip:FaitGenerateur/dgfip:Date/text()">
+ <br/> Date : <xsl:call-template name="format-date">
+ <xsl:with-param name="datebrute"
+ select="$extension/dgfip:OrdreMission/dgfip:FaitGenerateur/dgfip:Date/text()"
+ />
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if
+ test="$extension/dgfip:OrdreMission/dgfip:FaitGenerateur/dgfip:Reference/text()">
+ <br/> Référence : <xsl:value-of
+ select="$extension/dgfip:OrdreMission/dgfip:FaitGenerateur/dgfip:Reference/text()"
+ />
+ </xsl:if>
+ <xsl:if
+ test="$extension/dgfip:OrdreMission/dgfip:FaitGenerateur/dgfip:Date/text()">
+ <br/> Durée de l'OM : <xsl:call-template name="libDureeOM">
+ <xsl:with-param name="cod"
+ select="$extension/dgfip:OrdreMission/dgfip:FaitGenerateur/dgfip:DureeOM/text()"
+ />
+ </xsl:call-template>
+ </xsl:if>
+ </td>
+ </tr>
+ <xsl:if
+ test="$extension/dgfip:OrdreMission/dgfip:LieuDeplacement or
+ $extension/dgfip:OrdreMission/dgfip:LieuDepart or
+ $extension/dgfip:OrdreMission/dgfip:LieuArrivee">
+ <tr>
+ <td class="bordered">Lieux</td>
+ <td class="bordered">
+ <xsl:if test="$extension/dgfip:OrdreMission/dgfip:LieuDeplacement">
+ Déplacement :  <xsl:value-of
+ select="$extension/dgfip:OrdreMission/dgfip:LieuDeplacement/@CP"
+ />  <xsl:value-of
+ select="$extension/dgfip:OrdreMission/dgfip:LieuDeplacement/@Commune"/>
+ <br/>
+ </xsl:if>
+ <xsl:if test="$extension/dgfip:OrdreMission/dgfip:LieuDepart"> Départ
+ :  <xsl:value-of
+ select="$extension/dgfip:OrdreMission/dgfip:LieuDepart/@CP"
+ />  <xsl:value-of
+ select="$extension/dgfip:OrdreMission/dgfip:LieuDepart/@Commune"/>
+ <br/>
+ </xsl:if>
+ <xsl:if test="$extension/dgfip:OrdreMission/dgfip:LieuArrivee"> Arrivée
+ :  <xsl:value-of
+ select="$extension/dgfip:OrdreMission/dgfip:LieuArrivee/@CP"
+ />  <xsl:value-of
+ select="$extension/dgfip:OrdreMission/dgfip:LieuArrivee/@Commune"
+ />
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="$extension/dgfip:OrdreMission/dgfip:MoyenTransportAutorise">
+ <tr>
+ <td class="bordered">Moyen de transport autorisé</td>
+ <td class="bordered">
+ <xsl:value-of
+ select="$extension/dgfip:OrdreMission/dgfip:MoyenTransportAutorise/text()"/>
+ <xsl:if
+ test="$extension/dgfip:OrdreMission/dgfip:MoyenTransportAutorise/@ClasseAutorisee">
+ <br/> Classe : <xsl:value-of
+ select="$extension/dgfip:OrdreMission/dgfip:MoyenTransportAutorise/@ClasseAutorisee"
+ />
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:if>
+ <!-- il est spécifié qu'on devrait virer ça, mais on peut pas pour l'anomalie -->
+ <tr>
+ <td class="bordered">Identifiant Valideur</td>
+ <xsl:variable name="currentNodeId"
+ select="$extension/dgfip:OrdreMission/dgfip:Valideur/cac:PartyIdentification/cbc:ID/@ano:node-id"/>
+ <td class="bordered">
+ <xsl:if test="count($tags-ano/node[@id = $currentNodeId]) > 0">
+ <xsl:attribute name="style">background-color: #FFFF66;</xsl:attribute>
+ </xsl:if>
+ <xsl:value-of
+ select="$extension/dgfip:OrdreMission/dgfip:Valideur/cac:PartyIdentification/cbc:ID/text()"
+ />
+ </td>
+ </tr>
+ <tr>
+ <td class="bordered">Valideur</td>
+ <td class="bordered">
+ <xsl:if
+ test="$extension/dgfip:OrdreMission/dgfip:Valideur/cac:Person/cbc:Title">
+ <xsl:value-of
+ select="concat($extension/dgfip:OrdreMission/dgfip:Valideur/cac:Person/cbc:Title/text(),' ')"
+ />
+ </xsl:if>
+ <xsl:value-of
+ select="concat($extension/dgfip:OrdreMission/dgfip:Valideur/cac:Person/cbc:FirstName/text(),' ')"/>
+ <xsl:value-of
+ select="$extension/dgfip:OrdreMission/dgfip:Valideur/cac:Person/cbc:FamilyName/text()"
+ />
+ <br/>
+ <xsl:value-of select="concat($extension/dgfip:OrdreMission/dgfip:Valideur/cac:Person/cbc:JobTitle/text(),' : ')"/>
+ <xsl:value-of select="$extension/dgfip:OrdreMission/dgfip:Valideur/cac:Person/cbc:OrganizationDepartment/text()"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="bordered">Date validation</td>
+ <td class="bordered">
+ <xsl:if test="$extension/dgfip:OrdreMission/dgfip:DateValidation/text()">
+ <xsl:call-template name="format-date">
+ <xsl:with-param name="datebrute"
+ select="$extension/dgfip:OrdreMission/dgfip:DateValidation/text()"
+ />
+ </xsl:call-template>
+ </xsl:if>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+ <!-- Listage des Anomalies -->
+ <xsl:if test="./ano:Anomalie or ./cac:InvoiceLine/ano:Anomalie">
+ <hr/>
+ <xsl:variable name="anos">
+ <xsl:copy-of select="./cac:InvoiceLine/ano:Anomalie"/>
+ <xsl:copy-of select="./ano:Anomalie"/>
+ </xsl:variable>
+ <xsl:for-each select="$anos//ano:Anomalie">
+ <xsl:call-template name="anomalie">
+ <xsl:with-param name="ano" select="."/>
+ <xsl:with-param name="invoiceId" select="$this.invoice/@ano:unique-id"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <hr/>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="anomalie">
+ <xsl:param name="ano"/>
+ <xsl:param name="invoiceId"/>
+ <xsl:element name="div">
+ <xsl:attribute name="class">anomalie left</xsl:attribute>
+ <xsl:attribute name="width">75%</xsl:attribute>
+ <xsl:if test="$anoId = ./@ano:anoId">
+ <xsl:attribute name="style">background-color: #FFFF66;</xsl:attribute>
+ </xsl:if>
+ <h3 style="text-align: left;">
+ <xsl:element name="a">
+ <xsl:attribute name="name">AnoId_<xsl:value-of select="$ano/@ano:anoId"
+ /></xsl:attribute>
+ <xsl:attribute name="href"
+ >xemelios:/query?docId=DocEtatsFrais&etatId=EtatFrais&elementId=invoice&collectivite=<xsl:value-of
+ select="$collectivite"/>&budget=<xsl:value-of select="$budget"
+ />&path=[@ano:unique-id='<xsl:value-of select="$invoiceId"
+ />']&xsl:param=(anoId,<xsl:value-of select="$ano/@ano:anoId"
+ />)&xsl:param=(presentation,<xsl:value-of select="$presentation"
+ />)</xsl:attribute> Anomalie </xsl:element>
+ </h3>
+ <span class="gras">Contrôle :</span><xsl:value-of select="./@ano:ctrlLibelle"
+ /> (<xsl:value-of select="./@ano:ctrlId"/>)<br/>
+ <span class="gras">Règle fonctionnelle : </span><xsl:value-of
+ select="./ano:ctrlRegleFonct/text()" disable-output-escaping="yes"/><br/>
+ <span class="gras">Message : </span><xsl:value-of select="./ano:message/text()"
+ disable-output-escaping="yes"/>
+ <br/><xsl:element name="a">
+ <xsl:attribute name="name">AnoId_<xsl:value-of select="$ano/@ano:anoId"
+ /></xsl:attribute>
+ <xsl:attribute name="href"
+ >xemelios:/query?docId=DocEtatsFrais&etatId=EtatFrais&elementId=invoice&collectivite=<xsl:value-of
+ select="$collectivite"/>&budget=<xsl:value-of select="$budget"
+ />&path=[@ano:unique-id='<xsl:value-of select="$invoiceId"
+ />']&xsl:param=(anoId,<xsl:value-of select="$ano/@ano:anoId"/>)&xsl:param=(presentation,<xsl:choose>
+ <xsl:when test="$presentation = 'src'">normal</xsl:when>
+ <xsl:otherwise>src</xsl:otherwise>
+ </xsl:choose>)</xsl:attribute> Basculer l'affichage de
+ 'normal' à 'XML' </xsl:element>
+ </xsl:element>
+
+ </xsl:template>
+
+ <xsl:template name="invoiceLine">
+ <xsl:param name="line"/>
+ <xsl:element name="tr">
+ <xsl:if test="$line/cbc:ID/text() = $line.ID">
+ <xsl:attribute name="class" select="'highlighted'"/>
+ </xsl:if>
+ <td class="bordered top">
+ <span class="gras">
+ <xsl:call-template name="libTypeFrais">
+ <xsl:with-param name="cod"
+ select="$line/cac:Item/cac:BuyersItemIdentification/cbc:ID"/>
+ </xsl:call-template>
+ </span>
+ <xsl:if test="count($line/cac:Item/cbc:Name) = 1">
+ <br/>
+ <xsl:value-of select="$line/cac:Item/cbc:Name"/>
+ </xsl:if>
+ <xsl:for-each select="$line/cbc:Note">
+ <br/>
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ <xsl:if test="count($line/cac:Item/cbc:Description) > 0">
+ <br/>
+ <xsl:value-of select="$line/cac:Item/cbc:Description"/>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$line/cac:Item/cac:BuyersItemIdentification/cbc:ID = 'AUTRE'">
+ <!--
+ AUTRE
+ Propriété IMPUTATION
+ Item/Description pour préciser la nature du frais
+ InvoiceQuantity pour préciser la quantité, le cas échéant
+ PriceAmount pour préciser le prix unitaire, le cas échéant
+ LineExtensionAmount pour préciser le prix total du frais
+ Note pour préciser différentes informations, réglementaires ou non.
+ -->
+ <xsl:call-template name="blocDepartArrivee">
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ <!-- Note -->
+ <xsl:if test="$line/cac:Item/cbc:Note">
+ <ul>
+ <li class="nosign">Note : <xsl:value-of
+ select="$line/cac:Item/cbc:Note"/></li>
+ </ul>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="$line/cac:Item/cac:BuyersItemIdentification/cbc:ID = 'HOTEL'">
+ <!--
+ HOTEL
+ Propriété IMPUTATION
+ Item/Description pour préciser la nature des nuitées
+ InvoiceQuantity pour préciser le nombre de nuitées
+ PriceAmount pour préciser le prix de la nuitée, réel ou réglementaire.
+ LineExtensionAmount pour préciser le prix total des nuitées
+ Note pour préciser différentes informations, réglementaires ou non.
+ -->
+ <xsl:call-template name="blocDepartArrivee">
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ <!-- Note -->
+ <xsl:if test="$line/cac:Item/cbc:Note">
+ <ul>
+ <li class="nosign">Note : <xsl:value-of
+ select="$line/cac:Item/cbc:Note"/></li>
+ </ul>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="$line/cac:Item/cac:BuyersItemIdentification/cbc:ID = 'PARKING'">
+ <!--
+ PARKING
+ On précisera une ligne par parking (par ticket de parking).
+ Propriété IMPUTATION
+ Item/Description pour préciser la nature, l'emplacement du parking
+ LineExtensionAmount pour préciser le prix du frais
+ -->
+ <!-- Aucun attribut particulier -->
+ <xsl:call-template name="blocDepartArrivee">
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$line/cac:Item/cac:BuyersItemIdentification/cbc:ID = 'VOITURE'">
+ <!--
+ VOITURE
+ Sert a déclarer un frais de nature kilomètres parcourus avec une voiture personnelle.
+ Propriété IMPUTATION
+ Item/Description pour préciser la nature
+ Propriétés LIEU_DEPART_COMMUNE, LIEU_DEPART_CP
+ Propriétés LIEU_ARRIVEE_COMMUNE, LIEU_ARRIVEE_CP
+ Propriétés DATE_DEPART, DATE_ARRIVEE. Ces dates devront être précisées au format xs:date ou xs:dateTime des schémas XML
+ Propriété PUISSANCE, qui contiendra la puissance fiscale du véhicule, telle qu'indiquée sur la carte grise
+ Propriété IMMATRICULATION qui contiendra l'immatriculation du véhicule, telle qu'indiquée sur la carte grise
+ Propriété PRIX_VEHICULE, dans le cas d'un frais à l'étranger, qui contiendra le prix moyen hors taxes d'un véhicule de 5 à 7 CV de trois ans, retenu par l'autorité territoriale (information nécessaire au ministère des affaires étrangères), dans la devise de l'état de frais
+ -->
+ <xsl:call-template name="blocDepartArrivee">
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ <ul>
+ <!-- IMMATRICULATION, PUISSANCE, KM_DEBUT_ANNEE*, NB_KM_AUTORISES* -->
+ <li class="nosign">Véhicule : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='IMMATRICULATION']/cbc:Value"
+ /> - <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='PUISSANCE']/cbc:Value"
+ /> CV. <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='KM_DEBUT_ANNEE']/cbc:Value"
+ >  <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='KM_DEBUT_ANNEE']/cbc:Value"
+ /> km depuis le début de l'année </xsl:if>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='NB_KM_AUTORISES']/cbc:Value"
+ >  / <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='NB_KM_AUTORISES']/cbc:Value"
+ /> km autorisés. </xsl:if>
+ </li>
+ <!-- PRIX_VEHICULE* -->
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='PRIX_VEHICULE']/cbc:Value">
+ <li class="nosign">Prix véhicule moyen HT : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='PRIX_VEHICULE']/cbc:Value"
+ /></li>
+ </xsl:if>
+ </ul>
+ </xsl:when>
+ <xsl:when test="$line/cac:Item/cac:BuyersItemIdentification/cbc:ID = '2_ROUES'">
+ <!--
+ 2_ROUES
+ Sert à déclarer un frais de nature kilomètres parcourus avec un véhicule 2 roues personnel.
+ Propriété IMPUTATION
+ Item/Description pour préciser la nature
+ Propriétés LIEU_DEPART_COMMUNE, LIEU_DEPART_CP
+ Propriétés LIEU_ARRIVEE_COMMUNE, LIEU_ARRIVEE_CP
+ Propriétés DATE_DEPART, DATE_ARRIVEE. Ces dates devront être précisées au format xs:date ou xs:dateTime des schémas XML
+ Propriété IMMATRICULATION qui contiendra l'immatriculation du véhicule, telle qu'indiquée sur la carte grise
+ Propriété CYLINDREE, qui contiendra la cylindrée du véhicule, telle qu'indiquée sur la carte grise
+ Propriété PRIX_VEHICULE, dans le cas d'un frais à l'étranger, qui contiendra le prix moyen hors taxes d'un véhicule équivalent de trois ans, retenu par l'autorité territoriale (information nécessaire au ministère des affaires étrangères), dans la devise de l'état de frais
+ Propriété PRIX_CARBURANT, dans le cas d'un frais à l'étranger, qui contiendra le prix moyen d'un litre de carburant retenu par l'autorité territoriale, dans la devise de l'état de frais
+ Propriété NB_KM_AUTORISES, qui contiendra la nombre de kilomètres autorisés, le cas échéant
+ Propriété KM_DEBUT_ANNEE qui contiendra le nombre de km parcourus depuis le début de l'année par l'agent avec un véhicule personnel, en nombre entier, exclus les kilomètres faisant l'objet du frais
+ InvoiceQuantity pour préciser le nombre de kilomètres parcourus
+ PriceAmount pour préciser le prix unitaire retenu ou réglementaire
+ LineExtensionAmount pour préciser le prix du frais
+ -->
+ <xsl:call-template name="blocDepartArrivee">
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ <ul>
+ <!-- IMMATRICULATION, CYLINDREE, KM_DEBUT_ANNEE*, NB_KM_AUTORISES* -->
+ <li class="nosign">Véhicule : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='IMMATRICULATION']/cbc:Value"
+ /> - Cylindrée : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CYLINDREE']/cbc:Value"
+ />. <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='KM_DEBUT_ANNEE']/cbc:Value"
+ >  <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='KM_DEBUT_ANNEE']/cbc:Value"
+ /> km depuis le début de l'année </xsl:if>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='NB_KM_AUTORISES']/cbc:Value"
+ >  / <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='NB_KM_AUTORISES']/cbc:Value"
+ /> km autorisés. </xsl:if>
+ </li>
+ <!-- PRIX_VEHICULE* -->
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='PRIX_VEHICULE']/cbc:Value">
+ <li class="nosign"> Prix véhicule moyen HT : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='PRIX_VEHICULE']/cbc:Value"
+ />
+ </li>
+ </xsl:if>
+ <!-- PRIX_CARBURANT* -->
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='PRIX_CARBURANT']/cbc:Value">
+ <li class="nosign"> Prix carburant moyen (1 litre): <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='PRIX_CARBURANT']/cbc:Value"
+ />
+ </li>
+ </xsl:if>
+ </ul>
+ </xsl:when>
+ <xsl:when test="$line/cac:Item/cac:BuyersItemIdentification/cbc:ID = 'TAXI'">
+ <!--
+ TAXI
+ Sert à déclarer un frais de nature Taxi.
+ Propriété IMPUTATION
+ Item/Description pour préciser la nature
+ Propriétés LIEU_DEPART_COMMUNE, LIEU_DEPART_CP
+ Propriétés LIEU_ARRIVEE_COMMUNE, LIEU_ARRIVEE_CP
+ LineExtensionAmount pour préciser le prix du frais
+ -->
+ <xsl:call-template name="blocDepartArrivee">
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$line/cac:Item/cac:BuyersItemIdentification/cbc:ID = 'PEAGE'">
+ <!--
+ PEAGE
+ On précisera une ligne par péage, ou on regroupera les péages d'un même trajet, en fonction de la facturation émise par la société d'exploitation.
+ Propriété IMPUTATION
+ Item/Description pour préciser la nature
+ Propriétés LIEU_DEPART_COMMUNE, LIEU_DEPART_CP
+ Propriétés LIEU_ARRIVEE_COMMUNE, LIEU_ARRIVEE_CP
+ LineExtensionAmount pour préciser le prix du frais
+ -->
+ <xsl:call-template name="blocDepartArrivee">
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$line/cac:Item/cac:BuyersItemIdentification/cbc:ID = 'TRAIN'">
+ <!--
+ TRAIN
+ Propriété IMPUTATION
+ Item/Description pour préciser la nature du trajet
+ Propriétés LIEU_DEPART_COMMUNE, LIEU_DEPART_CP
+ Propriétés LIEU_ARRIVEE_COMMUNE, LIEU_ARRIVEE_CP
+ Propriétés DATE_DEPART, DATE_ARRIVEE. Ces dates devront être précisées au format xs:date ou xs:dateTime des schémas XML
+ Propriété CATEGORIE pour préciser la classe du transport utilisé, le cas échéant (utilisé par le ministère de la défense)
+ Item/Note à préciser si le tarif utilise un avantage personnel (par exemple carte famille nombreuse)
+ Item/Note à préciser si le tarif utilise un abonnement, personnel ou non (par exemple carte fréquence)
+ LineExtensionAmount pour préciser le prix du frais
+ -->
+ <xsl:call-template name="blocDepartArrivee">
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ <ul>
+ <!-- Classe du transport utilisé - utilisé par le MINDEF -->
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CATEGORIE']/cbc:Value">
+ <li class="nosign">Classe : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CATEGORIE']/cbc:Value"
+ />
+ </li>
+ </xsl:if>
+ <!-- abonnements ou carte de reductions -->
+ <xsl:if test="$line/cac:Item/cbc:Note">
+ <li class="nosign">Tarif : <xsl:value-of
+ select="$line/cac:Item/cbc:Note"/>
+ </li>
+ </xsl:if>
+ </ul>
+ </xsl:when>
+ <xsl:when test="$line/cac:Item/cac:BuyersItemIdentification/cbc:ID = 'AVION'">
+ <!--
+ AVION
+ Propriété IMPUTATION
+ Item/Description pour préciser la nature du trajet
+ Propriétés LIEU_DEPART_COMMUNE, LIEU_DEPART_CP
+ Propriétés LIEU_ARRIVEE_COMMUNE, LIEU_ARRIVEE_CP
+ Propriétés DATE_DEPART, DATE_ARRIVEE. Ces dates devront être précisées au format xs:date ou xs:dateTime des schémas XML
+ Propriété CATEGORIE pour préciser la classe du transport utilisé, le cas échéant (utilisé par le ministère de la défense)
+ Item/Note à préciser si le tarif utilise un avantage personnel (par exemple carte famille nombreuse)
+ Item/Note à préciser si le tarif utilise un abonnement, personnel ou non (par exemple carte fréquence)
+ LineExtensionAmount pour préciser le prix du frais
+ -->
+ <xsl:call-template name="blocDepartArrivee">
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$line/cac:Item/cac:BuyersItemIdentification/cbc:ID = 'CAR'">
+ <!--
+ CAR
+ Propriété IMPUTATION
+ Item/Description pour préciser la nature du trajet
+ Propriétés LIEU_DEPART_COMMUNE, LIEU_DEPART_CP
+ Propriétés LIEU_ARRIVEE_COMMUNE, LIEU_ARRIVEE_CP
+ Item/Note à préciser si le tarif utilise un avantage personnel (par exemple carte famille nombreuse)
+ Item/Note à préciser si le tarif utilise un abonnement, personnel ou non (par exemple carte fréquence)
+ LineExtensionAmount pour préciser le prix du frais
+ -->
+ <xsl:call-template name="blocDepartArrivee">
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$line/cac:Item/cac:BuyersItemIdentification/cbc:ID = 'BATEAU'">
+ <!--
+ BATEAU
+ Propriété IMPUTATION
+ Item/Description pour préciser la nature du trajet
+ Propriétés LIEU_DEPART_COMMUNE, LIEU_DEPART_CP
+ Propriétés LIEU_ARRIVEE_COMMUNE, LIEU_ARRIVEE_CP
+ Item/Note à préciser si le tarif utilise un avantage personnel (par exemple carte famille nombreuse)
+ Item/Note à préciser si le tarif utilise un abonnement, personnel ou non (par exemple carte fréquence)
+ LineExtensionAmount pour préciser le prix du frais
+ -->
+ <xsl:call-template name="blocDepartArrivee">
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when
+ test="$line/cac:Item/cac:BuyersItemIdentification/cbc:ID = 'AUTRE_TRANSPORT_COMMUN'">
+ <!--
+ AUTRE_TRANSPORT_COMMUN
+ Ces articles seront principalement utilisés pour les transports en commun urbains, et nécessiteront probablement une précision sur le trajet, qui sera portée par Item/Description
+ Propriété IMPUTATION
+ Item/Description pour préciser la nature du trajet
+ Propriétés LIEU_DEPART_COMMUNE, LIEU_DEPART_CP
+ Propriétés LIEU_ARRIVEE_COMMUNE, LIEU_ARRIVEE_CP
+ Item/Note à préciser si le tarif utilise un avantage personnel (par exemple carte famille nombreuse)
+ Item/Note à préciser si le tarif utilise un abonnement, personnel ou non (par exemple carte fréquence)
+ LineExtensionAmount pour préciser le prix du frais
+ -->
+ <ul>
+ <li class="nosign">De <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='LIEU_DEPART_COMMUNE']/cbc:Value"
+ /> (<xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='LIEU_DEPART_CP']/cbc:Value"
+ />)</li>
+ <li class="nosign">A <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='LIEU_ARRIVEE_COMMUNE']/cbc:Value"
+ /> (<xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='LIEU_ARRIVEE_CP']/cbc:Value"
+ />)</li>
+ </ul>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="blocDepartArrivee">
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:call-template name="donneesChorus">
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+
+ </td>
+ <td class="bordered top center"> <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_COMPTE_PCE']/cbc:Value"
+ /></td>
+ <td class="bordered top right"> <xsl:value-of
+ select="$line/cbc:InvoicedQuantity"/></td>
+ <td class="bordered top right"> <xsl:if
+ test="count($line/cac:Price/cbc:PriceAmount) = 1">
+ <xsl:call-template name="number">
+ <xsl:with-param name="num" select="$line/cac:Price/cbc:PriceAmount"/>
+ </xsl:call-template>
+ </xsl:if></td>
+ <td class="bordered top right"> <xsl:call-template name="number">
+ <xsl:with-param name="num" select="$line/cbc:LineExtensionAmount"/>
+ </xsl:call-template></td>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template name="donneesChorus">
+ <xsl:param name="line"/>
+ <ul>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_CENTRE_COUTS']/cbc:Value">
+ <li class="nosign little">Centre de coûts : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_CENTRE_COUTS']/cbc:Value"
+ /></li>
+ </xsl:if>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_CENTRE_FINANCIER']/cbc:Value">
+ <li class="nosign little">Centre financier : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_CENTRE_FINANCIER']/cbc:Value"
+ /></li>
+ </xsl:if>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_DOMAINE_FONCTIONNEL']/cbc:Value">
+ <li class="nosign little">Domaine fonctionnel : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_DOMAINE_FONCTIONNEL']/cbc:Value"
+ /></li>
+ </xsl:if>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_ACTIVITE']/cbc:Value">
+ <li class="nosign little">Activité : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_ACTIVITE']/cbc:Value"
+ /></li>
+ </xsl:if>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_LOCALISATION_INTERMINISTERIELLE']/cbc:Value">
+ <li class="nosign little">Localisation interministérielle : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_LOCALISATION_INTERMINISTERIELLE']/cbc:Value"
+ /></li>
+ </xsl:if>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_PROJET_ANALYTIQUE_MINISTERIEL']/cbc:Value">
+ <li class="nosign little">Projet analytique ministériel : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_PROJET_ANALYTIQUE_MINISTERIEL']/cbc:Value"
+ /></li>
+ </xsl:if>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_LOCALISATION_MINISTERIELLE']/cbc:Value">
+ <li class="nosign little">Localisation ministérielle : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_LOCALISATION_MINISTERIELLE']/cbc:Value"
+ /></li>
+ </xsl:if>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_NATURE_MINISTERIELLE']/cbc:Value">
+ <li class="nosign little">Nature détaillée ministérielle : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_NATURE_MINISTERIELLE']/cbc:Value"
+ /></li>
+ </xsl:if>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_AXE_MINISTERIEL_1']/cbc:Value">
+ <li class="nosign little">Axe ministériel 1 : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_AXE_MINISTERIEL_1']/cbc:Value"
+ /></li>
+ </xsl:if>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_AXE_MINISTERIEL_2']/cbc:Value">
+ <li class="nosign little">Axe ministériel 2 : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='CH_AXE_MINISTERIEL_2']/cbc:Value"
+ /></li>
+ </xsl:if>
+ </ul>
+ </xsl:template>
+
+ <xsl:template name="libPays">
+ <xsl:param name="cod"/>
+ <xsl:value-of
+ select="$pays/ISO_3166-1_List_fr/ISO_3166-1_Entry[ISO_3166-1_Alpha-2_code=$cod]/ISO_3166-1_Country_name/text()"
+ />
+ </xsl:template>
+
+ <xsl:template name="libSitFam">
+ <xsl:param name="cod"/>
+ <xsl:value-of select="$SituationsFamille/SituationsFamiliales/situation[@code=$cod]/text()"
+ />
+ </xsl:template>
+
+ <xsl:template name="libTypeEtatFrais">
+ <xsl:param name="cod"/>
+ <xsl:value-of select="$TypesEtatFrais/TypesEtatFrais/EtatFrais[@code=$cod]/text()"/>
+ </xsl:template>
+
+ <xsl:template name="libTypeFrais">
+ <xsl:param name="cod"/>
+ <xsl:value-of select="$TypesFrais/TypesFrais/Frais[@code=$cod]/text()"/>
+ </xsl:template>
+
+ <xsl:template name="libNatureOM">
+ <xsl:param name="cod"/>
+ <xsl:value-of select="$NaturesOM/NaturesOM/Nature[@code=$cod]/text()"/>
+ </xsl:template>
+
+ <xsl:template name="libTypePersonne">
+ <xsl:param name="cod"/>
+ <xsl:value-of select="$TypesPersonnes/TypesPersonnes/Type[@code=$cod]/text()"/>
+ </xsl:template>
+
+ <xsl:template name="libTypeFaitGenerateur">
+ <xsl:param name="cod"/>
+ <xsl:value-of select="$TypesFaitsGenerateurs/TypesFaitsGenerateurs/Type[@code=$cod]/text()"
+ />
+ </xsl:template>
+
+ <xsl:template name="libDureeOM">
+ <xsl:param name="cod"/>
+ <xsl:value-of select="$DureesOM/DureesOM/Duree[@code=$cod]/text()"/>
+ </xsl:template>
+
+ <xsl:template name="format-date">
+ <xsl:param name="datebrute"/>
+ <xsl:param name="formataffichage" select="'date'"/>
+ <!-- valeurs attendues : date / heure / dateheure -->
+ <xsl:if test="($formataffichage = 'date') or ($formataffichage = 'dateheure')">
+ <xsl:value-of select="substring($datebrute, 9, 2)"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="substring($datebrute, 6, 2)"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="substring($datebrute, 1, 4)"/>
+ </xsl:if>
+ <xsl:if test="($formataffichage = 'heure') or ($formataffichage = 'dateheure')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="substring($datebrute, 12, 2)"/>
+ <xsl:text>:</xsl:text>
+ <xsl:value-of select="substring($datebrute, 15, 2)"/>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="number">
+ <xsl:param name="num"/>
+ <xsl:choose>
+ <xsl:when test="substring($num,1,1) = '+'">
+ <xsl:value-of
+ select="format-number(number(substring($num,2)),'# ### ##0,00;-# ### ###,00','decformat')"
+ />
+ </xsl:when>
+ <xsl:when test="string-length($num) = 0"/>
+ <xsl:when test="number($num) = 0"/>
+ <xsl:when test="string(number($num)) = 'NaN'"/>
+ <xsl:otherwise>
+ <xsl:value-of select="format-number($num,'# ###,00;-# ###,00','decformat')"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="displaySrc">
+ <xsl:param name="el"/>
+ <xsl:choose>
+ <xsl:when
+ test="namespace-uri(.) = 'http://projets.admisource.gouv.fr/xemelios/namespaces#anomally' and local-name(.)='Anomalie'"/>
+ <xsl:when
+ test="$el[* or processing-instruction() or comment() or string-length(.) > 0]">
+ <div class="expander-open">
+ <xsl:variable name="currentNode" select="$el/@ano:node-id"/>
+ <xsl:if test="count($tags-ano/node[@id = $currentNode]) > 0">
+ <xsl:attribute name="style">background-color: #FFFF66;</xsl:attribute>
+ </xsl:if>
+ <xsl:text><</xsl:text>
+ <span class="start-tag">
+ <xsl:value-of select="name(.)"/>
+ </span>
+ <xsl:apply-templates select="@*"/>
+ <xsl:text>></xsl:text>
+ <xsl:choose>
+ <xsl:when test="count(./*) > 0">
+ <div class="expander-content">
+ <xsl:for-each select="./*">
+ <xsl:call-template name="displaySrc">
+ <xsl:with-param name="el" select="."/>
+ </xsl:call-template>
+ <!--xsl:if test="not(position() = last())"><br/></xsl:if-->
+ </xsl:for-each>
+ <span class="text">
+ <xsl:value-of select="./text()"/>
+ </span>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="text">
+ <xsl:value-of select="./text()"/>
+ </span>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text></</xsl:text>
+ <span class="end-tag">
+ <xsl:value-of select="name(.)"/>
+ </span>
+ <xsl:text>></xsl:text>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text><</xsl:text>
+ <span class="start-tag">
+ <xsl:variable name="currentNode" select="$el/@ano:node-id"/>
+ <xsl:if test="count($tags-ano/node[@id = $currentNode]) > 0">
+ <xsl:attribute name="style">background-color: #FFFF66;</xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="name(.)"/>
+ </span>
+ <xsl:apply-templates select="@*"/>
+ <xsl:text>/></xsl:text>
+ <br/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template match="@*">
+ <xsl:choose>
+ <xsl:when
+ test="namespace-uri(.) = 'http://projets.admisource.gouv.fr/xemelios/namespaces#anomally' and (local-name(.) = 'node-id' or local-name(.) = 'unique-id')"/>
+ <xsl:when
+ test="namespace-uri(.) = 'http://projets.admisource.gouv.fr/xemelios/namespaces#added'"/>
+ <xsl:otherwise> <span class="attribute-name">
+ <xsl:value-of select="name(.)"/>
+ </span><xsl:text>=</xsl:text><span class="attribute-value">"<xsl:value-of select="."
+ />"</span></xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="blocDepartArrivee">
+ <xsl:param name="line"/>
+ <ul>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='LIEU_DEPART_COMMUNE']/cbc:Value">
+ <li class="nosign"> De : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='LIEU_DEPART_COMMUNE']/cbc:Value/text()"/>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='LIEU_DEPART_CP']/cbc:Value"
+ > (<xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='LIEU_DEPART_CP']/cbc:Value/text()"
+ />) </xsl:if>
+ </li>
+ </xsl:if>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='LIEU_ARRIVEE_COMMUNE']/cbc:Value">
+ <li class="nosign"> A : <xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='LIEU_ARRIVEE_COMMUNE']/cbc:Value/text()"/>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='LIEU_DEPART_CP']/cbc:Value"
+ > (<xsl:value-of
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='LIEU_ARRIVEE_CP']/cbc:Value/text()"
+ />) </xsl:if>
+ </li>
+ </xsl:if>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='DATE_DEPART']/cbc:Value">
+ <li class="nosign"> Du : <xsl:call-template name="format-date">
+ <xsl:with-param name="datebrute"
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='DATE_DEPART']/cbc:Value/text()"/>
+ <xsl:with-param name="formataffichage" select="'dateheure'"/>
+ </xsl:call-template>
+ </li>
+ </xsl:if>
+ <xsl:if
+ test="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='DATE_ARRIVEE']/cbc:Value">
+ <li class="nosign"> Au : <xsl:call-template name="format-date">
+ <xsl:with-param name="datebrute"
+ select="$line/cac:Item/cac:AdditionalItemProperty[cbc:Name='DATE_ARRIVEE']/cbc:Value/text()"/>
+ <xsl:with-param name="formataffichage" select="'dateheure'"/>
+ </xsl:call-template>
+ </li>
+ </xsl:if>
+ </ul>
+ </xsl:template>
+
+</xsl:stylesheet>