KFNS#52066 OPDRSTAT_STRUKTON-import/Uitprijs-functionaliteit

svn path=/Website/branches/v2017.3/; revision=38194
This commit is contained in:
Maarten van der Heide
2018-06-13 14:05:50 +00:00
parent 73cd0f6e4a
commit 96eb985390

View File

@@ -4,37 +4,34 @@
<xsl:decimal-format name="european" decimal-separator="," grouping-separator="."/>
<xsl:template name="escape_quote">
<xsl:param name="string"/>
<xsl:choose>
<xsl:when test="contains($string, '&quot;')">
<xsl:value-of select="substring-before($string, '&quot;')"/>&quot;&quot;<xsl:call-template name="escape_quote">
<xsl:with-param name="string" select="substring-after($string, '&quot;')"/></xsl:call-template></xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="escape_quote">
<xsl:param name="string"/>
<xsl:choose>
<xsl:when test="contains($string, '&quot;')">
<xsl:value-of select="substring-before($string, '&quot;')"/>&quot;&quot;<xsl:call-template name="escape_quote"><xsl:with-param name="string" select="substring-after($string, '&quot;')"/></xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="linebreaks">
<xsl:param name="string"/>
<xsl:choose>
<xsl:when test="contains($string, '&#xA;')">
<xsl:value-of select="substring-before($string, '&#xA;')"/>@@<xsl:call-template name="linebreaks"><xsl:with-param name="string" select="substring-after($string, '&#xA;')"/></xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="linebreaks">
<xsl:param name="string"/>
<xsl:choose>
<xsl:when test="contains($string, '&#xA;')">
<xsl:value-of select="substring-before($string, '&#xA;')"/>@@<xsl:call-template name="linebreaks">
<xsl:with-param name="string" select="substring-after($string, '&#xA;')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="/">referenceID;ServiceRequestID;TypeID;DateTime;Description;Remarks;Total
<xsl:template match="/">ReferenceID;ServiceRequestID;TypeID;DateTime;Description;Remarks;Total
<xsl:for-each select="//Status">
<xsl:variable name="costinfo"><xsl:if test="TypeID='40'">@@Bruto: <20> <xsl:value-of select="format-number(CostCalculation/Total - CostCalculation/MaintenanceClause, '0,00', 'european')"/>@@Clausule: <20> <xsl:value-of select="format-number(CostCalculation/MaintenanceClause, '0,00', 'european')"/>@@Totaal: <20> <xsl:value-of select="format-number(CostCalculation/Total, '0,00', 'european')"/></xsl:if></xsl:variable>
<xsl:variable name="costs"><xsl:if test="TypeID='40'"><xsl:value-of select="CostCalculation/Total"/></xsl:if></xsl:variable>
<xsl:variable name="costinfo"><xsl:if test="TypeID='ignore'">@@Bruto: <20> <xsl:value-of select="format-number(CostCalculation/Total - CostCalculation/MaintenanceClause, '0,00', 'european')"/>@@Clausule: <20> <xsl:value-of select="format-number(CostCalculation/MaintenanceClause, '0,00', 'european')"/>@@Totaal: <20> <xsl:value-of select="format-number(CostCalculation/Total, '0,00', 'european')"/></xsl:if></xsl:variable>
<xsl:variable name="costs"><xsl:if test="TypeID='45'"><xsl:value-of select="CostCalculation/Total"/></xsl:if></xsl:variable>
<xsl:variable name="remarks_unquote"><xsl:call-template name="escape_quote"><xsl:with-param name="string" select="substring(Remarks,1,800)"/></xsl:call-template></xsl:variable>
<xsl:variable name="remarks_uncr">&quot;<xsl:call-template name="linebreaks"><xsl:with-param name="string" select="$remarks_unquote"/></xsl:call-template><xsl:value-of select="$costinfo"/>&quot;</xsl:variable>
<xsl:variable name="new_line" select="'&#xA;'"/>