MDUX#37895: Factuurmatching in financieel pakket laten plaatsvinden

svn path=/Website/branches/v2016.2/; revision=31029
This commit is contained in:
Marcel Bourseau
2016-10-11 08:43:14 +00:00
parent f7d9750b84
commit c2d18cf7f6

83
CUST/MDUX/xsl/bes4ax.xsl Normal file
View File

@@ -0,0 +1,83 @@
<?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">
<xsl:output method="xml" indent="yes" encoding="utf-8"/>
<xsl:decimal-format name="european" decimal-separator="." grouping-separator=","/>
<xsl:param name="mode"/>
<xsl:variable name="Rev">
<!-- Revision van deze cust.xsl -->
<xsl:value-of select="substring(translate('$Revision$', '$ ', ''), 10)"/>
</xsl:variable>
<xsl:key name="GROUP_BY_bes_opdr_key" match="//data_row" use="BES_OPDR_KEY"/>
<xsl:template match="rapport">
<!-- ******************************************************************* -->
<!-- *****FlexWhere-request: GetBES4AX -->
<!-- ******************************************************************* -->
<xsl:if test="@view='mdux_bes_4_ax'">
<xsl:choose>
<xsl:when test="$mode='BES4AX'">
<GetBES4AXResponse>
<BESTELOPDRACHTEN>
<xsl:for-each select="//data_row[generate-id(.)=generate-id(key('GROUP_BY_bes_opdr_key',BES_OPDR_KEY)[1])]">
<xsl:sort select="BES_OPDR_KEY"/>
<BESTELOPDRACHT>
<BES_OPDR_KEY><xsl:value-of select="BES_OPDR_KEY"/></BES_OPDR_KEY>
<PRS_LEVERANCIER_NR><xsl:value-of select="PRS_LEVERANCIER_NR"/></PRS_LEVERANCIER_NR>
<PRS_BEDRIJF_KEY><xsl:value-of select="PRS_BEDRIJF_KEY"/></PRS_BEDRIJF_KEY>
<BES_NR><xsl:value-of select="OPDRACHT_ID"/></BES_NR>
<PRS_KOSTENPLAATS_NR><xsl:value-of select="PRS_KOSTENPLAATS_NR"/></PRS_KOSTENPLAATS_NR>
<BES_BESTELOPDR_STATUS><xsl:value-of select="BES_BESTELOPDR_STATUS"/></BES_BESTELOPDR_STATUS>
<BES_BESTELOPDR_LEVERDATUM><xsl:value-of select="BES_BESOTV_DATUM"/></BES_BESTELOPDR_LEVERDATUM>
<BES_BESTELOPDR_LEVKOSTEN><xsl:value-of select="BES_BESTELOPDR_LEVKOSTEN"/></BES_BESTELOPDR_LEVKOSTEN>
<BES_BESTELOPDR_KORTING><xsl:value-of select="BES_BESTELOPDR_KORTING"/></BES_BESTELOPDR_KORTING>
<xsl:call-template name="BES4AX_response_per_BES_OPDR_KEY">
<xsl:with-param name="p_bes_opdr_key" select="BES_OPDR_KEY"/>
</xsl:call-template>
</BESTELOPDRACHT>
</xsl:for-each>
</BESTELOPDRACHTEN>
</GetBES4AXResponse>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template name="BES4AX_response_per_BES_OPDR_KEY">
<xsl:param name="p_bes_opdr_key"/>
<BESTELOPDRACHTREGELS>
<xsl:for-each select="//data_row[BES_OPDR_KEY = $p_bes_opdr_key]">
<BESTELREGEL>
<BES_BESTELOPDR_ITEM_POSNR><xsl:value-of select="BES_BESTELOPDR_ITEM_POSNR"/></BES_BESTELOPDR_ITEM_POSNR>
<BES_BESTELOPDR_ITEM_OMSCHRIJV><xsl:value-of select="BES_BESTELOPDR_ITEM_OMSCHRIJV"/></BES_BESTELOPDR_ITEM_OMSCHRIJV>
<BES_BESTELOPDR_ITEM_AANTAL><xsl:value-of select="BES_BESTELOPDR_ITEM_AANTAL"/></BES_BESTELOPDR_ITEM_AANTAL>
<BES_BESTELOPDR_ITEM_AANTALONTV><xsl:value-of select="BES_BESTELOPDR_ITEM_AANTALONTV"/></BES_BESTELOPDR_ITEM_AANTALONTV>
<BES_BESTELOPDR_ITEM_PRIJS><xsl:value-of select="BES_BESTELOPDR_ITEM_PRIJS"/></BES_BESTELOPDR_ITEM_PRIJS>
<BES_BESTELOPDR_ITEM_STATUS><xsl:value-of select="BES_BESTELOPDR_ITEM_STATUS"/></BES_BESTELOPDR_ITEM_STATUS>
</BESTELREGEL>
</xsl:for-each>
</BESTELOPDRACHTREGELS>
</xsl:template>
<!-- SOAP envelope met de afgesproken 'payload' in response op FlexWhere-request! -->
<xsl:template match="facilitor">
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<xsl:apply-templates select="rapport"/>
</soap:Body>
</soap:Envelope>
</xsl:template>
<!-- De afgesproken 'payload' in response op FlexWhere-request (zonder envelope)! -->
<!--xsl:template match="facilitor">
<xsl:apply-templates select="rapport"/>
</xsl:template-->
<!-- Root -->
<xsl:template match="/">
<xsl:apply-templates select="facilitor"/>
</xsl:template>
</xsl:stylesheet>