659 lines
37 KiB
XML
659 lines
37 KiB
XML
<?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:decimal-format name="format_default" decimal-separator="."/>
|
|
<xsl:decimal-format name="format_xtractor" 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: MAREONINFO -->
|
|
<!-- ******************************************************************* -->
|
|
<xsl:if test="@view='mar_v_mareon_info'">
|
|
<xsl:choose>
|
|
<xsl:when test="$mode='MAREONINFO'">
|
|
<xml>
|
|
<xsl:for-each select="//data_row">
|
|
<mareon_info>
|
|
<fclt_mar_version><xsl:value-of select="FCLT_MAR_VERSION"/></fclt_mar_version>
|
|
<min_adapter_version><xsl:value-of select="MAR_MIN_ADAPTER_VERSION"/></min_adapter_version>
|
|
<prs_bedrijf_naam><xsl:value-of select="PRS_BEDRIJF_NAAM"/></prs_bedrijf_naam>
|
|
<mar_bedrijf_lastconnection><xsl:value-of select="MAR_BEDRIJF_LASTCONNECTION"/></mar_bedrijf_lastconnection>
|
|
<mar_bedrijf_nextconnection><xsl:value-of select="MAR_BEDRIJF_NEXTCONNECTION"/></mar_bedrijf_nextconnection>
|
|
<mar_connection_allowed><xsl:value-of select="MAR_CONNECTION_ALLOWED"/></mar_connection_allowed>
|
|
<mar_sync_opdr_past_days><xsl:value-of select="MAR_SYNC_OPDR_PAST_DAYS"/></mar_sync_opdr_past_days>
|
|
<mar_sync_opdr_past_secs_start><xsl:value-of select="MAR_SYNC_OPDR_PAST_SECS_START"/></mar_sync_opdr_past_secs_start>
|
|
<mar_sync_opdr_past_secs_stop><xsl:value-of select="MAR_SYNC_OPDR_PAST_SECS_STOP"/></mar_sync_opdr_past_secs_stop>
|
|
</mareon_info>
|
|
</xsl:for-each>
|
|
</xml>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:if>
|
|
<!-- ******************************************************************* -->
|
|
<!-- *****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="AX_SUPPLIER_ID"/></ax_vendAccountNum>
|
|
<overeenkomstnr><xsl:value-of select="PRS_OVEREENKOMST_NR"/></overeenkomstnr>
|
|
<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_ordernr><xsl:value-of select="MLD_OPDR_ORDERNR"/></mld_opdr_ordernr>
|
|
<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>
|
|
<mld_opdr_ordernr><xsl:value-of select="MLD_OPDR_ORDERNR"/></mld_opdr_ordernr>
|
|
<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_ordernr><xsl:value-of select="MLD_OPDR_ORDERNR"/></mld_opdr_ordernr>
|
|
<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>
|
|
<mld_opdr_ordernr><xsl:value-of select="MLD_OPDR_ORDERNR"/></mld_opdr_ordernr>
|
|
<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: FACT4_TOBIAS -->
|
|
<!-- ******************************************************************* -->
|
|
<xsl:if test="@view='mar_v_factuur_tobias_export'">
|
|
<xsl:choose>
|
|
<xsl:when test="$mode='FACT4_TOBIAS'">
|
|
<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"/>
|
|
<Factuurinfo>
|
|
<Batchnaam>Mareon_<xsl:value-of select="FIN_FACTUUR_KEY"/></Batchnaam>
|
|
<Crediteurnummer><xsl:value-of select="PRS_BEDRIJF_AXNR"/></Crediteurnummer>
|
|
<Budgethouder></Budgethouder>
|
|
<ExternFactuurnummer><xsl:value-of select="FIN_FACTUUR_NR"/></ExternFactuurnummer>
|
|
<Item_id><xsl:value-of select="FIN_FACTUUR_KEY"/></Item_id>
|
|
<Omschrijving><xsl:value-of select="substring(normalize-space(FIN_FACTUUR_ONDERWERP),1,60)"/></Omschrijving>
|
|
<Factuurdatum><xsl:value-of select="substring(FIN_FACTUUR_DATUM,7,4)"/>-<xsl:value-of select="substring(FIN_FACTUUR_DATUM,4,2)"/>-<xsl:value-of select="substring(FIN_FACTUUR_DATUM,1,2)"/></Factuurdatum>
|
|
<Boekdatum><xsl:value-of select="substring(FIN_FACTUUR_BOEKDATUM,7,4)"/>-<xsl:value-of select="substring(FIN_FACTUUR_BOEKDATUM,4,2)"/>-<xsl:value-of select="substring(FIN_FACTUUR_BOEKDATUM,1,2)"/></Boekdatum>
|
|
<BTWdatum></BTWdatum>
|
|
<Factuurbedrag>
|
|
<xsl:call-template name="TOTAL_INCL">
|
|
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
|
|
<xsl:with-param name="p_formaat" select="'format_default'"/>
|
|
</xsl:call-template>
|
|
</Factuurbedrag>
|
|
<Bedragonbelast>
|
|
<xsl:call-template name="SGGONBEL_INCL">
|
|
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
|
|
</xsl:call-template>
|
|
</Bedragonbelast>
|
|
<BedragHoog>
|
|
<xsl:call-template name="SGGHOOG_INCL">
|
|
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
|
|
</xsl:call-template>
|
|
</BedragHoog>
|
|
<BedragLaag>
|
|
<xsl:call-template name="SGGLAAG_INCL">
|
|
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
|
|
</xsl:call-template>
|
|
</BedragLaag>
|
|
<BTWBedragHoog>
|
|
<xsl:call-template name="VAT_HIGH">
|
|
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
|
|
<xsl:with-param name="p_formaat" select="'format_default'"/>
|
|
</xsl:call-template>
|
|
</BTWBedragHoog>
|
|
<BTWBedragLaag>
|
|
<xsl:call-template name="VAT_LOW">
|
|
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
|
|
<xsl:with-param name="p_formaat" select="'format_default'"/>
|
|
</xsl:call-template>
|
|
</BTWBedragLaag>
|
|
<BTWVerlegd>
|
|
<xsl:call-template name="BTW_VERLEGD_TOBIAS">
|
|
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
|
|
</xsl:call-template>
|
|
</BTWVerlegd>
|
|
<G_Rekening>
|
|
<xsl:call-template name="BANKREKENINGNR">
|
|
<xsl:with-param name="p_fin_factuur_bankreknr" select="FIN_FACTUUR_G_IBAN"/>
|
|
<xsl:with-param name="p_prs_bedrijf_bankreknr" select="PRS_BEDRIJF_G_BANKREKNR"/>
|
|
<xsl:with-param name="p_prs_bedrijf_bankreknr2" select="PRS_BEDRIJF_G_BANKREKNR2"/>
|
|
</xsl:call-template>
|
|
</G_Rekening>
|
|
<Banknummer>
|
|
<xsl:call-template name="BANKREKENINGNR">
|
|
<xsl:with-param name="p_fin_factuur_bankreknr" select="FIN_FACTUUR_IBAN"/>
|
|
<xsl:with-param name="p_prs_bedrijf_bankreknr" select="PRS_BEDRIJF_BANKREKNR"/>
|
|
<xsl:with-param name="p_prs_bedrijf_bankreknr2" select="PRS_BEDRIJF_BANKREKNR2"/>
|
|
</xsl:call-template>
|
|
</Banknummer>
|
|
<BedragG_Rekening>
|
|
<xsl:if test="FIN_FACTUUR_G_AMMOUNT != ''">
|
|
<xsl:value-of select="format-number(FIN_FACTUUR_G_AMMOUNT, '0.00', 'format_default')"/>
|
|
</xsl:if>
|
|
</BedragG_Rekening>
|
|
<Referentie1>
|
|
<xsl:call-template name="TOBIAS_OPDRACHTEN_PER_FIN_FACTUUR_KEY">
|
|
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
|
|
</xsl:call-template>
|
|
</Referentie1>
|
|
<Referentie2>
|
|
<xsl:call-template name="TOBIAS_AMOUNTS_EXCL_BTW_PER_FIN_FACTUUR_KEY">
|
|
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
|
|
</xsl:call-template>
|
|
</Referentie2>
|
|
<Referentie3>
|
|
<xsl:call-template name="TOBIAS_BTW_TARIEF_PER_FIN_FACTUUR_KEY">
|
|
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
|
|
</xsl:call-template>
|
|
</Referentie3>
|
|
<Blokkeren>false</Blokkeren>
|
|
<Bedrijfnummer><xsl:value-of select="PRS_WOCO_AXNR"/></Bedrijfnummer>
|
|
<Factuurtype>Technisch</Factuurtype>
|
|
<AutoIncasso>false</AutoIncasso>
|
|
</Factuurinfo>
|
|
</xsl:for-each>
|
|
</batch>
|
|
</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"/>
|
|
<fin_factuur_key><xsl:value-of select="FIN_FACTUUR_KEY"/></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:call-template name="PDF_BESTAND">
|
|
<xsl:with-param name="p_bestand_upload" select="FIN_FACTUUR_UPLOAD_BESTAND"/>
|
|
<xsl:with-param name="p_bestand_naam" select="FIN_FACTUUR_BESTAND"/>
|
|
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
|
|
</xsl:call-template>
|
|
</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:call-template name="BANKREKENINGNR">
|
|
<xsl:with-param name="p_fin_factuur_bankreknr" select="FIN_FACTUUR_IBAN"/>
|
|
<xsl:with-param name="p_prs_bedrijf_bankreknr" select="PRS_BEDRIJF_BANKREKNR"/>
|
|
<xsl:with-param name="p_prs_bedrijf_bankreknr2" select="PRS_BEDRIJF_BANKREKNR2"/>
|
|
</xsl:call-template>
|
|
</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">
|
|
<xsl:call-template name="FACTUURONDERWERP">
|
|
<xsl:with-param name="p_fin_factuur_onderwerp" select="FIN_FACTUUR_ONDERWERP"/>
|
|
<xsl:with-param name="p_prs_bedrijf_adres_erbij" select="PRS_WOCO_ADRES_IN_FACTUUR"/>
|
|
<xsl:with-param name="p_prs_huurder_adres" select="PRS_HUURDER_ADRES"/>
|
|
<xsl:with-param name="p_prs_huurder_postcode" select="PRS_HUURDER_POSTCODE"/>
|
|
<xsl:with-param name="p_prs_huurder_plaats" select="PRS_HUURDER_PLAATS"/>
|
|
</xsl:call-template>
|
|
</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_WOCO_AXNR"/></xsl:attribute>
|
|
<xsl:value-of select="PRS_WOCO_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:with-param name="p_formaat" select="'format_xtractor'"/>
|
|
</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:with-param name="p_formaat" select="'format_xtractor'"/>
|
|
</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:with-param name="p_formaat" select="'format_xtractor'"/>
|
|
</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">
|
|
<xsl:call-template name="BANKREKENINGNR">
|
|
<xsl:with-param name="p_fin_factuur_bankreknr" select="FIN_FACTUUR_G_IBAN"/>
|
|
<xsl:with-param name="p_prs_bedrijf_bankreknr" select="PRS_BEDRIJF_G_BANKREKNR"/>
|
|
<xsl:with-param name="p_prs_bedrijf_bankreknr2" select="PRS_BEDRIJF_G_BANKREKNR2"/>
|
|
</xsl:call-template>
|
|
</EX_GREKNR>
|
|
<EX_GREKBDR type="Currency">
|
|
<xsl:if test="FIN_FACTUUR_G_AMMOUNT != ''">
|
|
<xsl:value-of select="format-number(FIN_FACTUUR_G_AMMOUNT, '0,00', 'format_xtractor')"/>
|
|
</xsl:if>
|
|
</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="OPDRACHTNR">
|
|
<xsl:param name="p_mld_opdr_id"/>
|
|
<xsl:param name="p_fin_factuur_ext_opdnr"/>
|
|
<xsl:choose>
|
|
<xsl:when test="$p_mld_opdr_id != ''"><xsl:value-of select="$p_mld_opdr_id"/></xsl:when>
|
|
<xsl:otherwise><xsl:value-of select="$p_fin_factuur_ext_opdnr"/></xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="FACTUURONDERWERP">
|
|
<xsl:param name="p_fin_factuur_onderwerp"/>
|
|
<xsl:param name="p_prs_bedrijf_adres_erbij"/>
|
|
<xsl:param name="p_prs_huurder_adres"/>
|
|
<xsl:param name="p_prs_huurder_postcode"/>
|
|
<xsl:param name="p_prs_huurder_plaats"/>
|
|
<xsl:choose>
|
|
<xsl:when test="$p_prs_bedrijf_adres_erbij = '1'"><xsl:value-of select="substring(normalize-space(concat($p_prs_huurder_adres, ' - ', $p_fin_factuur_onderwerp)),1,59)"/></xsl:when>
|
|
<xsl:otherwise>MAREON - <xsl:value-of select="substring(normalize-space($p_fin_factuur_onderwerp),1,50)"/></xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="BANKREKENINGNR">
|
|
<xsl:param name="p_fin_factuur_bankreknr"/>
|
|
<xsl:param name="p_prs_bedrijf_bankreknr"/>
|
|
<xsl:param name="p_prs_bedrijf_bankreknr2"/>
|
|
<xsl:choose>
|
|
<xsl:when test="$p_fin_factuur_bankreknr != ''"><xsl:value-of select="$p_fin_factuur_bankreknr"/></xsl:when>
|
|
<xsl:when test="$p_prs_bedrijf_bankreknr != ''"><xsl:value-of select="$p_prs_bedrijf_bankreknr"/></xsl:when>
|
|
<xsl:otherwise><xsl:value-of select="$p_prs_bedrijf_bankreknr2"/></xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
|
|
|
|
<xsl:template name="PDF_BESTAND">
|
|
<xsl:param name="p_bestand_upload"/>
|
|
<xsl:param name="p_bestand_naam"/>
|
|
<xsl:param name="p_fin_factuur_key"/>
|
|
<xsl:choose>
|
|
|
|
<!-- Let op de naamconventie van een geupload PDF bestand in Xtractor: zie ook F_GetFacturen.js, deze 2 MOETEN! exact overeenkomen-->
|
|
|
|
<!-- Bestandsnaam wordt in p_folder bewaard, met de naam als volgt: -->
|
|
<!-- 1. Vaste (harde) prefix 'mareon' -->
|
|
<!-- 2. Underscore '_' -->
|
|
<!-- 3. Uniek fin_factuur_key -->
|
|
<!-- 4. Underscore '_' -->
|
|
<!-- 5. Naam zoals leverancier die heeft geupload (handmatig of via SidB oid). -->
|
|
<!-- Voorbeeld: mareon_123_mijnfactuur.pdf -->
|
|
|
|
<xsl:when test="$p_bestand_upload != ''">mareon_<xsl:value-of select="$p_fin_factuur_key"/>_<xsl:value-of select="$p_bestand_upload"/></xsl:when>
|
|
|
|
<!-- Let op de naamconventie van een NIET geupload PDF bestand in Xtractor: 1-op-1 overnemen zoals de leverancier die rechtstreeks (buiten Mareon om) aan Woco zou sturen (bypass Mareon) -->
|
|
<xsl:when test="$p_bestand_naam != ''"><xsl:value-of select="$p_bestand_naam"/></xsl:when>
|
|
<xsl:otherwise></xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="BTWCODE">
|
|
<!-- **************************************************************************************** -->
|
|
<!-- *****BTW CODE moet in Xtractor Verlegd niet V zijn, maar H, en 0 moet G worden -->
|
|
<!-- **************************************************************************************** -->
|
|
<xsl:param name="p_fin_btwtabelwaarde_btwcode"/>
|
|
<xsl:choose>
|
|
<xsl:when test="$p_fin_btwtabelwaarde_btwcode = 'V21'">H</xsl:when>
|
|
<xsl:when test="$p_fin_btwtabelwaarde_btwcode = 'V6'">L</xsl:when>
|
|
<xsl:when test="$p_fin_btwtabelwaarde_btwcode = '0'">G</xsl:when>
|
|
<xsl:otherwise><xsl:value-of select="$p_fin_btwtabelwaarde_btwcode"/></xsl:otherwise>
|
|
</xsl:choose>
|
|
</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="BTW_VERLEGD_TOBIAS">
|
|
<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">true</xsl:when>
|
|
<xsl:otherwise>false</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', 'format_xtractor')"/>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="VAT_HIGH">
|
|
<xsl:param name="p_fin_factuur_key"/>
|
|
<xsl:param name="p_formaat"/>
|
|
<xsl:variable name="l_pattern">
|
|
<xsl:choose>
|
|
<xsl:when test="$p_formaat='format_xtractor'">0,00</xsl:when>
|
|
<xsl:otherwise>0.00</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:variable>
|
|
<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), $l_pattern, $p_formaat)"/>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="VAT_LOW">
|
|
<xsl:param name="p_fin_factuur_key"/>
|
|
<xsl:param name="p_formaat"/>
|
|
<xsl:variable name="l_pattern">
|
|
<xsl:choose>
|
|
<xsl:when test="$p_formaat='format_xtractor'">0,00</xsl:when>
|
|
<xsl:otherwise>0.00</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:variable>
|
|
<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), $l_pattern, $p_formaat)"/>
|
|
</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', 'format_xtractor')"/>
|
|
</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', 'format_xtractor')"/>
|
|
</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', 'format_xtractor')"/>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="TOTAL_INCL">
|
|
<xsl:param name="p_fin_factuur_key"/>
|
|
<xsl:param name="p_formaat"/>
|
|
<xsl:variable name="l_pattern">
|
|
<xsl:choose>
|
|
<xsl:when test="$p_formaat='format_xtractor'">0,00</xsl:when>
|
|
<xsl:otherwise>0.00</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:variable>
|
|
<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), $l_pattern, $p_formaat)"/>
|
|
</xsl:template>
|
|
|
|
|
|
<xsl:template name="SGGHOOG_INCL">
|
|
<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) + sum(//data_row[FIN_FACTUUR_KEY = $p_fin_factuur_key and FIN_FACTUURREGEL_BTW_PERC = '21']/FIN_FACTUURREGEL_BTW), '0.00', 'format_default')"/>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="SGGLAAG_INCL">
|
|
<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) + sum(//data_row[FIN_FACTUUR_KEY = $p_fin_factuur_key and FIN_FACTUURREGEL_BTW_PERC = '6']/FIN_FACTUURREGEL_BTW), '0.00', 'format_default')"/>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="SGGONBEL_INCL">
|
|
<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) + sum(//data_row[FIN_FACTUUR_KEY = $p_fin_factuur_key and FIN_FACTUURREGEL_BTW_PERC = '0']/FIN_FACTUURREGEL_BTW), '0.00', 'format_default')"/>
|
|
</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:call-template name="OPDRACHTNR">
|
|
<xsl:with-param name="p_mld_opdr_id" select="MLD_OPDR_ID"/>
|
|
<xsl:with-param name="p_fin_factuur_ext_opdnr" select="FIN_FACTUUR_EXT_OPDNR"/>
|
|
</xsl:call-template>
|
|
</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', 'format_xtractor')"/></col>
|
|
<col nr="4" id="BTW">
|
|
<xsl:call-template name="BTWCODE">
|
|
<xsl:with-param name="p_fin_btwtabelwaarde_btwcode" select="FIN_BTWTABELWAARDE_BTWCODE"/>
|
|
</xsl:call-template>
|
|
</col>
|
|
</xsl:element>
|
|
</xsl:for-each>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="TOBIAS_OPDRACHTEN_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:if test="position() != 1">;</xsl:if><xsl:call-template name="OPDRACHTNR">
|
|
<xsl:with-param name="p_mld_opdr_id" select="MLD_OPDR_ID"/>
|
|
<xsl:with-param name="p_fin_factuur_ext_opdnr" select="FIN_FACTUUR_EXT_OPDNR"/>
|
|
</xsl:call-template>
|
|
</xsl:for-each>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="TOBIAS_AMOUNTS_EXCL_BTW_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:if test="position() != 1">;</xsl:if><xsl:value-of select="format-number(FIN_FACTUURREGEL_TOTAAL, '0.00', 'format_default')"/>
|
|
</xsl:for-each>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="TOBIAS_BTW_TARIEF_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:if test="position() != 1">;</xsl:if><xsl:call-template name="BTWCODE">
|
|
<xsl:with-param name="p_fin_btwtabelwaarde_btwcode" select="FIN_BTWTABELWAARDE_BTWCODE"/>
|
|
</xsl:call-template>
|
|
</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>
|