AAHB#55671 -- Facilitor - Facilitor koppeling voor bestellingen

svn path=/Website/branches/v2018.2/; revision=40800
This commit is contained in:
Arthur Egberink
2019-02-05 13:21:44 +00:00
parent 769291a311
commit 631ab1f9fd

View File

@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" version="1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:unic="http://unica.nl/">
<xsl:output method="xml" indent="yes" encoding="utf-8"/>
<xsl:decimal-format name="european" decimal-separator="," grouping-separator="."/>
<xsl:variable name="Rev">
<!-- Revision van deze CSUN_besopdr_resp.xsl -->
<xsl:value-of select="substring(translate('$Revision$', '$ ', ''), 10)"/>
</xsl:variable>
<xsl:template name="linebreaks">
<xsl:param name="string"/><xsl:param name="delimiter"/>
<xsl:choose>
<xsl:when test="contains($string, $delimiter)">
<xsl:value-of select="substring-before($string, $delimiter)"/>
<xsl:text>&#10;</xsl:text>
<xsl:call-template name="linebreaks">
<xsl:with-param name="string" select="substring-after($string, $delimiter)"/>
<xsl:with-param name="delimiter" select="$delimiter"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="strip_prefix">
<xsl:param name="in"/>
<xsl:choose>
<xsl:when test="translate(substring($in,1,1), '01234567890', '')">
<xsl:call-template name="strip_prefix">
<xsl:with-param name="in" select="substring($in, 2)"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$in"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="facilitor">
<facilitor>
<xsl:for-each select="opdracht">
<xsl:sort select="DateTime"/>
<xsl:element name="bestelopdracht">
<xsl:attribute name="key">
<xsl:call-template name="strip_prefix">
<xsl:with-param name="in" select="@key"/>
</xsl:call-template>
</xsl:attribute>
<xsl:attribute name="type">update</xsl:attribute>
<xsl:choose>
<xsl:when test="status = 'ORDAFM' ">
<opdrstatus>BES2AF</opdrstatus>
</xsl:when>
<xsl:otherwise>
<status></status>
</xsl:otherwise>
</xsl:choose>
<opmerking>
<xsl:value-of select="mut_datum"/>:<xsl:value-of select="status"/><xsl:text>&#10;</xsl:text>
<xsl:value-of select="opmerking"/><xsl:text>&#10;</xsl:text>
</opmerking>
<xsl:element name="kenmerk">
<xsl:attribute name="naam">Ref. Nr. Leverancier</xsl:attribute>
<xsl:attribute name="type">C</xsl:attribute>
<xsl:value-of select="RegistrationID"/>
</xsl:element>
</xsl:element>
</xsl:for-each>
</facilitor>
</xsl:template>
<!-- Root -->
<xsl:template match="/">
<xsl:apply-templates select="facilitor"/>
</xsl:template>
</xsl:stylesheet><!-- Stylesheet edited using Stylus Studio - (c) 2004-2007. Progress Software Corporation. All rights reserved. --><!-- Stylesheet edited using Stylus Studio - (c) 2004-2007. Progress Software Corporation. All rights reserved. --><!-- Stylesheet edited using Stylus Studio - (c) 2004-2007. Progress Software Corporation. All rights reserved. --><!-- Stylesheet edited using Stylus Studio - (c) 2004-2007. Progress Software Corporation. All rights reserved. --><!-- Stylesheet edited using Stylus Studio - (c) 2004-2007. Progress Software Corporation. All rights reserved. --><!-- Stylesheet edited using Stylus Studio - (c) 2004-2007. Progress Software Corporation. All rights reserved. --><!-- Stylesheet edited using Stylus Studio - (c) 2004-2009. Progress Software Corporation. All rights reserved. --><!-- Stylesheet edited using Stylus Studio - (c) 2004-2009. Progress Software Corporation. All rights reserved. --><!-- Stylesheet edited using Stylus Studio - (c) 2004-2009. Progress Software Corporation. All rights reserved. -->