Open dellermann opened 7 years ago
A possible solution could be to add handling of NaN values in XSLT template:
<xsl:template match="entry[@key='taxRates']/entry">
<fo:table-row>
<fo:table-cell number-columns-spanned="2">
<fo:block></fo:block>
</fo:table-cell>
<fo:table-cell padding="{$table.cell.padding.default}">
<fo:block>
<xsl:value-of select="format-number(number(@key), '#.##0,##')"/>
<xsl:text> % MwSt.</xsl:text>
</fo:block>
</fo:table-cell>
<fo:table-cell><fo:block></fo:block></fo:table-cell>
<fo:table-cell padding="{$table.cell.padding.default}"
text-align="right">
<fo:block>
<xsl:choose>
<xsl:when test="string(number()) = 'NaN'">
<xsl:value-of select="format-number(0, '#.##0,00')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number(number(), '#.##0,00')"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text> €</xsl:text>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:template>
When I print an invoice, sales order etc. with all items having zero V.A.T the tax rate rows in the footer of the table contains "NaN".