-
Notifications
You must be signed in to change notification settings - Fork 6
/
fatturapa_v1.2_de-it_wd.xsl
1688 lines (1622 loc) · 189 KB
/
fatturapa_v1.2_de-it_wd.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<!-- Versionsdatum: 2017-09-02 -->
<!-- Feedback erwünscht an [email protected] -->
<!--
fatturapa_v1.2_de-it.xsl
Copyright (C) 2016 Ferdinand Tavernini WOBI-IPES Bozen/Bolzano
The XSL-stylesheet fatturapa_v1.2_de-it.xsl is free software:
you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or any later version.
fatturapa_v1.2_de-it.xsl is distributed in the hope that it will
be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program (see LICENSE file). If not, see
http://www.gnu.org/licenses/.
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://www.fatturapa.gov.it/sdi/fatturapa/v1.1">
-->
<xsl:stylesheet version="1.2" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2">
<xsl:output method="html" />
<xsl:variable name="VersionFT">
<p>Stylesheet fatturapa_v1.2_de-it_wd.xsl v20170902 Ferdinand Tavernini - <a href="http://tinyurl.com/fatturapa-xsl-southtyrol">http://tinyurl.com/fatturapa-xsl-southtyrol</a></p>
</xsl:variable>
<xsl:decimal-format name="euro" decimal-separator="," grouping-separator="." />
<xsl:template name="CodiceUnivocoUfficio">
<xsl:param name="kode" />
<xsl:choose>
<xsl:when test="$kode = 'U9CVVQ'" ><span><xsl:value-of select="$kode" /></span><br />Generaldirektion<br /><i>DIREZIONE GENERALE</i></xsl:when>
<xsl:when test="$kode = '9G9VCD'" ><span><xsl:value-of select="$kode" /></span><br />Rechtsamt<br /><i>UFFICIO AFFARI LEGALI</i></xsl:when>
<xsl:when test="$kode = 'D31MSA'" ><span><xsl:value-of select="$kode" /></span><br />EDV-Amt<br /><i>UFFICIO EDP</i></xsl:when>
<xsl:when test="$kode = '0COHRW'" ><span><xsl:value-of select="$kode" /></span><br />Personal- und Organisationsamt<br /><i>UFFICIO PERSONALE ED ORGANIZZAZIONE</i></xsl:when>
<xsl:when test="$kode = 'LSXW8L'" ><span><xsl:value-of select="$kode" /></span><br />Wohnungszuweisung und Mieterangelegenheiten<br /><i>RIPARTIZIONE ALLOGGI ED INQUILINATO</i></xsl:when>
<xsl:when test="$kode = 'RW81BN'" ><span><xsl:value-of select="$kode" /></span><br />Mieterservicestelle Bozen<br /><i>CENTRO SERVIZI ALL'INQUILINATO DI BOLZANO</i></xsl:when>
<xsl:when test="$kode = 'GNXLXD'" ><span><xsl:value-of select="$kode" /></span><br />Mieterservicestelle Meran<br /><i>CENTRO SERVIZI ALL'INQUILINATO DI MERANO</i></xsl:when>
<xsl:when test="$kode = 'GSRA1J'" ><span><xsl:value-of select="$kode" /></span><br />Mieterservicestelle Brixen<br /><i>CENTRO SERVIZI ALL'INQUILINATO DI BRESSANONE</i></xsl:when>
<xsl:when test="$kode = '80WPE5'" ><span><xsl:value-of select="$kode" /></span><br />Technisches Dienste<br /><i>RIPARTIZIONE SERVIZI TECNICI</i></xsl:when>
<xsl:when test="$kode = 'NP7VMX'" ><span><xsl:value-of select="$kode" /></span><br />Technisches Amt Mitte Süd<br /><i>UFFICIO TECNICO CENTRO SUD</i></xsl:when>
<xsl:when test="$kode = 'KOJPJL'" ><span><xsl:value-of select="$kode" /></span><br />Technisches Amt Ost<br /><i>UFFICIO TECNICO EST</i></xsl:when>
<xsl:when test="$kode = '6ACTCE'" ><span><xsl:value-of select="$kode" /></span><br />Technisches Amt West<br /><i>UFFICIO TECNICO OVEST</i></xsl:when>
<xsl:when test="$kode = 'UAQVHQ'" ><span><xsl:value-of select="$kode" /></span><br />Amt für Buchhaltung, Bilanzen, Versicherung und Zahlungen<br /><i>UFFICIO CONTABILITA, BILANCI, ASSICURAZIONI E PAGAMENTI</i></xsl:when>
<xsl:when test="$kode = '3PZ58V'" ><span><xsl:value-of select="$kode" /></span><br />Arbeitsgruppe für Vergabe, Verträge und Vermögen<br /><i>GRUPPO DI LAVORO APPALTI, CONTRATTI E PATRIMONIO</i></xsl:when>
<xsl:when test="$kode = '00ROQ2'" ><span><xsl:value-of select="$kode" /></span><br />Technisches Amt Instandhaltung<br /><i>UFFICIO TECNICO MANUTENZIONE</i></xsl:when>
<xsl:when test="$kode = 'UFQKV2'" ><span><xsl:value-of select="$kode" /></span><br />Uff_eFatturaPA</xsl:when>
<xsl:when test="$kode = '0000000'" ><span><xsl:value-of select="$kode" /></span><br />Nicht akkreditierter Rechnungsempfänger<br /><i>Destinatario non accreditato</i></xsl:when>
<xsl:otherwise><span><xsl:value-of select="$kode" /></span></xsl:otherwise>
</xsl:choose>
<xsl:variable name="kodeSel" select="''" />
</xsl:template>
<xsl:template name="FormatDate">
<xsl:param name="DateTime" />
<xsl:variable name="year" select="substring($DateTime,1,4)" />
<xsl:variable name="month" select="substring($DateTime,6,2)" />
<xsl:variable name="day" select="substring($DateTime,9,2)" />
<xsl:value-of select="' ('" />
<xsl:value-of select="$day" />
<xsl:value-of select="' '" />
<xsl:choose>
<xsl:when test="$month = '1' or $month = '01'">Jan./Gen.</xsl:when>
<xsl:when test="$month = '2' or $month = '02'">Feb.</xsl:when>
<xsl:when test="$month = '3' or $month = '03'">Mar.</xsl:when>
<xsl:when test="$month = '4' or $month = '04'">Apr.</xsl:when>
<xsl:when test="$month = '5' or $month = '05'">Mai/Mag.</xsl:when>
<xsl:when test="$month = '6' or $month = '06'">Jun./Giu.</xsl:when>
<xsl:when test="$month = '7' or $month = '07'">Jul./Lug.</xsl:when>
<xsl:when test="$month = '8' or $month = '08'">Aug./Ago.</xsl:when>
<xsl:when test="$month = '9' or $month = '09'">Sep./Set.</xsl:when>
<xsl:when test="$month = '10'">Okt./Ott.</xsl:when>
<xsl:when test="$month = '11'">Nov.</xsl:when>
<xsl:when test="$month = '12'">Dez./Dic.</xsl:when>
<xsl:otherwise><font color="red">Unbekannter Monat - <i>Mese non riconosciuto</i></font></xsl:otherwise>
</xsl:choose>
<xsl:value-of select="' '" />
<xsl:value-of select="$year" />
<xsl:variable name="time" select="substring($DateTime,12)" />
<xsl:if test="$time != ''">
<xsl:variable name="hh" select="substring($time,1,2)" />
<xsl:variable name="mm" select="substring($time,4,2)" />
<xsl:variable name="ss" select="substring($time,7,2)" />
<xsl:value-of select="' '" />
<xsl:value-of select="$hh" />
<xsl:value-of select="':'" />
<xsl:value-of select="$mm" />
<xsl:value-of select="':'" />
<xsl:value-of select="$ss" />
</xsl:if>
<xsl:value-of select="')'" />
</xsl:template>
<xsl:template match="/">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<style type="text/css">
@media print { body { font-size: 7pt }
h1 { font-size: 12pt; }
h2 { font-size: 11pt; }
h3 { font-size: 10pt; }
h4 { font-size: 9pt; }
h5 { font-size: 8pt; }
}
@page { size: A4 portrait; }
@media screen { body { font-size: 10px }}
body { max-width: 1010px; min-width: 990px; }
#fattura-container { font-size: 10px; width: 100%; position: relative;}
#fattura-elettronica { font-family: serif; margin-left: auto; margin-right: auto; padding: 0; }
.version { font-size: 8px; float:right; color: #777777; }
h1 { padding: 5px 0 0 0; margin: 0; font-size: 22px; }
h2 { padding: 5px 0 0 0; margin: 0; font-size: 18px; }
h3 { padding: 5px 0 0 0; margin: 0; font-size: 15px; }
h4 { padding: 5px 0 0 0; margin: 0; font-size: 12px; }
h5 { padding: 5px 0 0 0; margin: 0; font-size: 10px; font-style: italic; }
ul { list-style-type: none; margin: 0 !important; padding: 15px 0 0 40px !important; }
ul li {}
span { font-weight: bold; font-size: 10pt;}
fehler {color: red; text-decoration:blink; }
div { padding: 0; margin: 0; }
div.page {
background-color: #fff !important;
position: relative;
margin: 5px 0 5px 0;
padding: 5px;
background: -moz-linear-gradient(0% 0 360deg, #FFFFFF, #F2F2F2 20%, #FFFFFF) repeat scroll 0 0 transparent;
border: 1px solid #CCCCCC;
-webkitbox-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
-mozbox-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
background: url('logo_sdi_trasparente.jpg') 98% 50px no-repeat;
}
table {table-layout:fixed; width:630px;}
table td {overflow: hidden;}
table, td, th { border: 1px solid black; border-collapse: collapse;}
#t1 td, #t1 th { border: none; }
#ti td { color: #000000; background-color: #EAF2D3;}
th { padding: 2px;}
td { padding: 2px; word-wrap:break-word;}
div.footer { padding: 10px 0 0 0; margin: 0; font-size: 10px; text-align: center; color: #777777; }
tr:nth-of-type(even){background-color: #F3F3F3;}
tr:nth-of-type(odd) {background-color:#ddd;}
th {background-color:#0f0f0f; color: #fafafa;}</style>
</head>
<body>
<div id="fattura-container">
<!--INIZIO DATI HEADER-->
<xsl:if test="a:FatturaElettronica">
<div id="fattura-elettronica"><h1>Italienische elektronische Rechnung<br /><i>FATTURA ELETTRONICA</i></h1><xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader">
<div class="page">
<div class="version">FatturaPA Version/<i>versione </i><xsl:value-of select="a:FatturaElettronica/@versione"/></div>
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/DatiTrasmissione">
<!--INIZIO DATI DELLA TRASMISSIONE-->
<div id="dati-trasmissione"><h3>Daten zur Übertragung - <i>Dati relativi alla trasmissione</i></h3>
<table id="t1">
<xsl:for-each select="a:FatturaElettronica/FatturaElettronicaHeader/DatiTrasmissione">
<xsl:if test="IdTrasmittente or ProgressivoInvio or FormatoTrasmissione">
<tr><td width="70px">1.1.[3|1|2]</td>
<td width="170px">Übertragungskennung<br /><i>Ident. di trasmissione</i></td>
<td width="731px"><span>
<xsl:if test="FormatoTrasmissione"><xsl:value-of select="FormatoTrasmissione" />:</xsl:if>
<xsl:if test="IdTrasmittente"><xsl:value-of select="IdTrasmittente/IdPaese" /><xsl:value-of select="IdTrasmittente/IdCodice" />_</xsl:if>
<xsl:if test="ProgressivoInvio"><xsl:value-of select="ProgressivoInvio" /></xsl:if>
</span></td></tr>
</xsl:if>
<xsl:if test="CodiceDestinatario">
<tr><td>1.1.4</td><td>Kodex Rechnungsempfänger<br /><i>Codice destinatario</i></td>
<td><xsl:call-template name="CodiceUnivocoUfficio"><xsl:with-param name="kode" select="CodiceDestinatario" /></xsl:call-template></td>
</tr>
</xsl:if>
<xsl:if test="ContattiTrasmittente/Telefono">
<tr><td>1.1.5.1</td><td>Telefonnummer Sender<br /><i>Telefono del trasmittente</i></td>
<td><span><xsl:value-of select="ContattiTrasmittente/Telefono" /></span></td></tr>
</xsl:if>
<xsl:if test="ContattiTrasmittente/Email">
<tr><td>1.1.5.2</td><td>E-Mail des Senders<br /><i>E-mail del trasmittente</i></td>
<td><span><xsl:value-of select="ContattiTrasmittente/Email" /></span></td></tr>
</xsl:if>
<!-- Version 1.2 -->
<xsl:if test="PECDestinatario">
<tr><td>1.1.6</td><td>zertifizierte E-Mail des Empfängers<br /><i>E-mail certificata del destinatario</i></td>
<td><span><xsl:value-of select="PECDestinatario" /></span></td></tr>
</xsl:if>
</xsl:for-each>
</table>
</div>
</xsl:if>
<!--FINE DATI DELLA TRASMISSIONE-->
<!--INIZIO DATI CEDENTE PRESTATORE-->
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/CedentePrestatore">
<div id="cedente">
<h3>Daten zum Lieferanten/Freiberufler - <i>Dati del cedente/prestatore</i></h3>
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/CedentePrestatore/DatiAnagrafici">
<h4>Anagrafische Daten - <i>Dati anagrafici</i></h4>
<table id="t1">
<xsl:for-each select="a:FatturaElettronica/FatturaElettronicaHeader/CedentePrestatore/DatiAnagrafici">
<xsl:if test="Anagrafica/Denominazione or Anagrafica/Nome">
<tr><td width="70px">1.2.1.3.[1|4|2|3]</td><td width="170px">Benennung<br /><i>Nominativo</i></td>
<td width="731px"><span><xsl:value-of select="Anagrafica/Denominazione" /> <xsl:value-of select="Anagrafica/Titolo" /> <xsl:value-of select="Anagrafica/Nome" /> <xsl:value-of select="Anagrafica/Cognome" /></span></td>
</tr>
</xsl:if>
<xsl:if test="Anagrafica/CodEORI">
<tr><td>1.2.1.3.5</td><td>EORI-Kodex<br /><i>Codice EORI</i></td>
<td><span><xsl:value-of select="Anagrafica/CodEORI" /></span></td>
</tr>
</xsl:if>
<xsl:if test="AlboProfessionale or ProvinciaAlbo or NumeroIscrizioneAlbo or DataIscrizioneAlbo">
<tr><td>1.2.1.[4|5|6|7]</td><td>Zugehörigkeit Berufsalbum<br /><i>Albo professionale di appartenenza</i></td>
<td><span><xsl:value-of select="AlboProfessionale" /> <xsl:value-of select="ProvinciaAlbo" /> <xsl:value-of select="NumeroIscrizioneAlbo" /></span><xsl:if test="DataIscrizioneAlbo"> <span><xsl:value-of select="DataIscrizioneAlbo" /></span><xsl:call-template name="FormatDate"><xsl:with-param name="DateTime" select="DataIscrizioneAlbo" /></xsl:call-template></xsl:if></td>
</tr>
</xsl:if>
<xsl:if test="IdFiscaleIVA">
<tr><td>1.2.1.1</td><td>Mehrwertsteuernummer<br /><i>Ident. fiscale ai fini IVA</i></td>
<td><span><xsl:value-of select="IdFiscaleIVA/IdPaese" /><xsl:value-of select="IdFiscaleIVA/IdCodice" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceFiscale">
<tr><td>1.2.1.2</td><td>Steuernummer<br /><i>Codice fiscale</i></td>
<td><span><xsl:value-of select="CodiceFiscale" /></span></td>
</tr>
</xsl:if>
<xsl:if test="RegimeFiscale">
<tr><td>1.2.1.8</td><td>Steuersystem<br /><i>Regime fiscale</i></td>
<td><span><xsl:value-of select="RegimeFiscale" /></span>
<xsl:variable name="RF"><xsl:value-of select="RegimeFiscale" /></xsl:variable>
<xsl:choose>
<xsl:when test="$RF='RF01'"> (ordinario)</xsl:when>
<xsl:when test="$RF='RF02'"> (contribuenti minimi)</xsl:when>
<xsl:when test="$RF='RF03'"> (nuove iniziative produttive)</xsl:when>
<xsl:when test="$RF='RF04'"> (agricoltura e attività connesse e pesca)</xsl:when>
<xsl:when test="$RF='RF05'"> (vendita sali e tabacchi)</xsl:when>
<xsl:when test="$RF='RF06'"> (commercio fiammiferi)</xsl:when>
<xsl:when test="$RF='RF07'"> (editoria)</xsl:when>
<xsl:when test="$RF='RF08'"> (gestione servizi telefonia pubblica)</xsl:when>
<xsl:when test="$RF='RF09'"> (rivendita documenti di trasporto pubblico e di sosta)</xsl:when>
<xsl:when test="$RF='RF10'"> (intrattenimenti, giochi e altre attività di cui alla tariffa allegata al DPR 640/72)</xsl:when>
<xsl:when test="$RF='RF11'"> (agenzie viaggi e turismo)</xsl:when>
<xsl:when test="$RF='RF12'"> (agriturismo)</xsl:when>
<xsl:when test="$RF='RF13'"> (vendite a domicilio)</xsl:when>
<xsl:when test="$RF='RF14'"> (rivendita beni usati, oggetti d’arte, d’antiquariato o da collezione)</xsl:when>
<xsl:when test="$RF='RF15'"> (agenzie di vendite all’asta di oggetti d’arte, antiquariato o da collezione)</xsl:when>
<xsl:when test="$RF='RF16'"> (IVA per cassa P.A.)</xsl:when>
<xsl:when test="$RF='RF17'"> (IVA per cassa - art. 32-bis, D.L. 83/2012)</xsl:when>
<xsl:when test="$RF='RF19'"> (Regime forfettario)</xsl:when>
<xsl:when test="$RF='RF18'"> (altro)</xsl:when>
<xsl:when test="$RF=''"></xsl:when>
<xsl:otherwise><fehler> (!!! falscher Kodex !!!)<i>(!!! codice non previsto !!!)</i></fehler></xsl:otherwise>
</xsl:choose>
</td></tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:if>
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/CedentePrestatore/Sede">
<h4>Firmensitz - <i>Dati della sede</i></h4>
<table id="t1">
<xsl:for-each select="a:FatturaElettronica/FatturaElettronicaHeader/CedentePrestatore/Sede">
<xsl:if test="Indirizzo or NumeroCivico or CAP or Comune or Provincia or Nazione">
<tr><td width="70px">1.2.2.[1|2|3|4|5|6]</td><td width="170px">Anschrift<br /><i>indirizzo</i></td>
<td width="731px"><span><xsl:value-of select="Indirizzo" /> <xsl:value-of select="NumeroCivico" /><br /><xsl:value-of select="CAP" /> <xsl:value-of select="Comune" /> <xsl:value-of select="Provincia" /> <xsl:value-of select="Nazione" /></span></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:if>
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/CedentePrestatore/StabileOrganizzazione">
<h4>Daten der Organisation - <i>Dati della stabile organizzazione</i></h4>
<table id="t1">
<xsl:for-each select="a:FatturaElettronica/FatturaElettronicaHeader/CedentePrestatore/StabileOrganizzazione">
<xsl:if test="Indirizzo or NumeroCivico or CAP or Comune or Provincia or Nazione">
<tr><td width="70px">1.2.3.[1|2|3|4|5]</td><td width="170px">Anschrift<br /><i>indirizzo</i></td>
<td width="731px"><span><xsl:value-of select="Indirizzo" /> <xsl:value-of select="NumeroCivico" /><br /><xsl:value-of select="CAP" /> <xsl:value-of select="Comune" /> <xsl:value-of select="Provincia" /> <xsl:value-of select="Nazione" /></span></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:if>
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/CedentePrestatore/IscrizioneREA">
<h4>Handelsregistereintragung - <i>Dati di iscrizione nel registro delle imprese</i></h4>
<table id="t1">
<xsl:for-each select="a:FatturaElettronica/FatturaElettronicaHeader/CedentePrestatore/IscrizioneREA">
<xsl:if test="Ufficio">
<tr><td width="70px">1.2.4.1</td><td width="170px">Handelsregister der Provinz<br /><i>Uff. Reg. Imp. Provinciale</i></td>
<td width="731px"><span><xsl:value-of select="Ufficio" /></span></td>
</tr>
</xsl:if>
<xsl:if test="NumeroREA">
<tr><td>1.2.4.2</td><td>Eintragungsnummer<br /><i>Numero di iscrizione</i></td>
<td><span><xsl:value-of select="NumeroREA" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CapitaleSociale or SocioUnico">
<tr><td>1.2.4.[3|4]</td><td>Handelskapital<br /><i>Capitale sociale </i></td>
<td>
<xsl:if test="CapitaleSociale">
<span><xsl:value-of select="format-number(CapitaleSociale, '###.##0,00 €', 'euro')" /></span>
</xsl:if>
<xsl:if test="SocioUnico">
 <span><xsl:value-of select="SocioUnico" /></span>
<xsl:variable name="NS"><xsl:value-of select="SocioUnico" /></xsl:variable>
<xsl:choose>
<xsl:when test="$NS='SU'"> (Einzelgesellschafter)<i>(socio unico)</i></xsl:when>
<xsl:when test="$NS='SM'"> (mehrere Gesellschafter)<i>(più soci)</i></xsl:when>
<xsl:when test="$NS=''"></xsl:when>
<xsl:otherwise><fehler> (!!! falscher Kodex !!!)<i>(!!! codice non previsto !!!)</i></fehler></xsl:otherwise>
</xsl:choose>
</xsl:if>
</td></tr>
</xsl:if>
<xsl:if test="StatoLiquidazione">
<tr><td>1.2.4.5</td><td>Auflösung<br /><i>Stato di liquidazione</i></td>
<td><span><xsl:value-of select="StatoLiquidazione" /></span><xsl:variable name="SL"><xsl:value-of select="StatoLiquidazione" /></xsl:variable>
<xsl:choose>
<xsl:when test="$SL='LS'"> (in Auflösung)<i>(in liquidazione)</i></xsl:when>
<xsl:when test="$SL='LN'"> (nicht in Auflösung)<i>(non in liquidazione)</i></xsl:when>
<xsl:when test="$SL=''"></xsl:when>
<xsl:otherwise><fehler>(!!! falscher Kodex !!!)<i>(!!! codice non previsto !!!)</i></fehler></xsl:otherwise>
</xsl:choose></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:if>
<xsl:for-each select="a:FatturaElettronica/FatturaElettronicaHeader/CedentePrestatore/Contatti">
<xsl:if test="Telefono or Fax or Email">
<h4>Adresse - <i>Recapiti</i></h4>
<table id="t1">
<xsl:if test="Telefono">
<tr><td width="70px">1.2.5.1</td><td width="170px">Telefon<br /><i>Telefono</i></td>
<td width="731px"><span><xsl:value-of select="Telefono" /></span></td>
</tr>
</xsl:if>
<xsl:if test="Fax">
<tr><td width="70px">1.2.5.2</td><td width="170px">FAX<br /><i>Fax</i></td>
<td width="731px"><span><xsl:value-of select="Fax" /></span></td>
</tr>
</xsl:if>
<xsl:if test="Email">
<tr><td width="70px">1.2.5.3</td><td width="170px">E-Mail<br /><i>E-mail</i></td>
<td width="731px"><span><xsl:value-of select="Email" /></span></td>
</tr>
</xsl:if>
</table>
</xsl:if>
</xsl:for-each>
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/CedentePrestatore/RiferimentoAmministrazione">
<h4>Hinweis Verwaltung / Buchhaltung - <i>Riferimento amministrativo</i></h4>
<table id="t1">
<tr><td width="70px">1.2.6</td><td width="170px">Referenz<br /><i>Riferimento</i></td>
<td width="731px"><span><xsl:value-of select="a:FatturaElettronica/FatturaElettronicaHeader/CedentePrestatore/RiferimentoAmministrazione" /></span></td>
</tr>
</table>
</xsl:if>
</div>
</xsl:if>
<!--FINE DATI CEDENTE PRESTATORE-->
<!--INIZIO DATI RAPPRESENTANTE FISCALE-->
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/RappresentanteFiscale">
<div id="rappresentante-fiscale">
<h3>Daten des Vertreters für Steuerfragen für Dienstleisters / Lieferanten<br /><i>Dati del rappresentante fiscale del cedente / prestatore</i></h3>
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/RappresentanteFiscale/DatiAnagrafici">
<h4>Anagrafische Daten - <i>Dati anagrafici</i></h4>
<table id="t1">
<xsl:for-each select="a:FatturaElettronica/FatturaElettronicaHeader/RappresentanteFiscale/DatiAnagrafici">
<xsl:if test="IdFiscaleIVA">
<tr><td width="70px">1.3.1.1</td><td width="170px">Mehrwertsteuernummer<br /><i>Ident. fiscale ai fini IVA</i></td>
<td width="731px"><span><xsl:value-of select="IdFiscaleIVA/IdPaese" /><xsl:value-of select="IdFiscaleIVA/IdCodice" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceFiscale">
<tr><td>1.3.1.2</td><td>Steuernummer<br /><i>Codice fiscale</i></td>
<td><span><xsl:value-of select="CodiceFiscale" /></span></td>
</tr>
</xsl:if>
<xsl:if test="Anagrafica/Denominazione or Anagrafica/Titolo or Anagrafica/Nome or Anagrafica/Cognome">
<tr><td width="70px">1.3.1.3.[1|4|2|3]</td><td width="170px">Anschrift<br /><i>indirizzo</i></td>
<td width="731px"><span><xsl:value-of select="Anagrafica/Denominazione" /> <xsl:value-of select="Anagrafica/Titolo" /><xsl:value-of select="Anagrafica/Nome" /> <xsl:value-of select="Anagrafica/Cognome" /></span></td>
</tr>
</xsl:if>
<xsl:if test="Anagrafica/CodEORI">
<tr><td>1.3.1.3.5</td><td>EORI-Kodex<br /><i>Codice EORI</i></td>
<td><span><xsl:value-of select="Anagrafica/CodEORI" /></span></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:if>
</div>
</xsl:if>
<!--FINE DATI RAPPRESENTANTE FISCALE-->
<!--INIZIO DATI CESSIONARIO COMMITTENTE-->
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/CessionarioCommittente">
<div id="cessionario">
<h3>Daten des Rechnungsempfängers - <i>Dati del cessionario / committente</i></h3>
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/CessionarioCommittente/DatiAnagrafici">
<h4>Anagrafische Daten - <i>Dati anagrafici</i></h4>
<table id="t1">
<xsl:for-each select="a:FatturaElettronica/FatturaElettronicaHeader/CessionarioCommittente/DatiAnagrafici">
<xsl:if test="Anagrafica/Denominazione or Anagrafica/Titolo or Anagrafica/Nome or Anagrafica/Cognome">
<tr><td width="70px">1.4.1.3.[1|4|2|3]</td><td width="170px">Benennung<br /><i>denominazione</i></td>
<td width="731px"><span><xsl:value-of select="Anagrafica/Denominazione" /> <xsl:value-of select="Anagrafica/Titolo" /><xsl:value-of select="Anagrafica/Nome" /> <xsl:value-of select="Anagrafica/Cognome" /></span></td>
</tr>
</xsl:if>
<xsl:if test="IdFiscaleIVA">
<tr><td>1.4.1.1</td><td>Mehrwertsteuernummer<br /><i>Ident. fiscale ai fini IVA</i></td>
<td><span><xsl:value-of select="IdFiscaleIVA/IdPaese" /><xsl:value-of select="IdFiscaleIVA/IdCodice" /> </span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceFiscale">
<tr><td>1.4.1.2</td><td>Steuernummer<br /><i>Codice Fiscale</i></td>
<td><span><xsl:value-of select="CodiceFiscale" /></span></td>
</tr>
</xsl:if>
<xsl:if test="Anagrafica/CodEORI">
<tr><td>1.4.1.3.5</td><td>EORI-Kodex<br /><i>Codice EORI</i></td>
<td><span><xsl:value-of select="Anagrafica/CodEORI" /></span></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:if>
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/CessionarioCommittente/Sede">
<h4>Firmensitz - <i>Dati della sede</i></h4>
<table id="t1">
<xsl:for-each select="a:FatturaElettronica/FatturaElettronicaHeader/CessionarioCommittente/Sede">
<xsl:if test="Indirizzo or NumeroCivico or CAP or Comune or Provincia or Nazione">
<tr><td width="70px">1.4.2.[1|2|3|4|5|6]</td><td width="170px">Anschrift<br /><i>indirizzo</i></td>
<td width="731px"><span><xsl:value-of select="Indirizzo" /> <xsl:value-of select="NumeroCivico" /><br /> <xsl:value-of select="CAP" /> <xsl:value-of select="Comune" /> <xsl:value-of select="Provincia" />  <xsl:value-of select="Nazione" /></span></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:if>
<!-- neu seit Version 1.2-->
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/CessionarioCommittente/StabileOrganizzazione">
<h4>Firmensitz - <i>Dati della stabile organizzazione</i></h4>
<table id="t1">
<xsl:for-each select="a:FatturaElettronica/FatturaElettronicaHeader/CessionarioCommittente/StabileOrganizzazione">
<xsl:if test="Indirizzo or NumeroCivico or CAP or Comune or Provincia or Nazione">
<tr><td width="70px">1.4.3.[1|2|3|4|5|6]</td><td width="170px">Anschrift<br /><i>indirizzo</i></td>
<td width="731px"><span><xsl:value-of select="Indirizzo" /> <xsl:value-of select="NumeroCivico" /><br /> <xsl:value-of select="CAP" /> <xsl:value-of select="Comune" /> <xsl:value-of select="Provincia" />  <xsl:value-of select="Nazione" /></span></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:if>
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/CessionarioCommittente/RappresentanteFiscale">
<h4>Steuerberater - <i>Rappresentante fiscale</i></h4>
<table id="t1">
<xsl:for-each select="a:FatturaElettronica/FatturaElettronicaHeader/CessionarioCommittente/RappresentanteFiscale">
<xsl:if test="IdFiscaleIVA">
<tr><td>1.4.4.1</td><td>Mehrwertsteuernummer<br /><i>Ident. fiscale ai fini IVA</i></td>
<td><span><xsl:value-of select="IdFiscaleIVA/IdPaese" /><xsl:value-of select="IdFiscaleIVA/IdCodice" /> </span></td>
</tr>
</xsl:if>
<xsl:if test="Denominazione or Nome or Cognome">
<tr><td width="70px">1.4.4.[2 / 3|4]</td><td width="170px">Benennung<br /><i>denominazione</i></td>
<td width="731px"><span><xsl:value-of select="Denominazione" /> <xsl:value-of select="Nome" /> <xsl:value-of select="Cognome" /></span></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:if>
<!-- -->
</div>
</xsl:if>
<!--FINE DATI CESSIONARIO COMMITTENTE-->
<!--INIZIO DATI TERZO INTERMEDIARIO SOGGETTO EMITTENTE-->
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/TerzoIntermediarioOSoggettoEmittente">
<div id="terzointermediario">
<xsl:for-each select="a:FatturaElettronica/FatturaElettronicaHeader/TerzoIntermediarioOSoggettoEmittente">
<h3>Daten des Vermittlers des Emittenten - <i>Dati del terzo intermediario soggetto emittente</i></h3>
<xsl:if test="DatiAnagrafici">
<h4>Anagrafische Daten - <i>Dati anagrafici</i></h4>
<table id="t1">
<xsl:if test="DatiAnagrafici/Anagrafica/Denominazione or DatiAnagrafici/Anagrafica/Titolo or DatiAnagrafici/Anagrafica/Nome or DatiAnagrafici/Anagrafica/Cognome">
<tr><td width="70px">1.5.1.3.[1|4|2|3]</td><td width="170px">Anschrift<br /><i>indirizzo</i></td>
<td width="731px"><span><xsl:value-of select="DatiAnagrafici/Anagrafica/Denominazione" /> <xsl:value-of select="DatiAnagrafici/Anagrafica/Titolo" /> <xsl:value-of select="DatiAnagrafici/Anagrafica/Nome" />  <xsl:value-of select="DatiAnagrafici/Anagrafica/Cognome" /></span></td>
</tr>
</xsl:if>
<xsl:if test="DatiAnagrafici/IdFiscaleIVA">
<tr><td>1.5.1.1</td><td>Mehrwertsteuernummer<br /><i>Ident. fiscale ai fini IVA</i></td>
<td><span><xsl:value-of select="DatiAnagrafici/IdFiscaleIVA/IdPaese" /><xsl:value-of select="DatiAnagrafici/IdFiscaleIVA/IdCodice" /></span></td>
</tr>
</xsl:if>
<xsl:if test="DatiAnagrafici/CodiceFiscale">
<tr><td>1.5.1.2</td><td>Steuernummer<br /><i>Codice Fiscale</i></td>
<td><span><xsl:value-of select="DatiAnagrafici/CodiceFiscale" /></span></td>
</tr>
</xsl:if>
<xsl:if test="DatiAnagrafici/Anagrafica/CodEORI">
<tr><td>1.5.1.3.5</td><td>EORI-Kodex<br /><i>Codice EORI</i></td>
<td><span><xsl:value-of select="DatiAnagrafici/Anagrafica/CodEORI" /></span></td>
</tr>
</xsl:if>
</table>
</xsl:if>
</xsl:for-each>
</div>
</xsl:if>
<!--FINE DATI TERZO INTERMEDIARIO SOGGETTO EMITTENTE-->
<!--INIZIO DATI SOGGETTO EMITTENTE-->
<xsl:if test="a:FatturaElettronica/FatturaElettronicaHeader/SoggettoEmittente">
<div id="soggetto-emittente">
<h3>Rechnungsersteller - <i>Soggetto emittente la fattura</i></h3>
<table id="t1">
<tr><td width="70px">1.6</td><td width="170px">Austeller<br /><i>Soggetto emittente</i></td>
<td width="731px"><span><xsl:value-of select="a:FatturaElettronica/FatturaElettronicaHeader/SoggettoEmittente" /> </span><xsl:variable name="SC"><xsl:value-of select="a:FatturaElettronica/FatturaElettronicaHeader/SoggettoEmittente" /> </xsl:variable>
<xsl:choose>
<xsl:when test="$SC='CC'"> (Rechnungssteller)<i>(cessionario/committente)</i></xsl:when>
<xsl:when test="$SC='TZ'"> (dritter)<i>(terzo)</i></xsl:when>
<xsl:when test="$SC=''"></xsl:when>
<xsl:otherwise><fehler> (!!! falscher Kodex !!!)<i>(!!! codice non previsto !!!)</i></fehler></xsl:otherwise>
</xsl:choose></td>
</tr>
</table>
</div>
</xsl:if>
<!--FINE DATI SOGGETTO EMITTENTE-->
<div class="footer"><xsl:copy-of select="$VersionFT" /></div>
</div>
</xsl:if>
<!--FINE DATI HEADER-->
<!--INIZIO DATI BODY-->
<xsl:variable name="TOTALBODY">
<xsl:value-of select="count(a:FatturaElettronica/FatturaElettronicaBody)" />
</xsl:variable>
<xsl:for-each select="a:FatturaElettronica/FatturaElettronicaBody">
<xsl:if test="$TOTALBODY>1">
<h2>Dokument Nummer <i>Numero documento nel lotto</i>:<xsl:value-of select="position()" /></h2>
</xsl:if>
<div class="page">
<div class="version">FatturaPA Version/<i>versione </i><xsl:value-of select="../@versione"/></div>
<xsl:variable name="Valuta" select="DatiGenerali/DatiGeneraliDocumento/Divisa" />
<xsl:if test="DatiGenerali">
<!--INIZIO DATI GENERALI-->
<div id="dati-generali">
<xsl:if test="DatiGenerali/DatiGeneraliDocumento">
<!--INIZIO DATI GENERALI DOCUMENTO-->
<div id="dati-generali-documento">
<h3>Generelle Rechnungssdaten - <i>Dati generali del documento</i></h3>
<table id="t1">
<xsl:if test="DatiGenerali/DatiGeneraliDocumento/TipoDocumento">
<tr><td width="70px">2.1.1.[2|1]</td><td width="170px">Währung : Dokumententyp<br /><i>Valuta : Tipologia doc.</i></td>
<td width="731px"><span><xsl:value-of select="$Valuta" /> : <xsl:value-of select="DatiGenerali/DatiGeneraliDocumento/TipoDocumento" /> </span><xsl:variable name="TD"><xsl:value-of select="DatiGenerali/DatiGeneraliDocumento/TipoDocumento" /> </xsl:variable>
<xsl:choose>
<xsl:when test="$TD='TD01'"> (Rechnung)<i>(fattura)</i></xsl:when>
<xsl:when test="$TD='TD02'"> (Accontorechnung)<i>(acconto/anticipo su fattura)</i></xsl:when>
<xsl:when test="$TD='TD03'"> (Accontohonorar)<i>(acconto/anticipo su parcella)</i></xsl:when>
<xsl:when test="$TD='TD04'"> (Gutschrift)<i>(nota di credito)</i></xsl:when>
<xsl:when test="$TD='TD05'"> (Lastschrift)<i>(nota di debito)</i></xsl:when>
<xsl:when test="$TD='TD06'"> (Honorarnote)<i>(parcella)</i></xsl:when>
<xsl:when test="$TD=''"></xsl:when>
<xsl:otherwise><fehler> (!!! falscher Kodex !!!)<i>(!!! codice non previsto !!!)</i></fehler></xsl:otherwise>
</xsl:choose></td>
</tr>
</xsl:if>
<xsl:if test="DatiGenerali/DatiGeneraliDocumento/Data">
<tr><td>2.1.1.[4|3]</td><td>Dok.-nummer und -datum<br /><i>Numero e data doc.</i></td>
<td><span><xsl:value-of select="DatiGenerali/DatiGeneraliDocumento/Numero" /> - <xsl:value-of select="DatiGenerali/DatiGeneraliDocumento/Data" /></span><xsl:call-template name="FormatDate"><xsl:with-param name="DateTime" select="DatiGenerali/DatiGeneraliDocumento/Data" /></xsl:call-template>
</td></tr>
</xsl:if>
<xsl:if test="DatiGenerali/DatiGeneraliDocumento/ImportoTotaleDocumento">
<tr><td>2.1.1.9</td><td>Gesamtbetrag Dokument<br /><i>Importo totale documento</i></td>
<td><span><xsl:value-of select="$Valuta" /> <xsl:variable name="ITD" select="DatiGenerali/DatiGeneraliDocumento/ImportoTotaleDocumento" /><xsl:value-of select="format-number($ITD, '###.##0,00', 'euro')" /></span></td>
</tr>
</xsl:if>
<xsl:if test="DatiGenerali/DatiGeneraliDocumento/Arrotondamento">
<tr><td>2.1.1.10</td><td>Rundung auf dem Gesamtbetrag<br /><i>Arrotondamento su Importo totale documento</i></td>
<td><span><xsl:value-of select="DatiGenerali/DatiGeneraliDocumento/Arrotondamento" /></span></td>
</tr>
</xsl:if>
<xsl:for-each select="DatiGenerali/DatiGeneraliDocumento/Causale">
<tr><td>2.1.1.11</td><td>Grund<br /><i>Causale</i></td>
<td><span><xsl:value-of select="current()" /></span></td>
</tr>
</xsl:for-each>
<xsl:if test="DatiGenerali/DatiGeneraliDocumento/Art73">
<tr><td>2.1.1.12</td><td>Art. 73 DPR 633/72</td>
<td><span><xsl:value-of select="DatiGenerali/DatiGeneraliDocumento/Art73" /></span></td>
</tr>
</xsl:if>
</table>
<!--INIZIO DATI DELLA RITENUTA-->
<xsl:if test="DatiGenerali/DatiGeneraliDocumento/DatiRitenuta">
<div id="dati-ritenuta">
<xsl:for-each select="DatiGenerali/DatiGeneraliDocumento/DatiRitenuta">
<h4>Einbehalte - <i>Ritenuta</i></h4>
<table id="t1">
<xsl:if test="TipoRitenuta">
<tr><td width="70px">2.1.1.5.1</td><td width="170px">Art des Einbehaltes<br /><i>Tipologia ritenuta</i></td>
<td width="731px"><span><xsl:value-of select="TipoRitenuta" /></span><xsl:variable name="TR"><xsl:value-of select="TipoRitenuta" /></xsl:variable>
<xsl:choose>
<xsl:when test="$TR='RT01'"> (ritenuta persone fisiche)</xsl:when>
<xsl:when test="$TR='RT02'"> (ritenuta persone giuridiche)</xsl:when>
<xsl:when test="$TR=''"></xsl:when>
<xsl:otherwise><fehler> (!!! falscher Kodex !!!)<i>(!!! codice non previsto !!!)</i></fehler></xsl:otherwise>
</xsl:choose>
</td></tr>
</xsl:if>
<xsl:if test="ImportoRitenuta">
<tr><td>2.1.1.5.2</td><td>Einbehaltener Betrag<br /><i>Importo ritenuta</i></td>
<td><span><xsl:value-of select="$Valuta" /> <xsl:value-of select="format-number(ImportoRitenuta, '###.##0,00', 'euro')" /></span></td>
</tr>
</xsl:if>
<xsl:if test="AliquotaRitenuta">
<tr><td>2.1.1.5.3</td><td>Einbehaltsatz<br /><i>Aliquota ritenuta (%)</i></td>
<td><span><xsl:value-of select="format-number(AliquotaRitenuta, '###')" /> %</span></td>
</tr>
</xsl:if>
<xsl:if test="CausalePagamento">
<tr><td>2.1.1.5.4</td><td>Zahlungsgrund<br /><i>Causale di pagamento</i></td>
<td><span><xsl:value-of select="CausalePagamento" /></span><xsl:variable name="CP"><xsl:value-of select="CausalePagamento" /></xsl:variable><xsl:if test="$CP!=''"> (Kodex nach Modell 770S)<i>(decodifica come da modello 770S)</i></xsl:if></td>
</tr>
</xsl:if>
</table>
</xsl:for-each>
</div>
</xsl:if>
<!--FINE DATI DELLA RITENUTA-->
<!--INIZIO DATI DEL BOLLO-->
<xsl:if test="DatiGenerali/DatiGeneraliDocumento/DatiBollo">
<div id="dati-bollo">
<xsl:for-each select="DatiGenerali/DatiGeneraliDocumento/DatiBollo">
<h4>Stempelwert - <i>Bollo</i></h4>
<table id="t1">
<xsl:if test="BolloVirtuale">
<tr><td width="70px">2.1.1.6.1</td><td width="170px">Virtueller Stempelwert<br /><i>Bollo virtuale</i></td>
<td width="731px"><span><xsl:value-of select="BolloVirtuale" /></span></td>
</tr>
</xsl:if>
<xsl:if test="ImportoBollo">
<tr><td>2.1.1.6.2</td><td>Betrag Stempelwert<br /><i>Importo bollo</i></td>
<td><span><xsl:value-of select="$Valuta" /> <xsl:value-of select="format-number(ImportoBollo, '###.##0,00', 'euro')" /></span></td>
</tr>
</xsl:if>
</table>
</xsl:for-each>
</div>
</xsl:if>
<!--FINE DATI DEL BOLLO-->
<!--INIZIO DATI DELLA CASSA PREVIDENZIALE-->
<xsl:if test="DatiGenerali/DatiGeneraliDocumento/DatiCassaPrevidenziale">
<div id="dati-cassa-previdenziale">
<h4>Fürsorgekasse - <i>Cassa previdenziale</i></h4>
<xsl:for-each select="DatiGenerali/DatiGeneraliDocumento/DatiCassaPrevidenziale">
<table id="t1">
<xsl:if test="TipoCassa">
<tr><td width="70px">2.1.1.7.1</td><td width="170px">Fürsorgekasse<br /><i>Cassa previdenziale</i></td>
<td width="731px"><span><xsl:value-of select="TipoCassa" /></span><xsl:variable name="TC"><xsl:value-of select="TipoCassa" />
</xsl:variable>
<xsl:choose>
<xsl:when test="$TC='TC01'"> (Cassa Nazionale Previdenza e Assistenza Avvocati e Procuratori legali)</xsl:when>
<xsl:when test="$TC='TC02'"> (Cassa Previdenza Dottori Commercialisti)</xsl:when>
<xsl:when test="$TC='TC03'"> (Cassa Previdenza e Assistenza Geometri)</xsl:when>
<xsl:when test="$TC='TC04'"> (Cassa Nazionale Previdenza e Assistenza Ingegneri e Architetti liberi profess.)</xsl:when>
<xsl:when test="$TC='TC05'"> (Cassa Nazionale del Notariato)</xsl:when>
<xsl:when test="$TC='TC06'"> (Cassa Nazionale Previdenza e Assistenza Ragionieri e Periti commerciali)</xsl:when>
<xsl:when test="$TC='TC07'"> (Ente Nazionale Assistenza Agenti e Rappresentanti di Commercio-ENASARCO)</xsl:when>
<xsl:when test="$TC='TC08'"> (Ente Nazionale Previdenza e Assistenza Consulenti del Lavoro-ENPACL)</xsl:when>
<xsl:when test="$TC='TC09'"> (Ente Nazionale Previdenza e Assistenza Medici-ENPAM)</xsl:when>
<xsl:when test="$TC='TC10'"> (Ente Nazionale Previdenza e Assistenza Farmacisti-ENPAF)</xsl:when>
<xsl:when test="$TC='TC11'"> (Ente Nazionale Previdenza e Assistenza Veterinari-ENPAV)</xsl:when>
<xsl:when test="$TC='TC12'"> (Ente Nazionale Previdenza e Assistenza Impiegati dell'Agricoltura-ENPAIA)</xsl:when>
<xsl:when test="$TC='TC13'"> (Fondo Previdenza Impiegati Imprese di Spedizione e Agenzie Marittime)</xsl:when>
<xsl:when test="$TC='TC14'"> (Istituto Nazionale Previdenza Giornalisti Italiani-INPGI)</xsl:when>
<xsl:when test="$TC='TC15'"> (Opera Nazionale Assistenza Orfani Sanitari Italiani-ONAOSI)</xsl:when>
<xsl:when test="$TC='TC16'"> (Cassa Autonoma Assistenza Integrativa Giornalisti Italiani-CASAGIT)</xsl:when>
<xsl:when test="$TC='TC17'"> (Ente Previdenza Periti Industriali e Periti Industriali Laureati-EPPI)</xsl:when>
<xsl:when test="$TC='TC18'"> (Ente Previdenza e Assistenza Pluricategoriale-EPAP)</xsl:when>
<xsl:when test="$TC='TC19'"> (Ente Nazionale Previdenza e Assistenza Biologi-ENPAB)</xsl:when>
<xsl:when test="$TC='TC20'"> (Ente Nazionale Previdenza e Assistenza Professione Infermieristica-ENPAPI)</xsl:when>
<xsl:when test="$TC='TC21'"> (Ente Nazionale Previdenza e Assistenza Psicologi-ENPAP)</xsl:when>
<xsl:when test="$TC='TC22'"> (INPS)</xsl:when>
<xsl:when test="$TC=''"></xsl:when>
<xsl:otherwise><fehler> (!!! falscher Kodex !!!)<i>(!!! codice non previsto !!!)</i></fehler></xsl:otherwise>
</xsl:choose></td>
</tr>
</xsl:if>
<xsl:if test="ImponibileCassa">
<tr><td>2.1.1.7.4</td><td>Grundlage Fürsorgebeitrag<br /><i>Imponibile previdenziale</i></td>
<td><span><xsl:value-of select="$Valuta" /> <xsl:value-of select="format-number(ImponibileCassa, '###.##0,00', 'euro')" /></span></td>
</tr>
</xsl:if>
<xsl:if test="AlCassa">
<tr><td>2.1.1.7.2</td><td>Fürsorgebeitragssatz (%)<br /><i>Aliquota contri. cassa (%)</i></td>
<td><span><xsl:value-of select="format-number(AlCassa, '###')" /> %</span></td>
</tr>
</xsl:if>
<xsl:if test="ImportoContributoCassa">
<tr><td>2.1.1.7.3</td><td>Fürsorgebeitrag<br /><i>Importo contributo cassa</i></td>
<td><span><xsl:value-of select="$Valuta" /> <xsl:value-of select="format-number(ImportoContributoCassa, '###.##0,00', 'euro')" /></span></td>
</tr>
</xsl:if>
<xsl:if test="AliquotaIVA">
<tr><td>2.1.1.7.5</td><td>MwSt-Satz<br /><i>Aliquota IVA applicata</i></td>
<td><span><xsl:value-of select="format-number(AliquotaIVA, '###')" /> %</span></td>
</tr>
</xsl:if>
<xsl:if test="Ritenuta">
<tr><td>2.1.1.7.6</td><td>Fürsorgebeitrag im Abzug<br /><i>Contributo cassa soggetto a ritenuta</i></td>
<td><span><xsl:value-of select="Ritenuta" /></span></td>
</tr>
</xsl:if>
<xsl:if test="Natura">
<tr><td>2.1.1.7.7</td><td>Art der Beitragsfreistellung<br /><i>Tipologia di non imponibilità del contributo</i></td>
<td><span><xsl:value-of select="Natura" /></span><xsl:variable name="NT"><xsl:value-of select="Natura" /></xsl:variable>
<xsl:choose>
<xsl:when test="$NT='N1'"> (escluse ex art. 15)</xsl:when>
<xsl:when test="$NT='N2'"> (non soggette)</xsl:when>
<xsl:when test="$NT='N3'"> (non imponibili)</xsl:when>
<xsl:when test="$NT='N4'"> (esenti)</xsl:when>
<xsl:when test="$NT='N5'"> (regime del margine)</xsl:when>
<xsl:when test="$NT='N6'"> (inversione contabile)</xsl:when>
<xsl:when test="$NT='N7'"> (IVA assolta in altro stato UE)</xsl:when>
<xsl:when test="$NT=''"></xsl:when>
<xsl:otherwise><fehler> (!!! falscher Kodex !!!)<i>(!!! codice non previsto !!!)</i></fehler></xsl:otherwise>
</xsl:choose></td>
</tr>
</xsl:if>
<xsl:if test="RiferimentoAmministrazione">
<tr><td>2.1.1.7.8</td><td>Hinweis Verwaltung / Buchhaltung<br /><i>Riferimento amministrativo / contabile</i></td>
<td><span><xsl:value-of select="RiferimentoAmministrazione" /></span></td>
</tr>
</xsl:if>
</table>
</xsl:for-each>
</div>
</xsl:if>
<!--FINE DATI DELLA CASSA PREVIDENZIALE-->
<!--INIZIO DATI SCONTO / MAGGIORAZIONE-->
<xsl:if test="DatiGenerali/DatiGeneraliDocumento/ScontoMaggiorazione">
<h4>Skonto/Aufschläge - <i>Sconto/maggiorazione</i></h4>
<div id="dati-sconto-maggiorazione">
<xsl:for-each select="DatiGenerali/DatiGeneraliDocumento/ScontoMaggiorazione">
<table id="t1">
<xsl:if test="Tipo">
<tr><td width="70px">2.1.1.8.[2|1]</td><td width="170px">Prozentsatz-Typologie<br /><i>Percentuale e tipologia</i></td>
<td width="731px">
<xsl:if test="Percentuale">
<span><xsl:value-of select="Percentuale" /> % </span>
</xsl:if>
<span><xsl:value-of select="Tipo" /></span>
<xsl:variable name="TSM"><xsl:value-of select="Tipo" /></xsl:variable>
<xsl:choose>
<xsl:when test="$TSM='SC'"> (Skonto)<i>(sconto)</i></xsl:when>
<xsl:when test="$TSM='MG'"> (Aufpreis)<i>(maggiorazione)</i></xsl:when>
<xsl:otherwise> <fehler> (!!! falscher Kodex !!!)<i>(!!! codice non previsto !!!)</i></fehler></xsl:otherwise>
</xsl:choose></td>
</tr>
</xsl:if> <!--
<xsl:if test="Percentuale">
<tr><td>2.1.1.8.2</td><td>Prozentsatz<br /><i>Percentuale</i></td>
<td><span><xsl:value-of select="Percentuale" /> %</span></td>
</tr>
</xsl:if> -->
<xsl:if test="Importo">
<tr><td>2.1.1.8.3</td><td>Betrag<br /><i>Importo</i></td>
<td><span>
<xsl:variable name="TSCM"><xsl:value-of select="Tipo" /></xsl:variable>
<xsl:choose>
<xsl:when test="$TSCM='SC'">-</xsl:when>
<xsl:when test="$TSCM='MG'">+</xsl:when>
</xsl:choose>
<xsl:value-of select="format-number(Importo, '###.##0,00', 'euro')" /></span></td>
</tr>
</xsl:if>
</table>
</xsl:for-each>
</div>
</xsl:if>
<!--FINE DATI SCONTO / MAGGIORAZIONE-->
</div>
</xsl:if>
<!--FINE DATI GENERALI DOCUMENTO-->
<!--INIZIO DATI DELL'ORDINE DI ACQUISTO-->
<xsl:if test="DatiGenerali/DatiOrdineAcquisto">
<div id="dati-ordine-acquisto">
<h3>Daten zur Bestellung - <i>Dati dell'ordine di acquisto</i></h3>
<table id="t1">
<xsl:for-each select="DatiGenerali/DatiOrdineAcquisto">
<xsl:if test="RiferimentoNumeroLinea">
<tr><td width="70px">2.1.2.1</td><td width="170px">Zugehörige Zeilennummer der Rechnung<br /><i>Numero linea di fattura a cui si riferisce</i></td>
<td width="731px"><xsl:for-each select="RiferimentoNumeroLinea"><span><xsl:if test="(position( )) > 1">, </xsl:if><xsl:value-of select="." /></span></xsl:for-each></td>
</tr>
</xsl:if>
<xsl:if test="IdDocumento">
<tr><td width="70px">2.1.2.2</td><td width="170px">Bestellkennung<br /><i>Ident. ordine di acquisto</i></td>
<td width="731px"><span><xsl:value-of select="IdDocumento" /></span></td>
</tr>
</xsl:if>
<xsl:if test="Data">
<tr><td>2.1.2.3</td><td>Bestellungsdatum<br /><i>Data ordine di acquisto</i></td>
<td><span><xsl:value-of select="Data" /></span><xsl:call-template name="FormatDate"><xsl:with-param name="DateTime" select="Data" /></xsl:call-template></td>
</tr>
</xsl:if>
<xsl:if test="NumItem">
<tr><td>2.1.2.4</td><td>Zeilennummer der Bestellung<br /><i>Numero linea ordine di acquisto</i></td>
<td><span><xsl:value-of select="NumItem" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceCommessaConvenzione">
<tr><td>2.1.2.5</td><td>Verkaufs-/Konventionskodex<br /><i>Codice commessa/convenzione</i></td>
<td><span><xsl:value-of select="CodiceCommessaConvenzione" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceCUP">
<tr><td>2.1.2.6</td><td>Staatlicher Projektkodex<br /><i>Codice Unitario Progetto (CUP)</i></td>
<td><span><xsl:value-of select="CodiceCUP" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceCIG">
<tr><td>2.1.2.7</td><td>Ausschreibungskode<br /><i>Codice Ident. Gara (CIG)</i></td>
<td><span><xsl:value-of select="CodiceCIG" /></span></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</div>
</xsl:if>
<!--FINE DATI DELL'ORDINE DI ACQUISTO-->
<!--INIZIO DATI DEL CONTRATTO-->
<xsl:if test="DatiGenerali/DatiContratto">
<div id="dati-contratto">
<h3>Vertragsdaten - <i>Dati del contratto</i></h3>
<table id="t1">
<xsl:for-each select="DatiGenerali/DatiContratto">
<xsl:if test="RiferimentoNumeroLinea">
<tr><td width="70px">2.1.3.1</td><td width="170px">Zugehörige Zeilennummer der Rechnung<br /><i>Numero linea di fattura a cui si riferisce</i></td>
<td width="731px"><xsl:for-each select="RiferimentoNumeroLinea"><span><xsl:if test="(position( )) > 1">, </xsl:if><xsl:value-of select="." /></span></xsl:for-each></td>
</tr>
</xsl:if>
<xsl:if test="IdDocumento">
<tr><td width="70px">2.1.3.2</td><td width="170px">Vertragskenndaten<br /><i>Ident. contratto</i></td>
<td width="731px"><span><xsl:value-of select="IdDocumento" /></span></td>
</tr>
</xsl:if>
<xsl:if test="Data">
<tr><td>2.1.3.3</td><td>Vertagsdatum<br /><i>Data contratto</i></td>
<td><span><xsl:value-of select="Data" /></span><xsl:call-template name="FormatDate"><xsl:with-param name="DateTime" select="Data" /></xsl:call-template></td>
</tr>
</xsl:if>
<xsl:if test="NumItem">
<tr><td>2.1.3.4</td><td>Zeilennummer Vertrag<br /><i>Numero linea contratto</i></td>
<td><span><xsl:value-of select="NumItem" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceCommessaConvenzione">
<tr><td>2.1.3.5</td><td>Verk.-/Konv.-kodex<br /><i>Codice comm./conv.</i></td>
<td><span><xsl:value-of select="CodiceCommessaConvenzione" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceCUP">
<tr><td>2.1.3.6</td><td>Staatlicher Projektkodex<br /><i>Codice Unitario Progetto</i></td>
<td><span><xsl:value-of select="CodiceCUP" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceCIG">
<tr><td>2.1.3.7</td><td>Ausschreibungskode<br /><i>Codice Ident. Gara (CIG)</i></td>
<td><span><xsl:value-of select="CodiceCIG" /></span></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</div>
</xsl:if>
<!--FINE DATI DEL CONTRATTO-->
<!--INIZIO DATI CONVENZIONE-->
<xsl:if test="DatiGenerali/DatiConvenzione">
<div id="dati-convenzione">
<h3>Daten der Konvention - <i>Dati della convenzione</i></h3>
<table id="t1">
<xsl:for-each select="DatiGenerali/DatiConvenzione">
<xsl:if test="RiferimentoNumeroLinea">
<tr><td width="70px">2.1.4.1</td><td width="170px">Zugehörige Zeilennummer der Rechnung<br /><i>Numero linea di fattura a cui si riferisce</i></td>
<td width="731px"><xsl:for-each select="RiferimentoNumeroLinea"><span><xsl:if test="(position( )) > 1">, </xsl:if><xsl:value-of select="." /></span></xsl:for-each></td>
</tr>
</xsl:if>
<xsl:if test="IdDocumento">
<tr><td>2.1.4.2</td><td>Konventionskennung<br /><i>Ident. convenzione</i></td>
<td><span><xsl:value-of select="IdDocumento" /></span></td>
</tr>
</xsl:if>
<xsl:if test="Data">
<tr><td>2.1.4.3</td><td>Datum Konvention<br /><i>Data convenzione</i></td>
<td><span><xsl:value-of select="Data" /></span><xsl:call-template name="FormatDate"><xsl:with-param name="DateTime" select="Data" /></xsl:call-template></td>
</tr>
</xsl:if>
<xsl:if test="NumItem">
<tr><td>2.1.4.4</td><td>Zeilennummer Konvention<br /><i>Numero linea convenzione</i></td>
<td><span><xsl:value-of select="NumItem" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceCommessaConvenzione">
<tr><td>2.1.4.5</td><td>Verkaufs- / Konventionskodex<br /><i>Codice commessa/convenzione</i></td>
<td><span><xsl:value-of select="CodiceCommessaConvenzione" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceCUP">
<tr><td>2.1.4.6</td><td>Staatlicher Projektkodex<br /><i>Codice Unitario Progetto (CUP)</i></td>
<td><span><xsl:value-of select="CodiceCUP" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceCIG">
<tr><td>2.1.4.7</td><td>Ausschreibungskode<br /><i>Codice Ident. Gara (CIG)</i></td>
<td><span><xsl:value-of select="CodiceCIG" /></span></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</div>
</xsl:if>
<!--FINE DATI CONVENZIONE-->
<!--INIZIO DATI RICEZIONE-->
<xsl:if test="DatiGenerali/DatiRicezione">
<div id="dati-ricezione">
<h3>Daten zum Erhalt der Leistung - <i>Dati della ricezione</i></h3>
<table id="t1">
<xsl:for-each select="DatiGenerali/DatiRicezione">
<xsl:if test="RiferimentoNumeroLinea">
<tr><td width="70px">2.1.5.1</td><td width="170px">Zugehörige Zeilennummer der Rechnung<br /><i>Numero linea di fattura a cui si riferisce</i></td>
<td width="731px"><xsl:for-each select="RiferimentoNumeroLinea"><span><xsl:if test="(position( )) > 1">, </xsl:if><xsl:value-of select="." /></span></xsl:for-each></td>
</tr>
</xsl:if>
<xsl:if test="IdDocumento">
<tr><td>2.1.5.2</td><td>Kennzeichen des Empfangs<br /><i>Ident. ricezione</i></td>
<td><span><xsl:value-of select="IdDocumento" /></span></td>
</tr>
</xsl:if>
<xsl:if test="Data">
<tr><td>2.1.5.3</td><td>Empfangsdatum<br /><i>Data ricezione</i></td>
<td><span><xsl:value-of select="Data" /></span><xsl:call-template name="FormatDate"><xsl:with-param name="DateTime" select="Data" /></xsl:call-template></td>
</tr>
</xsl:if>
<xsl:if test="NumItem">
<tr><td>2.1.5.4</td><td>Zeilennummer des Empfangs<br /><i>Numero linea ricezione</i></td>
<td><span><xsl:value-of select="NumItem" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceCommessaConvenzione">
<tr><td>2.1.5.5</td><td>Verkaufs- / Konventionskodex<br /><i>Codice commessa/convenzione</i></td>
<td><span><xsl:value-of select="CodiceCommessaConvenzione" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceCUP">
<tr><td>2.1.5.6</td><td>Staatlicher Projektkodex<br /><i>Codice Unitario Progetto (CUP)</i></td>
<td><span><xsl:value-of select="CodiceCUP" /></span></td>
</tr>
</xsl:if>
<xsl:if test="CodiceCIG">
<tr><td>2.1.5.7</td><td>Ausschreibungskode<br /><i>Codice Ident. Gara (CIG)</i></td>
<td><span><xsl:value-of select="CodiceCIG" /></span></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>