<?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="2346.xml" -->
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:m="http://www.facturae.es/Facturae/2009/v3.2/Facturae" xmlns:xades="http://uri.etsi.org/01903/v1.2.2#">
<xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD HTML 4.01//EN" doctype-system="http://www.w3.org/TR/html4/strict.dtd"/>
<xsl:template match="/">

<xsl:variable name="FormaPago" select="m:Facturae/Invoices/Invoice/PaymentDetails/Installment/PaymentMeans"/>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Documento sin título</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<style type="text/css">
<xsl:comment>
#azul {
	background-color:#0074a8;
	padding-top:10px;
	padding-left:10px;
	padding-right:10px;
	padding-bottom:10px;
	    border-radius: 15px;}
		#blanca {
			background-color:#FFF;
		
			 border-radius: 15px;
			}
			.tr factura {
				background-color:#0CC;}
.encabezado2 {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	font-weight: bold;
	margin: 0px;
	padding-left: 20px;
}
.datos {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	margin-left: 20px;
	padding-left: 20px;
}
.encabezado {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	text-transform: capitalize;
	font-weight: bold;
	text-align: left;
}
.tituloscuadro {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	margin-top: 10px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
padding-left: 20px;
}
.datos {
	padding-top: 10px;
	padding-left: 20px;
}
.logo {
	margin-left: 20px;
	padding-left: 20px;
}
.datoscabecera {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	text-align: left;
}
.encabezadoemisor {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	font-weight: bolder;
	padding-left: 20px;
	text-align: center;
}
.datosemisor {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;

	padding-left: 20px;
}
.web {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	font-weight: normal;
	color: #0080C0;
	text-align: center;
}
.periodofacturacion {
	font-family: Verdana, Geneva, sans-serif;
	padding-left: 20px;
	font-size: 12px;
}
</xsl:comment>
/* Ocultar botón radio */
input[id^="mas"]{
display: none;
}
/* Estilo botón clicable */
input[id^="mas"] + label {
display: block;
width: 200px;
margin: 0 auto;
padding: 5px 20px;
background: #e1a;
cursor: pointer;
}
/* Estilo botón cuando su INPUT está seleccionado */

#toggle-view {
	list-style:none;	
	font-family:arial;
	font-size:11px;
	margin:0;
	padding:0;

	
}

	#toggle-view li {
		margin:10px;
		border-bottom:1px solid #ccc;
		position:relative;
		cursor:pointer;
	}
	
	#toggle-view h3 {
		margin:0;
		font-size:14px;
	}

	#toggle-view span {
	position:absolute;
	right:-22px;
	top:0px;
	color:#ccc;
	font-size:13px;
	width: 29px;
	}
	
	#toggle-view .panel {
		margin:1px 0;
		display:none;
	}	


.observaciones {
	text-align: justify;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	padding-left: 20px;
}
.parrafo {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	text-align: justify;
	padding-top: 0px;
	padding-right: 0px;
	padding-bottom: 0px;
	padding-left: 20px;
}
.cuadro {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	font-weight: bold;
}
.izquierda {
	text-align: left;
}
</style><script type="text/javascript">

$(document).ready(function () {
	
	$('#toggle-view li').click(function () {

		var text = $(this).children('div.panel');

		if (text.is(':hidden')) {
			text.slideDown('200');
			$(this).children('span').html('-');		
		} else {
			text.slideUp('200');
			$(this).children('span').html('+');		
		}
		
	});

});

</script></head>

<body>
<table id="azul" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="middle"><table id="blanca" cellspacing="0" cellpadding="0">
      <tr>
        <td height="47" colspan="7" align="center" valign="middle" class="logo"><span class="web">www.zerocoma.com</span></td>
      </tr>
      <tr>
        <td colspan="7" align="left" valign="middle" class="logo">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2" align="left" valign="middle" class="logo">&nbsp;</td>
        <td colspan="5">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2" align="left" valign="middle" class="logo">&nbsp;</td>
        <td colspan="5" class="encabezado">Cliente:</td>
      </tr>
      <tr>
        <td colspan="2" align="left" valign="middle" class="logo">&nbsp;</td>
        <td height="19" colspan="5" class="datoscabecera"><xsl:value-of select="m:Facturae/Parties/BuyerParty/LegalEntity/CorporateName"/></td>
      </tr>
      <tr>
        <td colspan="2" align="left" valign="middle" class="logo">&nbsp;</td>
        <td height="19" colspan="5" class="encabezado">Dirección:</td>
      </tr>
      <tr>
        <td colspan="2" align="left" valign="middle" class="logo">&nbsp;</td>
        <td height="19" colspan="5" class="datoscabecera"><xsl:value-of select="m:Facturae/Parties/BuyerParty/LegalEntity/AddressInSpain/Address"/></td>
      </tr>
      <tr>
        <td colspan="2" align="left" valign="middle" class="logo">&nbsp;</td>
        <td height="19" colspan="5" class="datoscabecera"><xsl:value-of select="m:Facturae/Parties/BuyerParty/LegalEntity/AddressInSpain/PostCode"/>&nbsp;<xsl:value-of select="m:Facturae/Parties/BuyerParty/LegalEntity/AddressInSpain/Town"/></td>
      </tr>
      <tr>
        <td height="19" colspan="2" class="encabezado2">Emisor de la factura:</td>
        <td height="19" colspan="5" class="datoscabecera"><xsl:value-of select="m:Facturae/Parties/SellerParty/LegalEntity/AddressInSpain/Province"/></td>
      </tr>
      <tr>
        <td height="19" colspan="2" class="datos"><xsl:value-of select="m:Facturae/Parties/SellerParty/LegalEntity/CorporateName"/></td>
        <td height="19" colspan="5" class="datoscabecera"><xsl:value-of select="m:Facturae/Parties/BuyerParty/LegalEntity/AddressInSpain/CountryCode"/></td>
      </tr>
      <tr>
        <td height="22" colspan="2" class="encabezadoemisor"></td>
        <td height="22" colspan="5">&nbsp;</td>
      </tr>
      <tr>
        <td height="11" colspan="2" class="encabezadoemisor"></td>
        <td height="11" colspan="5">&nbsp;</td>
      </tr>
      <tr id="factura">
        <td height="24" bgcolor="#CCCCCC" class="tituloscuadro">Nº FACTURA</td>
        <td colspan="2" bgcolor="#CCCCCC" class="tituloscuadro">FECHA</td>
        <td colspan="3" bgcolor="#CCCCCC" class="tituloscuadro">PERIODO FACTURACIÓN</td>
      </tr>
      <tr>
        <td height="45" class="datosemisor"><xsl:value-of select="m:Facturae/Invoices/Invoice/InvoiceHeader/InvoiceNumber"/></td>
        <td height="45" colspan="2" class="datosemisor"><xsl:value-of select="m:Facturae/Invoices/Invoice/InvoiceIssueData/IssueDate"/></td>
        <td colspan="2" class="datosemisor">Desde:&nbsp;<xsl:value-of select="m:Facturae/Invoices/Invoice/InvoiceIssueData/InvoicingPeriod/StartDate"/> </td>
        <td width="156" class="datoscabecera"> Hasta: <xsl:value-of select="m:Facturae/Invoices/Invoice/InvoiceIssueData/InvoicingPeriod/EndDate"/></td>
      </tr>
      <tr>
        <td height="24" bordercolor="#CCCCCC" bgcolor="#CCCCCC" class="tituloscuadro"><xsl:text disable-output-escaping="yes"> Descripción</xsl:text></td>
        <td colspan="2"  bordercolor="#CCCCCC" bgcolor="#CCCCCC" class="tituloscuadro"><xsl:text disable-output-escaping="yes"> Cantidad </xsl:text></td>
        <td bgcolor="#CCCCCC" class="tituloscuadro"><xsl:text disable-output-escaping="yes"> Precio Unitario</xsl:text></td>
        <td bgcolor="#CCCCCC" class="tituloscuadro"><xsl:text disable-output-escaping="yes"> Descuento</xsl:text></td>
        <td bgcolor="#CCCCCC" class="tituloscuadro"><xsl:text disable-output-escaping="yes"> Importe Total </xsl:text></td>
      </tr>
      <xsl:for-each select="m:Facturae/Invoices/Invoice/Items/InvoiceLine">
        <tr>
          <td align="left" height="45" class="datosemisor"><ul id="toggle-view">
            <li> <xsl:value-of select="ItemDescription"/> <span>+</span>
              <div class="panel">Nº de expediente: <xsl:value-of select="ReceiverTransactionReference"/></div>
                <div class="panel">Fecha de expediente:<xsl:value-of select="FileDate"/></div>
                  <div class="panel">Nº de secuencia: <xsl:value-of select="SequenceNumber"/></div>
                   <div class="panel">Número del albarán: <xsl:value-of select="DeliveryNotesReferences/DeliveryNote/DeliveryNoteNumber"/></div>
                    <div class="panel">Fecha del albarán: <xsl:value-of select="DeliveryNotesReferences/DeliveryNote/DeliveryNoteDate"/></div>
            </li>
          </ul></td>
          <td height="45" colspan="2" class="datosemisor"><xsl:value-of select="Quantity"/></td>
          <td width="89" class="datosemisor"><xsl:value-of select="UnitPriceWithoutTax"/></td>
          <td width="90" class="datosemisor"><xsl:value-of select="DiscountsAndRebates/Discount/DiscountAmount"/></td>
          <td width="156" class="datosemisor"><xsl:value-of select="TotalCost"/></td>
        </tr>
      </xsl:for-each>
      
      <tr>
        <td height="19" colspan="8">&nbsp;</td>
      </tr>
      <tr>
        <td height="12" colspan="6" class="encabezadoemisor">&nbsp;</td>
        </tr>
      <tr>
        <td height="18" bgcolor="#CCCCCC" class="encabezado2"> <xsl:text disable-output-escaping="yes"> Base Imponible</xsl:text></td>
        <td width="112" height="18" colspan="-1" bgcolor="#CCCCCC" class="encabezado2"> <xsl:text disable-output-escaping="yes">Tipo IVA%</xsl:text></td>
        <td colspan="3" bgcolor="#CCCCCC" class="encabezado2"><xsl:text disable-output-escaping="yes">Cuota IVA</xsl:text></td>
        <td bgcolor="#CCCCCC" class="encabezado2">SUBTOTAL</td>
      </tr>
               <xsl:for-each select=" m:Facturae/Invoices/Invoice/Items/InvoiceLine">
        <tr>

<td height="19" valign="top" class="datosemisor"><xsl:value-of select="TaxesOutputs/Tax/TaxableBase/TotalAmount"/></td>
        <td colspan="-1" valign="middle" class="datosemisor"><xsl:value-of select="TaxesOutputs/Tax/TaxRate"/></td>
        <td height="19" colspan="3" valign="middle" class="datosemisor"><xsl:value-of select="TaxesOutputs/Tax/TaxAmount/TotalAmount"/></td>
        <td valign="middle" class="datosemisor"> <xsl:value-of select="TaxesOutputs/Tax/TaxableBase/TotalAmount+TaxesOutputs/Tax/TaxAmount/TotalAmount"/></td>
        </tr>

      </xsl:for-each>

      <tr>
        <td height="2" colspan="6">&nbsp;</td>
        
        </tr>
          <tr>
        <td height="2" colspan="6">&nbsp;</td>
        
        </tr>
          <tr>
        <td height="2" colspan="6">&nbsp;</td>
        
        </tr>
      <tr>
        <td height="3" colspan="3"><p><span class="encabezado2">Forma de Pago:</span> <span class="datosemisor">
        
        <xsl:choose>
     <xsl:when test="$FormaPago=04">
     	<xsl:variable name="FormaPagoFinal" select="'Transferencia'"/>
	    <xsl:value-of select="$FormaPagoFinal"/>
     </xsl:when>

     <xsl:when test="$FormaPago=03">
		<xsl:variable name="FormaPagoFinal" select="'Recibo'"/>
		<xsl:value-of select="$FormaPagoFinal"/>
     </xsl:when>

  	<xsl:when test="$FormaPago=02">
		<xsl:variable name="FormaPagoFinal" select="'Recibo domiciliado'"/>
		<xsl:value-of select="$FormaPagoFinal"/>
    </xsl:when>
     
    <xsl:when test="$FormaPago=01">
		<xsl:variable name="FormaPagoFinal" select="'Al contado'"/>
		<xsl:value-of select="$FormaPagoFinal"/>
    </xsl:when>        

      </xsl:choose> 
    
     </span></p>  
        <span class="encabezado2">Fecha de vencimiento:</span> <span class="datosemisor"><xsl:value-of select="m:Facturae/Invoices/Invoice/PaymentDetails/Installment/InstallmentDueDate"/></span></td>
        <td height="3" colspan="2" rowspan="3">&nbsp;</td>
        <td bgcolor="#CCCCCC" ><p class="encabezado2">TOTAL FACTURA €</p>
          <p class="datosemisor"><xsl:value-of select="m:Facturae/Invoices/Invoice/InvoiceTotals/InvoiceTotal"/></p></td>
      </tr>
      <tr>
        <td height="2" colspan="3" rowspan="2">
        <p><span class="encabezado2">Observaciones:</span> <span class="datosemisor"><xsl:value-of select="m:Facturae/Invoices/Invoice/AdditionalData/InvoiceAdditionalInformation"/></span></p>
        
         </td>
    
      </tr>
      <tr>
        <td class="datosemisor">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>

</xsl:template>
</xsl:stylesheet>