FSN#30222: MAREON (MAR-module) versie 2.0

svn path=/Website/trunk/; revision=23184
This commit is contained in:
Marcel Bourseau
2014-10-30 12:49:00 +00:00
parent ebe1c4dd16
commit d78f456d5d
8 changed files with 503 additions and 0 deletions

BIN
APPL/MAR/images/mareon.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:b="http://schemas.datacontract.org/2004/07/SG.Services.Repositories"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
version="1.0">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:apply-templates select="s:Envelope/s:Body"/>
</xsl:template>
<xsl:template match="s:Body">ax_supplier_id;mld_melding_externnr;mld_melding_omschrijving;prs_afdeling_externnr;mld_melding_cust_name;mld_melding_cust_straat;mld_melding_cust_huisnr;mld_melding_cust_huisnr2;mld_melding_cust_postcode;mld_melding_cust_plaats;mld_melding_cust_telefoonnr;mld_melding_cust_object_omschr;mld_melding_memo;mld_opdr_externnr;mld_opdr_datumbegin;mld_opdr_einddatum
<xsl:for-each select="descendant::*/b:SupplierTaskSpec"><xsl:value-of select="b:vendAccountNum"/>;<xsl:value-of select="b:taskId"/>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="b:description"/></xsl:call-template>;<xsl:value-of select="b:companyId"/>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="b:custName"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="b:custStreet"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="b:custHouseNumber"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="b:custHouseNumberAddition"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="b:custZipCode"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="b:custCity"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="b:custPhone"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="b:objectDescription"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="b:memo"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="b:purchId"/></xsl:call-template>;<xsl:value-of select="b:startDateTime"/>;<xsl:value-of select="b:deadlineDate"/>;&#10;</xsl:for-each>
</xsl:template>
<xsl:template name="puntkomma">
<xsl:param name="p_string"/><xsl:call-template name="linebreaks"><xsl:with-param name="string" select="translate($p_string,';',':')"/></xsl:call-template></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;')"/>
<br/>
<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:stylesheet>

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:b="http://schemas.datacontract.org/2004/07/SG.Services.Repositories"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
version="1.0">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:apply-templates select="s:Envelope/s:Body"/>
</xsl:template>
<xsl:template match="s:Body">fac_usrdata_code;fac_usrdata_omschr
<xsl:for-each select="node()/node()/node()/node()">
<xsl:if test="local-name() = 'CodeId'"> <xsl:value-of select="text()"/>;</xsl:if>
<xsl:if test="local-name() = 'Description'"><xsl:value-of select="text()"/>;
</xsl:if>
</xsl:for-each>
<xsl:for-each select="descendant::*/b:ReturnCode"><xsl:value-of select="CodeId"/>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="Description"/></xsl:call-template>;&#10;</xsl:for-each>
</xsl:template>
<xsl:template name="puntkomma">
<xsl:param name="p_string"/><xsl:call-template name="linebreaks"><xsl:with-param name="string" select="translate($p_string,';',':')"/></xsl:call-template></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;')"/>
<br/>
<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:stylesheet>

View File

@@ -0,0 +1,335 @@
<?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_fin_factuur_key" match="//data_row" use="FIN_FACTUUR_KEY"/>
<xsl:template match="rapport">
<!-- ******************************************************************* -->
<!-- *****Request: AANNEMERS4AX -->
<!-- ******************************************************************* -->
<xsl:if test="@view='mar_v_bedrijven_ax'">
<xsl:choose>
<xsl:when test="$mode='AANNEMERS4AX'">
<xml>
<xsl:for-each select="//data_row">
<xsl:sort select="PRS_BEDRIJF_KEY"/>
<prs_bedrijf>
<prs_bedrijf_key><xsl:value-of select="PRS_BEDRIJF_KEY"/></prs_bedrijf_key>
<ax_vendAccountNum><xsl:value-of select="PRS_OVEREENKOMST_NR"/></ax_vendAccountNum>
<gln><xsl:value-of select="PRS_LEVERANCIER_NR"/></gln>
<prs_bedrijf_naam><xsl:value-of select="PRS_BEDRIJF_NAAM"/></prs_bedrijf_naam>
</prs_bedrijf>
</xsl:for-each>
</xml>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<!-- ******************************************************************* -->
<!-- *****Request: OPMERKING_OPDR_4AX -->
<!-- ******************************************************************* -->
<xsl:if test="@view='mar_v_opdr_opmerking_ax'">
<xsl:choose>
<xsl:when test="$mode='OPMERKING_OPDR_4AX'">
<xml>
<xsl:for-each select="//data_row">
<xsl:sort select="MLD_OPDR_KEY"/>
<mld_ordr>
<mld_opdr_key><xsl:value-of select="MLD_OPDR_KEY"/></mld_opdr_key>
<ax_company_id><xsl:value-of select="AX_COMPANY_ID"/></ax_company_id>
<mld_melding_externnr><xsl:value-of select="MLD_MELDING_EXTERNNR"/></mld_melding_externnr>
<mld_opdr_externnr><xsl:value-of select="MLD_OPDR_EXTERNNR"/></mld_opdr_externnr>
<mld_opdr_opmerking><xsl:value-of select="MLD_OPDR_OPMERKING"/></mld_opdr_opmerking>
</mld_ordr>
</xsl:for-each>
</xml>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<!-- ******************************************************************* -->
<!-- *****Request: AFGEMELDE_OPDR_4AX -->
<!-- ******************************************************************* -->
<xsl:if test="@view='mar_v_opdr_afgemeld_ax'">
<xsl:choose>
<xsl:when test="$mode='AFGEMELDE_OPDR_4AX'">
<xml>
<xsl:for-each select="//data_row">
<xsl:sort select="MLD_OPDR_KEY"/>
<mld_ordr>
<mld_opdr_key><xsl:value-of select="MLD_OPDR_KEY"/></mld_opdr_key>
<ax_company_id><xsl:value-of select="AX_COMPANY_ID"/></ax_company_id>
<mld_melding_externnr><xsl:value-of select="MLD_MELDING_EXTERNNR"/></mld_melding_externnr>
<mld_opdr_externnr><xsl:value-of select="MLD_OPDR_EXTERNNR"/></mld_opdr_externnr>
<fac_tracking_datum><xsl:value-of select="FAC_TRACKING_DATUM"/></fac_tracking_datum>
<mld_opdr_opmerking><xsl:value-of select="MLD_OPDR_OPMERKING"/></mld_opdr_opmerking>
</mld_ordr>
</xsl:for-each>
</xml>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<!-- ******************************************************************* -->
<!-- *****Request: GEPLANDE_OPDR_4AX -->
<!-- ******************************************************************* -->
<xsl:if test="@view='mar_v_opdr_plandatum_ax'">
<xsl:choose>
<xsl:when test="$mode='GEPLANDE_OPDR_4AX'">
<xml>
<xsl:for-each select="//data_row">
<xsl:sort select="MLD_OPDR_KEY"/>
<mld_ordr>
<mld_opdr_key><xsl:value-of select="MLD_OPDR_KEY"/></mld_opdr_key>
<ax_company_id><xsl:value-of select="AX_COMPANY_ID"/></ax_company_id>
<mld_melding_externnr><xsl:value-of select="MLD_MELDING_EXTERNNR"/></mld_melding_externnr>
<mld_opdr_externnr><xsl:value-of select="MLD_OPDR_EXTERNNR"/></mld_opdr_externnr>
<mld_opdr_plandatum><xsl:value-of select="MLD_OPDR_PLANDATUM"/></mld_opdr_plandatum>
<mld_opdr_opmerking><xsl:value-of select="MLD_OPDR_OPMERKING"/></mld_opdr_opmerking>
</mld_ordr>
</xsl:for-each>
</xml>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<!-- ******************************************************************* -->
<!-- *****Request: ACCEPT_REFUSED_OPDR_4AX -->
<!-- ******************************************************************* -->
<xsl:if test="@view='mar_v_opdr_accept_refused_ax'">
<xsl:choose>
<xsl:when test="$mode='ACCEPT_REFUSED_OPDR_4AX'">
<xml>
<xsl:for-each select="//data_row">
<xsl:sort select="MLD_OPDR_KEY"/>
<mld_ordr>
<mld_opdr_key><xsl:value-of select="MLD_OPDR_KEY"/></mld_opdr_key>
<ax_company_id><xsl:value-of select="AX_COMPANY_ID"/></ax_company_id>
<mld_melding_externnr><xsl:value-of select="MLD_MELDING_EXTERNNR"/></mld_melding_externnr>
<mld_opdr_externnr><xsl:value-of select="MLD_OPDR_EXTERNNR"/></mld_opdr_externnr>
<fac_tracking_datum><xsl:value-of select="FAC_TRACKING_DATUM"/></fac_tracking_datum>
<mld_opdr_opmerking><xsl:value-of select="MLD_OPDR_OPMERKING"/></mld_opdr_opmerking>
<fac_srtnotificatie_code><xsl:value-of select="FAC_SRTNOTIFICATIE_CODE"/></fac_srtnotificatie_code>
</mld_ordr>
</xsl:for-each>
</xml>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<!-- ******************************************************************* -->
<!-- *****Request: FACT4AX_XTRACTOR -->
<!-- ******************************************************************* -->
<xsl:if test="@view='mar_v_factuur_ax_export'">
<xsl:choose>
<xsl:when test="$mode='FACT4AX_XTRACTOR'">
<batch>
<xsl:for-each select="//data_row[generate-id(.)=generate-id(key('GROUP_BY_fin_factuur_key',FIN_FACTUUR_KEY)[1])]">
<xsl:sort select="FIN_FACTUUR_KEY"/>
<document>
<doctype>INVOICE</doctype>
<notes description="Document Notes">
<notes></notes>
</notes>
<extref description="External Reference">
<externalid></externalid>
<externalname>Otis</externalname>
<country>NL</country>
<currency>EUR</currency>
<language>NL</language>
</extref>
<docfile description="document files">
<doc_filename></doc_filename>
<data_file></data_file>
<pdf_img_file><xsl:value-of select="FIN_FACTUUR_BESTAND"/></pdf_img_file>
</docfile>
<fields description="data fields">
<CORSA description="Export">
<EX_BANKACC_ORG type="String"></EX_BANKACC_ORG>
<EX_BANKACC_2 type="String"></EX_BANKACC_2>
<EX_BANKACC_3 type="String"></EX_BANKACC_3>
<EX_VATNR_1 type="String"></EX_VATNR_1>
<EX_TELNR type="String"></EX_TELNR>
<EX_FAXNR type="String"></EX_FAXNR>
<EX_COCNR_1 type="String"></EX_COCNR_1>
<EX_WWW type="String"></EX_WWW>
<EX_IBANNR_1 type="String"></EX_IBANNR_1>
<EX_BANKACC_1 type="String"><xsl:value-of select="PRS_BEDRIJF_BANKREKNR"/></EX_BANKACC_1>
<EX_CUSTOM_1 type="String"></EX_CUSTOM_1>
</CORSA>
<DOCUMENT description="Factuurgegevens">
<EX_INVOICENR type="String"><xsl:value-of select="FIN_FACTUUR_NR"/></EX_INVOICENR>
<EX_INVOICEDATE type="Date"><xsl:value-of select="FIN_FACTUUR_DATUM"/></EX_INVOICEDATE>
<EX_OND type="String"></EX_OND>
<EX_BTWDATUM type="Date"></EX_BTWDATUM>
<xsl:element name="EX_SGBDR">
<xsl:attribute name="type">List</xsl:attribute>
<xsl:attribute name="Value"><xsl:value-of select="PRS_BEDRIJF_AXNR"/></xsl:attribute>
<xsl:value-of select="PRS_BEDRIJF_AXNR"/>
</xsl:element>
<EX_SGBOEKD type="Date"><xsl:value-of select="FIN_FACTUUR_BOEKDATUM"/></EX_SGBOEKD>
<EX_SGAINC type="Logical"></EX_SGAINC>
<EX_SGPROJNR type="String"></EX_SGPROJNR>
<EX_SGPROJMAN type="String"></EX_SGPROJMAN>
<EX_SGTERMIJN type="String"></EX_SGTERMIJN>
</DOCUMENT>
<AMOUNT description="Bedragen">
<EX_TOTALEXCL type="Currency">
<xsl:call-template name="TOTALEXCL">
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
</xsl:call-template>
</EX_TOTALEXCL>
<EX_VAT_HIGH type="Currency">
<xsl:call-template name="VAT_HIGH">
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
</xsl:call-template>
</EX_VAT_HIGH>
<EX_VAT_LOW type="Currency">
<xsl:call-template name="VAT_LOW">
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
</xsl:call-template>
</EX_VAT_LOW>
<EX_SGGHOOG type="Currency">
<xsl:call-template name="SGGHOOG">
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
</xsl:call-template>
</EX_SGGHOOG>
<EX_SGGLAAG type="Currency">
<xsl:call-template name="SGGLAAG">
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
</xsl:call-template>
</EX_SGGLAAG>
<EX_SGGONBEL type="Currency">
<xsl:call-template name="SGGONBEL">
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
</xsl:call-template>
</EX_SGGONBEL>
<EX_TOTAL_INCL type="Currency">
<xsl:call-template name="TOTAL_INCL">
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
</xsl:call-template>
</EX_TOTAL_INCL>
<Werkbonnentotaal type="Currency"></Werkbonnentotaal>
<EX_BTWVERL type="String">
<xsl:call-template name="BTW_VERLEGD">
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
</xsl:call-template>
</EX_BTWVERL>
<NG-EX_GREK type="String"></NG-EX_GREK>
<EX_GREKNR type="String"></EX_GREKNR>
<EX_GREKBDR type="Currency"></EX_GREKBDR>
<EX_CURRENCY type="String">EUR</EX_CURRENCY>
<EX_BTWTTV type="String"></EX_BTWTTV>
<EX_wrktot type="Currency"></EX_wrktot>
</AMOUNT>
<TABLE description="Werkbon">
<EX_TABLE type="Table">
<xsl:call-template name="XTRACTOR_ROWS_PER_FIN_FACTUUR_KEY">
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
</xsl:call-template>
</EX_TABLE>
</TABLE>
<CUSTOM description="Variabel"/>
</fields>
</document>
</xsl:for-each>
</batch>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template name="BTW_VERLEGD">
<xsl:param name="p_fin_factuur_key"/>
<xsl:choose>
<xsl:when test="count(//data_row[FIN_FACTUUR_KEY = $p_fin_factuur_key and FIN_BTWTABELWAARDE_VERLEGD = '1']) != 0">Ja</xsl:when>
<xsl:otherwise>Nee</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="TOTALEXCL">
<xsl:param name="p_fin_factuur_key"/>
<xsl:value-of select="format-number(sum(//data_row[FIN_FACTUUR_KEY = $p_fin_factuur_key]/FIN_FACTUURREGEL_TOTAAL), '0,00', 'european')"/>
</xsl:template>
<xsl:template name="VAT_HIGH">
<xsl:param name="p_fin_factuur_key"/>
<xsl:value-of select="format-number(sum(//data_row[FIN_FACTUUR_KEY = $p_fin_factuur_key and FIN_FACTUURREGEL_BTW_PERC = '21']/FIN_FACTUURREGEL_BTW), '0,00', 'european')"/>
</xsl:template>
<xsl:template name="VAT_LOW">
<xsl:param name="p_fin_factuur_key"/>
<xsl:value-of select="format-number(sum(//data_row[FIN_FACTUUR_KEY = $p_fin_factuur_key and FIN_FACTUURREGEL_BTW_PERC = '6']/FIN_FACTUURREGEL_BTW), '0,00', 'european')"/>
</xsl:template>
<xsl:template name="SGGHOOG">
<xsl:param name="p_fin_factuur_key"/>
<xsl:value-of select="format-number(sum(//data_row[FIN_FACTUUR_KEY = $p_fin_factuur_key and FIN_FACTUURREGEL_BTW_PERC = '21']/FIN_FACTUURREGEL_TOTAAL), '0,00', 'european')"/>
</xsl:template>
<xsl:template name="SGGLAAG">
<xsl:param name="p_fin_factuur_key"/>
<xsl:value-of select="format-number(sum(//data_row[FIN_FACTUUR_KEY = $p_fin_factuur_key and FIN_FACTUURREGEL_BTW_PERC = '6']/FIN_FACTUURREGEL_TOTAAL), '0,00', 'european')"/>
</xsl:template>
<xsl:template name="SGGONBEL">
<xsl:param name="p_fin_factuur_key"/>
<xsl:value-of select="format-number(sum(//data_row[FIN_FACTUUR_KEY = $p_fin_factuur_key and FIN_FACTUURREGEL_BTW_PERC = '0']/FIN_FACTUURREGEL_TOTAAL), '0,00', 'european')"/>
</xsl:template>
<xsl:template name="TOTAL_INCL">
<xsl:param name="p_fin_factuur_key"/>
<xsl:value-of select="format-number(sum(//data_row[FIN_FACTUUR_KEY = $p_fin_factuur_key]/FIN_FACTUURREGEL_TOTAAL) + sum(//data_row[FIN_FACTUUR_KEY = $p_fin_factuur_key]/FIN_FACTUURREGEL_BTW), '0,00', 'european')"/>
</xsl:template>
<xsl:template name="XTRACTOR_ROWS_PER_FIN_FACTUUR_KEY">
<xsl:param name="p_fin_factuur_key"/>
<xsl:for-each select="//data_row[FIN_FACTUUR_KEY = $p_fin_factuur_key]">
<xsl:sort select="FIN_FACTUURREGEL_NR"/>
<xsl:element name="row">
<xsl:attribute name="nr"><xsl:value-of select="position()"/></xsl:attribute>
<col nr="1" id="ART"><xsl:value-of select="MLD_OPDR_ID"/></col>
<col nr="2" id="DESCR"><xsl:value-of select="FIN_FACTUURREGEL_OMSCHRIJVING"/></col>
<col nr="3" id="AMNT"><xsl:value-of select="format-number(FIN_FACTUURREGEL_TOTAAL, '0,00', 'european')"/></col>
<col nr="4" id="BTW"><xsl:value-of select="FIN_BTWTABELWAARDE_BTWCODE"/></col>
</xsl:element>
</xsl:for-each>
</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>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:comment>leveranciernr;factuurnr;factuurdatum;opdrachtnr;omschrijving;bedrag;btwperc;btwbedrag;btw_verlegd;document;debiteurnr;opmerking;betaalkenmerk</xsl:comment>
<xsl:for-each select="Invoice">
<xsl:for-each select="InvoiceLine">
<xsl:value-of select="../Invoicer/GLN"/>;<xsl:value-of select="../InvoiceNumber"/>;<xsl:value-of select="../InvoiceDate"/>;<xsl:value-of select="../BuyersOrderNumber"/>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="FreeText"/></xsl:call-template>;<xsl:value-of select="NetLineAmount"/>;<xsl:apply-templates select="VATInformation"/>;<xsl:value-of select="../Attachment/FileName"/>;&#10;</xsl:for-each></xsl:for-each>
</xsl:template>
<xsl:template match="VATInformation">
<!-- Deze template levert het gedeelte [btwperc;btwbedrag;btw_verlegd] op -->
<!-- Let even op: geen voorgaande ; en zeker ook geen ; op einde, dat gebeurt in de aanroepende regel (hierboven dus) -->
<!-- Let op: btw bedrag wordt niet uit SidB uit de node InvoiceLine aangeboden, dus deze is hier altijd leeg. -->
<xsl:choose>
<xsl:when test="VATRate = 'E'">
<!-- BTW verlegd = Ja, en neem BTW-percentage over uit XML, indien deze NIET(!) staat ingevuld (hoeft kennelijk niet in SidB/volgens wet, zet dan hard 21% hier in -->
<xsl:choose>
<xsl:when test="VATPercentage != ''"><xsl:value-of select="VATPercentage"/>;;Ja</xsl:when>
<xsl:otherwise>21;;Ja</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!-- BTW verlegd = Nee (Vatrate is dan S), veld btw_verlegd in CSV gewoon leeg laten, en neem BTW-percentage over uit XML -->
<xsl:otherwise><xsl:value-of select="VATPercentage"/>;;</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="puntkomma">
<xsl:param name="p_string"/>
<xsl:value-of select="translate($p_string,';',':')"/>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">axsync_mode
<xsl:value-of select="axsync/mode"/>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
version="1.0">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:apply-templates select="soap:Envelope/soap:Body"/>
</xsl:template>
<xsl:template match="soap:Body">ax_supplier_id;mld_melding_externnr;mld_melding_omschrijving;prs_afdeling_externnr;mld_melding_cust_name;mld_melding_cust_straat;mld_melding_cust_huisnr;mld_melding_cust_huisnr2;mld_melding_cust_postcode;mld_melding_cust_plaats;mld_melding_cust_telefoonnr;mld_melding_cust_object_omschr;mld_melding_memo;mld_opdr_externnr;mld_opdr_datumbegin;mld_opdr_einddatum
<xsl:for-each select="descendant::*/Bon"><xsl:value-of select="CrediteurNummer"/>;<xsl:value-of select="BonId"/>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="BonOmschrijving"/></xsl:call-template>;<xsl:value-of select="xxx_companyId"/>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="HuurderNaam"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="StraatNaam"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="HuisNummer"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="Toevoegsel"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="Postcode"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="Woonplaats"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="Telefoon"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="xxx_objectDescription"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="xxx_memo"/></xsl:call-template>;<xsl:call-template name="puntkomma"><xsl:with-param name="p_string" select="concat(BonNummer,'.',BonVolgNummer)"/></xsl:call-template>;<xsl:value-of select="substring(BonDatumOpdracht,1,10)"/>;<xsl:value-of select="substring(UitersteDatumGereed,1,10)"/>;&#10;</xsl:for-each>
</xsl:template>
<xsl:template name="puntkomma">
<xsl:param name="p_string"/><xsl:call-template name="linebreaks"><xsl:with-param name="string" select="translate($p_string,';',':')"/></xsl:call-template></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;')"/>
<br/>
<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:stylesheet>

7
APPL/MAR/xsl/mareon.xsl Normal file
View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:variable name="Rev">
<!-- Revision van deze cust.xsl -->
<xsl:value-of select="substring(translate('$Revision$', '$ ', ''), 10)"/>
</xsl:variable>
</xsl:stylesheet>