offerte ‘fee’ element now deals gracefully with non-numbers

This commit is contained in:
skyanth 2017-08-15 11:30:57 +02:00
parent 5a8ccbdfad
commit d0d5d3e986

View File

@ -437,7 +437,7 @@
<xsl:value-of select="$placeholderElement"/>
</xsl:when>
<!-- PRETTY FORMATTING FOR AMOUNTS OF MONEY -->
<xsl:when test="self::p_fee or self::contractor_hourly_fee or self::ir_ora_rate">
<xsl:when test="(self::p_fee or self::contractor_hourly_fee or self::ir_ora_rate) and string($placeholderElement) castable as xs:float">
<xsl:variable name="fee" select="$placeholderElement * 1"/>
<xsl:number value="$fee" grouping-separator="," grouping-size="3"/>
</xsl:when>