1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:m3="http://www.facturae.es/Facturae/2007/v3.1/Facturae" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/">
3
<xsl:output method="html" indent="yes"/>
4
<xsl:decimal-format grouping-separator="." decimal-separator=","/>
5
<xsl:template match="/">
6
<xsl:apply-templates select="//m3:Facturae"/>
9
<xsl:template match="m3:Facturae">
12
<title>Resumen de factura</title>
13
<link rel="stylesheet" href="factura.css" type="text/css"/>
17
var lote = '<xsl:value-of select="FileHeader/Batch/BatchIdentifier"/>';
18
var factura = '<xsl:value-of select="Invoices/Invoice/InvoiceHeader/InvoiceNumber"/>';
21
if(document.location.host.toUpperCase().indexOf("CICS03D") > -1)
24
if(document.location.host.toUpperCase().indexOf("9443") == -1)
27
url = "https://" + document.location.host + ":9443/ES13/S/WIADWIGEIZ26";
32
url = "/ES13/S/WIADWIGEIZ26";
38
url = "/ES13/S/WIADWIGEIZ26";
41
var w = open('','','width=600,height=400,resizable=yes,scrollbars=yes');
42
w.document.write('<html>');
43
w.document.write('<body>');
44
w.document.write('<form name="frm_mas" action="' + url + '" method="post">');
45
w.document.write('<input type="hidden" name="NROLOTE" value="" />');
46
w.document.write('<input type="hidden" name="SECLOTE" value="0" />');
47
w.document.write('<input type="hidden" name="NROFAC" value="" />');
48
w.document.write('<input type="hidden" name="SERIEFAC" value="0" />');
49
w.document.write('</form>');
50
w.document.write('</body>');
51
w.document.write('</html>');
53
w.document.frm_mas.NROLOTE.value = lote;
54
w.document.frm_mas.NROFAC.value = factura;
55
w.document.frm_mas.submit();
62
<table border="0" width="90%" cellpadding="0" cellspacing="0">
65
<table border="0" cellpadding="0" cellspacing="0" width="100%">
67
<td align="center" colspan="2">
68
<font class="titulo1">RESUMEN DE FACTURA</font>
71
<xsl:apply-templates select="Parties/SellerParty"/>
75
<td colspan="3"><font color="FFFFFF">_</font></td>
79
<table border="1" cellpadding="0" cellspacing="0" width="100%">
82
<table border="0" cellpadding="0" cellspacing="0" width="100%">
84
<td align="center" width="33%">
85
<font class="titulopeque">NUMERO</font>
86
<br/><xsl:value-of select="Invoices/Invoice/InvoiceHeader/InvoiceNumber"/></td>
87
<td align="center" width="34%">
88
<font class="titulopeque">FECHA EXPED.</font>
90
<xsl:value-of select="substring(Invoices/Invoice/InvoiceIssueData/IssueDate,9,2)"/>-<xsl:value-of select="substring(Invoices/Invoice/InvoiceIssueData/IssueDate,6,2)"/>-<xsl:value-of select="substring(Invoices/Invoice/InvoiceIssueData/IssueDate,1,4)"/>
92
<td align="center" width="33%">
93
<font class="titulopeque">N� DE SERIE</font>
94
<br/><xsl:value-of select="Invoices/Invoice/InvoiceHeader/InvoiceSeriesCode"/></td>
101
<table border="0" cellpadding="0" cellspacing="0" width="100%">
103
<td align="center" width="33%">
104
<font class="titulopeque">N.I.F. EMISOR</font>
105
<br/><xsl:value-of select="Parties/SellerParty/TaxIdentification/TaxIdentificationNumber"/></td>
106
<td align="center" width="33%">
107
<font class="titulopeque">CONTRATO</font>
108
<br/><xsl:value-of select="Invoices/Invoice/Items/InvoiceLine/ReceiverContractReference"/></td>
109
<td align="center" width="34%">
110
<font class="titulopeque">FORMA DE PAGO</font>
111
<br/><xsl:value-of select="Invoices/Invoice/PaymentDetails/Installment/PaymentMeans"/></td>
118
<table border="0" cellpadding="0" cellspacing="0" width="100%">
120
<td align="center" width="50%">
121
<font class="titulopeque">TIPO DOCUMENTO</font><br/>
123
<xsl:when test='Invoices/Invoice/InvoiceHeader/InvoiceClass="OO"' >
126
<xsl:when test='Invoices/Invoice/InvoiceHeader/InvoiceClass="OR"' >
129
<xsl:when test='Invoices/Invoice/InvoiceHeader/InvoiceClass="CO"' >
132
<xsl:when test='Invoices/Invoice/InvoiceHeader/InvoiceClass="CR"' >
135
<xsl:when test='Invoices/Invoice/InvoiceHeader/InvoiceClass="CC"' >
139
<xsl:value-of select="Invoices/Invoice/InvoiceHeader/InvoiceClass"/>
142
<td align="center" width="50%">
143
<font class="titulopeque">N� FACTURA RECTIF.</font>
144
<br/><xsl:value-of select="Invoices/Invoice/InvoiceHeader/Corrective/InvoiceNumber"/></td>
151
<td width="3%"><font color="FFFFFF">_</font></td>
152
<td width="37%" valign="center">
153
<xsl:apply-templates select="Parties/BuyerParty"/>
160
<td><font color="FFFFFF">_</font></td>
169
<table border="0" cellpadding="0" cellspacing="0" width="100%">
172
<font class="titulo2">DIRECCI�N DE EMPLAZAMIENTO</font>
176
<td colspan="2"><font color="FFFFFF">_</font></td>
180
<font class="titulopeque">DOMICILIO SOCIAL:</font>
183
<xsl:if test="Parties/SellerParty/LegalEntity!=''">
184
<xsl:value-of select="Parties/SellerParty/LegalEntity/AddressInSpain/Address"/><br/>
186
<xsl:if test="Parties/SellerParty/Individual!=''">
187
<xsl:value-of select="Parties/SellerParty/Individual/AddressInSpain/Address"/><br/>
193
<font class="titulopeque">TRANSFERIR A BANCO:</font>
196
<xsl:value-of select="Invoices/Invoice/PaymentDetails/Installment/AccountToBeCredited/IBAN"/><font color="FFFFFF">___</font>
197
<xsl:value-of select="Invoices/Invoice/PaymentDetails/Installment/AccountToBeCredited/BankCode"/>
202
<font class="titulopeque">OBSERVACIONES:</font>
205
<xsl:for-each select="Invoices/Invoice/AdditionalData/InvoiceAdditionalInformation">
206
<xsl:apply-templates/><br/>
214
<td><font color="FFFFFF">_</font></td>
223
<font class="titulo2">DETALLE FACTURA</font>
227
<td><font color="FFFFFF">_</font></td>
231
<table border="1" cellpadding="0" cellspacing="0" width="100%">
233
<td width="48%" align="center">
234
<font class="titulopeque">DESCRIPCI�N</font>
236
<td width="12%" align="center">
237
<font class="titulopeque">FECHA OPER.</font>
239
<td width="10%" align="center">
240
<font class="titulopeque">CANTIDAD</font>
242
<td width="15%" align="center">
243
<font class="titulopeque">IMP. UNITARIO</font>
245
<td width="15%" align="center">
246
<font class="titulopeque">TOTAL</font>
250
<td width="48%" valign="top">
251
<table border="0" cellpadding="0" cellspacing="0" width="100%">
254
<table border="0" cellpadding="0" cellspacing="0" width="100%">
255
<xsl:for-each select="Invoices/Invoice/Items/InvoiceLine">
258
<xsl:apply-templates select="ItemDescription"/>
267
<td width="12%" valign="top">
268
<table border="0" cellpadding="0" cellspacing="0" width="100%">
271
<table border="0" cellpadding="0" cellspacing="0" width="100%">
272
<xsl:for-each select="Invoices/Invoice/Items/InvoiceLine">
275
<xsl:value-of select="substring(TransactionDate,9,2)"/>-<xsl:value-of select="substring(TransactionDate,6,2)"/>-<xsl:value-of select="substring(TransactionDate,1,4)"/>
284
<td width="10%" valign="top">
285
<table border="0" cellpadding="0" cellspacing="0" width="100%">
288
<table border="0" cellpadding="0" cellspacing="0" width="100%">
289
<xsl:for-each select="Invoices/Invoice/Items/InvoiceLine">
292
<xsl:value-of select="format-number(Quantity,'#.##0')"/>
301
<td width="15%" valign="top">
302
<table border="0" cellpadding="0" cellspacing="0" width="100%">
305
<table border="0" cellpadding="0" cellspacing="0" width="100%">
306
<xsl:for-each select="Invoices/Invoice/Items/InvoiceLine">
309
<xsl:value-of select="format-number(UnitPriceWithoutTax,'#.##0,00')"/>
318
<td width="15%" valign="top">
319
<table border="0" cellpadding="0" cellspacing="0" width="100%">
322
<table border="0" cellpadding="0" cellspacing="0" width="100%">
323
<xsl:for-each select="Invoices/Invoice/Items/InvoiceLine">
326
<xsl:value-of select="format-number(TotalCost,'#.##0,00')"/>
340
<td><font color="FFFFFF">_</font></td>
349
<font class="titulo2">IMPORTES</font>
353
<td><font color="FFFFFF">_</font></td>
357
<table border="0" cellpadding="0" cellspacing="0" width="100%">
359
<td width="80%" align="right">
360
<font class="titulopeque">IMPORTE BRUTO<font color="FFFFFF">___</font></font>
362
<td width="20%" align="center">
363
<table border="1" cellpadding="0" cellspacing="0" width="100%">
366
<font class="titulopeque">
367
<xsl:value-of select="format-number(Invoices/Invoice/InvoiceTotals/TotalGrossAmount,'#.##0,00')"/>
379
<xsl:if test='Invoices/Invoice/InvoiceTotals/GeneralDiscounts!=""' >
380
<font class="titulopeque"><i>DESCUENTOS</i></font>
381
<table border="1" cellpadding="0" cellspacing="0" width="100%">
383
<td width="70%" valign="top" align="center">
384
<font class="titulopeque">CONCEPTO</font>
386
<td width="10%" valign="top" align="center">
387
<font class="titulopeque">TIPO (%)</font>
389
<td width="20%" valign="top" align="center">
390
<font class="titulopeque">IMPORTE</font>
394
<td width="70%" valign="top">
395
<table border="0" cellpadding="0" cellspacing="0" width="100%">
396
<xsl:for-each select="Invoices/Invoice/InvoiceTotals/GeneralDiscounts/Discount">
399
<xsl:apply-templates select="DiscountReason"/>
405
<td width="10%" valign="top">
406
<table border="0" cellpadding="0" cellspacing="0" width="100%">
407
<xsl:for-each select="Invoices/Invoice/InvoiceTotals/GeneralDiscounts/Discount">
409
<td width="100%" align="center">
410
<xsl:value-of select="format-number(DiscountRate,'#0,00')"/>
416
<td width="20%" valign="top">
417
<table border="0" cellpadding="0" cellspacing="0" width="100%">
418
<xsl:for-each select="Invoices/Invoice/InvoiceTotals/GeneralDiscounts/Discount">
421
<xsl:value-of select="format-number(DiscountAmount,'#.##0,00')"/>
433
<td><font color="FFFFFF">_</font></td>
437
<xsl:if test='Invoices/Invoice/TaxesOutputs!=""' >
438
<font class="titulopeque"><i>IMPUESTOS REPERCUTIDOS</i></font>
439
<table border="1" cellpadding="0" cellspacing="0" width="100%">
441
<td width="50%" valign="top" align="center">
442
<font class="titulopeque">CLASE DE IMPUESTO</font>
444
<td width="10%" valign="top" align="center">
445
<font class="titulopeque">TIPO (%)</font>
447
<td width="20%" valign="top" align="center">
448
<font class="titulopeque">BASE IMPONIBLE</font>
450
<td width="20%" valign="top" align="center">
451
<font class="titulopeque">CUOTA</font>
455
<td width="50%" valign="top">
456
<table border="0" cellpadding="0" cellspacing="0" width="100%">
457
<xsl:for-each select="Invoices/Invoice/TaxesOutputs/Tax">
460
<xsl:apply-templates select="TaxTypeCode"/>
466
<td width="10%" valign="top">
467
<table border="0" cellpadding="0" cellspacing="0" width="100%">
468
<xsl:for-each select="Invoices/Invoice/TaxesOutputs/Tax">
470
<td width="100%" align="center">
471
<xsl:value-of select="format-number(TaxRate,'#0,00')"/>
477
<td width="10%" valign="top">
478
<table border="0" cellpadding="0" cellspacing="0" width="100%">
479
<xsl:for-each select="Invoices/Invoice/TaxesOutputs/Tax">
481
<td width="100%" align="right">
482
<xsl:value-of select="format-number(TaxableBase/TotalAmount,'#.##0,00')"/>
488
<td width="20%" valign="top">
489
<table border="0" cellpadding="0" cellspacing="0" width="100%">
490
<xsl:for-each select="Invoices/Invoice/TaxesOutputs/Tax">
493
<xsl:value-of select="format-number(TaxAmount/TotalAmount,'#.##0,00')"/>
505
<td><font color="FFFFFF">_</font></td>
509
<xsl:if test='Invoices/Invoice/TaxesWithheld!=""' >
510
<font class="titulopeque"><i>IMPUESTOS RETENIDOS</i></font>
511
<table border="1" cellpadding="0" cellspacing="0" width="100%">
513
<td width="50%" valign="top" align="center">
514
<font class="titulopeque">CLASE DE IMPUESTO</font>
516
<td width="10%" valign="top" align="center">
517
<font class="titulopeque">TIPO (%)</font>
519
<td width="20%" valign="top" align="center">
520
<font class="titulopeque">BASE IMPONIBLE</font>
522
<td width="20%" valign="top" align="center">
523
<font class="titulopeque">CUOTA</font>
527
<td width="50%" valign="top">
528
<table border="0" cellpadding="0" cellspacing="0" width="100%">
529
<xsl:for-each select="Invoices/Invoice/TaxesWithheld/Tax">
532
<xsl:apply-templates select="TaxTypeCode"/>
538
<td width="10%" valign="top">
539
<table border="0" cellpadding="0" cellspacing="0" width="100%">
540
<xsl:for-each select="Invoices/Invoice/TaxesWithheld/Tax">
542
<td width="100%" align="center">
543
<xsl:value-of select="format-number(TaxRate,'#0,00')"/>
549
<td width="10%" valign="top">
550
<table border="0" cellpadding="0" cellspacing="0" width="100%">
551
<xsl:for-each select="Invoices/Invoice/TaxesWithheld/Tax">
553
<td width="100%" align="right">
554
<xsl:value-of select="format-number(TaxableBase/TotalAmount,'#.##0,00')"/>
560
<td width="20%" valign="top">
561
<table border="0" cellpadding="0" cellspacing="0" width="100%">
562
<xsl:for-each select="Invoices/Invoice/TaxesWithheld/Tax">
565
<xsl:value-of select="format-number(TaxAmount/TotalAmount,'#.##0,00')"/>
577
<td><font color="FFFFFF">_</font></td>
581
<xsl:if test='Invoices/Invoice/InvoiceTotals/PaymentsonAccount!=""' >
582
<table border="0" cellpadding="0" cellspacing="0" width="40%">
584
<td><font class="titulopeque"><i>ANTICIPOS</i></font></td>
587
<table border="1" cellpadding="0" cellspacing="0" width="40%">
589
<td width="50%" valign="top" align="center">
590
<font class="titulopeque">FECHA</font>
592
<td width="50%" valign="top" align="center">
593
<font class="titulopeque">IMPORTE</font>
597
<td width="50%" valign="top">
598
<table border="0" cellpadding="0" cellspacing="0" width="100%">
599
<xsl:for-each select="Invoices/Invoice/InvoiceTotals/PaymentsonAccount/PaymentOnAccount">
601
<td width="100%" align="center">
602
<xsl:value-of select="substring(PaymentOnAccountDate,9,2)"/>-<xsl:value-of select="substring(PaymentOnAccountDate,6,2)"/>-<xsl:value-of select="substring(PaymentOnAccountDate,1,4)"/>
608
<td width="50%" valign="top">
609
<table border="0" cellpadding="0" cellspacing="0" width="100%">
610
<xsl:for-each select="Invoices/Invoice/InvoiceTotals/PaymentsonAccount/PaymentOnAccount">
613
<xsl:value-of select="format-number(PaymentOnAccountAmount,'#.##0,00')"/>
625
<td><font color="FFFFFF">_</font></td>
629
<table border="0" cellpadding="0" cellspacing="0" width="100%">
631
<td width="80%" align="right">
632
<font class="titulopeque">TOTAL EUROS<font color="FFFFFF">___</font></font>
634
<td width="20%" align="center">
635
<table border="1" cellpadding="0" cellspacing="0" width="100%">
638
<font class="titulopeque">
639
<xsl:value-of select="format-number(Invoices/Invoice/InvoiceTotals/TotalExecutableAmount,'#.##0,00')"/>
649
<xsl:apply-templates select="FileHeader/FactoringAssignmentData"/>
650
<tr><td><font color="FFFFFF">_</font></td></tr>
651
<tr><td><font color="FFFFFF">_</font></td></tr>
652
<tr><td><font color="FFFFFF">_</font></td></tr>
659
<xsl:template match="//m3:Facturae/Parties/SellerParty">
660
<xsl:if test="LegalEntity!=''">
661
<font class="titulo2">
662
<xsl:value-of select="LegalEntity/CorporateName"/>
665
<font class="titulopeque">
666
N.I.F.: <xsl:value-of select="TaxIdentification/TaxIdentificationNumber"/><br/>
667
<xsl:value-of select="LegalEntity/AddressInSpain/Address"/><br/>
668
<xsl:value-of select="LegalEntity/AddressInSpain/PostCode"/><font color="FFFFFF">_</font><font color="FFFFFF">_</font>
669
<xsl:value-of select="LegalEntity/AddressInSpain/Town"/>
672
<xsl:if test="Individual!=''">
673
<font class="titulo2">
674
<xsl:value-of select="Individual/Name"/>
675
<xsl:if test="Individual/FirstSurname!=''">
676
<font color="FFFFFF">_</font>
677
<xsl:value-of select="Individual/FirstSurname"/>
679
<xsl:if test="Individual/SecondSurname!=''">
680
<font color="FFFFFF">_</font>
681
<xsl:value-of select="Individual/FirstSurname"/>
685
<font class="titulopeque">
686
N.I.F.: <xsl:value-of select="TaxIdentification/TaxIdentificationNumber"/><br/>
687
<xsl:value-of select="Individual/AddressInSpain/Address"/><br/>
688
<xsl:value-of select="Individual/AddressInSpain/PostCode"/><font color="FFFFFF">__</font>
689
<xsl:value-of select="Individual/AddressInSpain/Town"/>
693
<xsl:template match="//m3:Facturae/Parties/BuyerParty">
694
<xsl:if test="LegalEntity!=''">
695
<font class="titulo2">
699
<font class="titulopeque">
700
<xsl:value-of select="LegalEntity/CorporateName"/><br/>
701
N.I.F.: <xsl:value-of select="TaxIdentification/TaxIdentificationNumber"/><br/>
702
<xsl:value-of select="LegalEntity/AddressInSpain/Address"/><br/>
703
<xsl:value-of select="LegalEntity/AddressInSpain/PostCode"/><font color="FFFFFF">_</font><font color="FFFFFF">_</font>
704
<xsl:value-of select="LegalEntity/AddressInSpain/Town"/>
707
<xsl:if test="Individual!=''">
708
<font class="titulo2">
709
<xsl:value-of select="Individual/Name"/><font color="FFFFFF">_</font>
710
<xsl:value-of select="Individual/FirstSurname"/><font color="FFFFFF">_</font>
711
<xsl:value-of select="Individual/SecondSurname"/><font color="FFFFFF">_</font>
714
<font class="titulopeque">
715
N.I.F.: <xsl:value-of select="TaxIdentification/TaxIdentificationNumber"/><br/>
716
<xsl:value-of select="Individual/AddressInSpain/Address"/><br/>
717
<xsl:value-of select="Individual/AddressInSpain/PostCode"/><font color="FFFFFF">__</font>
718
<xsl:value-of select="Individual/AddressInSpain/Town"/>
722
<xsl:template match="//m3:Facturae/FileHeader/FactoringAssignmentData">
723
<tr><td><font color="FFFFFF">_</font></td></tr>
724
<tr><td><hr/></td></tr>
727
<table border="0" cellpadding="0" cellspacing="0" width="100%">
730
<font class="titulo2">
736
<td colspan="2"><font color="FFFFFF">_</font></td>
740
<font class="titulopeque">
744
<td><xsl:value-of select="Assignee/TaxIdentification/TaxIdentificationNumber"/></td>
748
<font class="titulopeque">
749
RAZ�N SOCIAL / NOMBRE Y APELLIDOS:
753
<xsl:if test='Assignee/LegalEntity!=""' >
754
<xsl:value-of select="Assignee/LegalEntity/CorporateName"/>
756
<xsl:if test='Assignee/Individual!=""' >
757
<xsl:value-of select="Assignee/Individual/Name"/><font color="FFFFFF">_</font>
758
<xsl:value-of select="Assignee/Individual/FirstSurname"/><font color="FFFFFF">_</font>
759
<xsl:value-of select="Assignee/Individual/SecondSurname"/><font color="FFFFFF">_</font>
765
<font class="titulopeque">
770
<xsl:value-of select="PaymentDetails/IBAN"/>
776
<tr><td><font color="FFFFFF">_</font></td></tr>
777
<tr><td><hr/></td></tr>