MARX#39807: Factuurbericht vanuit Mareon rechtsgeldig maken
svn path=/Website/branches/v2016.3/; revision=33739
This commit is contained in:
@@ -303,7 +303,7 @@
|
||||
<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_VATNR_1 type="String"><xsl:value-of select="FIN_FACTUUR_BTWNR"/></EX_VATNR_1>
|
||||
<EX_TELNR type="String"></EX_TELNR>
|
||||
<EX_FAXNR type="String"></EX_FAXNR>
|
||||
<EX_COCNR_1 type="String"></EX_COCNR_1>
|
||||
@@ -338,6 +338,8 @@
|
||||
</xsl:element>
|
||||
<EX_SGBOEKD type="Date"><xsl:value-of select="FIN_FACTUUR_BOEKDATUM"/></EX_SGBOEKD>
|
||||
<EX_SGAINC type="Logical"></EX_SGAINC>
|
||||
<EX_DELIVERYDATE type="Date"><xsl:value-of select="FIN_FACTUUR_AFLEVERDATUM"/></EX_DELIVERYDATE>
|
||||
<EX_KVKNUMMER type="String"><xsl:value-of select="FIN_FACTUUR_KVKNR"/></EX_KVKNUMMER>
|
||||
<EX_SGPROJNR type="String"></EX_SGPROJNR>
|
||||
<EX_SGPROJMAN type="String"></EX_SGPROJMAN>
|
||||
<EX_SGTERMIJN type="String"></EX_SGTERMIJN>
|
||||
@@ -414,6 +416,37 @@
|
||||
<CUSTOM description="Variabel"/>
|
||||
</fields>
|
||||
</document>
|
||||
</xsl:for-each>
|
||||
</batch>
|
||||
</xsl:when>
|
||||
<xsl:when test="$mode='FACT4_FACILITOR'">
|
||||
<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>
|
||||
<fin_factuur>
|
||||
<fin_factuur_nr><xsl:value-of select="FIN_FACTUUR_NR"/></fin_factuur_nr>
|
||||
<fin_factuur_datum><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)"/></fin_factuur_datum>
|
||||
<Attachment>
|
||||
<AttachedData/>
|
||||
<FileName>
|
||||
<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>
|
||||
</FileName>
|
||||
</Attachment>
|
||||
<mld_bes_opdracht_nr>
|
||||
<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>
|
||||
</mld_bes_opdracht_nr>
|
||||
<xsl:call-template name="FACILITOR_ROWS_PER_FIN_FACTUUR_KEY">
|
||||
<xsl:with-param name="p_fin_factuur_key" select="FIN_FACTUUR_KEY"/>
|
||||
</xsl:call-template>
|
||||
</fin_factuur>
|
||||
</xsl:for-each>
|
||||
</batch>
|
||||
</xsl:when>
|
||||
@@ -583,7 +616,20 @@
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
<xsl:template name="FACILITOR_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="fin_factuurregel">
|
||||
<fin_factuurregel_nr><xsl:value-of select="FIN_FACTUURREGEL_NR"/></fin_factuurregel_nr>
|
||||
<fin_factuurregel_omschrijving><xsl:value-of select="FIN_FACTUURREGEL_OMSCHRIJVING"/></fin_factuurregel_omschrijving>
|
||||
<fin_factuurregel_totaal><xsl:value-of select="FIN_FACTUURREGEL_TOTAAL"/></fin_factuurregel_totaal>
|
||||
<fin_factuurregel_btwperc><xsl:value-of select="FIN_FACTUURREGEL_BTW_PERC"/></fin_factuurregel_btwperc>
|
||||
<fin_factuurregel_btwverlegd><xsl:value-of select="FIN_BTWTABELWAARDE_VERLEGD"/></fin_factuurregel_btwverlegd>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</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]">
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:etim="http://etim.nl/xmlschemas/messageservice/2.40" version="1.0">
|
||||
<xsl:import href="./F_SIDB_common.xsl"/>
|
||||
<xsl:output method="text" encoding="UTF-8"/>
|
||||
|
||||
<xsl:template match="Invoice">
|
||||
<xsl:comment>woconr;leveranciernr;factuurnr;factuurdatum;onderwerp;opdrachtnr;omschrijving;bedrag;btwperc;btwbedrag;btw_verlegd;document;iban;G_iban;G_bedrag</xsl:comment>
|
||||
<xsl:comment>woconr;leveranciernr;factuurnr;factuurdatum;onderwerp;opdrachtnr;omschrijving;bedrag;btwperc;btwbedrag;btw_verlegd;document;iban;G_iban;G_bedrag;kvk_nr;btw_nr;afleverdatum</xsl:comment>
|
||||
<xsl:for-each select="InvoiceLine">
|
||||
<xsl:value-of select="../Invoicee/GLN"/>;<xsl:value-of select="../Invoicer/GLN"/>;<xsl:value-of select="../InvoiceNumber"/>;<xsl:value-of select="../InvoiceDate"/>;<xsl:call-template name="vrije_tekst"><xsl:with-param name="p_string" select="../FreeText"/></xsl:call-template>;<xsl:value-of select="../BuyersOrderNumber"/>;<xsl:call-template name="vrije_tekst"><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"/>;<xsl:value-of select="../Supplier/AccountInformation/IBAN"/>;<xsl:value-of select="../PaymentOnBlockedAccount/IBAN"/>;<xsl:value-of select="../PaymentOnBlockedAccount/Amount"/>; </xsl:for-each>
|
||||
<xsl:value-of select="../Invoicee/GLN"/>;<xsl:value-of select="../Invoicer/GLN"/>;<xsl:value-of select="../InvoiceNumber"/>;<xsl:value-of select="../InvoiceDate"/>;<xsl:call-template name="vrije_tekst"><xsl:with-param name="p_string" select="../FreeText"/></xsl:call-template>;<xsl:value-of select="../BuyersOrderNumber"/>;<xsl:call-template name="construct_factuurregel_omschr"/>;<xsl:value-of select="NetLineAmount"/>;<xsl:apply-templates select="VATInformation"/>;<xsl:value-of select="../Attachment/FileName"/>;<xsl:value-of select="../Supplier/AccountInformation/IBAN"/>;<xsl:value-of select="../PaymentOnBlockedAccount/IBAN"/>;<xsl:value-of select="../PaymentOnBlockedAccount/Amount"/>;<xsl:value-of select="../Supplier/ChamberOfCommerceNumber"/>;<xsl:value-of select="../Supplier/VATRegistrationNumber"/>;<xsl:value-of select="../DeliveryDate"/>; </xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="VATInformation">
|
||||
@@ -26,6 +27,19 @@
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="construct_factuurregel_omschr">
|
||||
<xsl:call-template name="vrije_tekst">
|
||||
<xsl:with-param name="p_string">
|
||||
<xsl:if test="DeliveredQuantity != ''"><xsl:value-of select="DeliveredQuantity"/><xsl:text> </xsl:text></xsl:if>
|
||||
<xsl:call-template name="SidB_translate_from_eenheidscode"><xsl:with-param name="p_unit" select="DeliveredQuantityMeasureUnitCode"/></xsl:call-template>
|
||||
<xsl:if test="TradeItemIdentification/AdditionalItemIdentification/TradeItemDescription != ''"><xsl:text> </xsl:text><xsl:value-of select="TradeItemIdentification/AdditionalItemIdentification/TradeItemDescription"/></xsl:if>
|
||||
<xsl:if test="FreeText != ''"><xsl:text> - </xsl:text><xsl:value-of select="FreeText"/></xsl:if>
|
||||
<xsl:if test="TradeItemIdentification/SuppliersTradeItemIdentification != ''"><xsl:text> - </xsl:text><xsl:value-of select="TradeItemIdentification/SuppliersTradeItemIdentification"/></xsl:if>
|
||||
<xsl:if test="TradeItemIdentification/GTIN != ''"><xsl:text> (GTIN: </xsl:text><xsl:value-of select="TradeItemIdentification/GTIN"/><xsl:text>)</xsl:text></xsl:if>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="vrije_tekst">
|
||||
<xsl:param name="p_string"/>
|
||||
<xsl:variable name="l_string_esc_quotes"><xsl:call-template name="escape_quote"><xsl:with-param name="string" select="$p_string"/></xsl:call-template></xsl:variable>
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:import href="./F_SIDB_common.xsl"/>
|
||||
<xsl:output method="text" encoding="UTF-8"/>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:comment>woconr;leveranciernr;factuurnr;factuurdatum;onderwerp;opdrachtnr;omschrijving;bedrag;btwperc;btwbedrag;btw_verlegd;document;iban;G_iban;G_bedrag</xsl:comment>
|
||||
<xsl:comment>woconr;leveranciernr;factuurnr;factuurdatum;onderwerp;opdrachtnr;omschrijving;bedrag;btwperc;btwbedrag;btw_verlegd;document;iban;G_iban;G_bedrag;kvk_nr;btw_nr;afleverdatum</xsl:comment>
|
||||
<xsl:for-each select="Invoice">
|
||||
<xsl:for-each select="InvoiceLine">
|
||||
<xsl:value-of select="../Invoicee/GLN"/>;<xsl:value-of select="../Invoicer/GLN"/>;<xsl:value-of select="../InvoiceNumber"/>;<xsl:value-of select="../InvoiceDate"/>;<xsl:call-template name="vrije_tekst"><xsl:with-param name="p_string" select="../FreeText"/></xsl:call-template>;<xsl:value-of select="../BuyersOrderNumber"/>;<xsl:call-template name="vrije_tekst"><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"/>;<xsl:value-of select="../Supplier/AccountInformation/IBAN"/>;<xsl:value-of select="../PaymentOnBlockedAccount/IBAN"/>;<xsl:value-of select="../PaymentOnBlockedAccount/Amount"/>; </xsl:for-each></xsl:for-each>
|
||||
<xsl:value-of select="../Invoicee/GLN"/>;<xsl:value-of select="../Invoicer/GLN"/>;<xsl:value-of select="../InvoiceNumber"/>;<xsl:value-of select="../InvoiceDate"/>;<xsl:call-template name="vrije_tekst"><xsl:with-param name="p_string" select="../FreeText"/></xsl:call-template>;<xsl:value-of select="../BuyersOrderNumber"/>;<xsl:call-template name="construct_factuurregel_omschr"/>;<xsl:value-of select="NetLineAmount"/>;<xsl:apply-templates select="VATInformation"/>;<xsl:value-of select="../Attachment/FileName"/>;<xsl:value-of select="../Supplier/AccountInformation/IBAN"/>;<xsl:value-of select="../PaymentOnBlockedAccount/IBAN"/>;<xsl:value-of select="../PaymentOnBlockedAccount/Amount"/>;<xsl:value-of select="../Supplier/ChamberOfCommerceNumber"/>;<xsl:value-of select="../Supplier/VATRegistrationNumber"/>;<xsl:value-of select="../DeliveryDate"/>; </xsl:for-each></xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="VATInformation">
|
||||
@@ -28,6 +29,20 @@
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="construct_factuurregel_omschr">
|
||||
<xsl:call-template name="vrije_tekst">
|
||||
<xsl:with-param name="p_string">
|
||||
<xsl:if test="DeliveredQuantity != ''"><xsl:value-of select="DeliveredQuantity"/><xsl:text> </xsl:text></xsl:if>
|
||||
<xsl:call-template name="SidB_translate_from_eenheidscode"><xsl:with-param name="p_unit" select="DeliveredQuantityMeasureUnitCode"/></xsl:call-template>
|
||||
<xsl:if test="TradeItemIdentification/AdditionalItemIdentification/TradeItemDescription != ''"><xsl:text> </xsl:text><xsl:value-of select="TradeItemIdentification/AdditionalItemIdentification/TradeItemDescription"/></xsl:if>
|
||||
<xsl:if test="FreeText != ''"><xsl:text> - </xsl:text><xsl:value-of select="FreeText"/></xsl:if>
|
||||
<xsl:if test="TradeItemIdentification/SuppliersTradeItemIdentification != ''"><xsl:text> - </xsl:text><xsl:value-of select="TradeItemIdentification/SuppliersTradeItemIdentification"/></xsl:if>
|
||||
<xsl:if test="TradeItemIdentification/GTIN != ''"><xsl:text> (GTIN: </xsl:text><xsl:value-of select="TradeItemIdentification/GTIN"/><xsl:text>)</xsl:text></xsl:if>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="vrije_tekst">
|
||||
<xsl:param name="p_string"/>
|
||||
<xsl:variable name="l_string_esc_quotes"><xsl:call-template name="escape_quote"><xsl:with-param name="string" select="$p_string"/></xsl:call-template></xsl:variable>
|
||||
|
||||
@@ -39,10 +39,35 @@
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'STU'">PCE</xsl:when><xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'STUK'">PCE</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'PST'">PCE</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'TON'">TNE</xsl:when>
|
||||
<xsl:otherwise>PCE</xsl:otherwise>
|
||||
<xsl:otherwise>PCE</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="SidB_translate_from_eenheidscode">
|
||||
<xsl:param name="p_unit"/>
|
||||
|
||||
<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" />
|
||||
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'CMT'">cm</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'DAY'">dag</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'GRM'">gram</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'HUR'">uur</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'KGM'">kg</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'LTR'">liter</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'MIN'">min</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'MLT'">ml</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'MMT'">mm</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'MTK'">m2</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'MTQ'">m3</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'MTR'">meter</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'PCE'">stuk</xsl:when>
|
||||
<xsl:when test="translate($p_unit,$smallcase,$uppercase) = 'TNE'">ton</xsl:when>
|
||||
<xsl:when test="$p_unit=''">stuk</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$p_unit"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user