45068: Staffelprijzen voor Zalsman-->aanvraagprijs
svn path=/Website/branches/v2017.2/; revision=35664
This commit is contained in:
177
CUST/MDUX/xsl/Zalsman.xsl
Normal file
177
CUST/MDUX/xsl/Zalsman.xsl
Normal file
@@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
|
||||
|
||||
<xsl:decimal-format name="european" decimal-separator="." grouping-separator=","/>
|
||||
|
||||
<xsl:param name="mode"/>
|
||||
|
||||
<xsl:template match="bestelopdracht">
|
||||
<!--Facilitor custom XSL template for cXML bestelopdracht-->
|
||||
<xsl:element name="cXML">
|
||||
<xsl:attribute name="version">1.2.016</xsl:attribute>
|
||||
<xsl:attribute name="payloadID">
|
||||
<xsl:value-of select="key"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="timestamp">
|
||||
<xsl:value-of select="datum/jaar"/>-<xsl:value-of select="datum/maand"/>-<xsl:value-of select="datum/dag"/>T<xsl:value-of select="datum/tijd"/>:00+01:00</xsl:attribute>
|
||||
<xsl:attribute name="xml:lang">NL</xsl:attribute>
|
||||
<Header>
|
||||
<From>
|
||||
<xsl:element name="Credential">
|
||||
<xsl:attribute name="domain">Medux</xsl:attribute>
|
||||
<!--Bij Identity de Klantcode zoals door Weemen aan SORO toegekend: 4926157 -->
|
||||
<Identity>Medux</Identity>
|
||||
</xsl:element>
|
||||
</From>
|
||||
<To>
|
||||
<xsl:element name="Credential">
|
||||
<xsl:attribute name="domain">Zalsman</xsl:attribute>
|
||||
<Identity></Identity>
|
||||
</xsl:element>
|
||||
</To>
|
||||
<Sender>
|
||||
<Credential domain="Medux">
|
||||
<Identity>meduxociuser</Identity>
|
||||
<SharedSecret>xxx</SharedSecret>
|
||||
</Credential>
|
||||
<UserAgent>Testsysteem</UserAgent>
|
||||
</Sender>
|
||||
</Header>
|
||||
<Request>
|
||||
<OrderRequest>
|
||||
<xsl:element name="OrderRequestHeader">
|
||||
<xsl:attribute name="type">
|
||||
<xsl:call-template name="inline_punchout_catalogus"><xsl:with-param name="p_ins_discipline_key" select="bestelopdrachtitem[1]/bestelitem[1]/srtdeel/srtgroep/discipline/key"/></xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="orderID">
|
||||
<xsl:value-of select="id"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="orderDate">
|
||||
<xsl:value-of select="datum/jaar"/>-<xsl:value-of select="datum/maand"/>-<xsl:value-of select="datum/dag"/>
|
||||
</xsl:attribute>
|
||||
<Total>
|
||||
<Money currency="EUR">
|
||||
<xsl:value-of select="format-number(sum(bestelopdrachtitem/totaal), '0.00', 'european')"/>
|
||||
</Money>
|
||||
</Total>
|
||||
<ShipTo>
|
||||
<xsl:element name="Address">
|
||||
<xsl:attribute name="isoCountryCode">NL</xsl:attribute>
|
||||
<xsl:attribute name="addressID">SORO</xsl:attribute>
|
||||
<Name xml:lang="NL"><xsl:value-of select="afleveradres/naam"/></Name>
|
||||
<PostalAddress>
|
||||
<DeliverTo><xsl:value-of select="bestelling/aanvrager/naam_full"/></DeliverTo>
|
||||
<Street><xsl:value-of select="afleveradres/bezoek_adres"/></Street>
|
||||
<City><xsl:value-of select="afleveradres/bezoek_plaats"/></City>
|
||||
<State></State>
|
||||
<PostalCode><xsl:value-of select="afleveradres/bezoek_postcode"/></PostalCode>
|
||||
<Country isoCountryCode="NL"></Country>
|
||||
</PostalAddress>
|
||||
<Email>
|
||||
<xsl:value-of select="bestelling/aanvrager/email"/>
|
||||
</Email>
|
||||
</xsl:element>
|
||||
</ShipTo>
|
||||
<BillTo>
|
||||
<xsl:element name="Address">
|
||||
<xsl:attribute name="isoCountryCode">NL</xsl:attribute>
|
||||
<xsl:attribute name="addressID">SORO</xsl:attribute>
|
||||
<Name xml:lang="NL">
|
||||
<xsl:value-of select="factuuradres/naam"/>
|
||||
</Name>
|
||||
<PostalAddress>
|
||||
<Street><xsl:value-of select="factuuradres/post_adres"/></Street>
|
||||
<City><xsl:value-of select="factuuradres/post_plaats"/></City>
|
||||
<State></State>
|
||||
<PostalCode><xsl:value-of select="factuuradres/post_postcode"/></PostalCode>
|
||||
<Country isoCountryCode="NL"></Country>
|
||||
</PostalAddress>
|
||||
</xsl:element>
|
||||
</BillTo>
|
||||
<Contact>
|
||||
<Name xml:lang="NL">
|
||||
<xsl:value-of select="bestelling/aanvrager/naam_full"/>
|
||||
</Name>
|
||||
<Email>
|
||||
<xsl:value-of select="bestelling/aanvrager/email"/>
|
||||
</Email>
|
||||
</Contact>
|
||||
<Extrinsic name="kostenplaats">
|
||||
<xsl:value-of select="substring-before(bestelling/kostenplaats/nr,'.')"/>
|
||||
</Extrinsic>
|
||||
<Extrinsic name="kostendrager">
|
||||
<xsl:value-of select="substring-after(bestelling/kostenplaats/nr,'.')"/>
|
||||
</Extrinsic>
|
||||
<Extrinsic name="grootboekrekening">
|
||||
<xsl:value-of select="bestelopdrachtitem[1]/bestelitem[1]/srtdeel/srtgroep/discipline/kostensoort/omschrijving"/>
|
||||
</Extrinsic>
|
||||
</xsl:element>
|
||||
<xsl:for-each select="bestelopdrachtitem">
|
||||
<xsl:sort select="srtdeel/omschrijving"/>
|
||||
<xsl:sort select="posnr"/>
|
||||
<xsl:element name="ItemOut">
|
||||
<xsl:attribute name="quantity">
|
||||
<xsl:value-of select="aantal"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="lineNumber">
|
||||
<xsl:value-of select="posnr"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="requestedDeliveryDate">
|
||||
<xsl:value-of select="../bestelling/leverdatum/jaar"/>-<xsl:value-of select="../bestelling/leverdatum/maand"/>-<xsl:value-of select="../bestelling/leverdatum/dag"/>
|
||||
</xsl:attribute>
|
||||
<ItemID>
|
||||
<SupplierPartID>
|
||||
<xsl:value-of select="bestelitem/srtdeel/artikel_nummer"/>
|
||||
</SupplierPartID>
|
||||
</ItemID>
|
||||
<ItemDetail>
|
||||
<UnitPrice>
|
||||
<Money currency="EUR">
|
||||
<xsl:value-of select="format-number(bestelitem/prijs, '0.00', 'european')"/>
|
||||
</Money>
|
||||
</UnitPrice>
|
||||
<Description xml:lang="NL">
|
||||
<xsl:value-of select="bestelitem/srtdeel/omschrijving"/>
|
||||
</Description>
|
||||
<UnitOfMeasure>
|
||||
<xsl:value-of select="bestelitem/srtdeel/eenheid"/>
|
||||
</UnitOfMeasure>
|
||||
<Classification domain=""/>
|
||||
</ItemDetail>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</OrderRequest>
|
||||
</Request>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="inline_punchout_catalogus">
|
||||
<!-- Type attribuut bij inline catalogus = [new], bij punch out = [update] -->
|
||||
<!-- Discipline key 361 = drukwerk, is interne catalogus-->
|
||||
<xsl:param name="p_ins_discipline_key"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$p_ins_discipline_key='361'">new</xsl:when>
|
||||
<xsl:otherwise>update</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="facilitor">
|
||||
<xsl:apply-templates select="bestelopdracht"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$mode='getExtension'">
|
||||
<xsl:element name="format">
|
||||
<xsl:element name="extension">xml</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
|
||||
<xsl:apply-templates select="facilitor"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
Reference in New Issue
Block a user