<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet  xmlns:java="http://xml.apache.org/xslt/java"
	extension-element-prefixes="java" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:m="http://www.facturae.es/Facturae/2007/v3.0/Facturae" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/">
	<xsl:output method="html" indent="yes"/>
	<xsl:decimal-format grouping-separator="." decimal-separator=","/>
	<xsl:template match="/">	
		<html>
			<script id="ASW_status">window.status=' WIGEXSLT Plantilla xslt de facturas                        '</script>
			<head>				
				<title>Resumen del lote</title>
				<link rel="stylesheet" href="factura.css" type="text/css"/>
				<script>					
					function mostrarCapa(capa)
					{						
						var datos = document.getElementById(capa).style.display;
						if (datos != "none")
						{
							document.getElementById(capa + "Link").innerHTML = "Mostrar más datos";
							document.getElementById(capa).style.display="none";							
						}
						else
						{
							document.getElementById(capa + "Link").innerHTML = "Ocultar";
							document.getElementById(capa).style.display="";							
						}
					}	
					function mostrarFactura(numFactura)
					{						
						var datos = document.getElementById(numFactura).style.display;
						if (datos != "none")						
						{
							document.getElementById("lote").style.display="";
							document.getElementById("importesLote").style.display="";
							if (document.getElementById("tercero")!=null)
							{
								document.getElementById("tercero").style.display="";
							}
							document.getElementById("listadoFacturas").style.display="";
							document.getElementById("factura" + numFactura).style.display="none";
							document.getElementById(numFactura).style.display="none";
						}
						else
						{
							document.getElementById("lote").style.display="none";
							document.getElementById("importesLote").style.display="none";
							if (document.getElementById("tercero")!=null)
							{
								document.getElementById("tercero").style.display="none";
							}
							document.getElementById("listadoFacturas").style.display="none";
							document.getElementById("factura" + numFactura).style.display="";
							document.getElementById(numFactura).style.display="";
						}						
					}
					function mostrarDetalle(numFactura,desDetalle)
					{
						var datos = document.getElementById(numFactura + "_" + desDetalle).style.display;
						if (datos != "none")						
						{							
							document.getElementById("emisor").style.display="";
							document.getElementById("receptor").style.display="";							
							if (document.getElementById("cesionario")!=null)
							{
								document.getElementById("cesionario").style.display="";
							}
							document.getElementById("factura" + numFactura).style.display="";
							document.getElementById(numFactura).style.display="";	
							document.getElementById(numFactura + "_" + desDetalle).style.display="none";
						}
						else
						{
							document.getElementById("lote").style.display="none";
							document.getElementById("importesLote").style.display="none";
							document.getElementById("emisor").style.display="none";
							document.getElementById("receptor").style.display="none";
							if (document.getElementById("tercero")!=null)
							{
								document.getElementById("tercero").style.display="none";
							}
							if (document.getElementById("cesionario")!=null)
							{
								document.getElementById("cesionario").style.display="none";
							}
							document.getElementById("listadoFacturas").style.display="none";
							document.getElementById("factura" + numFactura).style.display="none";
							document.getElementById(numFactura).style.display="none";	
							document.getElementById(numFactura + "_" + desDetalle).style.display="";
						}
					}
				</script>
			</head>		
			<xsl:apply-templates select="//m:Facturae"/>
		</html>
	</xsl:template>
	<!-- Versión 3.0 -->
	<xsl:template match="m:Facturae">				
			<body>					
					<div id="principal">					
					<center>						
						<table border="0" width="90%" cellpadding="0" cellspacing="0">				
							<tr  id="lote">
								<td width="100%">
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tr>
											<td align="center" colspan="2">
												<font class="titulo1">RESUMEN DEL LOTE</font>
											</td>											
										</tr>
										<tr>
											<td colspan="3"><font color="FFFFFF">_</font></td>
										</tr>
										<tr>
											<td width="100%">
												<table border="1" cellpadding="0" cellspacing="0" width="100%">
													<tr>
														<td>
															<table border="0" cellpadding="0" cellspacing="0" width="100%">
																<tr>
																	<td align="center" width="33%">
																		<font class="titulopeque">NÚMERO</font>
																		<br/><xsl:value-of select="FileHeader/Batch/BatchIdentifier"/></td>
																	<td align="center" width="34%">
																		<font class="titulopeque">VERSIÓN</font>
																		<br/>
																			<xsl:value-of select="FileHeader/SchemaVersion"/></td>
																	<td align="center" width="33%">
																		<font class="titulopeque">MODALIDAD</font>
																		<br/>
																		<xsl:choose>
																			<xsl:when test='FileHeader/Modality="I"'>
																				INDIVIDUAL
																			</xsl:when>
																			<xsl:when test='FileHeader/Modality="L"'>
																				LOTE
																			</xsl:when>
																			<xsl:otherwise>
																				<xsl:value-of select="FileHeader/Modality"/>
																			</xsl:otherwise>
																		</xsl:choose>
																	</td>
																</tr>
															</table>
														</td>
													</tr>
													<tr>
														<td>
															<table border="0" cellpadding="0" cellspacing="0" width="100%">
																<tr>
																	<td align="center" width="33%">
																		<font class="titulopeque">EMISOR DE LA FACTURA</font>
																		<br/>
																		<xsl:choose>
																			<xsl:when test='FileHeader/InvoiceIssuerType="EM"'>
																				Proveedor (Emisor)
																			</xsl:when>
																			<xsl:when test='FileHeader/InvoiceIssuerType="RE"'>
																				Cliente (Receptor)
																			</xsl:when>
																			<xsl:when test='FileHeader/InvoiceIssuerType="TE"'>
																				Tercero
																			</xsl:when>
																			<xsl:otherwise>
																				<xsl:value-of select="FileHeader/InvoiceIssuerType"/>
																			</xsl:otherwise>
																		</xsl:choose>
																	</td>
																	<td align="center" width="33%">
																		<font class="titulopeque">NUM. FACTURAS</font>
																		<br/><xsl:value-of select="FileHeader/Batch/InvoicesCount"/></td>
																	<td align="center" width="34%">
																		<font class="titulopeque">MONEDA DE FACTURACIÓN</font>
																		<br/><xsl:value-of select="FileHeader/Batch/InvoiceCurrencyCode"/></td>
																</tr>
															</table>
														</td>
													</tr>	
												</table>
											</td>											
										</tr>										
									</table>
								</td>
							</tr>							
							<xsl:for-each select="Invoices/Invoice">
								<xsl:variable name="nFactura" select="InvoiceHeader/InvoiceNumber"/>
								<tr  id="factura{$nFactura}" style="display:none">
									<td width="100%">
										<table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td align="center">
													<font class="titulo1">FACTURA NÚMERO <xsl:value-of select="$nFactura"/></font>
												</td>
											</tr>
											<tr>
												<td align="right">
													<a href="#" onclick="mostrarFactura('{$nFactura}')">VOLVER AL LOTE</a>
												</td>
											</tr>											
										</table>
									</td>
								</tr>
							</xsl:for-each>
							<tr  id="importesLote">
								<td width="100%">
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tr>
											<td><font color="FFFFFF">_</font></td>
										</tr>
										<tr>
											<td>
												<hr/>
											</td>
										</tr>
										<tr>
											<td>
												<font class="titulo2">IMPORTES</font>
											</td>
										</tr>
										<tr>
											<td><font color="FFFFFF">_</font></td>
										</tr>
										<tr>
											<td align="right">	
												<xsl:if test='FileHeader/Batch/InvoiceCurrencyCode!="EUR"' >
													<table border="1" cellpadding="0" cellspacing="0" width="60%">									
														<tr>
															<td width="50%" valign="top" align="center">
																<font color="FFFFFF">___</font>
															</td>
															<td width="25%" valign="top" align="center">
																<font class="titulopeque">IMPORTE</font>
															</td>											
															<td width="25%" valign="top" align="center">
																<font class="titulopeque">CONTRAVALOR</font>
															</td>											
														</tr>										
														<tr>
															<td width="50%" valign="top" align="right">
																<font class="titulopeque">IMPORTE TOTAL FACTURAS<font color="FFFFFF">___</font></font>
															</td>
															<td width="25%" valign="top">
																<table border="0" cellpadding="0" cellspacing="0" width="100%">
																	<tr>
																		<td width="100%" align="right">																			
																			<xsl:variable name="decimales" select="FileHeader/Batch/TotalInvoicesAmount/TotalAmount"/>
																			<xsl:value-of select="format-number(FileHeader/Batch/TotalInvoicesAmount/TotalAmount,'#.##0,00')"/>
																		</td>
																	</tr>
																</table>
															</td>
															<td width="25%" valign="top">
																<table border="0" cellpadding="0" cellspacing="0" width="100%">
																	<tr>
																		<td align="right">
																			<xsl:variable name="decimales" select="FileHeader/Batch/TotalInvoicesAmount/EquivalentInEuros"/>
																			<xsl:value-of select="format-number(FileHeader/Batch/TotalInvoicesAmount/EquivalentInEuros,'#.##0,00')"/>
																		</td>
																	</tr>
																</table>
															</td>
														</tr>
														<tr>
															<td width="50%" valign="top" align="right">
																<font class="titulopeque">IMPORTE TOTAL A PAGAR<font color="FFFFFF">___</font></font>
															</td>
															<td width="25%" valign="top">
																<table border="0" cellpadding="0" cellspacing="0" width="100%">
																	<tr>
																		<td width="100%" align="right">
																			<xsl:variable name="decimales" select="FileHeader/Batch/TotalOutstandingAmount/TotalAmount"/>
																			<xsl:value-of select="format-number(FileHeader/Batch/TotalOutstandingAmount/TotalAmount,'#.##0,00')"/>
																		</td>
																	</tr>
																</table>
															</td>
															<td width="25%" valign="top">
																<table border="0" cellpadding="0" cellspacing="0" width="100%">
																	<tr>
																		<td align="right">																			
																			<xsl:variable name="decimales" select="FileHeader/Batch/TotalOutstandingAmount/EquivalentInEuros"/>
																			<xsl:value-of select="format-number(FileHeader/Batch/TotalOutstandingAmount/EquivalentInEuros,'#.##0,00')"/>
																		</td>
																	</tr>
																</table>
															</td>
														</tr>
														<tr>
															<td width="50%" valign="top" align="right">
																<font class="titulopeque">IMPORTE TOTAL A EJECUTAR<font color="FFFFFF">___</font></font>
															</td>
															<td width="25%" valign="top">
																<table border="0" cellpadding="0" cellspacing="0" width="100%">
																	<tr>
																		<td width="100%" align="right">
																			<xsl:variable name="decimales" select="FileHeader/Batch/TotalExecutableAmount/TotalAmount"/>
																			<xsl:value-of select="format-number(FileHeader/Batch/TotalExecutableAmount/TotalAmount,'#.##0,00')"/>
																		</td>
																	</tr>
																</table>
															</td>
															<td width="25%" valign="top">
																<table border="0" cellpadding="0" cellspacing="0" width="100%">
																	<tr>
																		<td align="right">
																			<xsl:variable name="decimales" select="FileHeader/Batch/TotalExecutableAmount/EquivalentInEuros"/>
																			<xsl:value-of select="format-number(FileHeader/Batch/TotalExecutableAmount/EquivalentInEuros,'#.##0,00')"/>
																		</td>
																	</tr>
																</table>
															</td>
														</tr>
													</table>
												</xsl:if>
												<xsl:if test='//m:Facturae/FileHeader/Batch/InvoiceCurrencyCode="EUR"' >								
													<table border="0" cellpadding="0" cellspacing="0" width="100%">
														<tr>
															<td width="80%" align="right">
																<font class="titulopeque">IMPORTE TOTAL FACTURAS<font color="FFFFFF">___</font></font>
															</td>
															<td width="20%" align="center">
																<table border="1" cellpadding="0" cellspacing="0" width="100%">
																	<tr>
																		<td align="right">
																			<xsl:variable name="decimales" select="FileHeader/Batch/TotalInvoicesAmount/TotalAmount"/>
																			<xsl:value-of select="format-number(FileHeader/Batch/TotalInvoicesAmount/TotalAmount,'#.##0,00')"/>
																		</td>
																	</tr>
																</table>
															</td>
														</tr>
													</table>
													<table border="0" cellpadding="0" cellspacing="0" width="100%">
														<tr>
															<td width="80%" align="right">
																<font class="titulopeque">IMPORTE TOTAL A PAGAR<font color="FFFFFF">___</font></font>
															</td>
															<td width="20%" align="center">
																<table border="1" cellpadding="0" cellspacing="0" width="100%">
																	<tr>
																		<td align="right">
																			<xsl:variable name="decimales" select="FileHeader/Batch/TotalOutstandingAmount/TotalAmount"/>
																			<xsl:value-of select="format-number(FileHeader/Batch/TotalOutstandingAmount/TotalAmount,'#.##0,00')"/>
																		</td>
																	</tr>
																</table>
															</td>
														</tr>
													</table>
													<table border="0" cellpadding="0" cellspacing="0" width="100%">
														<tr>
															<td width="80%" align="right">
																<font class="titulopeque">IMPORTE TOTAL A EJECUTAR<font color="FFFFFF">___</font></font>
															</td>
															<td width="20%" align="center">
																<table border="1" cellpadding="0" cellspacing="0" width="100%">
																	<tr>
																		<td align="right">
																			<xsl:variable name="decimales" select="FileHeader/Batch/TotalExecutableAmount/TotalAmount"/>
																			<xsl:value-of select="format-number(FileHeader/Batch/TotalExecutableAmount/TotalAmount,'#.##0,00')"/>
																		</td>
																	</tr>
																</table>
															</td>
														</tr>
													</table>
												</xsl:if>	
											</td>
										</tr>	
										<tr>
											<td><font color="FFFFFF">_</font></td>
										</tr>										
									</table>
								</td>
							</tr>							
							<tr id="emisor">
								 <td width="100%">
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tr>
											 <td width="100%">
												<table border="0" cellpadding="0" cellspacing="0" width="100%">													
													<tr>
														<td colspan="3">
															<hr/>
														</td>
													</tr>
													<tr>
														<td colspan="2">
															<font class="titulo2">
																DATOS EMISOR
															</font>
														</td>
														<td align="right">
															<a id="datosEmisorLink" href="javascript:mostrarCapa('datosEmisor')">Mostrar más datos</a>
														</td>        	
													</tr>
													<tr>
														<td colspan="3"><font color="FFFFFF">_</font></td>        	
													</tr>
													<xsl:if test='Parties/SellerParty/LegalEntity!=""' >
														<tr>											
															<td width="50%" colspan="2">
																<font class="titulopeque">
																	RAZÓN SOCIAL:
																</font>
																<font color="FFFFFF">__</font>
																<xsl:value-of select="Parties/SellerParty/LegalEntity/CorporateName"/>
															</td>
															<td width="50%">
																<font class="titulopeque">
																	NIF/CIF:
																</font>
																<font color="FFFFFF">__</font>
																<xsl:value-of select="Parties/SellerParty/TaxIdentification/TaxIdentificationNumber"/>
															</td>
														</tr>
													</xsl:if>
													<xsl:if test='Parties/SellerParty/Individual!=""' >
														<tr>											
															<td width="50%" colspan="2">
																<font class="titulopeque">
																	NOMBRE Y APELLIDOS:
																</font>
																<font color="FFFFFF">__</font>
																<xsl:value-of select="Parties/SellerParty/Individual/Name"/><font color="FFFFFF">_</font>
																<xsl:value-of select="Parties/SellerParty/Individual/FirstSurname"/><font color="FFFFFF">_</font>
																<xsl:value-of select="Parties/SellerParty/Individual/SecondSurname"/><font color="FFFFFF">_</font>
															</td> 
															<td width="50%">
																<font class="titulopeque">
																	NIF/CIF:
																</font>
																<font color="FFFFFF">__</font>												
																<xsl:value-of select="Parties/SellerParty/TaxIdentification/TaxIdentificationNumber"/>
															</td>
														</tr>
													</xsl:if>
												</table>
											</td>
										</tr>	
										<tr id="datosEmisor" style="display:none">
											<td width="100%">
												<table border="0" cellpadding="0" cellspacing="0" width="100%">							
													<tr>											
														<td width="50%" colspan="2">
															<font class="titulopeque">
																TIPO PERSONA:
															</font>
															<font color="FFFFFF">__</font>
															<xsl:choose>
																<xsl:when test='Parties/SellerParty/TaxIdentification/PersonTypeCode="F"' >
																	Física	
																</xsl:when>
																<xsl:when test='Parties/SellerParty/TaxIdentification/PersonTypeCode="J"' >
																	Jurídica
																</xsl:when>
																<xsl:otherwise>
																	<xsl:value-of select="Parties/SellerParty/TaxIdentification/PersonTypeCode"/>
																</xsl:otherwise>
															</xsl:choose>
														</td> 
														<td width="50%">
															<font class="titulopeque">
																TIPO RESIDENCIA:
															</font>
															<font color="FFFFFF">__</font>
															<xsl:choose>
																<xsl:when test='Parties/SellerParty/TaxIdentification/ResidenceTypeCode="E"' >
																	Extranjero (fuera de la UE)
																</xsl:when>
																<xsl:when test='Parties/SellerParty/TaxIdentification/ResidenceTypeCode="R"' >
																	Residente (en España)
																</xsl:when>
																<xsl:when test='Parties/SellerParty/TaxIdentification/ResidenceTypeCode="U"' >
																	Residente en la Unión Europea (excepto España)
																</xsl:when>
																<xsl:otherwise>
																	<xsl:value-of select="Parties/SellerParty/TaxIdentification/ResidenceTypeCode"/>
																</xsl:otherwise>
															</xsl:choose>
														</td>       	
													</tr>													
													<xsl:if test='Parties/SellerParty/LegalEntity!=""' >
														<tr>
															<td valign="top" width="10%">
																<font class="titulopeque">
																	DIRECCIÓN:
																</font>
															</td>
															<td valign="top" width="40%">
																<xsl:if test='Parties/SellerParty/LegalEntity/AddressInSpain!=""' >
																	<xsl:value-of select="Parties/SellerParty/LegalEntity/AddressInSpain/Address"/><br/>
																	<xsl:value-of select="Parties/SellerParty/LegalEntity/AddressInSpain/PostCode"/><font color="FFFFFF">_</font><font color="FFFFFF">_</font>
																	<xsl:value-of select="Parties/SellerParty/LegalEntity/AddressInSpain/Town"/><br/>
																	<xsl:value-of select="Parties/SellerParty/LegalEntity/AddressInSpain/Province"/><br/>
																	<xsl:value-of select="Parties/SellerParty/LegalEntity/AddressInSpain/CountryCode"/>
																</xsl:if>
																<xsl:if test='Parties/SellerParty/LegalEntity/OverseasAddress!=""' >
																	<xsl:value-of select="Parties/SellerParty/LegalEntity/OverseasAddress/Address"/><br/>
																	<xsl:value-of select="Parties/SellerParty/LegalEntity/OverseasAddress/PostCodeAndTown"/><br/>
																	<xsl:value-of select="Parties/SellerParty/LegalEntity/OverseasAddress/Province"/><br/>
																	<xsl:value-of select="Parties/SellerParty/LegalEntity/OverseasAddress/CountryCode"/>
																</xsl:if>
															</td>
															<xsl:if test='Parties/SellerParty/LegalEntity/TradeName!=""' >
																<td valign="top" width="50%">
																	<font class="titulopeque">
																		NOMBRE COMERCIAL:
																	</font>
																	<font color="FFFFFF">__</font>											
																	<xsl:value-of select="Parties/SellerParty/LegalEntity/TradeName"/>
																</td>        	
															</xsl:if>        	
														</tr>														
														<xsl:if test='Parties/SellerParty/LegalEntity/RegistrationData!=""' >
															<tr>											
																<td width="30%" colspan="3">
																<font class="titulopeque">
																	DATOS REGISTRALES:
																</font>
																</td>
															</tr>
															<tr>								
																<td colspan="3">
																	<table border="0" cellpadding="0" cellspacing="0" width="100%">
																		<tr>
																			<td width="25%">
																				<font class="titulopeque">Libro:</font><font color="FFFFFF">__</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/RegistrationData/Book"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Registro mercantil:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/RegistrationData/RegisterOfCompaniesLocation"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Hoja:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/RegistrationData/Sheet"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Folio:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/RegistrationData/Folio"/>
																			</td>
																		</tr>
																		<tr>
																			<td width="25%">
																				<font class="titulopeque">Sección:</font><font color="FFFFFF">__</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/RegistrationData/Section"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Tomo:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/RegistrationData/Volume"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Otros:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/RegistrationData/AdditionalRegistrationData"/>
																			</td>															
																		</tr>
																	</table>
																</td>        	
															</tr>	
														</xsl:if>
														<xsl:if test='Parties/SellerParty/LegalEntity/ContactDetails!=""' >
															<tr>											
																<td width="30%" colspan="3">
																<font class="titulopeque">
																	DATOS DE CONTACTO:
																</font>
																</td>
															</tr>
															<tr>								
																<td colspan="3">
																	<table border="0" cellpadding="0" cellspacing="0" width="100%">
																		<tr>
																			<td width="25%">
																				<font class="titulopeque">Teléfono:</font><font color="FFFFFF">__</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/ContactDetails/Telephone"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Fax:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/ContactDetails/TeleFax"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Web:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/ContactDetails/WebAddress"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Email:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/ContactDetails/ElectronicMail"/>
																			</td>
																		</tr>
																		<tr>
																			<td width="25%">
																				<font class="titulopeque">Personas contacto:</font><font color="FFFFFF">__</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/ContactDetails/ContactPersons"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">CnoCnae:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/ContactDetails/CnoCnae"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Código INE:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/ContactDetails/INETownCode"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Otros:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/LegalEntity/ContactDetails/AdditionalContactDetails"/>
																			</td>														
																		</tr>
																	</table>
																</td>        	
															</tr>
														</xsl:if>
													</xsl:if>
													<xsl:if test='Parties/SellerParty/Individual!=""' >
														<tr>
															<td valign="top" width="10%">
																<font class="titulopeque">
																	DIRECCIÓN:
																</font>
															</td>
															<td valign="top" width="40%">
																<xsl:if test='Parties/SellerParty/Individual/AddressInSpain!=""' >
																	<xsl:value-of select="Parties/SellerParty/Individual/AddressInSpain/Address"/><br/>
																	<xsl:value-of select="Parties/SellerParty/Individual/AddressInSpain/PostCode"/><font color="FFFFFF">_</font><font color="FFFFFF">_</font>
																	<xsl:value-of select="Parties/SellerParty/Individual/AddressInSpain/Town"/><br/>
																	<xsl:value-of select="Parties/SellerParty/Individual/AddressInSpain/Province"/><br/>
																	<xsl:value-of select="Parties/SellerParty/Individual/AddressInSpain/CountryCode"/>
																</xsl:if>
																<xsl:if test='Parties/SellerParty/Individual/OverseasAddress!=""' >
																	<xsl:value-of select="Parties/SellerParty/Individual/OverseasAddress/Address"/><br/>
																	<xsl:value-of select="Parties/SellerParty/Individual/OverseasAddress/PostCodeAndTown"/><br/>
																	<xsl:value-of select="Parties/SellerParty/Individual/OverseasAddress/Province"/><br/>
																	<xsl:value-of select="Parties/SellerParty/Individual/OverseasAddress/CountryCode"/>
																</xsl:if>
															</td>												   	
														</tr>
														<xsl:if test='Parties/SellerParty/Individual/ContactDetails!=""' >
															<tr>											
																<td width="30%" colspan="3">
																<font class="titulopeque">
																	DATOS DE CONTACTO:
																</font>
																</td>
															</tr>
															<tr>								
																<td colspan="3">
																	<table border="0" cellpadding="0" cellspacing="0" width="100%">
																		<tr>
																			<td width="25%">
																				<font class="titulopeque">Teléfono:</font><font color="FFFFFF">__</font>
																				<xsl:value-of select="Parties/SellerParty/Individual/ContactDetails/Telephone"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Fax:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/Individual/ContactDetails/TeleFax"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Web:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/Individual/ContactDetails/WebAddress"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Email:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/Individual/ContactDetails/ElectronicMail"/>
																			</td>
																		</tr>
																		<tr>
																			<td width="25%">
																				<font class="titulopeque">Personas contacto:</font><font color="FFFFFF">__</font>
																				<xsl:value-of select="Parties/SellerParty/Individual/ContactDetails/ContactPersons"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">CnoCnae:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/Individual/ContactDetails/CnoCnae"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Código INE:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/Individual/ContactDetails/INETownCode"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Otros:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/SellerParty/Individual/ContactDetails/AdditionalContactDetails"/>
																			</td>														
																		</tr>
																	</table>
																</td>        	
															</tr>
															</xsl:if>
													</xsl:if>
													<xsl:if test='Parties/SellerParty/AdministrativeCentres!=""' >
														<tr>
															<td colspan="3">												
																	<font class="titulopeque">CENTROS</font>
																	<table border="1" cellpadding="0" cellspacing="0" width="100%">
																		<tr>
																			<td width="9%" valign="top" align="center">
																				<font class="titulopeque">Número</font>
																			</td>
																			<td width="9%" valign="top" align="center">
																				<font class="titulopeque">Tipo rol</font>
																			</td>
																			<td width="18%" valign="top" align="center">
																				<font class="titulopeque">Nombre</font>
																			</td>
																			<td width="18%" valign="top" align="center">
																				<font class="titulopeque">Dirección</font>
																			</td>
																			<td width="28%" valign="top" align="center">
																				<font class="titulopeque">Datos de contacto</font>
																			</td>
																			<td width="9%" valign="top" align="center">
																				<font class="titulopeque">GLN Físico</font>
																			</td>
																			<td width="9%" valign="top" align="center">
																				<font class="titulopeque">Pto op. lógico</font>
																			</td>
																		</tr>
																		<xsl:for-each select="Parties/SellerParty/AdministrativeCentres/AdministrativeCentre">
																		<tr>
																			<td valign="top">
																				<xsl:choose>
																					<xsl:when test='CentreCode!=""' >
																						<xsl:apply-templates select="CentreCode"/>
																					</xsl:when>
																					<xsl:otherwise>
																						<font color="FFFFFF">_</font>
																					</xsl:otherwise>
																				</xsl:choose>															
																			</td>
																			<td valign="top">
																				<xsl:choose>
																					<xsl:when test='RoleTypeCode!=""' >
																						<xsl:apply-templates select="RoleTypeCode"/>
																					</xsl:when>
																					<xsl:otherwise>
																						<font color="FFFFFF">_</font>
																					</xsl:otherwise>
																				</xsl:choose>
																			</td>
																			<td valign="top">
																				<xsl:choose>
																					<xsl:when test='(Name!="") or (FirstSurname!="") or (SecondSurname!="")' >
																						<xsl:value-of select="Name"/><font color="FFFFFF">_</font>
																						<xsl:value-of select="FirstSurname"/><font color="FFFFFF">_</font>
																						<xsl:value-of select="SecondSurname"/><font color="FFFFFF">_</font>
																					</xsl:when>
																					<xsl:otherwise>
																						<font color="FFFFFF">_</font>
																					</xsl:otherwise>
																				</xsl:choose>																				
																			</td>
																			<td valign="top">
																				<xsl:choose>
																					<xsl:when test='(AddressInSpain!="") or (OverseasAddress!="")' >
																						<xsl:if test='AddressInSpain!=""' >
																							<xsl:value-of select="AddressInSpain/Address"/><br/>
																							<xsl:value-of select="AddressInSpain/PostCode"/><font color="FFFFFF">__</font>
																							<xsl:value-of select="AddressInSpain/Town"/><br/>
																							<xsl:value-of select="AddressInSpain/Province"/><br/>
																							<xsl:value-of select="AddressInSpain/CountryCode"/>
																						</xsl:if>
																						<xsl:if test='OverseasAddress!=""' >
																							<xsl:value-of select="OverseasAddress/Address"/><br/>
																							<xsl:value-of select="OverseasAddress/PostCodeAndTown"/><br/>
																							<xsl:value-of select="OverseasAddress/Province"/><br/>
																							<xsl:value-of select="OverseasAddress/CountryCode"/>
																						</xsl:if>	
																					</xsl:when>
																					<xsl:otherwise>
																						<font color="FFFFFF">_</font>
																					</xsl:otherwise>
																				</xsl:choose>
																			</td>
																			<td valign="top">
																				<xsl:choose>
																					<xsl:when test='ContactDetails!=""' >
																						<table border="0" cellpadding="0" cellspacing="0" width="100%">
																							<tr>
																								<td width="50%">
																									Teléfono:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/Telephone"/>
																								</td>
																								<td width="50%">
																									Fax:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/TeleFax"/>
																								</td>
																							</tr>
																							<tr>
																								<td width="50%">
																									Web:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/WebAddress"/>
																								</td>
																								<td width="50%">
																									Email:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/ElectronicMail"/>
																								</td>
																							</tr>
																							<tr>
																								<td width="50%">
																									Pers. contacto:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/ContactPersons"/>
																								</td>
																								<td width="50%">
																									CnoCnae:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/CnoCnae"/>
																								</td>
																							</tr>
																							<tr>
																								<td width="50%">
																									Cód. INE:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/INETownCode"/>
																								</td>
																								<td width="50%">
																									Otros:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/AdditionalContactDetails"/>
																								</td>														
																							</tr>
																						</table>
																					</xsl:when>
																					<xsl:otherwise>
																						<font color="FFFFFF">_</font>
																					</xsl:otherwise>
																				</xsl:choose>
																			</td>
																			<td valign="top">
																				<xsl:choose>
																					<xsl:when test='PhysicalGLN!=""' >
																						<xsl:apply-templates select="PhysicalGLN"/>
																					</xsl:when>
																					<xsl:otherwise>
																						<font color="FFFFFF">_</font>
																					</xsl:otherwise>
																				</xsl:choose>
																			</td>
																			<td valign="top">
																				<xsl:choose>
																					<xsl:when test='LogicalOperationalPoint!=""' >
																						<xsl:apply-templates select="LogicalOperationalPoint"/>			
																					</xsl:when>
																					<xsl:otherwise>
																						<font color="FFFFFF">_</font>
																					</xsl:otherwise>
																				</xsl:choose>
																			</td>
																		</tr>
																		</xsl:for-each>
																	</table>					
															</td>
														</tr>
													</xsl:if>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr id="receptor">
								 <td width="100%">
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tr>
											 <td width="100%">
												<table border="0" cellpadding="0" cellspacing="0" width="100%">
													<tr>
														<td colspan="3"><font color="FFFFFF">_</font></td>
													</tr>
													<tr>
														<td colspan="3">
															<hr/>
														</td>
													</tr>
													<tr>
														<td colspan="2">
															<font class="titulo2">
																DATOS RECEPTOR
															</font>
														</td>
														<td align="right">											
															<a id="datosReceptorLink" href="javascript:mostrarCapa('datosReceptor')">Mostrar más datos</a>
														</td>    	
													</tr>
													<tr>
														<td colspan="3"><font color="FFFFFF">_</font></td>        	
													</tr>
													<xsl:if test='Parties/BuyerParty/LegalEntity!=""' >
														<tr>											
															<td width="50%" colspan="2">
																<font class="titulopeque">
																	RAZÓN SOCIAL:
																</font>
																<font color="FFFFFF">__</font>											
																<xsl:value-of select="Parties/BuyerParty/LegalEntity/CorporateName"/>
															</td>
															<td  width="50%">
																<font class="titulopeque">
																	NIF/CIF:
																</font>
																<font color="FFFFFF">__</font>
																<xsl:value-of select="Parties/BuyerParty/TaxIdentification/TaxIdentificationNumber"/>
															</td>
														</tr>
													</xsl:if>
													<xsl:if test='Parties/BuyerParty/Individual!=""' >
														<tr>											
															<td width="50%" colspan="2">
																<font class="titulopeque">
																	NOMBRE Y APELLIDOS:
																</font>
																<font color="FFFFFF">__</font>
																<xsl:value-of select="Parties/BuyerParty/Individual/Name"/><font color="FFFFFF">_</font>
																<xsl:value-of select="Parties/BuyerParty/Individual/FirstSurname"/><font color="FFFFFF">_</font>
																<xsl:value-of select="Parties/BuyerParty/Individual/SecondSurname"/><font color="FFFFFF">_</font>
															</td> 
															<td width="50%">
																<font class="titulopeque">
																	NIF/CIF:
																</font>
																<font color="FFFFFF">__</font>
																<xsl:value-of select="Parties/BuyerParty/TaxIdentification/TaxIdentificationNumber"/>
															</td>       	
														</tr>
													</xsl:if>
												</table>
											</td>
										</tr>
										<tr id="datosReceptor" style="display:none">
											<td width="100%">
												<table border="0" cellpadding="0" cellspacing="0" width="100%">							
													<tr>											
														<td width="50%" colspan="2">
															<font class="titulopeque">
																TIPO PERSONA:
															</font>
															<font color="FFFFFF">__</font>
															<xsl:choose>
																<xsl:when test='Parties/BuyerParty/TaxIdentification/PersonTypeCode="F"' >
																	Física
																</xsl:when>
																<xsl:when test='Parties/BuyerParty/TaxIdentification/PersonTypeCode="J"' >
																	Jurídica
																</xsl:when>
																<xsl:otherwise>
																	<xsl:value-of select="Parties/BuyerParty/TaxIdentification/PersonTypeCode"/>
																</xsl:otherwise>
															</xsl:choose>
														</td>      
														<td width="50%">
															<font class="titulopeque">
																TIPO RESIDENCIA:
															</font>
															<font color="FFFFFF">__</font>
															<xsl:choose>
																<xsl:when test='Parties/BuyerParty/TaxIdentification/ResidenceTypeCode="E"' >
																	Extranjero (fuera de la UE)
																</xsl:when>
																<xsl:when test='Parties/BuyerParty/TaxIdentification/ResidenceTypeCode="R"' >
																	Residente (en España)
																</xsl:when>
																<xsl:when test='Parties/BuyerParty/TaxIdentification/ResidenceTypeCode="U"' >
																	Residente en la Unión Europea (excepto España)
																</xsl:when>
																<xsl:otherwise>
																	<xsl:value-of select="Parties/BuyerParty/TaxIdentification/ResidenceTypeCode"/>
																</xsl:otherwise>
															</xsl:choose>
														</td>  	
													</tr>
													<xsl:if test='Parties/BuyerParty/LegalEntity!=""' >
														<tr>
															<td valign="top"  width="10%">
															<font class="titulopeque">
																DIRECCIÓN:
															</font>
															</td>        	
															<td  width="40%">
																<xsl:if test='Parties/BuyerParty/LegalEntity/AddressInSpain!=""' >
																	<xsl:value-of select="Parties/BuyerParty/LegalEntity/AddressInSpain/Address"/><br/>
																	<xsl:value-of select="Parties/BuyerParty/LegalEntity/AddressInSpain/PostCode"/><font color="FFFFFF">_</font><font color="FFFFFF">_</font>
																	<xsl:value-of select="Parties/BuyerParty/LegalEntity/AddressInSpain/Town"/><br/>
																	<xsl:value-of select="Parties/BuyerParty/LegalEntity/AddressInSpain/Province"/><br/>
																	<xsl:value-of select="Parties/BuyerParty/LegalEntity/AddressInSpain/CountryCode"/>
																</xsl:if>
																<xsl:if test='Parties/BuyerParty/LegalEntity/OverseasAddress!=""' >
																	<xsl:value-of select="Parties/BuyerParty/LegalEntity/OverseasAddress/Address"/><br/>
																	<xsl:value-of select="Parties/BuyerParty/LegalEntity/OverseasAddress/PostCodeAndTown"/><br/>
																	<xsl:value-of select="Parties/BuyerParty/LegalEntity/OverseasAddress/Province"/><br/>
																	<xsl:value-of select="Parties/BuyerParty/LegalEntity/OverseasAddress/CountryCode"/>
																</xsl:if>
															</td>
															<xsl:if test='Parties/BuyerParty/LegalEntity/TradeName!=""' >
																<td width="50%">
																	<font class="titulopeque">
																		NOMBRE COMERCIAL:
																	</font>
																	<font color="FFFFFF">__</font>
																	<xsl:value-of select="Parties/BuyerParty/LegalEntity/TradeName"/>
																</td>        	
														</xsl:if>
														</tr>
														<xsl:if test='Parties/BuyerParty/LegalEntity/RegistrationData!=""' >
															<tr>											
																<td width="30%" colspan="3">
																<font class="titulopeque">
																	DATOS REGISTRALES:
																</font>
																</td>
															</tr>
															<tr>								
																<td colspan="3">
																	<table border="0" cellpadding="0" cellspacing="0" width="100%">
																		<tr>
																			<td width="25%">
																				<font class="titulopeque">Libro:</font><font color="FFFFFF">__</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/RegistrationData/Book"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Registro mercantil:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/RegistrationData/RegisterOfCompaniesLocation"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Hoja:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/RegistrationData/Sheet"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Folio:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/RegistrationData/Folio"/>
																			</td>
																		</tr>
																		<tr>
																			<td width="25%">
																				<font class="titulopeque">Sección:</font><font color="FFFFFF">__</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/RegistrationData/Section"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Tomo:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/RegistrationData/Volume"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Otros:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/RegistrationData/AdditionalRegistrationData"/>
																			</td>															
																		</tr>
																	</table>
																</td>        	
															</tr>	
														</xsl:if>
														<xsl:if test='Parties/BuyerParty/LegalEntity/ContactDetails!=""' >
															<tr>											
																<td width="30%" colspan="3">
																<font class="titulopeque">
																	DATOS DE CONTACTO:
																</font>
																</td>
															</tr>
															<tr>								
																<td colspan="3">
																	<table border="0" cellpadding="0" cellspacing="0" width="100%">
																		<tr>
																			<td width="25%">
																				<font class="titulopeque">Teléfono:</font><font color="FFFFFF">__</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/ContactDetails/Telephone"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Fax:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/ContactDetails/TeleFax"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Web:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/ContactDetails/WebAddress"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Email:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/ContactDetails/ElectronicMail"/>
																			</td>
																		</tr>
																		<tr>
																			<td width="25%">
																				<font class="titulopeque">Personas contacto:</font><font color="FFFFFF">__</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/ContactDetails/ContactPersons"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">CnoCnae:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/ContactDetails/CnoCnae"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Código INE:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/ContactDetails/INETownCode"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Otros:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/LegalEntity/ContactDetails/AdditionalContactDetails"/>
																			</td>														
																		</tr>
																	</table>
																</td>        	
															</tr>
														</xsl:if>
													</xsl:if>
													<xsl:if test='Parties/BuyerParty/Individual!=""' >
														<tr>
															<td valign="top" width="10%">
															<font class="titulopeque">
																DIRECCIÓN:
															</font>
															</td>        	
															<td valign="top" width="40%">
																<xsl:if test='Parties/BuyerParty/Individual/AddressInSpain!=""' >
																	<xsl:value-of select="Parties/BuyerParty/Individual/AddressInSpain/Address"/><br/>
																	<xsl:value-of select="Parties/BuyerParty/Individual/AddressInSpain/PostCode"/><font color="FFFFFF">_</font><font color="FFFFFF">_</font>
																	<xsl:value-of select="Parties/BuyerParty/Individual/AddressInSpain/Town"/><br/>
																	<xsl:value-of select="Parties/BuyerParty/Individual/AddressInSpain/Province"/><br/>
																	<xsl:value-of select="Parties/BuyerParty/Individual/AddressInSpain/CountryCode"/>
																</xsl:if>
																<xsl:if test='Parties/BuyerParty/Individual/OverseasAddress!=""' >
																	<xsl:value-of select="Parties/BuyerParty/Individual/OverseasAddress/Address"/><br/>
																	<xsl:value-of select="Parties/BuyerParty/Individual/OverseasAddress/PostCodeAndTown"/><br/>
																	<xsl:value-of select="Parties/BuyerParty/Individual/OverseasAddress/Province"/><br/>
																	<xsl:value-of select="Parties/BuyerParty/Individual/OverseasAddress/CountryCode"/>
																</xsl:if>
															</td>        	
														</tr>
														<xsl:if test='Parties/BuyerParty/Individual/ContactDetails!=""' >
															<tr>											
																<td width="30%" colspan="3">
																<font class="titulopeque">
																	DATOS DE CONTACTO:
																</font>
																</td>
															</tr>
															<tr>								
																<td colspan="3">
																	<table border="0" cellpadding="0" cellspacing="0" width="100%">
																		<tr>
																			<td width="25%">
																				<font class="titulopeque">Teléfono:</font><font color="FFFFFF">__</font>
																				<xsl:value-of select="Parties/BuyerParty/Individual/ContactDetails/Telephone"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Fax:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/Individual/ContactDetails/TeleFax"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Web:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/Individual/ContactDetails/WebAddress"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Email:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/Individual/ContactDetails/ElectronicMail"/>
																			</td>
																		</tr>
																		<tr>
																			<td width="25%">
																				<font class="titulopeque">Personas contacto:</font><font color="FFFFFF">__</font>
																				<xsl:value-of select="Parties/BuyerParty/Individual/ContactDetails/ContactPersons"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">CnoCnae:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/Individual/ContactDetails/CnoCnae"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Código INE:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/Individual/ContactDetails/INETownCode"/>
																			</td>
																			<td width="25%">
																				<font class="titulopeque">Otros:</font><font color="FFFFFF">___</font>
																				<xsl:value-of select="Parties/BuyerParty/Individual/ContactDetails/AdditionalContactDetails"/>
																			</td>														
																		</tr>
																	</table>
																</td>        	
															</tr>
															</xsl:if>
													</xsl:if>
													<xsl:if test='Parties/BuyerParty/AdministrativeCentres!=""' >
														<tr>
															<td colspan="3">												
																	<font class="titulopeque">CENTROS</font>
																	<table border="1" cellpadding="0" cellspacing="0" width="100%">
																		<tr>
																			<td width="9%" valign="top" align="center">
																				<font class="titulopeque">Número</font>
																			</td>
																			<td width="9%" valign="top" align="center">
																				<font class="titulopeque">Tipo rol</font>
																			</td>
																			<td width="18%" valign="top" align="center">
																				<font class="titulopeque">Nombre</font>
																			</td>
																			<td width="18%" valign="top" align="center">
																				<font class="titulopeque">Dirección</font>
																			</td>
																			<td width="28%" valign="top" align="center">
																				<font class="titulopeque">Datos de contacto</font>
																			</td>
																			<td width="9%" valign="top" align="center">
																				<font class="titulopeque">GLN Físico</font>
																			</td>
																			<td width="9%" valign="top" align="center">
																				<font class="titulopeque">Pto op. lógico</font>
																			</td>
																		</tr>
																		<xsl:for-each select="Parties/BuyerParty/AdministrativeCentres/AdministrativeCentre">
																		<tr>
																			<td valign="top">
																				<xsl:choose>
																					<xsl:when test='CentreCode!=""' >
																						<xsl:apply-templates select="CentreCode"/>	
																					</xsl:when>
																					<xsl:otherwise>
																						<font color="FFFFFF">_</font>
																					</xsl:otherwise>
																				</xsl:choose>		
																			</td>
																			<td valign="top">
																				<xsl:choose>
																					<xsl:when test='RoleTypeCode!=""' >
																						<xsl:apply-templates select="RoleTypeCode"/>		
																					</xsl:when>
																					<xsl:otherwise>
																						<font color="FFFFFF">_</font>
																					</xsl:otherwise>
																				</xsl:choose>
																			</td>
																			<td valign="top">
																				<xsl:choose>
																					<xsl:when test='(Name!="") or (FirstSurname!="") or (SecondSurname!="")' >
																						<xsl:value-of select="Name"/><font color="FFFFFF">_</font>
																						<xsl:value-of select="FirstSurname"/><font color="FFFFFF">_</font>
																						<xsl:value-of select="SecondSurname"/><font color="FFFFFF">_</font>
																					</xsl:when>
																					<xsl:otherwise>
																						<font color="FFFFFF">_</font>
																					</xsl:otherwise>
																				</xsl:choose>
																			</td>
																			<td valign="top">
																				<xsl:choose>
																					<xsl:when test='(AddressInSpain!="") or (OverseasAddress!="")' >
																						<xsl:if test='AddressInSpain!=""' >
																							<xsl:value-of select="AddressInSpain/Address"/><br/>
																							<xsl:value-of select="AddressInSpain/PostCode"/><font color="FFFFFF">__</font>
																							<xsl:value-of select="AddressInSpain/Town"/><br/>
																							<xsl:value-of select="AddressInSpain/Province"/><br/>
																							<xsl:value-of select="AddressInSpain/CountryCode"/>
																						</xsl:if>
																						<xsl:if test='OverseasAddress!=""' >
																							<xsl:value-of select="OverseasAddress/Address"/><br/>
																							<xsl:value-of select="OverseasAddress/PostCodeAndTown"/><br/>
																							<xsl:value-of select="OverseasAddress/Province"/><br/>
																							<xsl:value-of select="OverseasAddress/CountryCode"/>
																						</xsl:if>			
																					</xsl:when>
																					<xsl:otherwise>
																						<font color="FFFFFF">_</font>
																					</xsl:otherwise>
																				</xsl:choose>
																			</td>
																			<td valign="top">
																				<xsl:choose>
																					<xsl:when test='ContactDetails!=""' >
																						<table border="0" cellpadding="0" cellspacing="0" width="100%">
																							<tr>
																								<td width="50%">
																									Teléfono:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/Telephone"/>
																								</td>
																								<td width="50%">
																									Fax:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/TeleFax"/>
																								</td>
																							</tr>
																							<tr>
																								<td width="50%">
																									Web:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/WebAddress"/>
																								</td>
																								<td width="50%">
																									Email:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/ElectronicMail"/>
																								</td>
																							</tr>
																							<tr>
																								<td width="50%">
																									Pers. contacto:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/ContactPersons"/>
																								</td>
																								<td width="50%">
																									CnoCnae:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/CnoCnae"/>
																								</td>
																							</tr>
																							<tr>
																								<td width="50%">
																									Cód. INE:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/INETownCode"/>
																								</td>
																								<td width="50%">
																									Otros:<font color="FFFFFF">_</font>
																									<xsl:value-of select="ContactDetails/AdditionalContactDetails"/>
																								</td>														
																							</tr>
																						</table>
																					</xsl:when>
																					<xsl:otherwise>
																						<font color="FFFFFF">_</font>
																					</xsl:otherwise>
																				</xsl:choose>
																			</td>
																			<td valign="top">
																				<xsl:choose>
																					<xsl:when test='PhysicalGLN!=""' >
																						<xsl:apply-templates select="PhysicalGLN"/>
																					</xsl:when>
																					<xsl:otherwise>
																						<font color="FFFFFF">_</font>
																					</xsl:otherwise>
																				</xsl:choose>
																			</td>
																			<td valign="top">
																				<xsl:choose>
																					<xsl:when test='LogicalOperationalPoint!=""' >
																						<xsl:apply-templates select="LogicalOperationalPoint"/>
																					</xsl:when>
																					<xsl:otherwise>
																						<font color="FFFFFF">_</font>
																					</xsl:otherwise>
																				</xsl:choose>
																			</td>
																		</tr>
																		</xsl:for-each>
																	</table>					
															</td>
														</tr>
													</xsl:if>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<xsl:apply-templates select="FileHeader/ThirdParty"/>								
							<xsl:apply-templates select="Invoices/Invoice"/>
							<tr  id="listadoFacturas">
								<td width="100%">
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tr>
											<td><font color="FFFFFF">_</font></td>
										</tr>
										<tr>
											<td>
												<hr/>
											</td>
										</tr>
										<tr>
											<td>
												<font class="titulo2">LISTADO DE FACTURAS</font>
											</td>
										</tr>
										<tr>
											<td><font color="FFFFFF">_</font></td>
										</tr>
										<tr>
											<td width="100%">
												<table border="1" cellpadding="0" cellspacing="0" width="100%">
													<tr>
														<td width="20%" align="center">
															<font class="titulopeque">NÚMERO</font>
														</td>
														<td width="20%" align="center">
															<font class="titulopeque">SERIE</font>
														</td>											
														<td width="20%" align="center">
															<font class="titulopeque">FECHA EXPED.</font>
														</td>											
														<td width="20%" align="center">
															<font class="titulopeque">IMPORTE BRUTO</font>
														</td>
														<td width="20%" align="center">
															<font class="titulopeque">TOTAL EUROS</font>
														</td>											
													</tr>
													<xsl:for-each select="Invoices/Invoice">
													<tr style="cursor:hand" onclick="mostrarFactura('{InvoiceHeader/InvoiceNumber}')" onMouseOver="this.style.background='#DDEEEE'" onMouseOut="this.style.background='#FFFFFF'">
														<td align="center">												
															<xsl:value-of select="InvoiceHeader/InvoiceNumber"/>
														</td>
														<td align="center">
															<xsl:choose>
																<xsl:when test='InvoiceHeader/InvoiceSeriesCode!=""' >
																	<xsl:value-of select="InvoiceHeader/InvoiceSeriesCode"/>
																</xsl:when>
																<xsl:otherwise>
																	<font color="FFFFFF">_</font>
																</xsl:otherwise>
															</xsl:choose>
														</td>											
														<td align="center">
															<xsl:value-of select="substring(InvoiceIssueData/IssueDate,9,2)"/>-<xsl:value-of select="substring(InvoiceIssueData/IssueDate,6,2)"/>-<xsl:value-of select="substring(InvoiceIssueData/IssueDate,1,4)"/>
														</td>
														<td align="right">
															<xsl:variable name="decimales" select="InvoiceTotals/TotalGrossAmount"/>
															<xsl:value-of select="format-number(InvoiceTotals/TotalGrossAmount,'#.##0,00')"/>
														</td>
														<td align="right">
															<xsl:variable name="decimales" select="InvoiceTotals/TotalExecutableAmount"/>
															<xsl:value-of select="format-number(InvoiceTotals/TotalExecutableAmount,'#.##0,00')"/>
														</td>											
													</tr>
													</xsl:for-each>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<xsl:apply-templates select="FileHeader/FactoringAssignmentData"/>
							<tr><td><font color="FFFFFF">_</font></td></tr>
							<tr><td><hr/></td></tr>
							<tr><td><font color="FFFFFF">_</font></td></tr>
							<tr><td><font color="FFFFFF">_</font></td></tr>
							<tr><td><font color="FFFFFF">_</font></td></tr>							
						</table>
					</center>
					</div>
			</body>
	</xsl:template>
	<xsl:template match="//m:Facturae/FileHeader/ThirdParty">		 
		<tr id="tercero">
			 <td width="100%">
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
						 <td width="100%">
							<table border="0" cellpadding="0" cellspacing="0" width="100%">	
								<tr>
									<td colspan="3"><font color="FFFFFF">_</font></td>
								</tr>
								<tr>
									<td colspan="3">
										<hr/>
									</td>
								</tr>
								<tr>
									<td colspan="2">
										<font class="titulo2">
											DATOS TERCERO
										</font>
									</td>
									<td align="right">						
										<a id="datosTerceroLink" href="javascript:mostrarCapa('datosTercero')">Mostrar más datos</a>
									</td>         	
								</tr>
								<tr>
									<td colspan="3"><font color="FFFFFF">_</font></td>        	
								</tr>
								<xsl:if test='LegalEntity!=""' >
									<tr>											
										<td width="50%" colspan="2">
											<font class="titulopeque">
												RAZÓN SOCIAL:
											</font>
											<font color="FFFFFF">__</font>
											<xsl:value-of select="LegalEntity/CorporateName"/>
										</td>
										<td width="50%">
											<font class="titulopeque">
												NIF/CIF:
											</font>
											<font color="FFFFFF">__</font>
											<xsl:value-of select="TaxIdentification/TaxIdentificationNumber"/>
										</td>
									</tr>									
								</xsl:if>
								<xsl:if test='Individual!=""' >
									<tr>											
										<td width="50%" colspan="2">
											<font class="titulopeque">
												NOMBRE Y APELLIDOS:
											</font>
											<font color="FFFFFF">__</font>
											<xsl:value-of select="Individual/Name"/><font color="FFFFFF">_</font>
											<xsl:value-of select="Individual/FirstSurname"/><font color="FFFFFF">_</font>
											<xsl:value-of select="Individual/SecondSurname"/><font color="FFFFFF">_</font>
										</td>
										<td width="50%">
											<font class="titulopeque">
												NIF/CIF:
											</font>
											<font color="FFFFFF">__</font>
											<xsl:value-of select="TaxIdentification/TaxIdentificationNumber"/>
										</td>        	        	
									</tr>									
								</xsl:if>
							</table>
						</td>
					</tr>	
					<tr id="datosTercero" style="display:none">
						<td width="100%">
							<table border="0" cellpadding="0" cellspacing="0" width="100%">							
								<tr>											
									<td width="50%" colspan="2">
										<font class="titulopeque">
											TIPO PERSONA:
										</font>
										<font color="FFFFFF">__</font>
										<xsl:choose>
											<xsl:when test='Parties/BuyerParty/TaxIdentification/PersonTypeCode="F"' >
												Física
											</xsl:when>
											<xsl:when test='Parties/BuyerParty/TaxIdentification/PersonTypeCode="J"' >
												Jurídica
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select="Parties/BuyerParty/TaxIdentification/PersonTypeCode"/>
											</xsl:otherwise>
										</xsl:choose>
									</td>
									<td width="50%">
										<font class="titulopeque">
											TIPO RESIDENCIA:
										</font>
										<font color="FFFFFF">__</font>
										<xsl:choose>
											<xsl:when test='Parties/SellerParty/TaxIdentification/ResidenceTypeCode="E"' >
												Extranjero (fuera de la UE)
											</xsl:when>
											<xsl:when test='Parties/SellerParty/TaxIdentification/ResidenceTypeCode="R"' >
												Residente (en España)
											</xsl:when>
											<xsl:when test='Parties/SellerParty/TaxIdentification/ResidenceTypeCode="U"' >
												Residente en la Unión Europea (excepto España)
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select="Parties/SellerParty/TaxIdentification/ResidenceTypeCode"/>
											</xsl:otherwise>
										</xsl:choose>
									</td>        	
								</tr>
								<xsl:if test='LegalEntity!=""' >
									<tr>
										<td valign="top"  width="10%">
											<font class="titulopeque">
												DIRECCIÓN:
											</font>
										</td>        	
										<td valign="top" width="40%">
											<xsl:if test='LegalEntity/AddressInSpain!=""' >
												<xsl:value-of select="LegalEntity/AddressInSpain/Address"/><br/>
												<xsl:value-of select="LegalEntity/AddressInSpain/PostCode"/><font color="FFFFFF">_</font><font color="FFFFFF">_</font>
												<xsl:value-of select="LegalEntity/AddressInSpain/Town"/><br/>
												<xsl:value-of select="LegalEntity/AddressInSpain/Province"/><br/>
												<xsl:value-of select="LegalEntity/AddressInSpain/CountryCode"/>
											</xsl:if>
											<xsl:if test='LegalEntity/OverseasAddress!=""' >
												<xsl:value-of select="LegalEntity/OverseasAddress/Address"/><br/>
												<xsl:value-of select="LegalEntity/OverseasAddress/PostCodeAndTown"/><br/>
												<xsl:value-of select="LegalEntity/OverseasAddress/Province"/><br/>
												<xsl:value-of select="LegalEntity/OverseasAddress/CountryCode"/>
											</xsl:if>
										</td>
										<xsl:if test='LegalEntity/TradeName!=""' >
											<td valign="top" width="50%">
												<font class="titulopeque">
													NOMBRE COMERCIAL:
												</font>
												<font color="FFFFFF">__</font>
												<xsl:value-of select="LegalEntity/TradeName"/>
											</td>        	
										</xsl:if>
									</tr>
									<xsl:if test='LegalEntity/RegistrationData!=""' >
										<tr>											
											<td width="30%" colspan="3">
											<font class="titulopeque">
												DATOS REGISTRALES:
											</font>
											</td>
										</tr>
										<tr>								
											<td colspan="3">
												<table border="0" cellpadding="0" cellspacing="0" width="100%">
													<tr>
														<td width="25%">
															<font class="titulopeque">Libro:</font><font color="FFFFFF">__</font>
															<xsl:value-of select="LegalEntity/RegistrationData/Book"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Registro mercantil:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="LegalEntity/RegistrationData/RegisterOfCompaniesLocation"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Hoja:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="LegalEntity/RegistrationData/Sheet"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Folio:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="LegalEntity/RegistrationData/Folio"/>
														</td>
													</tr>
													<tr>
														<td width="25%">
															<font class="titulopeque">Sección:</font><font color="FFFFFF">__</font>
															<xsl:value-of select="LegalEntity/RegistrationData/Section"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Tomo:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="LegalEntity/RegistrationData/Volume"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Otros:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="LegalEntity/RegistrationData/AdditionalRegistrationData"/>
														</td>															
													</tr>
												</table>
											</td>        	
										</tr>	
									</xsl:if>
									<xsl:if test='LegalEntity/ContactDetails!=""' >
										<tr>											
											<td width="30%" colspan="3">
											<font class="titulopeque">
												DATOS DE CONTACTO:
											</font>
											</td>
										</tr>
										<tr>								
											<td colspan="3">
												<table border="0" cellpadding="0" cellspacing="0" width="100%">
													<tr>
														<td width="25%">
															<font class="titulopeque">Teléfono:</font><font color="FFFFFF">__</font>
															<xsl:value-of select="LegalEntity/ContactDetails/Telephone"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Fax:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="LegalEntity/ContactDetails/TeleFax"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Web:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="LegalEntity/ContactDetails/WebAddress"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Email:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="LegalEntity/ContactDetails/ElectronicMail"/>
														</td>
													</tr>
													<tr>
														<td width="25%">
															<font class="titulopeque">Personas contacto:</font><font color="FFFFFF">__</font>
															<xsl:value-of select="LegalEntity/ContactDetails/ContactPersons"/>
														</td>
														<td width="25%">
															<font class="titulopeque">CnoCnae:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="LegalEntity/ContactDetails/CnoCnae"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Código INE:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="LegalEntity/ContactDetails/INETownCode"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Otros:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="LegalEntity/ContactDetails/AdditionalContactDetails"/>
														</td>														
													</tr>
												</table>
											</td>        	
										</tr>
									</xsl:if>
								</xsl:if>
								<xsl:if test='Individual!=""' >
									<tr>
										<td valign="top" width="10%">
										<font class="titulopeque">
											DIRECCIÓN:
										</font>
										</td>        	
										<td valign="top" width="40%">
											<xsl:if test='Individual/AddressInSpain!=""' >
												<xsl:value-of select="Individual/AddressInSpain/Address"/><br/>
												<xsl:value-of select="Individual/AddressInSpain/PostCode"/><font color="FFFFFF">_</font><font color="FFFFFF">_</font>
												<xsl:value-of select="Individual/AddressInSpain/Town"/><br/>
												<xsl:value-of select="Individual/AddressInSpain/Province"/><br/>
												<xsl:value-of select="Individual/AddressInSpain/CountryCode"/>
											</xsl:if>
											<xsl:if test='Individual/OverseasAddress!=""' >
												<xsl:value-of select="Individual/OverseasAddress/Address"/><br/>
												<xsl:value-of select="Individual/OverseasAddress/PostCodeAndTown"/><br/>
												<xsl:value-of select="Individual/OverseasAddress/Province"/><br/>
												<xsl:value-of select="Individual/OverseasAddress/CountryCode"/>
											</xsl:if>
										</td>												   	
									</tr>
									<xsl:if test='Individual/ContactDetails!=""' >
										<tr>											
											<td width="30%" colspan="3">
											<font class="titulopeque">
												DATOS DE CONTACTO:
											</font>
											</td>
										</tr>
										<tr>								
											<td colspan="3">
												<table border="0" cellpadding="0" cellspacing="0" width="100%">
													<tr>
														<td width="25%">
															<font class="titulopeque">Teléfono:</font><font color="FFFFFF">__</font>
															<xsl:value-of select="Individual/ContactDetails/Telephone"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Fax:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Individual/ContactDetails/TeleFax"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Web:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Individual/ContactDetails/WebAddress"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Email:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Individual/ContactDetails/ElectronicMail"/>
														</td>
													</tr>
													<tr>
														<td width="25%">
															<font class="titulopeque">Personas contacto:</font><font color="FFFFFF">__</font>
															<xsl:value-of select="Individual/ContactDetails/ContactPersons"/>
														</td>
														<td width="25%">
															<font class="titulopeque">CnoCnae:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Individual/ContactDetails/CnoCnae"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Código INE:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Individual/ContactDetails/INETownCode"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Otros:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Individual/ContactDetails/AdditionalContactDetails"/>
														</td>														
													</tr>
												</table>
											</td>        	
										</tr>
										</xsl:if>
								</xsl:if>					
							</table>
						</td>
					</tr>		
				</table>
			</td>
		</tr> 
	</xsl:template>
	<xsl:template match="//m:Facturae/FileHeader/FactoringAssignmentData">		 
		 <tr id="cesionario">
			 <td width="100%">
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
						 <td width="100%">
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td colspan="3">
										<font color="FFFFFF">_</font>
									</td>
								</tr>
								<tr>
									<td colspan="3">
										<hr/>
									</td>
								</tr>
								<tr>
									<td colspan="2">
										<font class="titulo2">
											DATOS CESIONARIO
										</font>
									</td>
									<td align="right">							
										<a id="datosCesionarioLink" href="javascript:mostrarCapa('datosCesionario')">Mostrar más datos</a>
									</td>
								</tr>
								<tr>
									<td colspan="3"><font color="FFFFFF">_</font></td>        	
								</tr>
								<tr>
									<xsl:if test='Assignee/LegalEntity!=""' >
										<td  width="50%" colspan="2">
											<font class="titulopeque">
												RAZÓN SOCIAL:
											</font>
											<font color="FFFFFF">__</font>
											<xsl:value-of select="Assignee/LegalEntity/CorporateName"/>								
										</td>        	
									</xsl:if>
									<xsl:if test='Assignee/Individual!=""' >
										<td  width="50%" colspan="2">
											<font class="titulopeque">
												NOMBRE Y APELLIDOS:
											</font>
											<font color="FFFFFF">__</font>
											<xsl:value-of select="Assignee/Individual/Name"/><font color="FFFFFF">_</font>
											<xsl:value-of select="Assignee/Individual/FirstSurname"/><font color="FFFFFF">_</font>
											<xsl:value-of select="Assignee/Individual/SecondSurname"/><font color="FFFFFF">_</font>
										</td>        	
									</xsl:if>
									<td width="50%">
										<font class="titulopeque">
											NIF / CIF:
										</font>
										<font color="FFFFFF">__</font>
										<xsl:value-of select="Assignee/TaxIdentification/TaxIdentificationNumber"/>
									</td>
								</tr>
								<tr>
									<td width="50%" colspan="2">
										<font class="titulopeque">
											CUENTA:
										</font>
										<font color="FFFFFF">__</font>
										<xsl:value-of select="PaymentDetails/IBAN"/>
									</td>        	
								</tr>
							</table>
						</td>
					</tr>
					<tr id="datosCesionario" style="display:none">
						<td width="100%">
							<table border="0" cellpadding="0" cellspacing="0" width="100%">							
								<tr>											
									<td width="50%" colspan="2">
										<font class="titulopeque">
											TIPO PERSONA:
										</font>
										<font color="FFFFFF">__</font>
										<xsl:choose>
											<xsl:when test='Assignee/TaxIdentification/PersonTypeCode="F"' >
												Física
											</xsl:when>
											<xsl:when test='Assignee/TaxIdentification/PersonTypeCode="J"' >
												Jurídica
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select="Assignee/TaxIdentification/PersonTypeCode"/>
											</xsl:otherwise>
										</xsl:choose>
									</td>
									<td width="50%">
										<font class="titulopeque">
											TIPO RESIDENCIA:
										</font>
										<font color="FFFFFF">__</font>
										<xsl:choose>
											<xsl:when test='Assignee/TaxIdentification/ResidenceTypeCode="E"' >
												Extranjero (fuera de la UE)
											</xsl:when>
											<xsl:when test='Assignee/TaxIdentification/ResidenceTypeCode="R"' >
												Residente (en España)
											</xsl:when>
											<xsl:when test='Assignee/TaxIdentification/ResidenceTypeCode="U"' >
												Residente en la Unión Europea (excepto España)
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select="Assignee/TaxIdentification/ResidenceTypeCode"/>
											</xsl:otherwise>
										</xsl:choose>
									</td>
								</tr>
								<tr>
									<td width="50%" colspan="2">
										<font class="titulopeque">
											FECHA DE PAGO:
										</font>
										<font color="FFFFFF">__</font>
										<xsl:value-of select="substring(PaymentDetails/AssignmentDuePaymentDate,9,2)"/>-<xsl:value-of select="substring(PaymentDetails/AssignmentDuePaymentDate,6,2)"/>-<xsl:value-of select="substring(PaymentDetails/AssignmentDuePaymentDate,1,4)"/>			
									</td>
									<td width="50%">
										<font class="titulopeque">
											FORMA DE PAGO:
										</font>
										<font color="FFFFFF">__</font>
										<xsl:choose>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="01"' >
												Contado
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="02"' >
												Recibo Domiciliario
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="03"' >
												Recibo
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="04"' >
												Transferencia
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="05"' >
												Letra Aceptada
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="06"' >
												Credito Documentado
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="07"' >
												Contrato Adjudicación
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="08"' >
												Letra
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="09"' >
												Pagaré a orden
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="10"' >
												Pagaré
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="11"' >
												Checque
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="12"' >
												Reposición
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="13"' >
												Especiales
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="14"' >
												Compensa
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="15"' >
												Giro
											</xsl:when>
											<xsl:when test='PaymentDetails/AssignmentPaymentMeans="16"' >
												SWIFT
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select="PaymentDetails/AssignmentPaymentMeans"/>
											</xsl:otherwise>
										</xsl:choose>							
									</td>
								</tr>								
								<tr>
									<td width="50%" colspan="2">
										<font class="titulopeque">
											REFERENCIA DE PAGO:
										</font>
										<font color="FFFFFF">__</font>
										<xsl:value-of select="PaymentDetails/PaymentReference"/>								
									</td>
									<td width="50%">
										<font class="titulopeque">
											CLÁUSULA:
										</font>
										<font color="FFFFFF">__</font>
										<xsl:value-of select="FactoringAssignmentClauses"/>								
									</td>        	
								</tr>
								<xsl:if test='Assignee/LegalEntity!=""' >
									<tr>
										<td valign="top" width="10%">
											<font class="titulopeque">
												DIRECCIÓN:
											</font>
										</td>        	
										<td valign="top" width="40%">
											<xsl:if test='Assignee/LegalEntity/AddressInSpain!=""' >
												<xsl:value-of select="Assignee/LegalEntity/AddressInSpain/Address"/><br/>
												<xsl:value-of select="Assignee/LegalEntity/AddressInSpain/PostCode"/><font color="FFFFFF">_</font><font color="FFFFFF">_</font>
												<xsl:value-of select="Assignee/LegalEntity/AddressInSpain/Town"/><br/>
												<xsl:value-of select="Assignee/LegalEntity/AddressInSpain/Province"/><br/>
												<xsl:value-of select="Assignee/LegalEntity/AddressInSpain/CountryCode"/>
											</xsl:if>
											<xsl:if test='Assignee/LegalEntity/OverseasAddress!=""' >
												<xsl:value-of select="Assignee/LegalEntity/OverseasAddress/Address"/><br/>
												<xsl:value-of select="Assignee/LegalEntity/OverseasAddress/PostCodeAndTown"/><br/>
												<xsl:value-of select="Assignee/LegalEntity/OverseasAddress/Province"/><br/>
												<xsl:value-of select="Assignee/LegalEntity/OverseasAddress/CountryCode"/>
											</xsl:if>
										</td>
										<xsl:if test='Assignee/LegalEntity/TradeName!=""' >
											<td valign="top" width="50%">
												<font class="titulopeque">
													NOMBRE COMERCIAL:
												</font>
												<font color="FFFFFF">__</font>
												<xsl:value-of select="Assignee/LegalEntity/TradeName"/>
											</td>        	
										</xsl:if>
									</tr>									
									<xsl:if test='Assignee/LegalEntity/RegistrationData!=""' >
										<tr>											
											<td width="30%" colspan="3">
											<font class="titulopeque">
												DATOS REGISTRALES:
											</font>
											</td>
										</tr>
										<tr>								
											<td colspan="3">
												<table border="0" cellpadding="0" cellspacing="0" width="100%">
													<tr>
														<td width="25%">
															<font class="titulopeque">Libro:</font><font color="FFFFFF">__</font>
															<xsl:value-of select="Assignee/LegalEntity/RegistrationData/Book"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Registro mercantil:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/LegalEntity/RegistrationData/RegisterOfCompaniesLocation"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Hoja:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/LegalEntity/RegistrationData/Sheet"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Folio:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/LegalEntity/RegistrationData/Folio"/>
														</td>
													</tr>
													<tr>
														<td width="25%">
															<font class="titulopeque">Sección:</font><font color="FFFFFF">__</font>
															<xsl:value-of select="Assignee/LegalEntity/RegistrationData/Section"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Tomo:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/LegalEntity/RegistrationData/Volume"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Otros:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/LegalEntity/RegistrationData/AdditionalRegistrationData"/>
														</td>															
													</tr>
												</table>
											</td>        	
										</tr>	
									</xsl:if>
									<xsl:if test='Assignee/LegalEntity/ContactDetails!=""' >
										<tr>											
											<td width="30%" colspan="3">
											<font class="titulopeque">
												DATOS DE CONTACTO:
											</font>
											</td>
										</tr>
										<tr>								
											<td colspan="3">
												<table border="0" cellpadding="0" cellspacing="0" width="100%">
													<tr>
														<td width="25%">
															<font class="titulopeque">Teléfono:</font><font color="FFFFFF">__</font>
															<xsl:value-of select="Assignee/LegalEntity/ContactDetails/Telephone"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Fax:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/LegalEntity/ContactDetails/TeleFax"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Web:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/LegalEntity/ContactDetails/WebAddress"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Email:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/LegalEntity/ContactDetails/ElectronicMail"/>
														</td>
													</tr>
													<tr>
														<td width="25%">
															<font class="titulopeque">Personas contacto:</font><font color="FFFFFF">__</font>
															<xsl:value-of select="Assignee/LegalEntity/ContactDetails/ContactPersons"/>
														</td>
														<td width="25%">
															<font class="titulopeque">CnoCnae:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/LegalEntity/ContactDetails/CnoCnae"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Código INE:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/LegalEntity/ContactDetails/INETownCode"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Otros:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/LegalEntity/ContactDetails/AdditionalContactDetails"/>
														</td>														
													</tr>
												</table>
											</td>        	
										</tr>
									</xsl:if>
								</xsl:if>
								<xsl:if test='Assignee/Individual!=""' >
									<tr>
										<td valign="top" width="10%">
											<font class="titulopeque">
												DIRECCIÓN:
											</font>
										</td>        	
										<td valign="top" width="40%">
											<xsl:if test='Assignee/Individual/AddressInSpain!=""' >
												<xsl:value-of select="Assignee/Individual/AddressInSpain/Address"/><br/>
												<xsl:value-of select="Assignee/Individual/AddressInSpain/PostCode"/><font color="FFFFFF">_</font><font color="FFFFFF">_</font>
												<xsl:value-of select="Assignee/Individual/AddressInSpain/Town"/><br/>
												<xsl:value-of select="Assignee/Individual/AddressInSpain/Province"/><br/>
												<xsl:value-of select="Assignee/Individual/AddressInSpain/CountryCode"/>
											</xsl:if>
											<xsl:if test='Assignee/Individual/OverseasAddress!=""' >
												<xsl:value-of select="Assignee/Individual/OverseasAddress/Address"/><br/>
												<xsl:value-of select="Assignee/Individual/OverseasAddress/PostCodeAndTown"/><br/>
												<xsl:value-of select="Assignee/Individual/OverseasAddress/Province"/><br/>
												<xsl:value-of select="Assignee/Individual/OverseasAddress/CountryCode"/>
											</xsl:if>
										</td>        	
									</tr>
									<xsl:if test='Assignee/Individual/ContactDetails!=""' >
										<tr>											
											<td width="30%" colspan="3">
											<font class="titulopeque">
												DATOS DE CONTACTO:
											</font>
											</td>
										</tr>
										<tr>								
											<td colspan="3">
												<table border="0" cellpadding="0" cellspacing="0" width="100%">
													<tr>
														<td width="25%">
															<font class="titulopeque">Teléfono:</font><font color="FFFFFF">__</font>
															<xsl:value-of select="Assignee/Individual/ContactDetails/Telephone"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Fax:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/Individual/ContactDetails/TeleFax"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Web:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/Individual/ContactDetails/WebAddress"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Email:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/Individual/ContactDetails/ElectronicMail"/>
														</td>
													</tr>
													<tr>
														<td width="25%">
															<font class="titulopeque">Personas contacto:</font><font color="FFFFFF">__</font>
															<xsl:value-of select="Assignee/Individual/ContactDetails/ContactPersons"/>
														</td>
														<td width="25%">
															<font class="titulopeque">CnoCnae:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/Individual/ContactDetails/CnoCnae"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Código INE:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/Individual/ContactDetails/INETownCode"/>
														</td>
														<td width="25%">
															<font class="titulopeque">Otros:</font><font color="FFFFFF">___</font>
															<xsl:value-of select="Assignee/Individual/ContactDetails/AdditionalContactDetails"/>
														</td>														
													</tr>
												</table>
											</td>        	
										</tr>
									</xsl:if>
								</xsl:if>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</xsl:template>
	<xsl:template match="//m:Facturae/Invoices/Invoice">	
		<xsl:variable name="numFactura" select="InvoiceHeader/InvoiceNumber"/>		
		<tr id="{$numFactura}" style="display:none">
			<td width="100%">
				<table border="0" cellpadding="0" cellspacing="0" width="100%">					
					<tr>
						<td><font color="FFFFFF">_</font></td>
					</tr>
					<tr>
						<td>
							<hr/>
						</td>
					</tr>
					<tr>
						<td>
							<font class="titulo2">RESUMEN FACTURA</font>
						</td>
					</tr>
					<tr>
						<td><font color="FFFFFF">_</font></td>
					</tr>
					<tr>
						<td width="100%">
							<table border="1" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td>
										<table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td align="center" width="25%">
													<font class="titulopeque">NUMERO</font>
													<br/><xsl:value-of select="InvoiceHeader/InvoiceNumber"/>
												</td>																	
												<td align="center" width="25%">
													<font class="titulopeque">SERIE</font>
													<br/>
													<xsl:choose>
														<xsl:when test='InvoiceHeader/InvoiceSeriesCode!=""' >
															<xsl:value-of select="InvoiceHeader/InvoiceSeriesCode"/>
														</xsl:when>
														<xsl:otherwise>
															-
														</xsl:otherwise>
													</xsl:choose>																			
												</td>
												<td align="center" width="25%">
													<font class="titulopeque">TIPO</font>
													<br/>
													<xsl:choose>
														<xsl:when test='InvoiceHeader/InvoiceDocumentType="FC"' >
															Factura Completa
														</xsl:when>
														<xsl:when test='InvoiceHeader/InvoiceDocumentType="FA"' >
															Factura Abreviada
														</xsl:when>
														<xsl:when test='InvoiceHeader/InvoiceDocumentType="AF"' >
															Autofactura
														</xsl:when>
														<xsl:otherwise>
															<xsl:value-of select="InvoiceHeader/InvoiceDocumentType"/>
														</xsl:otherwise>
													</xsl:choose>
												</td>
												<td align="center" width="25%">
													<font class="titulopeque">CLASE</font>
													<br/>
													<xsl:choose>
														<xsl:when test='InvoiceHeader/InvoiceClass="OO"' >
															Original
														</xsl:when>
														<xsl:when test='InvoiceHeader/InvoiceClass="OR"' >
															Original Rectificativa
														</xsl:when>
														<xsl:when test='IInvoiceHeader/InvoiceClass="OC"' >
															Original Recapitulativa
														</xsl:when>
														<xsl:when test='IInvoiceHeader/InvoiceClass="CO"' >
															Copia Original
														</xsl:when>
														<xsl:when test='InvoiceHeader/InvoiceClass="CR"' >
															Copia Rectificativa
														</xsl:when>
														<xsl:when test='InvoiceHeader/InvoiceClass="CC"' >
															Copia Recapitulativa
														</xsl:when>
														<xsl:otherwise>
															<xsl:value-of select="InvoiceHeader/InvoiceClass"/>
														</xsl:otherwise>
													</xsl:choose>
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td>
										<table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td align="center" width="25%">
													<font class="titulopeque">FECHA EXPED.</font>
													<br/>
														<xsl:value-of select="substring(InvoiceIssueData/IssueDate,9,2)"/>-<xsl:value-of select="substring(InvoiceIssueData/IssueDate,6,2)"/>-<xsl:value-of select="substring(InvoiceIssueData/IssueDate,1,4)"/>
												</td>
												<td align="center" width="25%">
													<font class="titulopeque">LUGAR EXPED.</font>
													<br/>
													<xsl:choose>
														<xsl:when test='InvoiceIssueData/PlaceOfIssue!=""' >
															<xsl:value-of select="InvoiceIssueData/PlaceOfIssue/PostCode"/><font color="FFFFFF">_</font><xsl:value-of select="InvoiceIssueData/PlaceOfIssue/PlaceOfIssueDescription"/>
														</xsl:when>
														<xsl:otherwise>
															-
														</xsl:otherwise>
													</xsl:choose>
												</td>
												<td align="center" width="25%">																		
													<font class="titulopeque">PERIODO FACT.</font>
													<br/>
													<xsl:choose>
														<xsl:when test='InvoiceIssueData/InvoicingPeriod!=""' >
															<xsl:value-of select="substring(InvoiceIssueData/InvoicingPeriod/StartDate,9,2)"/>-<xsl:value-of select="substring(InvoiceIssueData/InvoicingPeriod/StartDate,6,2)"/>-<xsl:value-of select="substring(InvoiceIssueData/InvoicingPeriod/StartDate,1,4)"/> - 
															<xsl:value-of select="substring(InvoiceIssueData/InvoicingPeriod/EndDate,9,2)"/>-<xsl:value-of select="substring(InvoiceIssueData/InvoicingPeriod/EndDate,6,2)"/>-<xsl:value-of select="substring(InvoiceIssueData/InvoicingPeriod/EndDate,1,4)"/>
														</xsl:when>
														<xsl:otherwise>
															-
														</xsl:otherwise>
													</xsl:choose>
												</td>
												<td align="center" width="25%">
													<font class="titulopeque">LENGUA</font>
													<br/>
													<xsl:choose>
														<xsl:when test='InvoiceIssueData/LanguageName!=""' >
															<xsl:value-of select="InvoiceIssueData/LanguageName"/>
														</xsl:when>
														<xsl:otherwise>
															-
														</xsl:otherwise>
													</xsl:choose>
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td>
										<table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td align="center" width="25%">
													<font class="titulopeque">MONEDA OPERACIÓN</font><br/>
													<xsl:value-of select="InvoiceIssueData/InvoiceCurrencyCode"/>
												</td>
												<xsl:if test='InvoiceIssueData/InvoiceCurrencyCode!="EUR"'>
													<td align="center" width="25%">
														<font class="titulopeque">TIPO CAMBIO</font>
														<br/><xsl:value-of select="InvoiceIssueData/ExchangeRate"/>
													</td>
													<td align="center" width="25%">
														<font class="titulopeque">FECHA TIPO CAMBIO</font>
														<br/><xsl:value-of select="substring(InvoiceIssueData/ExchangeRateDate,9,2)"/>-<xsl:value-of select="substring(InvoiceIssueData/ExchangeRateDate,6,2)"/>-<xsl:value-of select="substring(InvoiceIssueData/ExchangeRateDate,1,4)"/>
													</td>
												</xsl:if>
												<td align="center" width="25%">
													<font class="titulopeque">MONEDA IMPUESTO</font>
													<br/><xsl:value-of select="InvoiceIssueData/TaxCurrencyCode"/>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>											
					</tr>					
					<xsl:apply-templates select="InvoiceHeader/Corrective"/>
					<tr>
						<td><font color="FFFFFF">_</font></td>
					</tr>
					<tr>
						<td>
							<hr/>
						</td>
					</tr>
					<tr>
						<td>
							<font class="titulo2">DETALLES</font>
						</td>
					</tr>
					<tr>
						<td><font color="FFFFFF">_</font></td>
					</tr>
					<tr>
						<td width="100%">
							<table border="1" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td width="48%" align="center">
										<font class="titulopeque">DESCRIPCIÓN</font>
									</td>
									<td width="12%" align="center">
										<font class="titulopeque">FECHA OPER.</font>
									</td>
									<td width="10%" align="center">
										<font class="titulopeque">CANTIDAD</font>
									</td>
									<td width="15%" align="center">
										<font class="titulopeque">IMP. UNITARIO</font>
									</td>
									<td width="15%" align="center">
										<font class="titulopeque">TOTAL</font>
									</td>
								</tr>
								<xsl:for-each select="Items/InvoiceLine">
									<tr style="cursor:hand" onclick="mostrarDetalle('{$numFactura}','{ItemDescription}')" onMouseOver="this.style.background='#DDEEEE'" onMouseOut="this.style.background='#FFFFFF'">
										<td width="48%" valign="top">
											<xsl:apply-templates select="ItemDescription"/>
										</td>
										<td width="12%" valign="top" align="center">
											<xsl:choose>
												<xsl:when test='TransactionDate!=""' >
													<xsl:value-of select="substring(TransactionDate,9,2)"/>-<xsl:value-of select="substring(TransactionDate,6,2)"/>-<xsl:value-of select="substring(TransactionDate,1,4)"/>
												</xsl:when>
												<xsl:otherwise>
													<font color="FFFFFF">_</font>
												</xsl:otherwise>
											</xsl:choose>
										</td>
										<td width="10%" valign="top" align="right">
											<xsl:variable name="decimales"><xsl:value-of select="Quantity"/></xsl:variable>
											<xsl:value-of select="format-number(./Quantity,'#.##0,0')"/> 
										</td>
										<td width="15%" valign="top" align="right">
											<xsl:variable name="decimales"><xsl:value-of select="UnitPriceWithoutTax"/></xsl:variable>
											<xsl:value-of select="format-number(./UnitPriceWithoutTax,'#.##0,000000')"/>
										</td>
										<td width="15%" valign="top" align="right">
											<xsl:variable name="decimales"><xsl:value-of select="TotalCost"/></xsl:variable>
											<xsl:value-of select="format-number(./TotalCost,'#.##0,00')"/>
										</td>
									</tr>
								</xsl:for-each>
							</table>
						</td>
					</tr>
					<tr>
						<td><font color="FFFFFF">_</font></td>
					</tr>
					<tr>
						<td>
							<hr/>
						</td>
					</tr>
					<tr>
						<td width="100%">
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td>
										<font class="titulo2">IMPORTES</font>
									</td>
								</tr>
								<tr>
									<td><font color="FFFFFF">_</font></td>
								</tr>
								<tr>
									<td width="100%">
										<table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td width="80%" align="right">
													<font class="titulopeque">IMPORTE BRUTO<font color="FFFFFF">___</font></font>
												</td>
												<td width="20%" align="center">
													<table border="1" cellpadding="0" cellspacing="0" width="100%">
														<tr>
															<td align="right">
																<font class="titulopeque">
																	<xsl:variable name="decimales"><xsl:value-of select="InvoiceTotals/TotalGrossAmount"/></xsl:variable>
																	<xsl:value-of select="format-number(InvoiceTotals/TotalGrossAmount,'#.##0,00')"/> 
																</font>
															</td>
														</tr>
													</table>
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<xsl:if test='InvoiceTotals/GeneralDiscounts!=""' >
								<tr>
									<td>									
										<font class="titulopeque"><i>DESCUENTOS</i></font>
										<table border="1" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td width="70%" valign="top" align="center">
													<font class="titulopeque">CONCEPTO</font>
												</td>
												<td width="10%" valign="top" align="center">
													<font class="titulopeque">TIPO (%)</font>
												</td>
												<td width="20%" valign="top" align="center">
													<font class="titulopeque">IMPORTE</font>
												</td>
											</tr>
											<tr>
												<td width="70%" valign="top">
													<table border="0" cellpadding="0" cellspacing="0" width="100%">
														<xsl:for-each select="InvoiceTotals/GeneralDiscounts/Discount">
															<tr>
																<td width="100%">
																	<xsl:apply-templates select="DiscountReason"/>
																</td>
															</tr>
														</xsl:for-each>
													</table>
												</td>
												<td width="10%" valign="top">
													<table border="0" cellpadding="0" cellspacing="0" width="100%">
														<xsl:for-each select="InvoiceTotals/GeneralDiscounts/Discount">
															<tr>
																<td width="100%" align="center">
																	<xsl:choose>
																		<xsl:when test='DiscountRate!=""' >
																			<xsl:variable name="decimales"><xsl:value-of select="DiscountRate"/></xsl:variable>
																			<xsl:value-of select="format-number(./DiscountRate,'#.##0,0000')"/>																			
																		</xsl:when>
																		<xsl:otherwise>
																			-
																		</xsl:otherwise>
																	</xsl:choose>																	
																</td>
															</tr>
														</xsl:for-each>
													</table>
												</td>
												<td width="20%" valign="top">
													<table border="0" cellpadding="0" cellspacing="0" width="100%">
														<xsl:for-each select="InvoiceTotals/GeneralDiscounts/Discount">
															<tr>
																<td align="right">
																	<xsl:variable name="decimales"><xsl:value-of select="DiscountAmount"/></xsl:variable>
																	<xsl:value-of select="format-number(./DiscountAmount,'#.##0,00')"/>
																</td>
															</tr>
														</xsl:for-each>
													</table>
												</td>
											</tr>
										</table>							
									</td>
								</tr>
								<tr>
									<td><font color="FFFFFF">_</font></td>
								</tr>
								<tr>
									<td width="100%">
										<table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td width="80%" align="right">
													<font class="titulopeque">TOTAL DESCUENTOS<font color="FFFFFF">___</font></font>
												</td>
												<td width="20%" align="center">
													<table border="1" cellpadding="0" cellspacing="0" width="100%">
														<tr>
															<td align="right">
																<font class="titulopeque">
																	<xsl:variable name="decimales"><xsl:value-of select="InvoiceTotals/TotalGeneralDiscounts"/></xsl:variable>
																	<xsl:value-of select="format-number(./InvoiceTotals/TotalGeneralDiscounts,'#.##0,00')"/>
																</font>
															</td>
														</tr>
													</table>
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td><font color="FFFFFF">_</font></td>
								</tr>
								</xsl:if>
								<xsl:if test='InvoiceTotals/GeneralSurcharges!=""' >
								<tr>
									<td>									
										<font class="titulopeque"><i>RECARGOS</i></font>
										<table border="1" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td width="70%" valign="top" align="center">
													<font class="titulopeque">CONCEPTO</font>
												</td>
												<td width="10%" valign="top" align="center">
													<font class="titulopeque">TIPO (%)</font>
												</td>
												<td width="20%" valign="top" align="center">
													<font class="titulopeque">IMPORTE</font>
												</td>
											</tr>
											<tr>
												<td width="70%" valign="top">
													<table border="0" cellpadding="0" cellspacing="0" width="100%">
														<xsl:for-each select="InvoiceTotals/GeneralSurcharges/Charge">
															<tr>
																<td width="100%">
																	<xsl:apply-templates select="ChargeReason"/>
																</td>
															</tr>
														</xsl:for-each>
													</table>
												</td>
												<td width="10%" valign="top">
													<table border="0" cellpadding="0" cellspacing="0" width="100%">
														<xsl:for-each select="InvoiceTotals/GeneralSurcharges/Charge">
															<tr>
																<td width="100%" align="center">
																	<xsl:choose>
																		<xsl:when test='ChargeRate!=""' >
																			<xsl:variable name="decimales"><xsl:value-of select="ChargeRate"/></xsl:variable>
																			<xsl:value-of select="format-number(./ChargeRate,'#.##0,0000')"/>
																		</xsl:when>
																		<xsl:otherwise>
																			-
																		</xsl:otherwise>
																	</xsl:choose>
																</td>
															</tr>
														</xsl:for-each>
													</table>
												</td>
												<td width="20%" valign="top">
													<table border="0" cellpadding="0" cellspacing="0" width="100%">
														<xsl:for-each select="InvoiceTotals/GeneralSurcharges/Charge">
															<tr>
																<td align="right">
																	<xsl:variable name="decimales"><xsl:value-of select="ChargeAmount"/></xsl:variable>
																	<xsl:value-of select="format-number(./ChargeAmount,'#.##0,00')"/>
																</td>
															</tr>
														</xsl:for-each>
													</table>
												</td>
											</tr>
										</table>					
									</td>
								</tr>
								<tr>
									<td><font color="FFFFFF">_</font></td>
								</tr>
								<tr>
									<td width="100%">
										<table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td width="80%" align="right">
													<font class="titulopeque">TOTAL RECARGOS<font color="FFFFFF">___</font></font>
												</td>
												<td width="20%" align="center">
													<table border="1" cellpadding="0" cellspacing="0" width="100%">
														<tr>
															<td align="right">
																<font class="titulopeque">
																	<xsl:variable name="decimales"><xsl:value-of select="InvoiceTotals/TotalGeneralSurcharges"/></xsl:variable>
																	<xsl:value-of select="format-number(./InvoiceTotals/TotalGeneralSurcharges,'#.##0,00')"/>
																</font>
															</td>
														</tr>
													</table>
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td><font color="FFFFFF">_</font></td>
								</tr>
								</xsl:if>
								<tr>
									<td width="100%">
										<table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td width="80%" align="right">
													<font class="titulopeque">TOTAL IMPORTE BRUTO ANTES IMPUESTOS<font color="FFFFFF">___</font></font>
												</td>
												<td width="20%" align="center">
													<table border="1" cellpadding="0" cellspacing="0" width="100%">
														<tr>
															<td align="right">
																<font class="titulopeque">
																	<xsl:variable name="decimales"><xsl:value-of select="InvoiceTotals/TotalGrossAmountBeforeTaxes"/></xsl:variable>
																	<xsl:value-of select="format-number(./InvoiceTotals/TotalGrossAmountBeforeTaxes,'#.##0,00')"/>
																</font>
															</td>
														</tr>
													</table>
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td><font color="FFFFFF">_</font></td>
								</tr>
								<xsl:if test='TaxesOutputs!=""' >
								<tr>
									<td>									
										<font class="titulopeque"><i>IMPUESTOS REPERCUTIDOS</i></font>
										<xsl:choose>
											<xsl:when test='//m:Facturae/FileHeader/Batch/InvoiceCurrencyCode="EUR"'>
												<table border="1" cellpadding="0" cellspacing="0" width="100%">
													<tr>
														<td width="50%" valign="top" align="center">
															<font class="titulopeque">CLASE DE IMPUESTO</font>
														</td>
														<td width="10%" valign="top" align="center">
															<font class="titulopeque">TIPO (%)</font>
														</td>
														<td width="20%" valign="top" align="center">
															<font class="titulopeque">BASE IMPONIBLE</font>
														</td>
														<td width="20%" valign="top" align="center">
															<font class="titulopeque">CUOTA</font>
														</td>
													</tr>
													<tr>
														<td width="50%" valign="top">
															<table border="0" cellpadding="0" cellspacing="0" width="100%">
																	<tr>
																		<td width="100%">
																			<xsl:choose>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="01"' >
																					IVA
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="02"' >
																					IPSI
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="03"' >
																					IGIC
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="04"' >
																					IRPF
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="05"' >
																					ITPAJD
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="06"' >
																					IE
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="07"' >
																					Ra
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="08"' >
																					ICTECM
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="09"' >
																					IECDPCAC
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="11"' >
																					IIIMAB
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="12"' >
																					OCIO
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="13"' >
																					IMVDM
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="14"' >
																					IMSM
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="15"' >
																					IMGSM
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="16"' >
																					IMPN
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="17"' >
																					No sujeto
																				</xsl:when>
																				<xsl:otherwise>
																					<xsl:value-of select="TaxesOutputs/Tax/TaxTypeCode"/>
																				</xsl:otherwise>
																			</xsl:choose>
																		</td>
																	</tr>
															</table>
														</td>
														<td width="10%" valign="top">
															<table border="0" cellpadding="0" cellspacing="0" width="100%">
																<xsl:for-each select="TaxesOutputs/Tax">
																	<tr>
																		<td width="100%" align="center">
																			<xsl:choose>
																				<xsl:when test='TaxRate!=""' >
																					<xsl:variable name="decimales"><xsl:value-of select="TaxRate"/></xsl:variable>
																					<xsl:value-of select="format-number(./TaxRate,'#.##0,00')"/>
																				</xsl:when>
																				<xsl:otherwise>
																					-
																				</xsl:otherwise>
																			</xsl:choose>
																		</td>
																	</tr>
																</xsl:for-each>
															</table>
														</td>
														<td width="10%" valign="top">
															<table border="0" cellpadding="0" cellspacing="0" width="100%">
																<xsl:for-each select="TaxesOutputs/Tax">
																	<tr>
																		<td width="100%" align="right">
																			<xsl:choose>
																				<xsl:when test='TaxableBase!=""' >
																					<xsl:variable name="decimales"><xsl:value-of select="TaxableBase/TotalAmount"/></xsl:variable>
																					<xsl:value-of select="format-number(./TaxableBase/TotalAmount,'#.##0,00')"/>																					
																				</xsl:when>
																				<xsl:otherwise>
																					-
																				</xsl:otherwise>
																			</xsl:choose>																		
																		</td>
																	</tr>
																</xsl:for-each>
															</table>
														</td>
														<td width="20%" valign="top">
															<table border="0" cellpadding="0" cellspacing="0" width="100%">
																<xsl:for-each select="TaxesOutputs/Tax">
																	<tr>
																		<td align="right">
																			<xsl:choose>
																				<xsl:when test='TaxAmount!=""' >
																					<xsl:variable name="decimales"><xsl:value-of select="TaxAmount/TotalAmount"/></xsl:variable>
																					<xsl:value-of select="format-number(./TaxAmount/TotalAmount,'#.##0,00')"/>																				
																				</xsl:when>
																				<xsl:otherwise>
																					-
																				</xsl:otherwise>
																			</xsl:choose>
																		</td>
																	</tr>
																</xsl:for-each>
															</table>
														</td>
													</tr>
												</table>
											</xsl:when>
											<xsl:otherwise>
												<table border="1" cellpadding="0" cellspacing="0" width="100%">
													<tr>
														<td width="30%" align="center" rowspan="2">
															<font class="titulopeque">CLASE DE IMPUESTO</font>
														</td>
														<td width="10%" align="center" rowspan="2">
															<font class="titulopeque">TIPO (%)</font>
														</td>
														<td width="30%" valign="top" align="center" colspan="2">
															<font class="titulopeque">BASE IMPONIBLE</font>
														</td>
														<td width="30%" valign="top" align="center" colspan="2">
															<font class="titulopeque">CUOTA</font>
														</td>
													</tr>
													<tr>
														<td valign="top" align="center">
															<font class="titulopeque">Importe</font>
														</td>
														<td valign="top" align="center">
															<font class="titulopeque">Contravalor</font>
														</td>
														<td valign="top" align="center">														
															<font class="titulopeque">Importe</font>
														</td>
														<td valign="top" align="center">
															<font class="titulopeque">Contravalor</font>
														</td>
													</tr>
													<tr>
														<td width="30%" valign="top">
															<table border="0" cellpadding="0" cellspacing="0" width="100%">
																	<tr>
																		<td width="100%">
																			<xsl:choose>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="01"' >
																					IVA
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="02"' >
																					IPSI
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="03"' >
																					IGIC
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="04"' >
																					IRPF
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="05"' >
																					ITPAJD
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="06"' >
																					IE
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="07"' >
																					Ra
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="08"' >
																					ICTECM
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="09"' >
																					IECDPCAC
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="11"' >
																					IIIMAB
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="12"' >
																					OCIO
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="13"' >
																					IMVDM
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="14"' >
																					IMSM
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="15"' >
																					IMGSM
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="16"' >
																					IMPN
																				</xsl:when>
																				<xsl:when test='TaxesOutputs/Tax/TaxTypeCode="17"' >
																					No sujeto
																				</xsl:when>
																				<xsl:otherwise>
																					<xsl:value-of select="TaxesOutputs/Tax/TaxTypeCode"/>
																				</xsl:otherwise>
																			</xsl:choose>
																		</td>
																	</tr>
															</table>
														</td>
														<td width="10%" valign="top">
															<table border="0" cellpadding="0" cellspacing="0" width="100%">
																<xsl:for-each select="TaxesOutputs/Tax">
																	<tr>
																		<td width="100%" align="center">
																			<xsl:choose>
																				<xsl:when test='TaxRate!=""' >
																					<xsl:variable name="decimales"><xsl:value-of select="TaxRate"/></xsl:variable>
																					<xsl:value-of select="format-number(./TaxRate,'#.##0,00')"/>
																				</xsl:when>
																				<xsl:otherwise>
																					-
																				</xsl:otherwise>
																			</xsl:choose>
																		</td>
																	</tr>
																</xsl:for-each>
															</table>
														</td>
														<td width="15%" valign="top">
															<table border="0" cellpadding="0" cellspacing="0" width="100%">
																<xsl:for-each select="TaxesOutputs/Tax">
																	<tr>
