odoo-addon-l10n-it-edi-extension 18.0.1.0.0.30__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. odoo/addons/l10n_it_edi_extension/README.rst +493 -0
  2. odoo/addons/l10n_it_edi_extension/__init__.py +951 -0
  3. odoo/addons/l10n_it_edi_extension/__manifest__.py +37 -0
  4. odoo/addons/l10n_it_edi_extension/controllers/__init__.py +1 -0
  5. odoo/addons/l10n_it_edi_extension/controllers/portal.py +27 -0
  6. odoo/addons/l10n_it_edi_extension/data/FoglioStileAssoSoftware.xsl +3150 -0
  7. odoo/addons/l10n_it_edi_extension/data/invoice_it_template.xml +50 -0
  8. odoo/addons/l10n_it_edi_extension/data/res.city.it.code.csv +13898 -0
  9. odoo/addons/l10n_it_edi_extension/i18n/l10n_it_edi_extension.pot +1167 -0
  10. odoo/addons/l10n_it_edi_extension/i18n/l10n_it_edi_fatturapa.pot +44 -0
  11. odoo/addons/l10n_it_edi_extension/models/__init__.py +15 -0
  12. odoo/addons/l10n_it_edi_extension/models/account_journal.py +152 -0
  13. odoo/addons/l10n_it_edi_extension/models/account_move.py +765 -0
  14. odoo/addons/l10n_it_edi_extension/models/account_move_line.py +10 -0
  15. odoo/addons/l10n_it_edi_extension/models/ir_attachment.py +37 -0
  16. odoo/addons/l10n_it_edi_extension/models/l10n_it_edi_activity_progress.py +14 -0
  17. odoo/addons/l10n_it_edi_extension/models/l10n_it_edi_article_code.py +15 -0
  18. odoo/addons/l10n_it_edi_extension/models/l10n_it_edi_discount_rise_price.py +25 -0
  19. odoo/addons/l10n_it_edi_extension/models/l10n_it_edi_line.py +48 -0
  20. odoo/addons/l10n_it_edi_extension/models/l10n_it_edi_line_other_data.py +17 -0
  21. odoo/addons/l10n_it_edi_extension/models/l10n_it_edi_summary_data.py +77 -0
  22. odoo/addons/l10n_it_edi_extension/models/res_city_it_code.py +83 -0
  23. odoo/addons/l10n_it_edi_extension/models/res_company.py +62 -0
  24. odoo/addons/l10n_it_edi_extension/models/res_partner.py +64 -0
  25. odoo/addons/l10n_it_edi_extension/readme/CONFIGURE.md +45 -0
  26. odoo/addons/l10n_it_edi_extension/readme/CONTRIBUTORS.md +5 -0
  27. odoo/addons/l10n_it_edi_extension/readme/DESCRIPTION.md +160 -0
  28. odoo/addons/l10n_it_edi_extension/security/ir.model.access.csv +14 -0
  29. odoo/addons/l10n_it_edi_extension/static/description/icon.png +0 -0
  30. odoo/addons/l10n_it_edi_extension/static/description/index.html +832 -0
  31. odoo/addons/l10n_it_edi_extension/tests/__init__.py +2 -0
  32. odoo/addons/l10n_it_edi_extension/tests/import_xmls/IT01234567890_FPR03.xml +166 -0
  33. odoo/addons/l10n_it_edi_extension/tests/import_xmls/IT02780790107_11004.xml +216 -0
  34. odoo/addons/l10n_it_edi_extension/tests/import_xmls/IT02780790107_11005.xml +224 -0
  35. odoo/addons/l10n_it_edi_extension/tests/import_xmls/IT05979361218_003.xml +107 -0
  36. odoo/addons/l10n_it_edi_extension/tests/import_xmls/test.png +0 -0
  37. odoo/addons/l10n_it_edi_extension/tests/import_xmls/xml_import.zip +0 -0
  38. odoo/addons/l10n_it_edi_extension/tests/test_fiscalcode.py +126 -0
  39. odoo/addons/l10n_it_edi_extension/tests/test_import_edi_extension_xml.py +350 -0
  40. odoo/addons/l10n_it_edi_extension/views/company_view.xml +41 -0
  41. odoo/addons/l10n_it_edi_extension/views/l10n_it_view.xml +164 -0
  42. odoo/addons/l10n_it_edi_extension/views/res_partner_view.xml +19 -0
  43. odoo/addons/l10n_it_edi_extension/wizards/__init__.py +2 -0
  44. odoo/addons/l10n_it_edi_extension/wizards/compute_fc.py +176 -0
  45. odoo/addons/l10n_it_edi_extension/wizards/compute_fc_view.xml +65 -0
  46. odoo/addons/l10n_it_edi_extension/wizards/l10n_it_edi_import_file_wizard.py +98 -0
  47. odoo/addons/l10n_it_edi_extension/wizards/l10n_it_edi_import_file_wizard.xml +46 -0
  48. odoo_addon_l10n_it_edi_extension-18.0.1.0.0.30.dist-info/METADATA +513 -0
  49. odoo_addon_l10n_it_edi_extension-18.0.1.0.0.30.dist-info/RECORD +51 -0
  50. odoo_addon_l10n_it_edi_extension-18.0.1.0.0.30.dist-info/WHEEL +5 -0
  51. odoo_addon_l10n_it_edi_extension-18.0.1.0.0.30.dist-info/top_level.txt +1 -0
@@ -0,0 +1,3150 @@
1
+ <?xml version="1.0"?>
2
+ <xsl:stylesheet
3
+ version="1.1"
4
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5
+ xmlns:b="http://www.fatturapa.gov.it/sdi/fatturapa/v1.1"
6
+ xmlns:c="http://www.fatturapa.gov.it/sdi/fatturapa/v1.0"
7
+ xmlns:a="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2"
8
+ xmlns:d="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.0">
9
+
10
+ <xsl:output method="html" />
11
+ <xsl:decimal-format name="euro" decimal-separator="," grouping-separator="."/>
12
+
13
+ <xsl:template name="FormatDateIta">
14
+ <xsl:param name="DateTime" />
15
+
16
+ <xsl:variable name="year" select="substring($DateTime,1,4)" />
17
+ <xsl:variable name="month" select="substring($DateTime,6,2)" />
18
+ <xsl:variable name="day" select="substring($DateTime,9,2)" />
19
+
20
+ <xsl:value-of select="$day" />
21
+ <xsl:value-of select="'-'" />
22
+ <xsl:value-of select="$month" />
23
+ <xsl:value-of select="'-'" />
24
+ <xsl:value-of select="$year" />
25
+
26
+ </xsl:template>
27
+
28
+ <xsl:template name="FormatIVA">
29
+ <xsl:param name="Natura" />
30
+ <xsl:param name="IVA" />
31
+ <xsl:choose>
32
+ <xsl:when test="$Natura">
33
+ <xsl:value-of select="$Natura" />
34
+ </xsl:when>
35
+ <xsl:otherwise>
36
+ <xsl:if test="$IVA">
37
+ <xsl:value-of select="format-number($IVA, '###.###.##0,00', 'euro')" />
38
+ </xsl:if>
39
+ </xsl:otherwise>
40
+ </xsl:choose>
41
+ </xsl:template>
42
+
43
+ <xsl:template name="FormatSconto">
44
+ <xsl:param name="tipo" />
45
+ <xsl:param name="percentuale" />
46
+ <xsl:param name="importo" />
47
+
48
+ <xsl:choose>
49
+ <xsl:when test="$tipo = 'SC' ">
50
+ <xsl:text>-</xsl:text>
51
+ </xsl:when>
52
+ <xsl:when test="$tipo = 'MG'">
53
+ <xsl:text>+</xsl:text>
54
+
55
+ </xsl:when>
56
+ <xsl:otherwise>
57
+
58
+ </xsl:otherwise>
59
+ </xsl:choose>
60
+
61
+
62
+ <xsl:choose>
63
+ <xsl:when test="$percentuale">
64
+ <xsl:value-of select="$percentuale" />
65
+ <xsl:text>%</xsl:text>
66
+ </xsl:when>
67
+ <xsl:otherwise>
68
+ <xsl:if test="$importo">
69
+ <xsl:value-of select="format-number($importo, '###.###.##0,00######', 'euro')" />
70
+ </xsl:if>
71
+ </xsl:otherwise>
72
+ </xsl:choose>
73
+ <xsl:text> </xsl:text>
74
+
75
+ </xsl:template>
76
+
77
+ <xsl:template name="FormatColSconto">
78
+ <xsl:param name="tipo" />
79
+ <xsl:param name="percentuale" />
80
+ <xsl:param name="importo" />
81
+
82
+ <xsl:choose>
83
+ <xsl:when test="$tipo = 'SC' ">
84
+ <xsl:text>-</xsl:text>
85
+ </xsl:when>
86
+ <xsl:when test="$tipo = 'MG'">
87
+ <xsl:text>+</xsl:text>
88
+
89
+ </xsl:when>
90
+ <xsl:otherwise>
91
+
92
+ </xsl:otherwise>
93
+ </xsl:choose>
94
+
95
+
96
+ <xsl:choose>
97
+ <xsl:when test="$percentuale">
98
+ <xsl:value-of select="$percentuale" />
99
+ <xsl:text>%</xsl:text>
100
+ </xsl:when>
101
+ <xsl:otherwise>
102
+ <xsl:if test="$importo">
103
+ <xsl:value-of select="format-number($importo, '###.###.##0,00######', 'euro')" />
104
+ </xsl:if>
105
+ </xsl:otherwise>
106
+ </xsl:choose>
107
+
108
+ </xsl:template>
109
+
110
+ <!--DatiOrdineAcquisto Vs.Ord. XXXXXX del 26/09/2018 CUP:YYYYYY CIG:ZZZZZZZ-->
111
+ <!--DatiContratto Contratto XXXXXX del 26/09/2018 CUP:YYYYYY CIG:ZZZZZZZ -->
112
+ <!--DatiConvenzione Convenzione XXXXXX del 26/09/2018 CUP:YYYYYY CIG:ZZZZZZZ -->
113
+ <!--DatiRicezione Ricezione XXXXXX del 26/09/2018 CUP:YYYYYY CIG:ZZZZZZZ -->
114
+ <!--Fatture collegate Fatt.coll. XXXXXX del 26/09/2018 CUP:YYYYYY CIG:ZZZZZZZ -->
115
+ <xsl:template name="DatiCorrelati">
116
+ <xsl:param name="Prefix" />
117
+ <xsl:param name="IdDocumento" />
118
+ <xsl:param name="Data" />
119
+ <xsl:param name="CodiceCUP" />
120
+ <xsl:param name="CodiceCIG" />
121
+ <xsl:variable name="descrizione" >
122
+ <xsl:value-of select="$Prefix" />
123
+ <xsl:value-of select="$IdDocumento" />
124
+ <xsl:if test="$Data">
125
+ <xsl:text> del </xsl:text>
126
+ <xsl:call-template name="FormatDateIta">
127
+ <xsl:with-param name="DateTime" select="$Data" />
128
+ </xsl:call-template>
129
+ </xsl:if>
130
+ <xsl:if test="$CodiceCUP">
131
+ <xsl:text> CUP: </xsl:text>
132
+ <xsl:value-of select="$CodiceCUP" />
133
+ </xsl:if>
134
+ <xsl:if test="$CodiceCIG">
135
+ <xsl:text> CIG: </xsl:text>
136
+ <xsl:value-of select="$CodiceCIG" />
137
+ </xsl:if>
138
+ </xsl:variable>
139
+ <xsl:if test="$descrizione">
140
+ <xsl:call-template name="AltraDescrizioneLinea">
141
+ <xsl:with-param name="textDescrizione" select = "$descrizione" />
142
+ </xsl:call-template>
143
+ </xsl:if>
144
+ </xsl:template>
145
+
146
+ <xsl:template match="DatiDDT">
147
+ <xsl:variable name="descri_DAO" >
148
+
149
+ <xsl:text>DDT </xsl:text>
150
+ <xsl:value-of select="NumeroDDT" />
151
+ <xsl:if test="DataDDT">
152
+ <xsl:text> del </xsl:text>
153
+ <xsl:call-template name="FormatDateIta">
154
+ <xsl:with-param name="DateTime" select="DataDDT" />
155
+ </xsl:call-template>
156
+ </xsl:if>
157
+
158
+ </xsl:variable>
159
+
160
+ <xsl:if test="$descri_DAO">
161
+ <xsl:call-template name="AltraDescrizioneLinea">
162
+ <xsl:with-param name="textDescrizione" select = "$descri_DAO" />
163
+ </xsl:call-template>
164
+ </xsl:if>
165
+ </xsl:template>
166
+
167
+ <xsl:template match="DettaglioLinee">
168
+ <xsl:param name="r" />
169
+ <xsl:param name="posASWRELSTD" />
170
+ <xsl:param name="TipoFattura" />
171
+ <xsl:param name="IndiceBody" />
172
+
173
+ <!--Numero Linea -->
174
+ <xsl:variable name="valNumeroLinea" >
175
+ <xsl:value-of select="number(NumeroLinea)" />
176
+ </xsl:variable>
177
+
178
+ <!--Pre LINEA OpzPreLineaDatiDDT -->
179
+
180
+ <xsl:choose>
181
+
182
+ <xsl:when test="OpzPreLineaDatiDDT">
183
+ <!--Pre LINEA OpzPreLineaDatiDDT -->
184
+ <xsl:for-each select="OpzPreLineaDatiDDT" >
185
+ <xsl:call-template name="AltraDescrizioneLinea">
186
+ <xsl:with-param name="textDescrizione" select = "." />
187
+ </xsl:call-template>
188
+ </xsl:for-each>
189
+
190
+ </xsl:when>
191
+ <xsl:otherwise>
192
+
193
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaBody[$IndiceBody]/DatiGenerali/DatiDDT[ number(./RiferimentoNumeroLinea) = $valNumeroLinea] ">
194
+ <xsl:apply-templates select="."/> <!-- apply DatiDDT template -->
195
+ </xsl:for-each>
196
+
197
+ </xsl:otherwise>
198
+ </xsl:choose>
199
+
200
+
201
+ <!--DatiOrdineAcquisto -->
202
+ <xsl:choose>
203
+ <!--Pre LINEA OpzPreLineaDatiOrdineAcquisto -->
204
+ <xsl:when test="OpzPreLineaDatiOrdineAcquisto ">
205
+ <xsl:for-each select="OpzPreLineaDatiOrdineAcquisto" >
206
+ <xsl:call-template name="AltraDescrizioneLinea">
207
+ <xsl:with-param name="textDescrizione" select = "." />
208
+ </xsl:call-template>
209
+ </xsl:for-each>
210
+ </xsl:when>
211
+
212
+ <xsl:otherwise>
213
+
214
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaBody[$IndiceBody]/DatiGenerali/DatiOrdineAcquisto[ number(./RiferimentoNumeroLinea) = $valNumeroLinea] ">
215
+ <xsl:call-template name="DatiCorrelati" >
216
+ <xsl:with-param name="Prefix" select='"Vs.Ord. "'/>
217
+ <xsl:with-param name="IdDocumento" select="IdDocumento"/>
218
+ <xsl:with-param name="Data" select="Data"/>
219
+ <xsl:with-param name="CodiceCUP" select="CodiceCUP"/>
220
+ <xsl:with-param name="CodiceCIG" select="CodiceCIG"/>
221
+ </xsl:call-template >
222
+ </xsl:for-each>
223
+
224
+
225
+ </xsl:otherwise>
226
+ </xsl:choose>
227
+
228
+ <!--DatiContratto -->
229
+ <xsl:choose>
230
+ <!--Pre LINEA OpzPreLineaDatiContratto -->
231
+ <xsl:when test="OpzPreLineaDatiContratto ">
232
+ <xsl:for-each select="OpzPreLineaDatiContratto" >
233
+ <xsl:call-template name="AltraDescrizioneLinea">
234
+ <xsl:with-param name="textDescrizione" select = "." />
235
+ </xsl:call-template>
236
+ </xsl:for-each>
237
+ </xsl:when>
238
+
239
+ <xsl:otherwise>
240
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaBody[$IndiceBody]/DatiGenerali/DatiContratto[ number(./RiferimentoNumeroLinea) = $valNumeroLinea] ">
241
+ <xsl:call-template name="DatiCorrelati" >
242
+ <xsl:with-param name="Prefix" select='"Contratto "'/>
243
+ <xsl:with-param name="IdDocumento" select="IdDocumento"/>
244
+ <xsl:with-param name="Data" select="Data"/>
245
+ <xsl:with-param name="CodiceCUP" select="CodiceCUP"/>
246
+ <xsl:with-param name="CodiceCIG" select="CodiceCIG"/>
247
+ </xsl:call-template >
248
+ </xsl:for-each>
249
+
250
+ </xsl:otherwise>
251
+ </xsl:choose>
252
+
253
+ <!--DatiConvenzione -->
254
+ <xsl:choose>
255
+ <!--Pre LINEA OpzPreLineaDatiConvenzione -->
256
+ <xsl:when test="OpzPreLineaDatiConvenzione ">
257
+ <xsl:for-each select="OpzPreLineaDatiConvenzione" >
258
+ <xsl:call-template name="AltraDescrizioneLinea">
259
+ <xsl:with-param name="textDescrizione" select = "." />
260
+ </xsl:call-template>
261
+ </xsl:for-each>
262
+ </xsl:when>
263
+
264
+ <xsl:otherwise>
265
+
266
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaBody[$IndiceBody]/DatiGenerali/DatiConvenzione[ number(./RiferimentoNumeroLinea) = $valNumeroLinea] ">
267
+ <xsl:call-template name="DatiCorrelati" >
268
+ <xsl:with-param name="Prefix" select='"Convenzione "'/>
269
+ <xsl:with-param name="IdDocumento" select="IdDocumento"/>
270
+ <xsl:with-param name="Data" select="Data"/>
271
+ <xsl:with-param name="CodiceCUP" select="CodiceCUP"/>
272
+ <xsl:with-param name="CodiceCIG" select="CodiceCIG"/>
273
+ </xsl:call-template >
274
+ </xsl:for-each>
275
+
276
+ </xsl:otherwise>
277
+ </xsl:choose>
278
+
279
+ <!--DatiRicezione -->
280
+ <xsl:choose>
281
+ <!--Pre LINEA OpzPreLineaDatiRicezione -->
282
+ <xsl:when test="OpzPreLineaDatiRicezione ">
283
+ <xsl:for-each select="OpzPreLineaDatiRicezione" >
284
+ <xsl:call-template name="AltraDescrizioneLinea">
285
+ <xsl:with-param name="textDescrizione" select = "." />
286
+ </xsl:call-template>
287
+ </xsl:for-each>
288
+ </xsl:when>
289
+
290
+ <xsl:otherwise>
291
+
292
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaBody[$IndiceBody]/DatiGenerali/DatiRicezione[ number(./RiferimentoNumeroLinea) = $valNumeroLinea] ">
293
+ <xsl:call-template name="DatiCorrelati" >
294
+ <xsl:with-param name="Prefix" select='"Ricezione "'/>
295
+ <xsl:with-param name="IdDocumento" select="IdDocumento"/>
296
+ <xsl:with-param name="Data" select="Data"/>
297
+ <xsl:with-param name="CodiceCUP" select="CodiceCUP"/>
298
+ <xsl:with-param name="CodiceCIG" select="CodiceCIG"/>
299
+ </xsl:call-template >
300
+ </xsl:for-each>
301
+
302
+ </xsl:otherwise>
303
+ </xsl:choose>
304
+
305
+ <!--DatiFattureCollegate-->
306
+ <xsl:choose>
307
+ <!--Pre LINEA OpzPreLineaDatiFattureCollegate-->
308
+ <xsl:when test="OpzPreLineaDatiFattureCollegate ">
309
+ <xsl:for-each select="OpzPreLineaDatiFattureCollegate" >
310
+ <xsl:call-template name="AltraDescrizioneLinea">
311
+ <xsl:with-param name="textDescrizione" select = "." />
312
+ </xsl:call-template>
313
+ </xsl:for-each>
314
+ </xsl:when>
315
+ <xsl:otherwise>
316
+
317
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaBody[$IndiceBody]/DatiGenerali/DatiFattureCollegate[ number(./RiferimentoNumeroLinea) = $valNumeroLinea] ">
318
+ <xsl:call-template name="DatiCorrelati" >
319
+ <xsl:with-param name="Prefix" select='"Fatt.coll. "'/>
320
+ <xsl:with-param name="IdDocumento" select="IdDocumento"/>
321
+ <xsl:with-param name="Data" select="Data"/>
322
+ <xsl:with-param name="CodiceCUP" select="CodiceCUP"/>
323
+ <xsl:with-param name="CodiceCIG" select="CodiceCIG"/>
324
+ </xsl:call-template >
325
+ </xsl:for-each>
326
+
327
+ </xsl:otherwise>
328
+ </xsl:choose>
329
+
330
+ <!--DETTAGLIO LINEE -->
331
+
332
+ <xsl:choose>
333
+ <xsl:when test="$posASWRELSTD = $r">
334
+ <xsl:call-template name="DettaglioLineeASW"/>
335
+ </xsl:when>
336
+
337
+ <xsl:otherwise>
338
+
339
+ <tr>
340
+ <td>
341
+ <xsl:for-each select="CodiceArticolo" >
342
+ <div class="tx-xsmall">
343
+ <xsl:if test="CodiceValore">
344
+ <xsl:text> </xsl:text>
345
+ <xsl:value-of select="CodiceValore" />
346
+ </xsl:if>
347
+ <xsl:if test="CodiceTipo">
348
+ (<xsl:value-of select="CodiceTipo" />)
349
+ </xsl:if>
350
+ </div>
351
+ </xsl:for-each>
352
+ </td>
353
+ <td>
354
+
355
+ <xsl:if test="Descrizione">
356
+ <xsl:value-of select="Descrizione" />
357
+ </xsl:if>
358
+
359
+ <xsl:if test="TipoCessionePrestazione">
360
+ (<xsl:value-of select="TipoCessionePrestazione" />)
361
+ </xsl:if>
362
+
363
+ <xsl:if test="DataInizioPeriodo or DataFinePeriodo">
364
+ <div class="tx-xsmall">
365
+ <xsl:text>Periodo</xsl:text>
366
+ <xsl:if test="DataInizioPeriodo">
367
+ <xsl:text> da </xsl:text>
368
+ <xsl:call-template name="FormatDateIta">
369
+ <xsl:with-param name="DateTime" select="DataInizioPeriodo" />
370
+ </xsl:call-template>
371
+ </xsl:if>
372
+ <xsl:if test="DataFinePeriodo">
373
+ <xsl:text> a </xsl:text>
374
+ <xsl:call-template name="FormatDateIta">
375
+ <xsl:with-param name="DateTime" select="DataFinePeriodo" />
376
+ </xsl:call-template>
377
+ </xsl:if>
378
+ </div>
379
+
380
+ </xsl:if>
381
+
382
+
383
+ <xsl:for-each select="AltriDatiGestionali" >
384
+
385
+ <xsl:if test=" translate( TipoDato,
386
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
387
+ 'abcdefghijklmnopqrstuvwxyz'
388
+ ) != 'aswrelstd'
389
+ and
390
+ translate( TipoDato,
391
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
392
+ 'abcdefghijklmnopqrstuvwxyz'
393
+ ) != 'aswswhouse' ">
394
+
395
+
396
+ <div class="tx-xsmall">
397
+ <xsl:text>Tipo dato: </xsl:text>
398
+ <xsl:value-of select="TipoDato" />
399
+ <xsl:if test=" translate( TipoDato,
400
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
401
+ 'abcdefghijklmnopqrstuvwxyz'
402
+ ) = 'aswlottsca' ">
403
+ <xsl:text> (dati relativi a lotti e scadenze) </xsl:text>
404
+ </xsl:if>
405
+
406
+ </div>
407
+
408
+ <xsl:if test="RiferimentoTesto">
409
+ <div class="tx-xsmall">
410
+ <xsl:choose>
411
+ <xsl:when test=" translate( TipoDato,
412
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
413
+ 'abcdefghijklmnopqrstuvwxyz'
414
+ ) = 'aswlottsca' ">
415
+
416
+ <xsl:text>Lotto: </xsl:text>
417
+ </xsl:when>
418
+ <xsl:otherwise>
419
+ <xsl:text>Rif. testo: </xsl:text>
420
+ </xsl:otherwise>
421
+ </xsl:choose>
422
+ <xsl:value-of select="RiferimentoTesto" />
423
+ </div>
424
+ </xsl:if>
425
+
426
+
427
+
428
+ <xsl:if test="RiferimentoData">
429
+ <div class="tx-xsmall">
430
+ <xsl:choose>
431
+ <xsl:when test=" translate( TipoDato,
432
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
433
+ 'abcdefghijklmnopqrstuvwxyz'
434
+ ) = 'aswlottsca' ">
435
+
436
+ <xsl:text>Scadenza: </xsl:text>
437
+ </xsl:when>
438
+ <xsl:otherwise>
439
+ <xsl:text>Rif. data: </xsl:text>
440
+ </xsl:otherwise>
441
+ </xsl:choose>
442
+
443
+ <xsl:call-template name="FormatDateIta">
444
+ <xsl:with-param name="DateTime" select="RiferimentoData" />
445
+ </xsl:call-template>
446
+
447
+ </div>
448
+ </xsl:if>
449
+
450
+ <xsl:if test="RiferimentoNumero">
451
+ <div class="tx-xsmall">
452
+ <xsl:choose>
453
+ <xsl:when test=" translate( TipoDato,
454
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
455
+ 'abcdefghijklmnopqrstuvwxyz'
456
+ ) = 'aswlottsca' ">
457
+
458
+ <xsl:text>Quantità del suddetto lotto: </xsl:text>
459
+ </xsl:when>
460
+ <xsl:otherwise>
461
+ <xsl:text>Rif. numero: </xsl:text>
462
+ </xsl:otherwise>
463
+ </xsl:choose>
464
+ <xsl:value-of select="format-number(RiferimentoNumero, '###.###.##0,00######', 'euro')" />
465
+ </div>
466
+ </xsl:if>
467
+
468
+
469
+
470
+ </xsl:if>
471
+
472
+ </xsl:for-each>
473
+
474
+ <xsl:if test="RiferimentoAmministrazione">
475
+ <div class="tx-xsmall">
476
+ RIF.AMM. <xsl:value-of select="RiferimentoAmministrazione" />
477
+ </div>
478
+ </xsl:if>
479
+
480
+ </td>
481
+
482
+
483
+
484
+ <td class="import2" >
485
+ <xsl:if test="Quantita">
486
+ <xsl:if test="number(Quantita)">
487
+ <xsl:value-of select="format-number(Quantita, '###.###.##0,00######', 'euro')" />
488
+ </xsl:if>
489
+ </xsl:if>
490
+ </td>
491
+
492
+
493
+
494
+ <td class="import" >
495
+ <xsl:if test="PrezzoUnitario">
496
+ <xsl:if test="number(PrezzoUnitario)">
497
+
498
+ <xsl:value-of select="format-number(PrezzoUnitario, '###.###.##0,00######', 'euro')" />
499
+ </xsl:if>
500
+ </xsl:if>
501
+ </td>
502
+
503
+ <td class="textCenter" >
504
+ <xsl:if test="UnitaMisura">
505
+ <xsl:value-of select="UnitaMisura" />
506
+ </xsl:if>
507
+
508
+ </td>
509
+ <td class="import" >
510
+
511
+ <xsl:for-each select="ScontoMaggiorazione" >
512
+
513
+ <div>
514
+
515
+ <xsl:call-template name="FormatColSconto" >
516
+ <xsl:with-param name="tipo" select="Tipo" />
517
+ <xsl:with-param name="percentuale" select="Percentuale" />
518
+ <xsl:with-param name="importo" select="Importo" />
519
+ </xsl:call-template>
520
+
521
+
522
+ </div>
523
+ </xsl:for-each>
524
+
525
+ </td>
526
+
527
+ <td class="import" >
528
+
529
+ <xsl:if test="number(PrezzoTotale)">
530
+
531
+ <xsl:call-template name="FormatIVA">
532
+ <xsl:with-param name="Natura" select="Natura" />
533
+ <xsl:with-param name="IVA" select="AliquotaIVA" />
534
+ </xsl:call-template>
535
+ </xsl:if>
536
+
537
+ </td>
538
+ <td>
539
+ <xsl:if test="PrezzoTotale">
540
+ <xsl:if test="number(PrezzoTotale)">
541
+
542
+ <div class="import">
543
+ <xsl:value-of select="format-number(PrezzoTotale, '###.###.##0,00######', 'euro')" />
544
+ </div>
545
+ </xsl:if>
546
+
547
+
548
+ <xsl:if test="OpzPrezzoTotale">
549
+ <div class="tx-xsmall">
550
+ <xsl:value-of select="OpzPrezzoTotale" />
551
+ </div>
552
+ </xsl:if>
553
+ </xsl:if>
554
+ </td>
555
+
556
+ </tr>
557
+
558
+ </xsl:otherwise>
559
+ </xsl:choose>
560
+
561
+ <!--POST LINEA -->
562
+ <xsl:for-each select="OpzPostLinea" >
563
+ <xsl:call-template name="AltraDescrizioneLinea">
564
+ <xsl:with-param name="textDescrizione" select = "." />
565
+ </xsl:call-template>
566
+ </xsl:for-each>
567
+
568
+ </xsl:template>
569
+
570
+
571
+ <!-- Nel caso in cui ho un AltriDatiGestionali con aswrelstd o aswswhouse, mi permette
572
+ di stampare tutti alti dati ma non aswrelstd e aswswhouse -->
573
+ <xsl:template name="DettaglioLineeASW">
574
+ <tr >
575
+ <td>
576
+ </td>
577
+
578
+ <td >
579
+ <xsl:text>------------------------</xsl:text>
580
+ <xsl:for-each select="AltriDatiGestionali" >
581
+
582
+ <xsl:if test=" translate( TipoDato,
583
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
584
+ 'abcdefghijklmnopqrstuvwxyz'
585
+ ) != 'aswrelstd'
586
+ and
587
+ translate( TipoDato,
588
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
589
+ 'abcdefghijklmnopqrstuvwxyz'
590
+ ) != 'aswswhouse' ">
591
+
592
+ <div class="tx-xsmall">
593
+ <xsl:value-of select="RiferimentoTesto" />
594
+ <xsl:text> </xsl:text>
595
+ <xsl:value-of select="TipoDato" />
596
+ </div>
597
+
598
+ </xsl:if>
599
+
600
+ </xsl:for-each>
601
+ </td>
602
+
603
+ <td >
604
+ </td>
605
+
606
+
607
+ <td >
608
+ </td>
609
+ <td >
610
+ </td>
611
+ <td >
612
+ </td>
613
+
614
+ <td >
615
+ </td>
616
+ <td >
617
+ </td>
618
+ </tr>
619
+
620
+ </xsl:template>
621
+
622
+ <xsl:template name="AltraDescrizioneLinea">
623
+ <xsl:param name = "textDescrizione" />
624
+ <!-- testo della descrizione -->
625
+ <tr>
626
+ <td >
627
+ </td>
628
+
629
+ <td >
630
+ <div class="tx-xsmall">
631
+ <xsl:value-of select="$textDescrizione" />
632
+ </div>
633
+ </td>
634
+
635
+ <td>
636
+ </td>
637
+
638
+
639
+ <td>
640
+ </td>
641
+ <td>
642
+ </td>
643
+ <td>
644
+ </td>
645
+
646
+ <td>
647
+ </td>
648
+ <td>
649
+ </td>
650
+ </tr>
651
+
652
+ </xsl:template>
653
+
654
+ <xsl:template match="DatiRitenuta">
655
+
656
+
657
+ <tr>
658
+ <td >
659
+
660
+ <xsl:if test="TipoRitenuta">
661
+
662
+ <span>
663
+ <xsl:value-of select="TipoRitenuta" />
664
+ </span>
665
+ <xsl:variable name="TR">
666
+ <xsl:value-of select="TipoRitenuta" />
667
+ </xsl:variable>
668
+ <xsl:choose>
669
+ <xsl:when test="$TR='RT01'">
670
+ Ritenuta persone fisiche
671
+ </xsl:when>
672
+ <xsl:when test="$TR='RT02'">
673
+ Ritenuta persone giuridiche
674
+ </xsl:when>
675
+ <xsl:when test="$TR='RT03'">
676
+ Contributo INPS
677
+ </xsl:when>
678
+ <xsl:when test="$TR='RT04'">
679
+ Contributo ENASARCO
680
+ </xsl:when>
681
+ <xsl:when test="$TR='RT05'">
682
+ Contributo ENPAM
683
+ </xsl:when>
684
+ <xsl:when test="$TR='RT06'">
685
+ Altro contributo previdenziale
686
+ </xsl:when>
687
+ <xsl:when test="$TR=''">
688
+ </xsl:when>
689
+ <xsl:otherwise>
690
+ <span>(!!! codice non previsto !!!)</span>
691
+ </xsl:otherwise>
692
+ </xsl:choose>
693
+
694
+ </xsl:if>
695
+ </td>
696
+
697
+ <td class="import" >
698
+ <xsl:if test="AliquotaRitenuta">
699
+ <xsl:value-of select="format-number(AliquotaRitenuta, '###.###.##0,00', 'euro')" />
700
+ </xsl:if>
701
+
702
+ </td>
703
+
704
+ <td >
705
+ <xsl:if test="CausalePagamento">
706
+
707
+ <span>
708
+ <xsl:value-of select="CausalePagamento" />
709
+ </span>
710
+ <xsl:variable name="CP">
711
+ <xsl:value-of select="CausalePagamento" />
712
+ </xsl:variable>
713
+ <xsl:if test="$CP!=''">
714
+ (decodifica come da modello CU)
715
+ </xsl:if>
716
+
717
+ </xsl:if>
718
+ </td>
719
+
720
+ <td class="import" >
721
+ <xsl:if test="ImportoRitenuta">
722
+
723
+ <xsl:value-of select="format-number(ImportoRitenuta, '###.###.##0,00', 'euro')" />
724
+
725
+ </xsl:if>
726
+ </td>
727
+
728
+ </tr>
729
+
730
+ </xsl:template>
731
+
732
+ <xsl:template match="DettaglioPagamento">
733
+
734
+ <xsl:if test="Beneficiario">
735
+ Beneficiario <xsl:value-of select="Beneficiario" /> <br/>
736
+ </xsl:if>
737
+
738
+ <xsl:if test="IBAN">
739
+ IBAN
740
+ <xsl:value-of select="IBAN" /> <br/>
741
+ </xsl:if>
742
+
743
+ <xsl:if test="ABI or CAB or BIC ">
744
+
745
+ <xsl:if test="ABI">
746
+ ABI <xsl:value-of select="ABI" />
747
+ </xsl:if>
748
+
749
+ <xsl:if test="CAB">
750
+ CAB <xsl:value-of select="CAB" />
751
+ </xsl:if>
752
+
753
+ <xsl:if test="BIC">
754
+ BIC <xsl:value-of select="BIC" />
755
+ </xsl:if>
756
+ <br/>
757
+ </xsl:if>
758
+
759
+ <xsl:if test="IstitutoFinanziario">
760
+ <xsl:value-of select="IstitutoFinanziario" />
761
+ <br/>
762
+ </xsl:if>
763
+
764
+ <xsl:if test="CodUfficioPostale">
765
+ Codice ufficio postale
766
+ <xsl:value-of select="CodUfficioPostale" />
767
+ <br/>
768
+ </xsl:if>
769
+
770
+ <xsl:if test="TitoloQuietanzante or CognomeQuietanzante or NomeQuietanzante or CFQuietanzante">
771
+ Quietanzante
772
+ <xsl:value-of select="concat(TitoloQuietanzante , ' ',CognomeQuietanzante, ' ', NomeQuietanzante, ' ', CFQuietanzante )"/>
773
+ <br/>
774
+ </xsl:if>
775
+
776
+ <xsl:if test="DataLimitePagamentoAnticipato or ScontoPagamentoAnticipato">
777
+
778
+ <xsl:if test="DataLimitePagamentoAnticipato">
779
+ Data limite pagamento anticipato <xsl:call-template name="FormatDateIta">
780
+ <xsl:with-param name="DateTime" select="DataLimitePagamentoAnticipato" />
781
+ </xsl:call-template>
782
+ </xsl:if>
783
+
784
+ <xsl:if test="ScontoPagamentoAnticipato">
785
+ Sconto anticipato
786
+ <xsl:value-of select="format-number(ScontoPagamentoAnticipato, '###.###.##0,00', 'euro')" />
787
+ </xsl:if>
788
+ <br/>
789
+ </xsl:if>
790
+
791
+ <xsl:if test="DataDecorrenzaPenale or PenalitaPagamentiRitardati">
792
+
793
+ <xsl:if test="DataDecorrenzaPenale">
794
+ Data penale <xsl:call-template name="FormatDateIta">
795
+ <xsl:with-param name="DateTime" select="DataDecorrenzaPenale" />
796
+ </xsl:call-template>
797
+ </xsl:if>
798
+
799
+ <xsl:if test="PenalitaPagamentiRitardati">
800
+ Importo penale
801
+ <xsl:value-of select="format-number(PenalitaPagamentiRitardati, '###.###.##0,00', 'euro')" />
802
+ </xsl:if>
803
+
804
+ <br/>
805
+ </xsl:if>
806
+
807
+ <xsl:if test="CodicePagamento">
808
+ Codice pagamento <xsl:value-of select="CodicePagamento" />
809
+ </xsl:if>
810
+
811
+ </xsl:template>
812
+
813
+ <xsl:template name="FatturaElettronica">
814
+
815
+ <xsl:param name="TipoFattura" />
816
+ <xsl:param name="IsFPRS" />
817
+
818
+ <xsl:if test="$TipoFattura">
819
+
820
+
821
+ <!--Variabile che contiene il codice destinatario dall'HEADER perchè viene visualizzato nella sezione BODY -->
822
+ <!--<xsl:variable name="CodiceDestinatario" select="$TipoFattura/FatturaElettronicaHeader/DatiTrasmissione/CodiceDestinatario"/>-->
823
+ <xsl:variable name="PecDestinatario" select="$TipoFattura/FatturaElettronicaHeader/DatiTrasmissione/PECDestinatario"/>
824
+
825
+ <!--Variabile che contiene il codice destinatario dall'HEADER perchè viene visualizzato nella sezione BODY -->
826
+ <xsl:variable name="CodiceDestinatario" >
827
+
828
+ <xsl:choose>
829
+ <xsl:when test="$TipoFattura/FatturaElettronicaHeader/DatiTrasmissione/CodiceDestinatario='0000000'">
830
+ <xsl:value-of select="$TipoFattura/FatturaElettronicaHeader/DatiTrasmissione/PECDestinatario" />
831
+ </xsl:when>
832
+ <xsl:otherwise>
833
+ <xsl:value-of select="$TipoFattura/FatturaElettronicaHeader/DatiTrasmissione/CodiceDestinatario" />
834
+ </xsl:otherwise>
835
+ </xsl:choose>
836
+ </xsl:variable>
837
+
838
+ <div id="fattura-elettronica" class="page">
839
+
840
+ <!-- FatturaElettronicaHeader -->
841
+ <xsl:if test="$TipoFattura/FatturaElettronicaHeader">
842
+
843
+ <xsl:if test="$TipoFattura/FatturaElettronicaHeader/NomeDocumento">
844
+ <table class="tbNoBorder">
845
+ <tr >
846
+ <td>
847
+ <xsl:value-of select="$TipoFattura/FatturaElettronicaHeader/NomeDocumento"/>
848
+ </td>
849
+ </tr>
850
+ </table>
851
+ </xsl:if>
852
+
853
+ <table id="tbHeader" class="tbHeader">
854
+
855
+ <tr >
856
+ <td class="tdHead">
857
+
858
+ <table class="tableHead">
859
+ <tr>
860
+
861
+ <td >
862
+
863
+ <!--INIZIO CEDENTE PRESTATORE-->
864
+ <div class="headBorder" >
865
+
866
+ <label class= "headerLabel">Cedente/prestatore (fornitore) </label>
867
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaHeader/CedentePrestatore">
868
+
869
+ <xsl:choose>
870
+ <xsl:when test="DatiAnagrafici">
871
+ <!--DatiAnagrafici FPA\FPR-->
872
+
873
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaHeader/CedentePrestatore/DatiAnagrafici">
874
+
875
+ <div class="headContent mt5">
876
+ <xsl:if test="IdFiscaleIVA">
877
+
878
+ Identificativo fiscale ai fini IVA:
879
+ <span>
880
+ <xsl:value-of select="IdFiscaleIVA/IdPaese" />
881
+ <xsl:value-of select="IdFiscaleIVA/IdCodice" />
882
+ </span>
883
+
884
+ </xsl:if>
885
+ </div>
886
+
887
+ <div class="headContent" >
888
+
889
+ <xsl:if test="CodiceFiscale">
890
+
891
+ Codice fiscale:
892
+ <span>
893
+ <xsl:value-of select="CodiceFiscale" />
894
+ </span>
895
+
896
+ </xsl:if>
897
+
898
+ </div>
899
+
900
+ <div class="headContent" >
901
+
902
+ <xsl:if test="Anagrafica/Denominazione">
903
+
904
+ Denominazione:
905
+ <span>
906
+ <xsl:value-of select="Anagrafica/Denominazione" />
907
+ </span>
908
+
909
+ </xsl:if>
910
+
911
+ </div>
912
+
913
+ <div class="headContent" >
914
+
915
+ <xsl:if test="Anagrafica/Nome | Anagrafica/Cognome">
916
+
917
+ Cognome nome:
918
+
919
+ <xsl:if test="Anagrafica/Cognome">
920
+ <span>
921
+ <xsl:value-of select="Anagrafica/Cognome" />
922
+ <xsl:text> </xsl:text>
923
+ </span>
924
+ </xsl:if>
925
+ <xsl:if test="Anagrafica/Nome">
926
+ <span>
927
+ <xsl:value-of select="Anagrafica/Nome" />
928
+ </span>
929
+ </xsl:if>
930
+
931
+ </xsl:if>
932
+
933
+ </div>
934
+
935
+
936
+ <div class="headContent" >
937
+
938
+ <xsl:if test="RegimeFiscale">
939
+
940
+ Regime fiscale:
941
+ <span>
942
+ <xsl:value-of select="RegimeFiscale" />
943
+ </span>
944
+
945
+ <xsl:variable name="RF">
946
+ <xsl:value-of select="RegimeFiscale" />
947
+ </xsl:variable>
948
+ <xsl:choose>
949
+ <xsl:when test="$RF='RF01'">
950
+ ordinario
951
+ </xsl:when>
952
+ <xsl:when test="$RF='RF02'">
953
+ contribuenti minimi
954
+ </xsl:when>
955
+ <xsl:when test="$RF='RF03'">
956
+ nuove iniziative produttive - Non più valido in quanto abrogato dalla legge di stabilità 2015
957
+ </xsl:when>
958
+ <xsl:when test="$RF='RF04'">
959
+ agricoltura e attività connesse e pesca
960
+ </xsl:when>
961
+ <xsl:when test="$RF='RF05'">
962
+ vendita sali e tabacchi
963
+ </xsl:when>
964
+ <xsl:when test="$RF='RF06'">
965
+ commercio fiammiferi
966
+ </xsl:when>
967
+ <xsl:when test="$RF='RF07'">
968
+ editoria
969
+ </xsl:when>
970
+ <xsl:when test="$RF='RF08'">
971
+ gestione servizi telefonia pubblica
972
+ </xsl:when>
973
+ <xsl:when test="$RF='RF09'">
974
+ rivendita documenti di trasporto pubblico e di sosta
975
+ </xsl:when>
976
+ <xsl:when test="$RF='RF10'">
977
+ intrattenimenti, giochi e altre attività di cui alla tariffa allegata al DPR 640/72
978
+ </xsl:when>
979
+ <xsl:when test="$RF='RF11'">
980
+ agenzie viaggi e turismo
981
+ </xsl:when>
982
+ <xsl:when test="$RF='RF12'">
983
+ agriturismo
984
+ </xsl:when>
985
+ <xsl:when test="$RF='RF13'">
986
+ vendite a domicilio
987
+ </xsl:when>
988
+ <xsl:when test="$RF='RF14'">
989
+ rivendita beni usati, oggetti d’arte, d’antiquariato o da collezione
990
+ </xsl:when>
991
+ <xsl:when test="$RF='RF15'">
992
+ agenzie di vendite all’asta di oggetti d’arte, antiquariato o da collezione
993
+ </xsl:when>
994
+ <xsl:when test="$RF='RF16'">
995
+ IVA per cassa P.A.
996
+ </xsl:when>
997
+ <xsl:when test="$RF='RF17'">
998
+ IVA per cassa - art. 32-bis, D.L. 83/2012
999
+ </xsl:when>
1000
+ <xsl:when test="$RF='RF19'">
1001
+ Regime forfettario
1002
+ </xsl:when>
1003
+ <xsl:when test="$RF='RF18'">
1004
+ altro
1005
+ </xsl:when>
1006
+ <xsl:when test="$RF=''">
1007
+ </xsl:when>
1008
+ <xsl:otherwise>
1009
+ <span>(!!! codice non previsto !!!)</span>
1010
+ </xsl:otherwise>
1011
+ </xsl:choose>
1012
+
1013
+ </xsl:if>
1014
+
1015
+ </div>
1016
+
1017
+ </xsl:for-each>
1018
+
1019
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaHeader/CedentePrestatore/Sede">
1020
+
1021
+ <div class="headContent" >
1022
+
1023
+ <xsl:if test="Indirizzo">
1024
+
1025
+ Indirizzo:
1026
+ <span>
1027
+ <xsl:value-of select="Indirizzo" />
1028
+ <xsl:text> </xsl:text>
1029
+ <xsl:value-of select="NumeroCivico" />
1030
+ </span>
1031
+
1032
+ </xsl:if>
1033
+
1034
+ </div>
1035
+
1036
+ <div class="headContent" >
1037
+ <span>
1038
+ <xsl:if test="Comune">
1039
+
1040
+ Comune:
1041
+ <span>
1042
+ <xsl:value-of select="Comune" />
1043
+
1044
+ </span>
1045
+
1046
+ </xsl:if>
1047
+ <xsl:if test="Provincia">
1048
+
1049
+ Provincia:
1050
+ <span>
1051
+ <xsl:value-of select="Provincia" />
1052
+
1053
+ </span>
1054
+
1055
+ </xsl:if>
1056
+ </span>
1057
+
1058
+
1059
+ </div>
1060
+ <div class="headContent" >
1061
+
1062
+ <span>
1063
+ <xsl:if test="CAP">
1064
+ Cap:
1065
+ <span>
1066
+ <xsl:value-of select="CAP" />
1067
+
1068
+ </span>
1069
+ </xsl:if>
1070
+
1071
+ <xsl:if test="Nazione">
1072
+
1073
+ Nazione:
1074
+ <span>
1075
+ <xsl:value-of select="Nazione" />
1076
+
1077
+ </span>
1078
+
1079
+ </xsl:if>
1080
+ </span>
1081
+
1082
+ </div>
1083
+ </xsl:for-each>
1084
+ <div class="headContent" >
1085
+
1086
+ <xsl:if test="$TipoFattura/FatturaElettronicaHeader/CedentePrestatore/Contatti/Telefono">
1087
+
1088
+ Telefono:
1089
+ <span>
1090
+ <xsl:value-of select="$TipoFattura/FatturaElettronicaHeader/CedentePrestatore/Contatti/Telefono" />
1091
+
1092
+ </span>
1093
+
1094
+ </xsl:if>
1095
+
1096
+
1097
+ </div>
1098
+
1099
+ <div class="headContent" >
1100
+
1101
+ <xsl:if test="$TipoFattura/FatturaElettronicaHeader/CedentePrestatore/Contatti/Email">
1102
+
1103
+ Email:
1104
+ <span>
1105
+ <xsl:value-of select="$TipoFattura/FatturaElettronicaHeader/CedentePrestatore/Contatti/Email" />
1106
+
1107
+ </span>
1108
+
1109
+ </xsl:if>
1110
+
1111
+
1112
+
1113
+ </div>
1114
+
1115
+ <div class="headContent" >
1116
+
1117
+ <xsl:if test="$TipoFattura/FatturaElettronicaHeader/CedentePrestatore/RiferimentoAmministrazione">
1118
+
1119
+ Riferimento Amministrazione:
1120
+ <span>
1121
+ <xsl:value-of select="$TipoFattura/FatturaElettronicaHeader/CedentePrestatore/RiferimentoAmministrazione" />
1122
+
1123
+ </span>
1124
+
1125
+ </xsl:if>
1126
+
1127
+
1128
+
1129
+ </div>
1130
+
1131
+ </xsl:when>
1132
+ <xsl:otherwise>
1133
+ <!--Anagrafica FPRS-->
1134
+ <div class="headContent mt5">
1135
+ <xsl:if test="IdFiscaleIVA">
1136
+
1137
+ Identificativo fiscale ai fini IVA:
1138
+ <span>
1139
+ <xsl:value-of select="IdFiscaleIVA/IdPaese" />
1140
+ <xsl:value-of select="IdFiscaleIVA/IdCodice" />
1141
+ </span>
1142
+
1143
+ </xsl:if>
1144
+ </div>
1145
+
1146
+ <div class="headContent" >
1147
+
1148
+ <xsl:if test="CodiceFiscale">
1149
+
1150
+ Codice fiscale:
1151
+ <span>
1152
+ <xsl:value-of select="CodiceFiscale" />
1153
+ </span>
1154
+
1155
+ </xsl:if>
1156
+
1157
+ </div>
1158
+
1159
+ <xsl:if test="Denominazione">
1160
+ <div class="headContent">
1161
+
1162
+ Denominazione:
1163
+ <span>
1164
+ <xsl:value-of select="Denominazione" />
1165
+ </span>
1166
+ </div>
1167
+ </xsl:if>
1168
+
1169
+ <xsl:if test="Nome | Cognome">
1170
+ <div class="headContent" >
1171
+
1172
+ Cognome nome:
1173
+
1174
+ <xsl:if test="Cognome">
1175
+ <span>
1176
+ <xsl:value-of select="Cognome" />
1177
+ <xsl:text> </xsl:text>
1178
+ </span>
1179
+ </xsl:if>
1180
+ <xsl:if test="Nome">
1181
+ <span>
1182
+ <xsl:value-of select="Nome" />
1183
+ </span>
1184
+ </xsl:if>
1185
+ </div>
1186
+ </xsl:if>
1187
+
1188
+ <div class="headContent" >
1189
+
1190
+ <xsl:if test="RegimeFiscale">
1191
+
1192
+ Regime fiscale:
1193
+ <span>
1194
+ <xsl:value-of select="RegimeFiscale" />
1195
+ </span>
1196
+
1197
+ <xsl:variable name="RF">
1198
+ <xsl:value-of select="RegimeFiscale" />
1199
+ </xsl:variable>
1200
+ <xsl:choose>
1201
+ <xsl:when test="$RF='RF01'">
1202
+ ordinario
1203
+ </xsl:when>
1204
+ <xsl:when test="$RF='RF02'">
1205
+ contribuenti minimi
1206
+ </xsl:when>
1207
+ <xsl:when test="$RF='RF03'">
1208
+ nuove iniziative produttive - Non più valido in quanto abrogato dalla legge di stabilità 2015
1209
+ </xsl:when>
1210
+ <xsl:when test="$RF='RF04'">
1211
+ agricoltura e attività connesse e pesca
1212
+ </xsl:when>
1213
+ <xsl:when test="$RF='RF05'">
1214
+ vendita sali e tabacchi
1215
+ </xsl:when>
1216
+ <xsl:when test="$RF='RF06'">
1217
+ commercio fiammiferi
1218
+ </xsl:when>
1219
+ <xsl:when test="$RF='RF07'">
1220
+ editoria
1221
+ </xsl:when>
1222
+ <xsl:when test="$RF='RF08'">
1223
+ gestione servizi telefonia pubblica
1224
+ </xsl:when>
1225
+ <xsl:when test="$RF='RF09'">
1226
+ rivendita documenti di trasporto pubblico e di sosta
1227
+ </xsl:when>
1228
+ <xsl:when test="$RF='RF10'">
1229
+ intrattenimenti, giochi e altre attività di cui alla tariffa allegata al DPR 640/72
1230
+ </xsl:when>
1231
+ <xsl:when test="$RF='RF11'">
1232
+ agenzie viaggi e turismo
1233
+ </xsl:when>
1234
+ <xsl:when test="$RF='RF12'">
1235
+ agriturismo
1236
+ </xsl:when>
1237
+ <xsl:when test="$RF='RF13'">
1238
+ vendite a domicilio
1239
+ </xsl:when>
1240
+ <xsl:when test="$RF='RF14'">
1241
+ rivendita beni usati, oggetti d’arte, d’antiquariato o da collezione
1242
+ </xsl:when>
1243
+ <xsl:when test="$RF='RF15'">
1244
+ agenzie di vendite all’asta di oggetti d’arte, antiquariato o da collezione
1245
+ </xsl:when>
1246
+ <xsl:when test="$RF='RF16'">
1247
+ IVA per cassa P.A.
1248
+ </xsl:when>
1249
+ <xsl:when test="$RF='RF17'">
1250
+ IVA per cassa - art. 32-bis, D.L. 83/2012
1251
+ </xsl:when>
1252
+ <xsl:when test="$RF='RF19'">
1253
+ Regime forfettario
1254
+ </xsl:when>
1255
+ <xsl:when test="$RF='RF18'">
1256
+ altro
1257
+ </xsl:when>
1258
+ <xsl:when test="$RF=''">
1259
+ </xsl:when>
1260
+ <xsl:otherwise>
1261
+ <span>!!! codice non previsto !!!</span>
1262
+ </xsl:otherwise>
1263
+ </xsl:choose>
1264
+
1265
+ </xsl:if>
1266
+
1267
+ </div>
1268
+
1269
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaHeader/CedentePrestatore/Sede">
1270
+
1271
+ <div class="headContent" >
1272
+
1273
+ <xsl:if test="Indirizzo">
1274
+
1275
+ Indirizzo:
1276
+ <span>
1277
+ <xsl:value-of select="Indirizzo" />
1278
+ <xsl:text> </xsl:text>
1279
+ <xsl:value-of select="NumeroCivico" />
1280
+ </span>
1281
+
1282
+ </xsl:if>
1283
+
1284
+ </div>
1285
+
1286
+ <div class="headContent" >
1287
+ <span>
1288
+ <xsl:if test="Comune">
1289
+
1290
+ Comune:
1291
+ <span>
1292
+ <xsl:value-of select="Comune" />
1293
+
1294
+ </span>
1295
+
1296
+ </xsl:if>
1297
+ <xsl:if test="Provincia">
1298
+
1299
+ Provincia:
1300
+ <span>
1301
+ <xsl:value-of select="Provincia" />
1302
+
1303
+ </span>
1304
+
1305
+ </xsl:if>
1306
+ </span>
1307
+
1308
+
1309
+ </div>
1310
+ <div class="headContent" >
1311
+
1312
+ <span>
1313
+ <xsl:if test="CAP">
1314
+ Cap:
1315
+ <span>
1316
+ <xsl:value-of select="CAP" />
1317
+
1318
+ </span>
1319
+ </xsl:if>
1320
+
1321
+ <xsl:if test="Nazione">
1322
+
1323
+ Nazione:
1324
+ <span>
1325
+ <xsl:value-of select="Nazione" />
1326
+
1327
+ </span>
1328
+
1329
+ </xsl:if>
1330
+ </span>
1331
+
1332
+ </div>
1333
+ </xsl:for-each>
1334
+ </xsl:otherwise>
1335
+ </xsl:choose>
1336
+
1337
+ </xsl:for-each>
1338
+
1339
+ <!--INIZIO TerzoIntermediarioOSoggettoEmittente-->
1340
+ <xsl:if test="$TipoFattura/FatturaElettronicaHeader/TerzoIntermediarioOSoggettoEmittente">
1341
+ <br/>
1342
+
1343
+ <xsl:choose>
1344
+ <xsl:when test="$TipoFattura/FatturaElettronicaHeader/SoggettoEmittente='CC'">
1345
+ <label class= "headerLabel">Soggetto Emittente (cessionario committente) </label>
1346
+
1347
+ </xsl:when>
1348
+ <xsl:when test="$TipoFattura/FatturaElettronicaHeader/SoggettoEmittente='TZ'">
1349
+ <label class= "headerLabel">Terzo Intermediario </label>
1350
+ </xsl:when>
1351
+
1352
+ <xsl:otherwise>
1353
+ <label class= "headerLabel">Terzo Intermediario o Soggetto Emittente </label>
1354
+ </xsl:otherwise>
1355
+ </xsl:choose>
1356
+
1357
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaHeader/TerzoIntermediarioOSoggettoEmittente/DatiAnagrafici">
1358
+
1359
+ <div class="headContent mt5">
1360
+ <xsl:if test="IdFiscaleIVA">
1361
+
1362
+ Identificativo fiscale ai fini IVA:
1363
+ <span>
1364
+ <xsl:value-of select="IdFiscaleIVA/IdPaese" />
1365
+ <xsl:value-of select="IdFiscaleIVA/IdCodice" />
1366
+ </span>
1367
+
1368
+ </xsl:if>
1369
+ </div>
1370
+
1371
+ <div class="headContent" >
1372
+
1373
+ <xsl:if test="CodiceFiscale">
1374
+
1375
+ Codice fiscale:
1376
+ <span>
1377
+ <xsl:value-of select="CodiceFiscale" />
1378
+ </span>
1379
+
1380
+ </xsl:if>
1381
+
1382
+ </div>
1383
+
1384
+ <div class="headContent" >
1385
+
1386
+ <xsl:if test="Anagrafica/Denominazione">
1387
+
1388
+ Denominazione:
1389
+ <span>
1390
+ <xsl:value-of select="Anagrafica/Denominazione" />
1391
+ </span>
1392
+
1393
+ </xsl:if>
1394
+
1395
+ </div>
1396
+
1397
+ <div class="headContent" >
1398
+
1399
+ <xsl:if test="Anagrafica/Nome | Anagrafica/Cognome">
1400
+
1401
+ Cognome nome:
1402
+
1403
+ <xsl:if test="Anagrafica/Cognome">
1404
+ <span>
1405
+ <xsl:value-of select="Anagrafica/Cognome" />
1406
+ <xsl:text> </xsl:text>
1407
+ </span>
1408
+ </xsl:if>
1409
+ <xsl:if test="Anagrafica/Nome">
1410
+ <span>
1411
+ <xsl:value-of select="Anagrafica/Nome" />
1412
+ </span>
1413
+ </xsl:if>
1414
+
1415
+ </xsl:if>
1416
+
1417
+ </div>
1418
+
1419
+
1420
+ </xsl:for-each>
1421
+
1422
+
1423
+
1424
+ </xsl:if>
1425
+ <!--FINE TerzoIntermediarioOSoggettoEmittente-->
1426
+
1427
+ </div>
1428
+ <!--FINE CEDENTE PRESTATORE-->
1429
+
1430
+ </td>
1431
+ </tr>
1432
+
1433
+ </table>
1434
+
1435
+
1436
+
1437
+ </td>
1438
+ <td class="tdHead">
1439
+
1440
+ <!--INIZIO CESSIONARIO COMMITTENTE-->
1441
+ <table class="tableHead">
1442
+ <tr>
1443
+ <td >
1444
+
1445
+ <div class="headBorder" >
1446
+ <label class= "headerLabel" >Cessionario/committente (cliente) </label>
1447
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaHeader/CessionarioCommittente">
1448
+ <xsl:choose>
1449
+ <xsl:when test="DatiAnagrafici">
1450
+ <!--DatiAnagrafici FPA\FPR-->
1451
+ <xsl:for-each select="DatiAnagrafici">
1452
+
1453
+ <div class="headContent mt5" >
1454
+ <xsl:if test="IdFiscaleIVA">
1455
+
1456
+ Identificativo fiscale ai fini IVA:
1457
+ <span>
1458
+ <xsl:value-of select="IdFiscaleIVA/IdPaese" />
1459
+ <xsl:value-of select="IdFiscaleIVA/IdCodice" />
1460
+ </span>
1461
+
1462
+ </xsl:if>
1463
+ </div>
1464
+
1465
+ <div class="headContent" >
1466
+
1467
+ <xsl:if test="CodiceFiscale">
1468
+
1469
+ Codice fiscale:
1470
+ <span>
1471
+ <xsl:value-of select="CodiceFiscale" />
1472
+ </span>
1473
+
1474
+ </xsl:if>
1475
+
1476
+ </div>
1477
+
1478
+ <div class="headContent" >
1479
+
1480
+ <xsl:if test="Anagrafica/Denominazione">
1481
+
1482
+ Denominazione:
1483
+ <span>
1484
+ <xsl:value-of select="Anagrafica/Denominazione" />
1485
+ </span>
1486
+
1487
+ </xsl:if>
1488
+
1489
+ </div>
1490
+
1491
+ <div class="headContent" >
1492
+
1493
+ <xsl:if test="Anagrafica/Nome | Anagrafica/Cognome">
1494
+
1495
+ Cognome nome:
1496
+
1497
+ <xsl:if test="Anagrafica/Cognome">
1498
+ <span>
1499
+ <xsl:value-of select="Anagrafica/Cognome" />
1500
+ <xsl:text> </xsl:text>
1501
+ </span>
1502
+ </xsl:if>
1503
+ <xsl:if test="Anagrafica/Nome">
1504
+ <span>
1505
+ <xsl:value-of select="Anagrafica/Nome" />
1506
+ </span>
1507
+ </xsl:if>
1508
+
1509
+ </xsl:if>
1510
+
1511
+ </div>
1512
+
1513
+
1514
+ </xsl:for-each>
1515
+
1516
+ <xsl:for-each select="Sede">
1517
+
1518
+ <div class="headContent" >
1519
+
1520
+ <xsl:if test="Indirizzo">
1521
+
1522
+ Indirizzo:
1523
+ <span>
1524
+ <xsl:value-of select="Indirizzo" />
1525
+ <xsl:text> </xsl:text>
1526
+ <xsl:value-of select="NumeroCivico" />
1527
+ </span>
1528
+
1529
+ </xsl:if>
1530
+
1531
+ </div>
1532
+
1533
+
1534
+
1535
+ <div class="headContent" >
1536
+ <span>
1537
+ <xsl:if test="Comune">
1538
+
1539
+ Comune:
1540
+ <span>
1541
+ <xsl:value-of select="Comune" />
1542
+
1543
+ </span>
1544
+
1545
+ </xsl:if>
1546
+ <xsl:if test="Provincia">
1547
+
1548
+ Provincia:
1549
+ <span>
1550
+ <xsl:value-of select="Provincia" />
1551
+
1552
+ </span>
1553
+
1554
+ </xsl:if>
1555
+ </span>
1556
+
1557
+
1558
+ </div>
1559
+ <div class="headContent" >
1560
+
1561
+ <span>
1562
+ <xsl:if test="CAP">
1563
+ Cap:
1564
+ <span>
1565
+ <xsl:value-of select="CAP" />
1566
+
1567
+ </span>
1568
+ </xsl:if>
1569
+
1570
+ <xsl:if test="Nazione">
1571
+
1572
+ Nazione:
1573
+ <span>
1574
+ <xsl:value-of select="Nazione" />
1575
+
1576
+ </span>
1577
+
1578
+ </xsl:if>
1579
+ </span>
1580
+
1581
+ </div>
1582
+ <div class="headContent" >
1583
+
1584
+ <xsl:if test="$PecDestinatario">
1585
+
1586
+ Pec: <span>
1587
+ <xsl:value-of select="$PecDestinatario" />
1588
+ </span>
1589
+
1590
+ </xsl:if>
1591
+
1592
+ </div>
1593
+
1594
+
1595
+ </xsl:for-each>
1596
+ </xsl:when>
1597
+ <xsl:otherwise>
1598
+ <!--Anagrafica FPRS-->
1599
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaHeader/CessionarioCommittente/IdentificativiFiscali">
1600
+ <div class="headContent mt5" >
1601
+ <xsl:if test="IdFiscaleIVA">
1602
+
1603
+ Identificativo fiscale ai fini IVA:
1604
+ <span>
1605
+ <xsl:value-of select="IdFiscaleIVA/IdPaese" />
1606
+ <xsl:value-of select="IdFiscaleIVA/IdCodice" />
1607
+ </span>
1608
+
1609
+ </xsl:if>
1610
+ </div>
1611
+
1612
+ <div class="headContent" >
1613
+
1614
+ <xsl:if test="CodiceFiscale">
1615
+
1616
+ Codice fiscale:
1617
+ <span>
1618
+ <xsl:value-of select="CodiceFiscale" />
1619
+ </span>
1620
+
1621
+ </xsl:if>
1622
+
1623
+ </div>
1624
+ </xsl:for-each>
1625
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaHeader/CessionarioCommittente/AltriDatiIdentificativi">
1626
+ <div class="headContent" >
1627
+
1628
+ <xsl:if test="Denominazione">
1629
+
1630
+ Denominazione:
1631
+ <span>
1632
+ <xsl:value-of select="Denominazione" />
1633
+ </span>
1634
+
1635
+ </xsl:if>
1636
+
1637
+ </div>
1638
+
1639
+ <div class="headContent" >
1640
+
1641
+ <xsl:if test="Nome | Cognome">
1642
+
1643
+ Cognome nome:
1644
+
1645
+ <xsl:if test="Cognome">
1646
+ <span>
1647
+ <xsl:value-of select="Cognome" />
1648
+ <xsl:text> </xsl:text>
1649
+ </span>
1650
+ </xsl:if>
1651
+ <xsl:if test="Nome">
1652
+ <span>
1653
+ <xsl:value-of select="Nome" />
1654
+ </span>
1655
+ </xsl:if>
1656
+
1657
+ </xsl:if>
1658
+
1659
+ </div>
1660
+
1661
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaHeader/CessionarioCommittente/AltriDatiIdentificativi/Sede">
1662
+
1663
+ <div class="headContent" >
1664
+
1665
+ <xsl:if test="Indirizzo">
1666
+
1667
+ Indirizzo:
1668
+ <span>
1669
+ <xsl:value-of select="Indirizzo" />
1670
+ <xsl:text> </xsl:text>
1671
+ <xsl:value-of select="NumeroCivico" />
1672
+ </span>
1673
+
1674
+ </xsl:if>
1675
+
1676
+ </div>
1677
+
1678
+
1679
+
1680
+ <div class="headContent" >
1681
+ <span>
1682
+ <xsl:if test="Comune">
1683
+
1684
+ Comune:
1685
+ <span>
1686
+ <xsl:value-of select="Comune" />
1687
+
1688
+ </span>
1689
+
1690
+ </xsl:if>
1691
+ <xsl:if test="Provincia">
1692
+
1693
+ Provincia:
1694
+ <span>
1695
+ <xsl:value-of select="Provincia" />
1696
+
1697
+ </span>
1698
+
1699
+ </xsl:if>
1700
+ </span>
1701
+
1702
+
1703
+ </div>
1704
+ <div class="headContent" >
1705
+
1706
+ <span>
1707
+ <xsl:if test="CAP">
1708
+ Cap:
1709
+ <span>
1710
+ <xsl:value-of select="CAP" />
1711
+
1712
+ </span>
1713
+ </xsl:if>
1714
+
1715
+ <xsl:if test="Nazione">
1716
+
1717
+ Nazione:
1718
+ <span>
1719
+ <xsl:value-of select="Nazione" />
1720
+
1721
+ </span>
1722
+
1723
+ </xsl:if>
1724
+ </span>
1725
+
1726
+ </div>
1727
+ <div class="headContent" >
1728
+
1729
+ <xsl:if test="$PecDestinatario">
1730
+
1731
+ Pec: <span>
1732
+ <xsl:value-of select="$PecDestinatario" />
1733
+ </span>
1734
+
1735
+ </xsl:if>
1736
+
1737
+ </div>
1738
+
1739
+
1740
+ </xsl:for-each>
1741
+
1742
+ </xsl:for-each>
1743
+ </xsl:otherwise>
1744
+ </xsl:choose>
1745
+ </xsl:for-each>
1746
+ </div>
1747
+
1748
+ </td>
1749
+ </tr>
1750
+
1751
+ </table>
1752
+ <!--FINE CESSIONARIO COMMITTENTE-->
1753
+ </td>
1754
+ </tr>
1755
+
1756
+
1757
+ </table>
1758
+
1759
+
1760
+ </xsl:if>
1761
+ <div style="height:10px" > </div>
1762
+
1763
+ <!-- FINE FatturaElettronicaHeader -->
1764
+
1765
+ <!--INIZIO BODY-->
1766
+
1767
+ <xsl:for-each select="$TipoFattura/FatturaElettronicaBody" >
1768
+
1769
+
1770
+ <xsl:variable name="BodyIndex" select="position()"/>
1771
+
1772
+ <!-- Conforme Standard AssoSoftware se altridatigestionali presenta ASWRELSTD -->
1773
+ <xsl:variable name="posASWRELSTD" >
1774
+ <xsl:for-each select="DatiBeniServizi/DettaglioLinee">
1775
+ <xsl:variable name="DettaglioLinee" select="."/>
1776
+
1777
+ <xsl:variable name="posDettaglioLinee" select="position()"/>
1778
+ <xsl:for-each select="AltriDatiGestionali">
1779
+
1780
+ <xsl:if test=" translate( TipoDato,
1781
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
1782
+ 'abcdefghijklmnopqrstuvwxyz'
1783
+ ) = 'aswrelstd'">
1784
+
1785
+ <xsl:value-of select="number($posDettaglioLinee)"/>
1786
+
1787
+ </xsl:if>
1788
+ </xsl:for-each>
1789
+
1790
+ </xsl:for-each>
1791
+ </xsl:variable>
1792
+ <!-- FINE conforme AssoSoftware -->
1793
+
1794
+
1795
+ <table class="tbFoglio">
1796
+
1797
+ <!-- TIPOLOGIA DOCUMENTO TESTATA-->
1798
+ <thead>
1799
+ <tr>
1800
+
1801
+ <th>Tipologia documento</th>
1802
+ <th class="perc">Art. 73</th>
1803
+ <th >Numero documento</th>
1804
+ <th class="data">Data documento</th>
1805
+ <th >Codice destinatario</th>
1806
+
1807
+ </tr>
1808
+ </thead>
1809
+ <tbody>
1810
+ <tr>
1811
+ <td>
1812
+ <xsl:if test="DatiGenerali/DatiGeneraliDocumento/TipoDocumento">
1813
+
1814
+ <xsl:value-of select="DatiGenerali/DatiGeneraliDocumento/TipoDocumento" />
1815
+
1816
+
1817
+ <xsl:variable name="TD">
1818
+ <xsl:value-of select="DatiGenerali/DatiGeneraliDocumento/TipoDocumento" />
1819
+ </xsl:variable>
1820
+ <xsl:choose>
1821
+ <xsl:when test="$TD='TD01'">
1822
+ fattura
1823
+ </xsl:when>
1824
+ <xsl:when test="$TD='TD02'">
1825
+ acconto/anticipo su fattura
1826
+ </xsl:when>
1827
+ <xsl:when test="$TD='TD03'">
1828
+ acconto/anticipo su parcella
1829
+ </xsl:when>
1830
+ <xsl:when test="$TD='TD04'">
1831
+ nota di credito
1832
+ </xsl:when>
1833
+ <xsl:when test="$TD='TD05'">
1834
+ nota di debito
1835
+ </xsl:when>
1836
+ <xsl:when test="$TD='TD06'">
1837
+ parcella
1838
+ </xsl:when>
1839
+ <xsl:when test="$TD='TD16'">
1840
+ integrazione fattura reverse charge interno
1841
+ </xsl:when>
1842
+ <xsl:when test="$TD='TD17'">
1843
+ integrazione/autofattura per acquisto servizi da estero
1844
+ </xsl:when>
1845
+ <xsl:when test="$TD='TD18'">
1846
+ integrazione per acquisto beni intracomunitari
1847
+ </xsl:when>
1848
+ <xsl:when test="$TD='TD19'">
1849
+ integrazione/autofattura per acquisto beni ex art.17 c.2 DPR 633/72
1850
+ </xsl:when>
1851
+ <xsl:when test="$TD='TD20'">
1852
+ autofattura per regolarizzazione e integrazione delle fatture - art.6 c.8 d.lgs.471/97 o art.46 c.5 D.L.331/93
1853
+ </xsl:when>
1854
+ <xsl:when test="$TD='TD21'">
1855
+ autofattura per splafonamento
1856
+ </xsl:when>
1857
+ <xsl:when test="$TD='TD22'">
1858
+ estrazione beni da Deposito IVA
1859
+ </xsl:when>
1860
+ <xsl:when test="$TD='TD23'">
1861
+ estrazione beni da Deposito IVA con versamento IVA
1862
+ </xsl:when>
1863
+ <xsl:when test="$TD='TD24'">
1864
+ fattura differita - art.21 c.4 lett. a)
1865
+ </xsl:when>
1866
+ <xsl:when test="$TD='TD25'">
1867
+ fattura differita - art.21 c.4 terzo periodo lett. b)
1868
+ </xsl:when>
1869
+ <xsl:when test="$TD='TD26'">
1870
+ cessione di beni ammortizzabili e per passaggi interni - art.36 DPR 633/72
1871
+ </xsl:when>
1872
+ <xsl:when test="$TD='TD27'">
1873
+ fattura per autoconsumo o per cessioni gratuite senza rivalsa
1874
+ </xsl:when>
1875
+ <xsl:when test="$TD='TD28'">
1876
+ acquisti da San Marino con IVA - fattura cartacea
1877
+ </xsl:when>
1878
+
1879
+ <!--FPRS-->
1880
+ <xsl:when test="$TD='TD07'">
1881
+ fattura semplificata
1882
+ </xsl:when>
1883
+ <xsl:when test="$TD='TD08'">
1884
+ nota di credito semplificata
1885
+ </xsl:when>
1886
+ <xsl:when test="$TD='TD09'">
1887
+ nota di debito semplificata
1888
+ </xsl:when>
1889
+ <xsl:when test="$TD=''">
1890
+ </xsl:when>
1891
+ <xsl:otherwise>
1892
+ <span>(!!! codice non previsto !!!)</span>
1893
+ </xsl:otherwise>
1894
+ </xsl:choose>
1895
+
1896
+ </xsl:if>
1897
+ </td>
1898
+
1899
+ <td class="ritenuta" >
1900
+ <xsl:if test="DatiGenerali/DatiGeneraliDocumento/Art73">
1901
+ <xsl:value-of select="DatiGenerali/DatiGeneraliDocumento/Art73" />
1902
+ </xsl:if>
1903
+ </td>
1904
+
1905
+ <td class="textCenter" >
1906
+
1907
+ <xsl:if test="DatiGenerali/DatiGeneraliDocumento/Numero">
1908
+ <xsl:value-of select="DatiGenerali/DatiGeneraliDocumento/Numero" />
1909
+ </xsl:if>
1910
+ </td>
1911
+ <td class="data" >
1912
+
1913
+ <xsl:if test="DatiGenerali/DatiGeneraliDocumento/Data">
1914
+ <xsl:call-template name="FormatDateIta">
1915
+ <xsl:with-param name="DateTime" select="DatiGenerali/DatiGeneraliDocumento/Data" />
1916
+ </xsl:call-template>
1917
+ </xsl:if>
1918
+
1919
+ </td>
1920
+
1921
+ <td class="textCenter" >
1922
+ <xsl:choose>
1923
+ <xsl:when test="$PecDestinatario">
1924
+ Indicata PEC
1925
+ </xsl:when>
1926
+
1927
+ <xsl:otherwise>
1928
+ <xsl:if test="$CodiceDestinatario">
1929
+ <xsl:value-of select="$CodiceDestinatario" />
1930
+ </xsl:if>
1931
+ </xsl:otherwise>
1932
+ </xsl:choose>
1933
+ </td>
1934
+
1935
+ </tr>
1936
+
1937
+ <!--FINE TIPOLOGIA Documento TESTATA-->
1938
+ </tbody>
1939
+ </table>
1940
+
1941
+ <xsl:if test="DatiGenerali/DatiGeneraliDocumento/Causale">
1942
+ <div class="separa"> </div>
1943
+ <table class="tbFoglio">
1944
+
1945
+ <!-- TIPOLOGIA DOCUMENTO TESTATA - parte causale-->
1946
+ <thead>
1947
+ <tr>
1948
+ <th>Causale</th>
1949
+ </tr>
1950
+ </thead>
1951
+ <tbody>
1952
+ <tr>
1953
+
1954
+ <td >
1955
+ <xsl:if test="DatiGenerali/DatiGeneraliDocumento/Causale">
1956
+
1957
+ <xsl:for-each select="DatiGenerali/DatiGeneraliDocumento/Causale" >
1958
+ <xsl:value-of select="." />
1959
+ </xsl:for-each>
1960
+
1961
+ </xsl:if>
1962
+ </td>
1963
+
1964
+ </tr>
1965
+
1966
+ <!--FINE TIPOLOGIA Documento TESTATA - parte causale -->
1967
+ </tbody>
1968
+ </table>
1969
+ </xsl:if>
1970
+
1971
+ <div class="separa"> </div>
1972
+
1973
+ <xsl:choose>
1974
+ <xsl:when test="$IsFPRS='1'">
1975
+
1976
+ <!-- Dettaglio Linee -->
1977
+ <table class="tbFoglio" >
1978
+
1979
+ <thead>
1980
+ <tr>
1981
+ <th>Descrizione</th>
1982
+ <th class="perc">Imposta</th>
1983
+ <th class="perc2">%IVA</th>
1984
+ <th class="ximport">Prezzo totale</th>
1985
+
1986
+ </tr>
1987
+ </thead>
1988
+ <tbody>
1989
+
1990
+ <xsl:for-each select="DatiBeniServizi" >
1991
+
1992
+ <tr>
1993
+ <td>
1994
+
1995
+ <xsl:if test="Descrizione">
1996
+ <xsl:value-of select="Descrizione" />
1997
+ </xsl:if>
1998
+
1999
+ <xsl:if test="RiferimentoNormativo">
2000
+ <div class="tx-xsmall">
2001
+ RIF.NORM. <xsl:value-of select="RiferimentoNormativo" />
2002
+ </div>
2003
+ </xsl:if>
2004
+
2005
+ </td>
2006
+ <td class="import" >
2007
+
2008
+ <xsl:if test="DatiIVA/Imposta">
2009
+ <xsl:value-of select="format-number(DatiIVA/Imposta, '###.###.##0,00', 'euro')" />
2010
+ </xsl:if>
2011
+ </td>
2012
+ <td class="import" >
2013
+
2014
+ <xsl:call-template name="FormatIVA">
2015
+ <xsl:with-param name="Natura" select="Natura" />
2016
+ <xsl:with-param name="IVA" select="DatiIVA/Aliquota" />
2017
+ </xsl:call-template>
2018
+
2019
+ </td>
2020
+ <td class="import" >
2021
+ <xsl:if test="Importo">
2022
+ <xsl:value-of select="format-number(Importo, '###.###.##0,00', 'euro')" />
2023
+ </xsl:if>
2024
+ </td>
2025
+ </tr>
2026
+
2027
+ </xsl:for-each>
2028
+
2029
+
2030
+ </tbody>
2031
+
2032
+ </table>
2033
+
2034
+ </xsl:when>
2035
+ <xsl:otherwise>
2036
+
2037
+ <!-- Dettaglio Linee -->
2038
+ <table class="tbFoglio" >
2039
+
2040
+ <thead>
2041
+ <tr>
2042
+ <th width="80px">Cod. articolo</th>
2043
+ <th>Descrizione</th>
2044
+ <th class="import2" >Quantità</th>
2045
+ <th class="import2">Prezzo unitario</th>
2046
+ <th class="perc2">UM</th>
2047
+ <th class="perc">Sconto o magg.</th>
2048
+ <th class="perc2">%IVA</th>
2049
+ <th class="ximport">Prezzo totale</th>
2050
+
2051
+ </tr>
2052
+ </thead>
2053
+ <tbody>
2054
+
2055
+
2056
+ <xsl:if test="count(DatiGenerali/DatiOrdineAcquisto[not(./RiferimentoNumeroLinea) or normalize-space(./RiferimentoNumeroLinea)='']) +
2057
+ count(DatiGenerali/DatiContratto[not(./RiferimentoNumeroLinea) or normalize-space(./RiferimentoNumeroLinea)='']) +
2058
+ count(DatiGenerali/DatiDDT[not(./RiferimentoNumeroLinea) or normalize-space(./RiferimentoNumeroLinea)='']) +
2059
+ count(DatiGenerali/DatiFattureCollegate[not(./RiferimentoNumeroLinea) or normalize-space(./RiferimentoNumeroLinea)='']) +
2060
+ count(DatiGenerali/DatiConvenzione[not(./RiferimentoNumeroLinea) or normalize-space(./RiferimentoNumeroLinea)=''])+
2061
+ count(DatiGenerali/DatiRicezione[not(./RiferimentoNumeroLinea) or normalize-space(./RiferimentoNumeroLinea)='']) > 0 " >
2062
+
2063
+
2064
+ <!-- Verifica che DatiOrdineAcquisto non siano senza riferimento numero linea in questo modo bisogna creare la linea di info -->
2065
+ <xsl:for-each select="DatiGenerali/DatiOrdineAcquisto[not(./RiferimentoNumeroLinea) or normalize-space(./RiferimentoNumeroLinea)=''] " >
2066
+
2067
+ <xsl:call-template name="DatiCorrelati" >
2068
+ <xsl:with-param name="Prefix" select='"Vs.Ord. "'/>
2069
+ <xsl:with-param name="IdDocumento" select="IdDocumento"/>
2070
+ <xsl:with-param name="Data" select="Data"/>
2071
+ <xsl:with-param name="CodiceCUP" select="CodiceCUP"/>
2072
+ <xsl:with-param name="CodiceCIG" select="CodiceCIG"/>
2073
+ </xsl:call-template >
2074
+ </xsl:for-each>
2075
+
2076
+ <!-- Verifica che DatiContratto non siano senza riferimento numero linea in questo modo bisogna creare la linea di info -->
2077
+
2078
+ <xsl:for-each select="DatiGenerali/DatiContratto[not(./RiferimentoNumeroLinea) or normalize-space(./RiferimentoNumeroLinea)=''] " >
2079
+ <xsl:call-template name="DatiCorrelati" >
2080
+ <xsl:with-param name="Prefix" select='"Contratto "'/>
2081
+ <xsl:with-param name="IdDocumento" select="IdDocumento"/>
2082
+ <xsl:with-param name="Data" select="Data"/>
2083
+ <xsl:with-param name="CodiceCUP" select="CodiceCUP"/>
2084
+ <xsl:with-param name="CodiceCIG" select="CodiceCIG"/>
2085
+ </xsl:call-template >
2086
+
2087
+ </xsl:for-each>
2088
+
2089
+ <!-- Verifica che DatiConvenzione non siano senza riferimento numero linea in questo modo bisogna creare la linea di info -->
2090
+
2091
+ <xsl:for-each select="DatiGenerali/DatiConvenzione[not(./RiferimentoNumeroLinea) or normalize-space(./RiferimentoNumeroLinea)=''] " >
2092
+ <xsl:call-template name="DatiCorrelati" >
2093
+ <xsl:with-param name="Prefix" select='"Convenzione "'/>
2094
+ <xsl:with-param name="IdDocumento" select="IdDocumento"/>
2095
+ <xsl:with-param name="Data" select="Data"/>
2096
+ <xsl:with-param name="CodiceCUP" select="CodiceCUP"/>
2097
+ <xsl:with-param name="CodiceCIG" select="CodiceCIG"/>
2098
+ </xsl:call-template >
2099
+
2100
+ </xsl:for-each>
2101
+
2102
+ <!-- Verifica che DatiRicezione non siano senza riferimento numero linea in questo modo bisogna creare la linea di info -->
2103
+ <xsl:for-each select="DatiGenerali/DatiRicezione[not(./RiferimentoNumeroLinea) or normalize-space(./RiferimentoNumeroLinea)=''] " >
2104
+ <xsl:call-template name="DatiCorrelati" >
2105
+ <xsl:with-param name="Prefix" select='"Ricezione "'/>
2106
+ <xsl:with-param name="IdDocumento" select="IdDocumento"/>
2107
+ <xsl:with-param name="Data" select="Data"/>
2108
+ <xsl:with-param name="CodiceCUP" select="CodiceCUP"/>
2109
+ <xsl:with-param name="CodiceCIG" select="CodiceCIG"/>
2110
+ </xsl:call-template >
2111
+
2112
+ </xsl:for-each>
2113
+
2114
+ <!-- Verifica che DatiFattureCollegate non siano senza riferimento numero linea in questo modo bisogna creare la linea di info -->
2115
+
2116
+ <xsl:for-each select="DatiGenerali/DatiFattureCollegate[not(./RiferimentoNumeroLinea) or normalize-space(./RiferimentoNumeroLinea)=''] " >
2117
+
2118
+ <xsl:call-template name="DatiCorrelati" >
2119
+ <xsl:with-param name="Prefix" select='"Fatt.Coll. "'/>
2120
+ <xsl:with-param name="IdDocumento" select="IdDocumento"/>
2121
+ <xsl:with-param name="Data" select="Data"/>
2122
+ <xsl:with-param name="CodiceCUP" select="CodiceCUP"/>
2123
+ <xsl:with-param name="CodiceCIG" select="CodiceCIG"/>
2124
+ </xsl:call-template >
2125
+
2126
+ </xsl:for-each>
2127
+
2128
+ <xsl:for-each select="DatiGenerali/DatiDDT[not(./RiferimentoNumeroLinea) or normalize-space(./RiferimentoNumeroLinea)=''] ">
2129
+ <xsl:apply-templates select="."/> <!-- apply DatiDDT template -->
2130
+ </xsl:for-each>
2131
+
2132
+ <xsl:call-template name="AltraDescrizioneLinea">
2133
+ <xsl:with-param name="textDescrizione" select = '"------------------------"' />
2134
+ </xsl:call-template>
2135
+ </xsl:if>
2136
+
2137
+
2138
+
2139
+ <xsl:for-each select="DatiBeniServizi/DettaglioLinee" >
2140
+ <xsl:apply-templates select=".">
2141
+ <xsl:with-param name="r" select="position()"/>
2142
+ <xsl:with-param name="posASWRELSTD" select="$posASWRELSTD"/>
2143
+ <xsl:with-param name="TipoFattura" select="$TipoFattura"/>
2144
+ <xsl:with-param name="IndiceBody" select="$BodyIndex"/>
2145
+ </xsl:apply-templates>
2146
+ </xsl:for-each>
2147
+
2148
+
2149
+ </tbody>
2150
+
2151
+ </table>
2152
+
2153
+ <!-- Dati Cassa Prevvidenziale -->
2154
+ <xsl:if test="DatiGenerali/DatiGeneraliDocumento/DatiCassaPrevidenziale">
2155
+ <div class="separa"> </div>
2156
+
2157
+ <table class="tbFoglio">
2158
+
2159
+ <thead>
2160
+ <tr>
2161
+ <th class="title">Dati Cassa Previdenziale</th>
2162
+ <th>Imponibile</th>
2163
+ <th class="perc">%Contr.</th>
2164
+ <th class="perc">Ritenuta</th>
2165
+ <th class="perc">%IVA</th>
2166
+ <th >Importo</th>
2167
+ </tr>
2168
+ </thead>
2169
+ <tbody>
2170
+ <xsl:for-each select="DatiGenerali/DatiGeneraliDocumento/DatiCassaPrevidenziale" >
2171
+
2172
+ <tr>
2173
+ <td>
2174
+ <xsl:if test="TipoCassa">
2175
+
2176
+ <span>
2177
+ <xsl:value-of select="TipoCassa" />
2178
+ </span>
2179
+ <xsl:variable name="TC">
2180
+ <xsl:value-of select="TipoCassa" />
2181
+ </xsl:variable>
2182
+ <xsl:choose>
2183
+ <xsl:when test="$TC='TC01'">
2184
+ (Cassa Nazionale Previdenza e Assistenza Avvocati
2185
+ e Procuratori legali)
2186
+ </xsl:when>
2187
+ <xsl:when test="$TC='TC02'">
2188
+ (Cassa Previdenza Dottori Commercialisti)
2189
+ </xsl:when>
2190
+ <xsl:when test="$TC='TC03'">
2191
+ (Cassa Previdenza e Assistenza Geometri)
2192
+ </xsl:when>
2193
+ <xsl:when test="$TC='TC04'">
2194
+ (Cassa Nazionale Previdenza e Assistenza
2195
+ Ingegneri e Architetti liberi profess.)
2196
+ </xsl:when>
2197
+ <xsl:when test="$TC='TC05'">
2198
+ (Cassa Nazionale del Notariato)
2199
+ </xsl:when>
2200
+ <xsl:when test="$TC='TC06'">
2201
+ (Cassa Nazionale Previdenza e Assistenza
2202
+ Ragionieri e Periti commerciali)
2203
+ </xsl:when>
2204
+ <xsl:when test="$TC='TC07'">
2205
+ (Ente Nazionale Assistenza Agenti e Rappresentanti
2206
+ di Commercio-ENASARCO)
2207
+ </xsl:when>
2208
+ <xsl:when test="$TC='TC08'">
2209
+ (Ente Nazionale Previdenza e Assistenza Consulenti
2210
+ del Lavoro-ENPACL)
2211
+ </xsl:when>
2212
+ <xsl:when test="$TC='TC09'">
2213
+ (Ente Nazionale Previdenza e Assistenza
2214
+ Medici-ENPAM)
2215
+ </xsl:when>
2216
+ <xsl:when test="$TC='TC10'">
2217
+ (Ente Nazionale Previdenza e Assistenza
2218
+ Farmacisti-ENPAF)
2219
+ </xsl:when>
2220
+ <xsl:when test="$TC='TC11'">
2221
+ (Ente Nazionale Previdenza e Assistenza
2222
+ Veterinari-ENPAV)
2223
+ </xsl:when>
2224
+ <xsl:when test="$TC='TC12'">
2225
+ (Ente Nazionale Previdenza e Assistenza Impiegati
2226
+ dell'Agricoltura-ENPAIA)
2227
+ </xsl:when>
2228
+ <xsl:when test="$TC='TC13'">
2229
+ (Fondo Previdenza Impiegati Imprese di Spedizione
2230
+ e Agenzie Marittime)
2231
+ </xsl:when>
2232
+ <xsl:when test="$TC='TC14'">
2233
+ (Istituto Nazionale Previdenza Giornalisti
2234
+ Italiani-INPGI)
2235
+ </xsl:when>
2236
+ <xsl:when test="$TC='TC15'">
2237
+ (Opera Nazionale Assistenza Orfani Sanitari
2238
+ Italiani-ONAOSI)
2239
+ </xsl:when>
2240
+ <xsl:when test="$TC='TC16'">
2241
+ (Cassa Autonoma Assistenza Integrativa
2242
+ Giornalisti Italiani-CASAGIT)
2243
+ </xsl:when>
2244
+ <xsl:when test="$TC='TC17'">
2245
+ (Ente Previdenza Periti Industriali e Periti
2246
+ Industriali Laureati-EPPI)
2247
+ </xsl:when>
2248
+ <xsl:when test="$TC='TC18'">
2249
+ (Ente Previdenza e Assistenza
2250
+ Pluricategoriale-EPAP)
2251
+ </xsl:when>
2252
+ <xsl:when test="$TC='TC19'">
2253
+ (Ente Nazionale Previdenza e Assistenza
2254
+ Biologi-ENPAB)
2255
+ </xsl:when>
2256
+ <xsl:when test="$TC='TC20'">
2257
+ (Ente Nazionale Previdenza e Assistenza
2258
+ Professione Infermieristica-ENPAPI)
2259
+ </xsl:when>
2260
+ <xsl:when test="$TC='TC21'">
2261
+ (Ente Nazionale Previdenza e Assistenza
2262
+ Psicologi-ENPAP)
2263
+ </xsl:when>
2264
+ <xsl:when test="$TC='TC22'">
2265
+ (INPS)
2266
+ </xsl:when>
2267
+ <xsl:when test="$TC=''">
2268
+ </xsl:when>
2269
+ <xsl:otherwise>
2270
+ <span>(!!! codice non previsto !!!)</span>
2271
+ </xsl:otherwise>
2272
+ </xsl:choose>
2273
+
2274
+ </xsl:if>
2275
+ </td>
2276
+ <td class="import">
2277
+ <xsl:if test="ImponibileCassa">
2278
+ <xsl:value-of select="format-number(ImponibileCassa, '###.###.##0,00', 'euro')" />
2279
+ </xsl:if>
2280
+ </td>
2281
+
2282
+ <td class="import">
2283
+ <xsl:if test="AlCassa">
2284
+
2285
+ <xsl:value-of select="format-number(AlCassa, '###.###.##0,00', 'euro')" />
2286
+
2287
+ </xsl:if>
2288
+
2289
+ </td>
2290
+
2291
+ <td class="Ritenuta" >
2292
+ <xsl:if test="Ritenuta">
2293
+
2294
+ <xsl:value-of select="Ritenuta" />
2295
+
2296
+ </xsl:if>
2297
+ </td>
2298
+
2299
+ <td class="import" >
2300
+
2301
+ <xsl:choose>
2302
+ <xsl:when test="Natura">
2303
+
2304
+ <xsl:value-of select="Natura" />
2305
+
2306
+ </xsl:when>
2307
+ <xsl:otherwise>
2308
+ <xsl:if test="AliquotaIVA">
2309
+
2310
+ <xsl:value-of select="format-number(AliquotaIVA, '###.###.##0,00', 'euro')" />
2311
+
2312
+ </xsl:if>
2313
+ </xsl:otherwise>
2314
+ </xsl:choose>
2315
+
2316
+ </td>
2317
+
2318
+ <td class="import">
2319
+ <xsl:if test="ImportoContributoCassa">
2320
+
2321
+ <xsl:value-of select="format-number(ImportoContributoCassa, '###.###.##0,00', 'euro')" />
2322
+
2323
+ </xsl:if>
2324
+
2325
+ </td>
2326
+
2327
+ </tr>
2328
+
2329
+ </xsl:for-each>
2330
+
2331
+
2332
+ </tbody>
2333
+ </table>
2334
+
2335
+
2336
+ </xsl:if>
2337
+ <!-- Fine Cassa Prevvidenziale -->
2338
+
2339
+
2340
+ <div class="separa" > </div>
2341
+ <!-- Dati RIEPILOGO-->
2342
+
2343
+ <table class="tbTitolo">
2344
+ <thead>
2345
+ <tr>
2346
+ <th>RIEPILOGHI IVA E TOTALI</th>
2347
+ </tr>
2348
+ </thead>
2349
+ </table>
2350
+
2351
+
2352
+
2353
+ <table class="tbFoglio">
2354
+ <thead>
2355
+ <tr >
2356
+
2357
+ <th colspan="3" >esigibilità iva / riferimenti normativi</th>
2358
+ <th class="perc">%IVA</th>
2359
+ <th>Spese accessorie</th>
2360
+ <th class="perc">Arr.</th>
2361
+ <th colspan="2" >Totale imponibile</th>
2362
+ <th colspan="2" >Totale imposta</th>
2363
+ </tr>
2364
+ </thead>
2365
+ <tbody>
2366
+
2367
+ <xsl:for-each select="DatiBeniServizi/DatiRiepilogo" >
2368
+
2369
+ <xsl:if test="number(ImponibileImporto)">
2370
+
2371
+ <tr>
2372
+ <td colspan="3" >
2373
+ <xsl:choose>
2374
+ <xsl:when test="EsigibilitaIVA">
2375
+
2376
+ <span>
2377
+ <xsl:value-of select="EsigibilitaIVA" />
2378
+ </span>
2379
+ <xsl:variable name="EI">
2380
+ <xsl:value-of select="EsigibilitaIVA" />
2381
+ </xsl:variable>
2382
+ <xsl:choose>
2383
+ <xsl:when test="$EI='I'">
2384
+ (esigibilità immediata)
2385
+ </xsl:when>
2386
+ <xsl:when test="$EI='D'">
2387
+ (esigibilità differita)
2388
+ </xsl:when>
2389
+ <xsl:when test="$EI='S'">
2390
+ (scissione dei pagamenti)
2391
+ </xsl:when>
2392
+ <xsl:otherwise>
2393
+ <span>(!!! codice non previsto !!!)</span>
2394
+ </xsl:otherwise>
2395
+ </xsl:choose>
2396
+ </xsl:when>
2397
+
2398
+ <xsl:otherwise>
2399
+
2400
+ <span>Esigib. non dich. (si presume immediata)</span>
2401
+
2402
+ </xsl:otherwise>
2403
+ </xsl:choose>
2404
+
2405
+ <xsl:if test="RiferimentoNormativo">
2406
+ <div class="tx-xsmall">
2407
+ <xsl:value-of select="RiferimentoNormativo" />
2408
+ </div>
2409
+ </xsl:if>
2410
+ </td>
2411
+
2412
+
2413
+ <td class="import" >
2414
+
2415
+ <xsl:call-template name="FormatIVA">
2416
+ <xsl:with-param name="Natura" select="Natura" />
2417
+ <xsl:with-param name="IVA" select="AliquotaIVA" />
2418
+ </xsl:call-template>
2419
+
2420
+
2421
+ </td>
2422
+
2423
+
2424
+ <td class="import">
2425
+
2426
+ <xsl:if test="SpeseAccessorie">
2427
+ <xsl:value-of select="format-number(SpeseAccessorie, '###.###.##0,00', 'euro')" />
2428
+ </xsl:if>
2429
+ </td>
2430
+
2431
+
2432
+ <td class="import">
2433
+
2434
+ <xsl:if test="Arrotondamento">
2435
+ <xsl:value-of select="format-number(Arrotondamento, '###.###.##0,00', 'euro')" />
2436
+ </xsl:if>
2437
+ </td>
2438
+ <td colspan="2" class="import" >
2439
+
2440
+ <xsl:if test="ImponibileImporto">
2441
+ <xsl:value-of select="format-number(ImponibileImporto, '###.###.##0,00', 'euro')" />
2442
+ </xsl:if>
2443
+ </td>
2444
+
2445
+ <td colspan="2" class="import" >
2446
+
2447
+ <xsl:if test="Imposta">
2448
+
2449
+ <xsl:choose>
2450
+ <xsl:when test="Imposta = 0">
2451
+ <xsl:text>0</xsl:text>
2452
+ </xsl:when>
2453
+ <xsl:otherwise>
2454
+ <xsl:value-of select="format-number(Imposta, '###.###.##0,00', 'euro')" />
2455
+ </xsl:otherwise>
2456
+ </xsl:choose>
2457
+
2458
+
2459
+
2460
+ </xsl:if>
2461
+ </td>
2462
+
2463
+ </tr>
2464
+
2465
+ </xsl:if>
2466
+
2467
+ </xsl:for-each>
2468
+
2469
+ <!-- Importo Totale -->
2470
+ <tr >
2471
+
2472
+ <th colspan="2">
2473
+ Importo bollo
2474
+ </th>
2475
+ <th colspan="3">
2476
+ Sconto/Maggiorazione
2477
+ </th>
2478
+
2479
+
2480
+
2481
+ <th class="perc">Arr.</th>
2482
+ <th colspan="4" >
2483
+ Totale documento
2484
+ </th>
2485
+
2486
+
2487
+ </tr>
2488
+
2489
+ <tr >
2490
+ <td colspan="2" class="import" >
2491
+
2492
+ <xsl:if test="DatiGenerali/DatiGeneraliDocumento/DatiBollo">
2493
+ <xsl:choose>
2494
+ <xsl:when test="DatiGenerali/DatiGeneraliDocumento/DatiBollo/ImportoBollo">
2495
+ <xsl:value-of select="format-number(DatiGenerali/DatiGeneraliDocumento/DatiBollo/ImportoBollo, '###.###.##0,00', 'euro')" />
2496
+ </xsl:when>
2497
+ <xsl:when test="DatiGenerali/DatiGeneraliDocumento/DatiBollo/BolloVirtuale">
2498
+ <xsl:value-of select="DatiGenerali/DatiGeneraliDocumento/DatiBollo/BolloVirtuale" />
2499
+ </xsl:when>
2500
+ <xsl:otherwise></xsl:otherwise>
2501
+ </xsl:choose>
2502
+ </xsl:if>
2503
+
2504
+ </td>
2505
+ <td colspan="3" class="import">
2506
+ <xsl:for-each select="DatiGenerali/DatiGeneraliDocumento/ScontoMaggiorazione" >
2507
+
2508
+ <xsl:call-template name="FormatSconto" >
2509
+ <xsl:with-param name="tipo" select="Tipo" />
2510
+ <xsl:with-param name="percentuale" select="Percentuale" />
2511
+ <xsl:with-param name="importo" select="Importo" />
2512
+ </xsl:call-template>
2513
+
2514
+
2515
+ </xsl:for-each>
2516
+ </td>
2517
+
2518
+
2519
+
2520
+
2521
+ <td class="import">
2522
+
2523
+ <xsl:if test="DatiGenerali/DatiGeneraliDocumento/Arrotondamento">
2524
+
2525
+ <xsl:value-of select="format-number(DatiGenerali/DatiGeneraliDocumento/Arrotondamento, '###.###.##0,00', 'euro')" />
2526
+
2527
+ </xsl:if>
2528
+ </td>
2529
+
2530
+ <td colspan="4" class="import">
2531
+
2532
+ <xsl:if test="DatiGenerali/DatiGeneraliDocumento/ImportoTotaleDocumento">
2533
+
2534
+ <xsl:value-of select="format-number(DatiGenerali/DatiGeneraliDocumento/ImportoTotaleDocumento, '###.###.##0,00', 'euro')" />
2535
+
2536
+ </xsl:if>
2537
+ </td>
2538
+
2539
+ </tr>
2540
+
2541
+ <!-- FINE Importo Totale -->
2542
+ </tbody>
2543
+ </table>
2544
+ <!-- FINE Dettaglio Linee -->
2545
+
2546
+
2547
+ <!-- Dati Ritenuta Acconto -->
2548
+ <xsl:if test="DatiGenerali/DatiGeneraliDocumento/DatiRitenuta">
2549
+ <div class="separa"> </div>
2550
+
2551
+ <table class="tbFoglio">
2552
+
2553
+ <thead>
2554
+ <tr>
2555
+ <th class="title"> Dati ritenuta d'acconto</th>
2556
+ <th class="perc">Aliquota ritenuta</th>
2557
+ <th>Causale </th>
2558
+ <th width="15%">Importo </th>
2559
+ </tr>
2560
+ </thead>
2561
+ <tbody>
2562
+
2563
+ <xsl:for-each select="DatiGenerali/DatiGeneraliDocumento/DatiRitenuta" >
2564
+ <xsl:apply-templates select="." />
2565
+ </xsl:for-each>
2566
+ </tbody>
2567
+ </table>
2568
+
2569
+ </xsl:if>
2570
+ <!-- Fine Dati Ritenuta -->
2571
+
2572
+
2573
+ <div class="separa"> </div>
2574
+
2575
+
2576
+ <!-- Dati Pagamento -->
2577
+
2578
+ <table class="tbFoglio" >
2579
+ <thead>
2580
+ <tr>
2581
+ <th style="width:200px">Modalità pagamento</th>
2582
+ <th>Dettagli</th>
2583
+ <th style="width:180px">Scadenze</th>
2584
+ <th class="ximport">Importo</th>
2585
+ </tr>
2586
+ </thead>
2587
+ <tbody>
2588
+ <xsl:for-each select="DatiPagamento" >
2589
+
2590
+ <xsl:variable name="CountDettaglioPagamento">
2591
+ <xsl:value-of select="count(DettaglioPagamento)" />
2592
+ </xsl:variable>
2593
+
2594
+
2595
+ <xsl:for-each select="DettaglioPagamento">
2596
+
2597
+ <tr>
2598
+ <td>
2599
+
2600
+ <xsl:if test="ModalitaPagamento">
2601
+ <span>
2602
+ <xsl:value-of select="ModalitaPagamento" />
2603
+ </span>
2604
+ <xsl:variable name="MP">
2605
+ <xsl:value-of select="ModalitaPagamento" />
2606
+ </xsl:variable>
2607
+ <xsl:choose>
2608
+ <xsl:when test="$MP='MP01'">
2609
+ Contanti
2610
+ </xsl:when>
2611
+ <xsl:when test="$MP='MP02'">
2612
+ Assegno
2613
+ </xsl:when>
2614
+ <xsl:when test="$MP='MP03'">
2615
+ Assegno circolare
2616
+ </xsl:when>
2617
+ <xsl:when test="$MP='MP04'">
2618
+ Contanti presso Tesoreria
2619
+ </xsl:when>
2620
+ <xsl:when test="$MP='MP05'">
2621
+ Bonifico
2622
+ </xsl:when>
2623
+ <xsl:when test="$MP='MP06'">
2624
+ Vaglia cambiario
2625
+ </xsl:when>
2626
+ <xsl:when test="$MP='MP07'">
2627
+ Bollettino bancario
2628
+ </xsl:when>
2629
+ <xsl:when test="$MP='MP08'">
2630
+ Carta di pagamento
2631
+ </xsl:when>
2632
+ <xsl:when test="$MP='MP09'">
2633
+ RID
2634
+ </xsl:when>
2635
+ <xsl:when test="$MP='MP10'">
2636
+ RID utenze
2637
+ </xsl:when>
2638
+ <xsl:when test="$MP='MP11'">
2639
+ RID veloce
2640
+ </xsl:when>
2641
+ <xsl:when test="$MP='MP12'">
2642
+ RIBA
2643
+ </xsl:when>
2644
+ <xsl:when test="$MP='MP13'">
2645
+ MAV
2646
+ </xsl:when>
2647
+ <xsl:when test="$MP='MP14'">
2648
+ Quietanza erario
2649
+ </xsl:when>
2650
+ <xsl:when test="$MP='MP15'">
2651
+ Giroconto su conti di contabilità speciale
2652
+ </xsl:when>
2653
+ <xsl:when test="$MP='MP16'">
2654
+ Domiciliazione bancaria
2655
+ </xsl:when>
2656
+ <xsl:when test="$MP='MP17'">
2657
+ Domiciliazione postale
2658
+ </xsl:when>
2659
+ <xsl:when test="$MP='MP18'">
2660
+ Bollettino di c/c postale
2661
+ </xsl:when>
2662
+ <xsl:when test="$MP='MP19'">
2663
+ SEPA Direct Debit
2664
+ </xsl:when>
2665
+ <xsl:when test="$MP='MP20'">
2666
+ SEPA Direct Debit CORE
2667
+ </xsl:when>
2668
+ <xsl:when test="$MP='MP21'">
2669
+ SEPA Direct Debit B2B
2670
+ </xsl:when>
2671
+ <xsl:when test="$MP='MP22'">
2672
+ Trattenuta su somme già riscosse
2673
+ </xsl:when>
2674
+ <xsl:when test="$MP='MP23'">
2675
+ PagoPA
2676
+ </xsl:when>
2677
+ <xsl:when test="$MP=''">
2678
+ </xsl:when>
2679
+ <xsl:otherwise>
2680
+ <span></span>
2681
+ </xsl:otherwise>
2682
+ </xsl:choose>
2683
+ <span>
2684
+ <xsl:value-of select="OpzDescrizionePagamento" />
2685
+ </span>
2686
+ </xsl:if>
2687
+
2688
+ </td>
2689
+
2690
+
2691
+ <td>
2692
+ <xsl:apply-templates select="."/>
2693
+ <xsl:if test="(position( )) != $CountDettaglioPagamento">
2694
+ <xsl:if test="Beneficiario or CodUfficioPostale or CognomeQuietanzante or CognomeQuietanzante or CFQuietanzante or TitoloQuietanzante
2695
+ or IstitutoFinanziario or IBAN or ABI or CAB or BIC or ScontoPagamentoAnticipato or DataLimitePagamentoAnticipato or PenalitaPagamentiRitardati
2696
+ or DataDecorrenzaPenale or CodicePagamento">
2697
+ <xsl:text>------------------------</xsl:text>
2698
+ </xsl:if>
2699
+ </xsl:if>
2700
+
2701
+ </td>
2702
+
2703
+ <td>
2704
+
2705
+ <xsl:if test="DataRiferimentoTerminiPagamento or GiorniTerminiPagamento">
2706
+
2707
+ <xsl:choose>
2708
+ <xsl:when test="DataRiferimentoTerminiPagamento">
2709
+ <xsl:text>Data termine </xsl:text>
2710
+ <xsl:call-template name="FormatDateIta">
2711
+ <xsl:with-param name="DateTime" select="DataRiferimentoTerminiPagamento" />
2712
+ </xsl:call-template>
2713
+
2714
+ <xsl:if test="GiorniTerminiPagamento">
2715
+ <xsl:text> </xsl:text><xsl:value-of select="GiorniTerminiPagamento" />gg
2716
+ </xsl:if>
2717
+ </xsl:when>
2718
+ <xsl:otherwise>
2719
+ <xsl:text>Giorni termine </xsl:text>
2720
+ <xsl:value-of select="GiorniTerminiPagamento" />
2721
+
2722
+ </xsl:otherwise>
2723
+ </xsl:choose>
2724
+ <br/>
2725
+ </xsl:if>
2726
+
2727
+ <xsl:if test="DataScadenzaPagamento">
2728
+ Data scadenza <xsl:call-template name="FormatDateIta">
2729
+ <xsl:with-param name="DateTime" select="DataScadenzaPagamento" />
2730
+ </xsl:call-template>
2731
+ </xsl:if>
2732
+ </td>
2733
+ <td class="import">
2734
+
2735
+ <xsl:if test="ImportoPagamento">
2736
+
2737
+ <xsl:value-of select="format-number(ImportoPagamento, '###.###.##0,00', 'euro')" />
2738
+
2739
+ </xsl:if>
2740
+ </td>
2741
+ </tr>
2742
+ </xsl:for-each>
2743
+
2744
+ </xsl:for-each>
2745
+ </tbody>
2746
+ </table>
2747
+ <!-- FINE Dati Pagamento -->
2748
+
2749
+ <div style="height:10px" > </div>
2750
+
2751
+ <xsl:for-each select="OpzRiepilogoIVA" >
2752
+ <div class="tx-xsmall">
2753
+ * <xsl:value-of select="." />
2754
+ </div>
2755
+
2756
+ </xsl:for-each>
2757
+ <xsl:if test="OpzRiepilogoIVA">
2758
+ <div style="height:10px" > </div>
2759
+ </xsl:if>
2760
+
2761
+ </xsl:otherwise>
2762
+
2763
+ </xsl:choose>
2764
+
2765
+ <!-- Definizione degli allegati -->
2766
+ <xsl:if test="Allegati">
2767
+
2768
+ <div class="tx-small" >Allegati:</div>
2769
+
2770
+ <ul class="ulAllegati">
2771
+ <xsl:for-each select="Allegati">
2772
+ <li>
2773
+ <div class="tx-small">
2774
+
2775
+ <xsl:value-of select="NomeAttachment" />
2776
+ <xsl:text> </xsl:text>
2777
+ <xsl:value-of select="DescrizioneAttachment" />
2778
+ </div>
2779
+ </li>
2780
+
2781
+
2782
+ </xsl:for-each>
2783
+
2784
+ </ul>
2785
+
2786
+ </xsl:if>
2787
+
2788
+ <!--Definizione se fattura è AssoSofware-->
2789
+
2790
+ <xsl:if test="$posASWRELSTD &gt; 0 ">
2791
+ <div class="dtASWRELSTD">
2792
+
2793
+ <label class="headerLabel">Conforme Standard AssoSoftware</label>
2794
+
2795
+ </div>
2796
+
2797
+ </xsl:if>
2798
+
2799
+
2800
+ <!-- FINE ASWRELSTD -->
2801
+
2802
+
2803
+ </xsl:for-each>
2804
+ <!--FINE BODY-->
2805
+
2806
+ </div>
2807
+
2808
+
2809
+
2810
+ </xsl:if>
2811
+ </xsl:template>
2812
+
2813
+ <xsl:template match="/">
2814
+ <html>
2815
+ <head>
2816
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
2817
+ <style type="text/css">
2818
+
2819
+ body {
2820
+ margin: 0;
2821
+ padding: 0;
2822
+ width: 100%;
2823
+ }
2824
+
2825
+ @media print {
2826
+ body {
2827
+ margin: 0;
2828
+ padding: 0;
2829
+ }
2830
+ #fattura-container {
2831
+ display: block !important;
2832
+ width: 100% !important;
2833
+ margin: 0 !important;
2834
+ padding: 0 !important;
2835
+ }
2836
+ #fattura-elettronica {
2837
+ display: block !important;
2838
+ width: auto !important;
2839
+ margin: 0 auto !important;
2840
+ }
2841
+ table {
2842
+ margin: 0 auto !important;
2843
+ }
2844
+ }
2845
+
2846
+ #fattura-container
2847
+ {
2848
+ display: block;
2849
+ width: 100%;
2850
+ margin: 0 auto;
2851
+ padding: 0;
2852
+ }
2853
+
2854
+ #fattura-elettronica
2855
+ {
2856
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
2857
+ margin: 0 auto;
2858
+ width: 850px;
2859
+ padding: 0;
2860
+ display: block;
2861
+ }
2862
+
2863
+ #fattura-elettronica
2864
+ div.page {
2865
+ }
2866
+
2867
+ .tbHeader
2868
+ {
2869
+ width: 800px;
2870
+ border: 2px solid black;
2871
+ margin: 0 auto;
2872
+ }
2873
+
2874
+ table {
2875
+ margin-left: auto;
2876
+ margin-right: auto;
2877
+ }
2878
+
2879
+ tr td {vertical-align: top;}
2880
+
2881
+ .tdHead {
2882
+ width: 50%;
2883
+ height: 91px;
2884
+ border: 1px solid black;
2885
+ }
2886
+
2887
+ .tableHead
2888
+ {
2889
+ font-size:smaller;
2890
+ width: 100%;
2891
+ }
2892
+
2893
+ .headBorder
2894
+ {
2895
+ <!--border: 2px solid black;
2896
+ width:100%;
2897
+ height: 210px;
2898
+ border-bottom-left-radius:30px;
2899
+ border-bottom-right-radius:30px; -->
2900
+ }
2901
+
2902
+ .headerLabel
2903
+ {
2904
+ color:#282828;
2905
+ font-weight:bold;
2906
+
2907
+
2908
+ }
2909
+
2910
+ .headContent
2911
+ {
2912
+ margin-left:10px;
2913
+ margin-bottom:0px
2914
+ }
2915
+
2916
+ .mt5
2917
+ {
2918
+ margin-top:5px
2919
+ }
2920
+
2921
+
2922
+ tr.break { page-break-after: always; }
2923
+
2924
+ .ulAllegati
2925
+ {
2926
+ margin-top:0px;
2927
+ }
2928
+
2929
+
2930
+ .separa
2931
+ {
2932
+ height:20px;
2933
+ }
2934
+
2935
+ table.tbTitolo
2936
+ {
2937
+ width: 800px;
2938
+ table-layout: fixed;
2939
+ border-collapse: collapse;
2940
+ word-wrap:normal; <!--break-word;-->
2941
+ margin: 0 auto;
2942
+ }
2943
+ table.tbTitolo th {
2944
+ padding-left: 5px;
2945
+ padding-right: 5px;
2946
+ border: solid 1px #000000;
2947
+ border-bottom: none;
2948
+ background-color: LightCyan;
2949
+ font-size:x-small;
2950
+
2951
+ }
2952
+
2953
+
2954
+ table.tbFoglio
2955
+ {
2956
+ width: 800px;
2957
+ table-layout: fixed;
2958
+ border-collapse: collapse;
2959
+ word-wrap:break-word;
2960
+ margin: 0 auto;
2961
+ }
2962
+
2963
+ table.tbFoglio th {
2964
+ padding-left: 5px;
2965
+ padding-right: 5px;
2966
+ border: solid 1px #000000;
2967
+ background-color: LightGrey;
2968
+
2969
+ <!-- text-transform: uppercase; -->
2970
+ font-size:x-small;
2971
+
2972
+
2973
+ }
2974
+
2975
+ table.tbFoglio tbody
2976
+ {
2977
+ border: solid 1px #000000;
2978
+ }
2979
+
2980
+ table.tbFoglio th .perc
2981
+ {
2982
+ width:50px;
2983
+ }
2984
+
2985
+ table.tbFoglio td {
2986
+ font-size:small;
2987
+
2988
+ border-right: solid 1px #000000;
2989
+ border-bottom: none;
2990
+ border-left: solid 1px #000000;
2991
+ }
2992
+
2993
+ table.tbFoglio tr {
2994
+
2995
+
2996
+ }
2997
+
2998
+ .textRight
2999
+ {
3000
+ text-align:right;
3001
+ }
3002
+
3003
+ .textCenter
3004
+ {
3005
+ text-align:center;
3006
+ }
3007
+
3008
+ .textPerc
3009
+ {
3010
+ width:50px;
3011
+ }
3012
+
3013
+ td.Ritenuta
3014
+ {
3015
+ width:50px;
3016
+ text-align:center;
3017
+ }
3018
+
3019
+ th.title, .title td {
3020
+ width:48%
3021
+ }
3022
+
3023
+ th.perc {
3024
+ width:50px;
3025
+ }
3026
+
3027
+ th.perc2 {
3028
+ width:40px;
3029
+ }
3030
+
3031
+ th.data {
3032
+ width:80px;
3033
+ }
3034
+
3035
+ th.import
3036
+ {
3037
+ width:100px;
3038
+ }
3039
+
3040
+ td.import
3041
+ {
3042
+ text-align:right;
3043
+ }
3044
+
3045
+ th.import2
3046
+ {
3047
+ width:80px;
3048
+ }
3049
+
3050
+ td.import2
3051
+ {
3052
+ text-align:right;
3053
+ }
3054
+
3055
+ th.ximport
3056
+ {
3057
+ width:100px;
3058
+ }
3059
+
3060
+ td.ximport
3061
+ {
3062
+ text-align:center;
3063
+ }
3064
+
3065
+ th.ximport2
3066
+ {
3067
+ width:80px;
3068
+ }
3069
+
3070
+ td.ximport2
3071
+ {
3072
+ text-align:center;
3073
+ }
3074
+
3075
+ td.data
3076
+ {
3077
+ text-align:center;
3078
+ }
3079
+
3080
+ .tx-xsmall {
3081
+ font-size:x-small;
3082
+ }
3083
+
3084
+ .tx-small {
3085
+ font-size:small;
3086
+ }
3087
+
3088
+ .import
3089
+ {
3090
+ text-align:right;
3091
+ }
3092
+
3093
+ table.tbNoBorder
3094
+ {
3095
+ border-collapse: collapse;
3096
+ margin: 0 auto 5px auto;
3097
+ font-size:small;
3098
+ text-align:center;
3099
+ width:800px;
3100
+ }
3101
+
3102
+ </style>
3103
+ </head>
3104
+ <body>
3105
+ <table width="100%" border="0" cellpadding="0" cellspacing="0">
3106
+ <tr>
3107
+ <td align="center">
3108
+ <div id="fattura-container">
3109
+
3110
+ <xsl:choose>
3111
+ <xsl:when test="d:FatturaElettronicaSemplificata">
3112
+ <!--versione 1.0 SEMPLIFICATA-->
3113
+ <xsl:call-template name="FatturaElettronica">
3114
+ <xsl:with-param name="TipoFattura" select="d:FatturaElettronicaSemplificata" />
3115
+ <xsl:with-param name="IsFPRS" select="1" />
3116
+ </xsl:call-template>
3117
+ </xsl:when>
3118
+ <xsl:when test="c:FatturaElettronica">
3119
+ <!--versione 1.0-->
3120
+ <xsl:call-template name="FatturaElettronica">
3121
+ <xsl:with-param name="TipoFattura" select="c:FatturaElettronica" />
3122
+ <xsl:with-param name="IsFPRS" select="0" />
3123
+ </xsl:call-template>
3124
+ </xsl:when>
3125
+ <xsl:when test="b:FatturaElettronica">
3126
+ <!--versione 1.1-->
3127
+ <xsl:call-template name="FatturaElettronica">
3128
+ <xsl:with-param name="TipoFattura" select="b:FatturaElettronica" />
3129
+ <xsl:with-param name="IsFPRS" select="0" />
3130
+ </xsl:call-template>
3131
+ </xsl:when>
3132
+ <xsl:otherwise>
3133
+ <xsl:call-template name="FatturaElettronica">
3134
+ <!--versione 1.2-->
3135
+ <xsl:with-param name="TipoFattura" select="a:FatturaElettronica" />
3136
+ <xsl:with-param name="IsFPRS" select="0" />
3137
+ </xsl:call-template>
3138
+ </xsl:otherwise>
3139
+ </xsl:choose>
3140
+
3141
+
3142
+
3143
+ </div>
3144
+ </td>
3145
+ </tr>
3146
+ </table>
3147
+ </body>
3148
+ </html>
3149
+ </xsl:template>
3150
+ </xsl:stylesheet>