WZUV#41726 Fase 2: Exact koppeling en factuurimport Liander
svn path=/Website/branches/v2017.2/; revision=36188
This commit is contained in:
117
CUST/WZUV/xsl/fclt_2_exact_xml.xsl
Normal file
117
CUST/WZUV/xsl/fclt_2_exact_xml.xsl
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:template match="/">
|
||||
<eExact>
|
||||
<xsl:for-each select="xml/kopregel">
|
||||
<GLEntries>
|
||||
<GLEntry status="E">
|
||||
<xsl:attribute name="entry">
|
||||
<xsl:value-of select="bkstnr"/>
|
||||
</xsl:attribute>
|
||||
<Description>
|
||||
<xsl:choose>
|
||||
<xsl:when test="fin_factuur_omschr_kopregel != ''">
|
||||
<xsl:value-of select="fin_factuur_omschr_kopregel"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="crdname"/> <xsl:value-of select="oms25"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</Description>
|
||||
<Date>
|
||||
<xsl:value-of select="substring(date,5,4)"/>
|
||||
<xsl:text>-</xsl:text>
|
||||
<xsl:value-of select="substring(date,3,2)"/>
|
||||
<xsl:text>-</xsl:text>
|
||||
<xsl:value-of select="substring(date,1,2)"/>
|
||||
</Date>
|
||||
<DocumentDate>
|
||||
<xsl:value-of select="substring(date,5,4)"/>
|
||||
<xsl:text>-</xsl:text>
|
||||
<xsl:value-of select="substring(date,3,2)"/>
|
||||
<xsl:text>-</xsl:text>
|
||||
<xsl:value-of select="substring(date,1,2)"/>
|
||||
</DocumentDate>
|
||||
<Journal>
|
||||
<xsl:attribute name="type">
|
||||
<xsl:value-of select="dagb_type"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="code">
|
||||
<xsl:value-of select="dagbknr"/>
|
||||
</xsl:attribute>
|
||||
</Journal>
|
||||
<FreeFields>
|
||||
<FreeTexts>
|
||||
<FreeText number="2">
|
||||
<xsl:value-of select="substring(bestand,1,75)"/>
|
||||
</FreeText>
|
||||
</FreeTexts>
|
||||
<FreeTexts>
|
||||
<FreeText number="3">
|
||||
<xsl:value-of select="substring(bestand,76,75)"/>
|
||||
</FreeText>
|
||||
</FreeTexts>
|
||||
</FreeFields>
|
||||
<xsl:for-each select="boekingsregel/bkstnr">
|
||||
<FinEntryLine subtype="T" type="N">
|
||||
<Date>
|
||||
<xsl:choose>
|
||||
<xsl:when test="../date != ''">
|
||||
<xsl:value-of select="substring(../date,7,4)"/>
|
||||
<xsl:text>-</xsl:text>
|
||||
<xsl:value-of select="substring(../date,4,2)"/>
|
||||
<xsl:text>-</xsl:text>
|
||||
<xsl:value-of select="substring(../date,1,2)"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring(../../date,5,4)"/>
|
||||
<xsl:text>-</xsl:text>
|
||||
<xsl:value-of select="substring(../../date,3,2)"/>
|
||||
<xsl:text>-</xsl:text>
|
||||
<xsl:value-of select="substring(../../date,1,2)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</Date>
|
||||
<GLAccount>
|
||||
<xsl:attribute name="code">
|
||||
<xsl:value-of select="../reknr"/>
|
||||
</xsl:attribute>
|
||||
</GLAccount>
|
||||
<Description>
|
||||
<xsl:value-of select="../oms25"/>
|
||||
</Description>
|
||||
<Costcenter>
|
||||
<xsl:attribute name="code">
|
||||
<xsl:value-of select="../kstplcode"/>
|
||||
</xsl:attribute>
|
||||
</Costcenter>
|
||||
<Creditor>
|
||||
<xsl:attribute name="code">
|
||||
<xsl:value-of select="../../crdnr"/>
|
||||
</xsl:attribute>
|
||||
</Creditor>
|
||||
<Amount>
|
||||
<Debit>
|
||||
<xsl:value-of select="../bedrag"/>
|
||||
</Debit>
|
||||
<VAT>
|
||||
<xsl:attribute name="code">
|
||||
<xsl:value-of select="../btwcode"/>
|
||||
</xsl:attribute>
|
||||
</VAT>
|
||||
</Amount>
|
||||
<Payment>
|
||||
<Reference></Reference>
|
||||
<InvoiceNumber></InvoiceNumber>
|
||||
</Payment>
|
||||
<FinReferences>
|
||||
<YourRef><xsl:value-of select="../../fin_factuur_nr"/></YourRef>
|
||||
</FinReferences>
|
||||
</FinEntryLine>
|
||||
</xsl:for-each>
|
||||
</GLEntry>
|
||||
</GLEntries>
|
||||
</xsl:for-each>
|
||||
</eExact>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
59
CUST/WZUV/xsl/fclt_2_tussen_exact_factuur_xml.xsl
Normal file
59
CUST/WZUV/xsl/fclt_2_tussen_exact_factuur_xml.xsl
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:output method="xml" encoding="UTF-8"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xml>
|
||||
<xsl:for-each select="xml/fin_factuur">
|
||||
<kopregel>
|
||||
<dagb_type>I</dagb_type>
|
||||
<dagbknr><xsl:value-of select="/xml/dagboeknr"/></dagbknr>
|
||||
<bkstnr><xsl:apply-templates select="../fin_factuur_key"/></bkstnr>
|
||||
<fin_factuur_nr><xsl:value-of select="fin_factuur_nr"/></fin_factuur_nr>
|
||||
<fin_factuur_omschr_kopregel><xsl:value-of select="fin_factuur_omschr_kopregel"/></fin_factuur_omschr_kopregel>
|
||||
<oms25><xsl:value-of select="bes_mld_cnt_opdracht_id"/></oms25>
|
||||
<date><xsl:value-of select="fin_factuur_datum"/></date>
|
||||
<crdnr><xsl:value-of select="prs_leverancier_nr"/></crdnr>
|
||||
<crdname><xsl:value-of select="prs_bedrijf_naam"/></crdname>
|
||||
<bedrag><xsl:value-of select="fin_factuur_totaal_incbtw"/></bedrag>
|
||||
<betaalref><xsl:value-of select="prs_betaal_referentie"/></betaalref>
|
||||
<bestand><xsl:value-of select="fin_factuur_bestand"/></bestand>
|
||||
<xsl:for-each select="fin_factuurregel">
|
||||
<boekingsregel>
|
||||
<dagb_type>I</dagb_type>
|
||||
<dagbknr><xsl:value-of select="/xml/dagboeknr"/></dagbknr>
|
||||
<bkstnr><xsl:apply-templates select="../fin_factuur_key"/></bkstnr>
|
||||
<oms25>
|
||||
<xsl:choose>
|
||||
<xsl:when test="fin_factuurregel_omschrijving=''"><xsl:value-of select="fin_factuurregel_nr"/></xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="fin_factuurregel_omschrijving"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</oms25>
|
||||
<verdeelperiode><xsl:value-of select="concat(fin_factuur_boekmaand,'-01')"/></verdeelperiode>
|
||||
<date><xsl:value-of select="fin_factuurregel_datum"/></date>
|
||||
<reknr><xsl:value-of select="prs_kostensoort_oms"/></reknr>
|
||||
<!-- Onderstaande vreemde * 100 en delen door 100 bewust (natuurlijk) gedaan, omdat xsl verschrikkelijke veel decimalen toont -->
|
||||
<!-- Er is ook geen round-functie in decimalen, de round-functie rond af op integer -->
|
||||
<bedrag><xsl:value-of select="round(100*(fin_factuurregel_totaal+fin_factuurregel_btw_bedrag)) div 100"/></bedrag>
|
||||
<btwcode><xsl:apply-templates select="fin_factuurregel_btw_perc_code">
|
||||
<xsl:with-param name="p_btwplichtig" select="prs_kostensoort_doorbelasten"/>
|
||||
</xsl:apply-templates>
|
||||
</btwcode>
|
||||
<btw_bdr><xsl:value-of select="fin_factuurregel_btw_bedrag"/></btw_bdr>
|
||||
<kstplcode><xsl:value-of select="prs_kostenplaats_nr"/></kstplcode>
|
||||
</boekingsregel>
|
||||
</xsl:for-each>
|
||||
</kopregel>
|
||||
</xsl:for-each>
|
||||
</xml>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fin_factuurregel_btw_perc_code">
|
||||
<xsl:param name="p_btwplichtig"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$p_btwplichtig=1"><xsl:value-of select="."/></xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -5,12 +5,16 @@
|
||||
xmlns:stat="urn:oasis:names:specification:ubl:schema:xsd:DocumentStatusCode-1.0" xmlns:udt="urn:un:unece:uncefact:data:draft:UnqualifiedDataTypesSchemaModule:2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
|
||||
<xsl:output method="text" encoding="UTF-8"/>
|
||||
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:comment>factuurnr;factuurdatum;opdrachtnr;omschrijving;bedrag;btwperc;btwbedrag;pdf</xsl:comment>
|
||||
<xsl:comment>factuurnr;factuurdatum;omschrijving;bedrag;btwperc;btwbedrag;periode_van</xsl:comment>
|
||||
<xsl:for-each select="//cac:InvoiceLine">
|
||||
<xsl:value-of select="../cbc:ID"/>;<xsl:value-of select="../cbc:IssueDate"/>;<xsl:value-of select="cac:OrderLineReference/cac:OrderReference/cbc:ID"/>;"<xsl:value-of select="cac:Item/cbc:Description"/>";<xsl:value-of select="cbc:LineExtensionAmount"/>;<xsl:value-of select="cac:TaxTotal/cac:TaxSubtotal/cbc:Percent"/>;<xsl:value-of select="cac:TaxTotal/cac:TaxSubtotal/cbc:TaxAmount"/>;<xsl:value-of select="../cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject/@filename"/>;
</xsl:for-each>
|
||||
<xsl:value-of select="../cbc:ID"/>;<xsl:value-of select="../cbc:IssueDate"/>;<xsl:value-of select="cac:Item/cbc:Name"/>;<xsl:value-of select="cac:TaxTotal/cac:TaxSubtotal/cbc:TaxableAmount"/>;<xsl:value-of select="cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:Percent"/>;<xsl:value-of select="cac:TaxTotal/cbc:TaxAmount"/>;<xsl:value-of select="cac:InvoicePeriod/cbc:StartDate"/>;
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
||||
<!-- Stylus Studio meta-information - (c) 2004-2007. Progress Software Corporation. All rights reserved.
|
||||
<metaInformation>
|
||||
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="file:///z:/Project/Implementaties/Customers/WZUV/9. Inkoop en inkoopfacturen/Liander/Efactuur40016060173.xml" htmlbaseurl="" outputurl="" processortype="saxon8" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator="" ><advancedProp name="sInitialMode" value=""/><advancedProp name="bXsltOneIsOkay" value="true"/><advancedProp name="bSchemaAware" value="true"/><advancedProp name="bXml11" value="false"/><advancedProp name="iValidation" value="0"/><advancedProp name="bExtensions" value="true"/><advancedProp name="iWhitespace" value="0"/><advancedProp name="sInitialTemplate" value=""/><advancedProp name="bTinyTree" value="true"/><advancedProp name="bWarnings" value="true"/><advancedProp name="bUseDTD" value="false"/><advancedProp name="iErrorHandling" value="fatal"/></scenario></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
|
||||
</metaInformation>
|
||||
-->
|
||||
Reference in New Issue
Block a user