fix partita iva in generazione xml

This commit is contained in:
Pek5892 2023-05-08 13:16:05 +02:00
parent 64c4f73ad7
commit 69e638627f
1 changed files with 64 additions and 15 deletions

View File

@ -877,10 +877,19 @@
Identificativo fiscale ai fini IVA: Identificativo fiscale ai fini IVA:
<span> <span>
<xsl:value-of select="IdFiscaleIVA/IdPaese" /> <xsl:choose>
<xsl:value-of select="IdFiscaleIVA/IdCodice" /> <xsl:when test="string(number(substring(IdFiscaleIVA/IdCodice[1],1,1)))='NaN' and string(number(substring(IdFiscaleIVA/IdCodice[2],1,1)))='NaN'">
<xsl:if test="IdFiscaleIVA/IdPaese = 'FR' or (substring(IdFiscaleIVA/IdCodice[1],1,1)='G' and substring(IdFiscaleIVA/IdCodice[2],1,1)='D') or (substring(IdFiscaleIVA/IdCodice[1],1,1)='H' and substring(IdFiscaleIVA/IdCodice[2],1,1)='A')">
<xsl:value-of select="IdFiscaleIVA/IdPaese" />
</xsl:if>
<xsl:value-of select="IdFiscaleIVA/IdCodice" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="IdFiscaleIVA/IdPaese" />
<xsl:value-of select="IdFiscaleIVA/IdCodice" />
</xsl:otherwise>
</xsl:choose>
</span> </span>
</xsl:if> </xsl:if>
</div> </div>
@ -1135,10 +1144,20 @@
<xsl:if test="IdFiscaleIVA"> <xsl:if test="IdFiscaleIVA">
Identificativo fiscale ai fini IVA: Identificativo fiscale ai fini IVA:
<span> <span>
<xsl:value-of select="IdFiscaleIVA/IdPaese" /> <xsl:choose>
<xsl:value-of select="IdFiscaleIVA/IdCodice" /> <xsl:when test="string(number(substring(IdFiscaleIVA/IdCodice[1],1,1)))='NaN' and string(number(substring(IdFiscaleIVA/IdCodice[2],1,1)))='NaN'">
</span> <xsl:if test="IdFiscaleIVA/IdPaese = 'FR' or (substring(IdFiscaleIVA/IdCodice[1],1,1)='G' and substring(IdFiscaleIVA/IdCodice[2],1,1)='D') or (substring(IdFiscaleIVA/IdCodice[1],1,1)='H' and substring(IdFiscaleIVA/IdCodice[2],1,1)='A')">
<xsl:value-of select="IdFiscaleIVA/IdPaese" />
</xsl:if>
<xsl:value-of select="IdFiscaleIVA/IdCodice" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="IdFiscaleIVA/IdPaese" />
<xsl:value-of select="IdFiscaleIVA/IdCodice" />
</xsl:otherwise>
</xsl:choose>
</span>
</xsl:if> </xsl:if>
</div> </div>
@ -1360,10 +1379,20 @@
<xsl:if test="IdFiscaleIVA"> <xsl:if test="IdFiscaleIVA">
Identificativo fiscale ai fini IVA: Identificativo fiscale ai fini IVA:
<span> <span>
<xsl:value-of select="IdFiscaleIVA/IdPaese" /> <xsl:choose>
<xsl:value-of select="IdFiscaleIVA/IdCodice" /> <xsl:when test="string(number(substring(IdFiscaleIVA/IdCodice[1],1,1)))='NaN' and string(number(substring(IdFiscaleIVA/IdCodice[2],1,1)))='NaN'">
</span> <xsl:if test="IdFiscaleIVA/IdPaese = 'FR' or (substring(IdFiscaleIVA/IdCodice[1],1,1)='G' and substring(IdFiscaleIVA/IdCodice[2],1,1)='D') or (substring(IdFiscaleIVA/IdCodice[1],1,1)='H' and substring(IdFiscaleIVA/IdCodice[2],1,1)='A')">
<xsl:value-of select="IdFiscaleIVA/IdPaese" />
</xsl:if>
<xsl:value-of select="IdFiscaleIVA/IdCodice" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="IdFiscaleIVA/IdPaese" />
<xsl:value-of select="IdFiscaleIVA/IdCodice" />
</xsl:otherwise>
</xsl:choose>
</span>
</xsl:if> </xsl:if>
</div> </div>
@ -1455,8 +1484,18 @@
Identificativo fiscale ai fini IVA: Identificativo fiscale ai fini IVA:
<span> <span>
<xsl:value-of select="IdFiscaleIVA/IdPaese" /> <xsl:choose>
<xsl:value-of select="IdFiscaleIVA/IdCodice" /> <xsl:when test="string(number(substring(IdFiscaleIVA/IdCodice[1],1,1)))='NaN' and string(number(substring(IdFiscaleIVA/IdCodice[2],1,1)))='NaN'">
<xsl:if test="IdFiscaleIVA/IdPaese = 'FR' or (substring(IdFiscaleIVA/IdCodice[1],1,1)='G' and substring(IdFiscaleIVA/IdCodice[2],1,1)='D') or (substring(IdFiscaleIVA/IdCodice[1],1,1)='H' and substring(IdFiscaleIVA/IdCodice[2],1,1)='A')">
<xsl:value-of select="IdFiscaleIVA/IdPaese" />
</xsl:if>
<xsl:value-of select="IdFiscaleIVA/IdCodice" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="IdFiscaleIVA/IdPaese" />
<xsl:value-of select="IdFiscaleIVA/IdCodice" />
</xsl:otherwise>
</xsl:choose>
</span> </span>
</xsl:if> </xsl:if>
@ -1602,8 +1641,18 @@
Identificativo fiscale ai fini IVA: Identificativo fiscale ai fini IVA:
<span> <span>
<xsl:value-of select="IdFiscaleIVA/IdPaese" /> <xsl:choose>
<xsl:value-of select="IdFiscaleIVA/IdCodice" /> <xsl:when test="string(number(substring(IdFiscaleIVA/IdCodice[1],1,1)))='NaN' and string(number(substring(IdFiscaleIVA/IdCodice[2],1,1)))='NaN'">
<xsl:if test="IdFiscaleIVA/IdPaese = 'FR' or (substring(IdFiscaleIVA/IdCodice[1],1,1)='G' and substring(IdFiscaleIVA/IdCodice[2],1,1)='D') or (substring(IdFiscaleIVA/IdCodice[1],1,1)='H' and substring(IdFiscaleIVA/IdCodice[2],1,1)='A')">
<xsl:value-of select="IdFiscaleIVA/IdPaese" />
</xsl:if>
<xsl:value-of select="IdFiscaleIVA/IdCodice" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="IdFiscaleIVA/IdPaese" />
<xsl:value-of select="IdFiscaleIVA/IdCodice" />
</xsl:otherwise>
</xsl:choose>
</span> </span>
</xsl:if> </xsl:if>