diff --git a/History.md b/History.md index 615a200c..f24355a2 100644 --- a/History.md +++ b/History.md @@ -5,6 +5,9 @@ Support BuyerReference (r+w), as well as SpecifiedLegalOrganization (w) and DefinedTradeContact (w) use dom4j to format output xml document corrected some exception logging glitches +upgrade PDFBox to 2.0.15+ +extraction to use proper filename instead of alias #98 +NullPointerException in ZUGFeRDImporter.extractLowLevel #96 1.7.1 diff --git a/pom.xml b/pom.xml index e8b226d1..67a0bb2a 100644 --- a/pom.xml +++ b/pom.xml @@ -69,12 +69,12 @@ org.apache.pdfbox preflight - 2.0.12 + [2.0.15,) org.apache.pdfbox pdfbox - 2.0.12 + [2.0.15,) org.dom4j diff --git a/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java b/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java index 35ce8717..c9004873 100644 --- a/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java +++ b/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java @@ -46,6 +46,9 @@ import javax.xml.xpath.XPath; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; import java.io.*; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; @@ -67,14 +70,13 @@ public class ZUGFeRDImporter { private String xmpString = null; // XMP metadata public ZUGFeRDImporter(String pdfFilename) { - try { - BufferedInputStream bis = new BufferedInputStream(new FileInputStream(pdfFilename)); + + try (InputStream bis = Files.newInputStream(Paths.get(pdfFilename), StandardOpenOption.READ)) { extractLowLevel(bis); - bis.close(); } catch (IOException e) { Logger.getLogger(ZUGFeRDImporter.class.getName()).log(Level.SEVERE, null, e); throw new ZUGFeRDExportException(e); - } + } } public ZUGFeRDImporter(InputStream pdfStream) { @@ -125,7 +127,9 @@ public class ZUGFeRDImporter { private void extractFiles(Map names) throws IOException { - for (String filename : names.keySet()) { + for (String alias : names.keySet()) { + String filename=names.get(alias).getFilename(); + /** * currently (in the release candidate of version 1) only one attached file with * the name ZUGFeRD-invoice.xml is allowed diff --git a/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDVisualizer.java b/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDVisualizer.java new file mode 100644 index 00000000..03b820b3 --- /dev/null +++ b/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDVisualizer.java @@ -0,0 +1,134 @@ +/** ********************************************************************** + * + * Copyright 2018 Jochen Staerk + * + * Use is subject to license terms. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and + * limitations under the License. + * + *********************************************************************** */ +package org.mustangproject.ZUGFeRD; + +import javax.xml.transform.*; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; +import java.io.*; +import java.util.logging.Level; +import java.util.logging.Logger; + +public class ZUGFeRDVisualizer { + + static final ClassLoader CLASS_LOADER = ZUGFeRDVisualizer.class.getClassLoader(); + private static final String RESOURCE_PATH = ""; //$NON-NLS-1$ + private static final Logger LOG = Logger.getLogger(ZUGFeRDVisualizer.class.getName()); + // private static File createTempFileResult(final Transformer transformer, final StreamSource toTransform, +// final String suffix) throws TransformerException, IOException { +// File result = File.createTempFile("ZUV_", suffix); //$NON-NLS-1$ +// result.deleteOnExit(); +// +// try (FileOutputStream fos = new FileOutputStream(result)) { +// transformer.transform(toTransform, new StreamResult(fos)); +// } +// return result; +// } + private TransformerFactory mFactory = null; + private Templates mXsltXRTemplate = null; + private Templates mXsltHTMLTemplate = null; + + public ZUGFeRDVisualizer() { + mFactory = new net.sf.saxon.TransformerFactoryImpl(); + //fact = TransformerFactory.newInstance(); + mFactory.setURIResolver(new ClasspathResourceURIResolver()); + try { + mXsltXRTemplate = mFactory.newTemplates(new StreamSource(CLASS_LOADER.getResourceAsStream(RESOURCE_PATH + "stylesheets/cii-xr.xsl"))); + mXsltHTMLTemplate = mFactory.newTemplates(new StreamSource(CLASS_LOADER.getResourceAsStream(RESOURCE_PATH + "stylesheets/xrechnung-html.xsl"))); + } catch (TransformerConfigurationException ex) { + LOG.log(Level.SEVERE, null, ex); + } + } + + public String visualize(String xmlFilename) throws FileNotFoundException, TransformerException, UnsupportedEncodingException { + /** + * * + * http://www.unece.org/fileadmin/DAM/cefact/xml/XML-Naming-And-Design-Rules-V2_1.pdf + * http://www.ferd-net.de/upload/Dokumente/FACTUR-X_ZUGFeRD_2p0_Teil1_Profil_EN16931_1p03.pdf + * http://countwordsfree.com/xmlviewer + */ + ByteArrayOutputStream iaos = new ByteArrayOutputStream(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + applySchematronXsl(new FileInputStream(xmlFilename), iaos); + // take the copy of the stream and re-write it to an InputStream + PipedInputStream in = new PipedInputStream(); + PipedOutputStream out; + try { + out = new PipedOutputStream(in); + new Thread(new Runnable() { + public void run () { + try { + // write the original OutputStream to the PipedOutputStream + // note that in order for the below method to work, you need + // to ensure that the data has finished writing to the + // ByteArrayOutputStream + iaos.writeTo(out); + } + catch (IOException e) { + // logging and exception handling should go here + } + finally { + // close the PipedOutputStream here because we're done writing data + // once this thread has completed its run + if (out != null) { + // close the PipedOutputStream cleanly + try { + out.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + } + }).start(); + applySchematronXsl2(in, baos); + } catch (IOException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + + return baos.toString("UTF-8"); + } + + public void applySchematronXsl(final InputStream xmlFile, + final OutputStream HTMLOutstream) throws TransformerException { + Transformer transformer = mXsltXRTemplate.newTransformer(); + + transformer.transform(new StreamSource(xmlFile), new StreamResult(HTMLOutstream)); + } + + public void applySchematronXsl2(final InputStream xmlFile, + final OutputStream HTMLOutstream) throws TransformerException { + Transformer transformer = mXsltHTMLTemplate.newTransformer(); + + transformer.transform(new StreamSource(xmlFile), new StreamResult(HTMLOutstream)); + } + + private static class ClasspathResourceURIResolver implements URIResolver { + ClasspathResourceURIResolver() { + // Do nothing, just prevents synthetic access warning. + } + + @Override + public Source resolve(String href, String base) throws TransformerException { + return new StreamSource(CLASS_LOADER.getResourceAsStream(RESOURCE_PATH + href)); + } + } +} diff --git a/src/main/java/org/mustangproject/toecount/Toecount.java b/src/main/java/org/mustangproject/toecount/Toecount.java index d45a26ce..06843a4c 100755 --- a/src/main/java/org/mustangproject/toecount/Toecount.java +++ b/src/main/java/org/mustangproject/toecount/Toecount.java @@ -30,8 +30,10 @@ import org.mustangproject.ZUGFeRD.*; import javax.xml.transform.TransformerException; import java.io.BufferedReader; import java.io.File; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -235,6 +237,8 @@ public class Toecount { // Option: Help Option helpOption = parser.addBooleanOption('h', "help"); + // Option: Action + Option actionOption = parser.addStringOption('a', "action"); // Generic options available for multiple command // --source: input file @@ -304,6 +308,7 @@ public class Toecount { String sourceXMLName = parser.getOptionValue(sourceXmlOption); String outName = parser.getOptionValue(outOption); String format = parser.getOptionValue(formatOption); + String action = parser.getOptionValue(actionOption); String zugferdVersion = parser.getOptionValue(zugferdVersionOption); String zugferdProfile = parser.getOptionValue(zugferdProfileOption); @@ -319,6 +324,8 @@ public class Toecount { performConvert(sourceName, outName); } else if (upgradeRequested) { performUpgrade(sourceName, outName); + } else if (action.equals("convertToHTML")) { + performVisualization(sourceName, outName); } else { // no argument or argument unknown printUsage(); @@ -332,6 +339,48 @@ public class Toecount { } + private static void performVisualization(String sourceName, String outName) { + // Get params from user if not already defined + if (sourceName == null) { + sourceName = getFilenameFromUser("ZUGFeRD XML source", "zugferd-invoice.xml", "xml", true, false); + } else { + System.out.println("ZUGFeRD XML source set to " + sourceName); + } + if (outName == null) { + outName = getFilenameFromUser("ZUGFeRD 2.0 XML target", "factur-x.html", "html", false, true); + } else { + System.out.println("ZUGFeRD 1.0 XML source set to " + outName); + } + + // Verify params + try { + ensureFileExists(sourceName); + ensureFileNotExists(outName); + + //stylesheets/ZUGFeRD_1p0_c1p0_s1p0.xslt + } catch (IOException e) { + Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, e); + } + + ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer(); + String xml = null; + try { + xml = zvi.visualize(sourceName); + Files.write(Paths.get(outName), xml.getBytes()); + } catch (FileNotFoundException e) { + Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, e); + } catch (UnsupportedEncodingException e) { + Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, e); + } catch (TransformerException e) { + Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, e); + } catch (IOException e) { + Logger.getLogger(Toecount.class.getName()).log(Level.SEVERE, null, e); + } + System.out.println("Written to " + outName); + + + } + private static void performUpgrade(String xmlName, String outName) throws IOException, TransformerException { // Get params from user if not already defined @@ -341,7 +390,7 @@ public class Toecount { System.out.println("ZUGFeRD 1.0 XML source set to " + xmlName); } if (outName == null) { - outName = getFilenameFromUser("ZUGFeRD 2.0 XML target", "factur-x.xml", "xml", false, true); + outName = getFilenameFromUser("ZUGFeRD 2.0 XML target", "zugferd-invoice.xml", "xml", false, true); } else { System.out.println("ZUGFeRD 1.0 XML source set to " + outName); } diff --git a/src/main/resources/stylesheets/ZUGFeRD_1p0_c1p0_s1p0.xslt b/src/main/resources/stylesheets/ZUGFeRD_1p0_c1p0_s1p0.xslt new file mode 100644 index 00000000..97f444fe --- /dev/null +++ b/src/main/resources/stylesheets/ZUGFeRD_1p0_c1p0_s1p0.xslt @@ -0,0 +1,3008 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + <meta http-equiv="X-UA-Compatible" content="IE=9"/> + <xsl:comment>[if IE]><STYLE type="text/css">.altova-rotate-left-textbox{filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3)} .altova-rotate-right-textbox{filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1)} </STYLE><![endif]</xsl:comment> + <xsl:comment>[if !IE]><!</xsl:comment> + <style type="text/css">.altova-rotate-left-textbox{-webkit-transform: rotate(-90deg) translate(-100%, 0%); -webkit-transform-origin: 0% 0%;-moz-transform: rotate(-90deg) translate(-100%, 0%); -moz-transform-origin: 0% 0%;-ms-transform: rotate(-90deg) translate(-100%, 0%); -ms-transform-origin: 0% 0%;}.altova-rotate-right-textbox{-webkit-transform: rotate(90deg) translate(0%, -100%); -webkit-transform-origin: 0% 0%;-moz-transform: rotate(90deg) translate(0%, -100%); -moz-transform-origin: 0% 0%;-ms-transform: rotate(90deg) translate(0%, -100%); -ms-transform-origin: 0% 0%;}</style> + <xsl:comment><![endif]</xsl:comment> + <style type="text/css">@page { margin-left:0.60in; margin-right:0.60in; margin-top:0.79in; margin-bottom:0.79in } @media print { br.altova-page-break { page-break-before: always; } }</style> + </head> + <body style="font-family:Courier; font-size:small; "> + <xsl:for-each select="$XML"> + <xsl:for-each select="rsm:CrossIndustryDocument"> + <span> + <xsl:text>Stylesheet Lesbarmachung der XML-Daten von ZUGFeRD-Rechnungen</xsl:text> + </span> + <br/> + <span> + <xsl:text>ZUGFeRD-Version   : 1.0 vom 25.06.2014 </xsl:text> + </span> + <br/> + <span> + <xsl:text>Stylesheet-Version: 1.0 vom 25.06.2014</xsl:text> + </span> + <br/> + <span> + <xsl:text>Codelisten-Version: 1.0 vom 25.06.2014</xsl:text> + </span> + <br/> + <span> + <xsl:text>(c) AWV e.V. 2014</xsl:text> + </span> + <xsl:variable name="altova:table"> + <table style="border-collapse:collapse; " border="1" width="100%"> + <xsl:variable name="altova:CurrContextGrid_0" select="."/> + <xsl:variable name="altova:ColumnData"/> + <tbody> + <tr> + <td> + <br/> + <h2> + <xsl:for-each select="rsm:HeaderExchangedDocument"> + <xsl:for-each select="ram:Name"> + <span style="font-weight:bold; "> + <xsl:apply-templates/> + </span> + </xsl:for-each> + <span style="empty-cells:hide; font-weight:bold; "> + <xsl:text>(</xsl:text> + </span> + <xsl:for-each select="ram:TypeCode"> + <xsl:apply-templates/> + </xsl:for-each> + <span style="empty-cells:hide; font-weight:bold; "> + <xsl:text>) Nr. </xsl:text> + </span> + <xsl:for-each select="ram:ID"> + <span style="font-weight:bold; "> + <xsl:apply-templates/> + </span> + </xsl:for-each> + <span style="empty-cells:hide; font-weight:bold; "> + <xsl:text> vom </xsl:text> + </span> + <xsl:for-each select="ram:IssueDateTime"> + <xsl:for-each select="udt:DateTimeString"> + <xsl:call-template name="ram:Datum"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </h2> + <xsl:for-each select="rsm:SpecifiedExchangedDocumentContext"> + <br/> + <xsl:for-each select="ram:TestIndicator"> + <xsl:for-each select="udt:Indicator"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Testkennzeichen      : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:BusinessProcessSpecifiedDocumentContextParameter"> + <xsl:for-each select="ram:ID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Geschäftsprozess     : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedExchangedDocumentContext"> + <xsl:for-each select="ram:GuidelineSpecifiedDocumentContextParameter"> + <xsl:for-each select="ram:ID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Anwendungsempfehlung : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:HeaderExchangedDocument"> + <xsl:for-each select="ram:CopyIndicator"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Kopie                : </xsl:text> + </span> + <xsl:for-each select="udt:Indicator"> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:HeaderExchangedDocument"> + <xsl:for-each select="ram:LanguageID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Sprache              : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeSettlement"> + <xsl:for-each select="ram:InvoiceCurrencyCode"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Währung              : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <br/> + </td> + </tr> + <tr> + <td> + <xsl:for-each select="rsm:HeaderExchangedDocument"> + <xsl:for-each select="ram:EffectiveSpecifiedPeriod"> + <xsl:for-each select="ram:CompleteDateTime"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Vertragliches Fälligkeitsdatum: </xsl:text> + </span> + <xsl:for-each select="udt:DateTimeString"> + <xsl:call-template name="ram:Datum"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeDelivery"> + <xsl:for-each select="ram:ActualDeliverySupplyChainEvent"> + <xsl:for-each select="ram:OccurrenceDateTime"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Liefer- und Leistungsdatum    : </xsl:text> + </span> + <xsl:for-each select="udt:DateTimeString"> + <xsl:call-template name="ram:Datum"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeSettlement"> + <xsl:for-each select="ram:BillingSpecifiedPeriod"> + <xsl:for-each select="ram:StartDateTime"> + <br/> + <span> + <xsl:text>Abrechnungszeitraum           : </xsl:text> + </span> + <xsl:for-each select="udt:DateTimeString"> + <xsl:call-template name="ram:Datum"/> + </xsl:for-each> + </xsl:for-each> + <span> + <xsl:text> bis </xsl:text> + </span> + <xsl:for-each select="ram:EndDateTime"> + <xsl:for-each select="udt:DateTimeString"> + <xsl:call-template name="ram:Datum"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <br/> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeAgreement"> + <xsl:for-each select="ram:BuyerReference"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Referenz des Käufers          : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeSettlement"> + <xsl:for-each select="ram:PaymentReference"> + <br/> + <span style="empty-cells:hide; font-weight:bold; "> + <xsl:text>Zahlungsreferenz              : </xsl:text> + </span> + <span style="font-weight:bold; "> + <xsl:apply-templates/> + </span> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeSettlement"> + <xsl:for-each select="ram:ReceivableSpecifiedTradeAccountingAccount"> + <xsl:for-each select="ram:ID"> + <br/> + <span> + <xsl:text>Buchungsreferenz              : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeAgreement"> + <xsl:for-each select="ram:ApplicableTradeDeliveryTerms"> + <xsl:for-each select="ram:DeliveryTypeCode"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Lieferbedingung (codiert)     : </xsl:text> + </span> + <xsl:call-template name="DeliveryTypeCode"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeDelivery"> + <xsl:for-each select="ram:RelatedSupplyChainConsignment"> + <xsl:for-each select="ram:SpecifiedLogisticsTransportMovement"> + <xsl:for-each select="ram:ModeCode"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Versandart (codiert)          : </xsl:text> + </span> + <xsl:call-template name="ram:VersandMode"/> + </xsl:for-each> + <xsl:for-each select="ram:ID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Versand-ID                    : </xsl:text> + </span> + <xsl:apply-templates/> + <xsl:for-each select="@schemeID"> + <span style="empty-cells:hide; "> + <xsl:text>, Art: </xsl:text> + </span> + <xsl:call-template name="ram:Versand_Identifer"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <br/> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeAgreement"> + <xsl:for-each select="ram:BuyerOrderReferencedDocument"> + <xsl:for-each select="ram:ID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Bestellung                    : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <span style="empty-cells:hide; "> + <xsl:text> vom </xsl:text> + </span> + <xsl:for-each select="ram:IssueDateTime"> + <span> + <xsl:variable name="altova:seqContentStrings_1"> + <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00', 'format1')"/> + <xsl:variable name="sText" as="xs:string?"> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:value-of select="$sText"/> + <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00', 'format1')"/> + <xsl:variable name="sText" as="xs:string?"> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:value-of select="$sText"/> + <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_1" select="string($altova:seqContentStrings_1)"/> + <xsl:value-of select="$altova:sContent_1"/> + </span> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeDelivery"> + <xsl:for-each select="ram:DespatchAdviceReferencedDocument"> + <xsl:for-each select="ram:ID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Lieferavis                    : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <span style="empty-cells:hide; "> + <xsl:text> vom </xsl:text> + </span> + <xsl:for-each select="ram:IssueDateTime"> + <span> + <xsl:variable name="altova:seqContentStrings_2"> + <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00', 'format1')"/> + <xsl:variable name="sText" as="xs:string?"> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:value-of select="$sText"/> + <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00', 'format1')"/> + <xsl:variable name="sText" as="xs:string?"> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:value-of select="$sText"/> + <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_2" select="string($altova:seqContentStrings_2)"/> + <xsl:value-of select="$altova:sContent_2"/> + </span> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeDelivery"> + <xsl:for-each select="ram:DeliveryNoteReferencedDocument"> + <xsl:for-each select="ram:ID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Lieferschein                  : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <span style="empty-cells:hide; "> + <xsl:text> vom </xsl:text> + </span> + <xsl:for-each select="ram:IssueDateTime"> + <span> + <xsl:variable name="altova:seqContentStrings_3"> + <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00', 'format1')"/> + <xsl:variable name="sText" as="xs:string?"> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:value-of select="$sText"/> + <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00', 'format1')"/> + <xsl:variable name="sText" as="xs:string?"> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:value-of select="$sText"/> + <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_3" select="string($altova:seqContentStrings_3)"/> + <xsl:value-of select="$altova:sContent_3"/> + </span> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeAgreement"> + <xsl:for-each select="ram:ContractReferencedDocument"> + <xsl:for-each select="ram:ID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Vertrag                       : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <span style="empty-cells:hide; "> + <xsl:text> vom </xsl:text> + </span> + <xsl:for-each select="ram:IssueDateTime"> + <span> + <xsl:variable name="altova:seqContentStrings_4"> + <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00', 'format1')"/> + <xsl:variable name="sText" as="xs:string?"> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:value-of select="$sText"/> + <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00', 'format1')"/> + <xsl:variable name="sText" as="xs:string?"> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:value-of select="$sText"/> + <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_4" select="string($altova:seqContentStrings_4)"/> + <xsl:value-of select="$altova:sContent_4"/> + </span> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeAgreement"> + <xsl:for-each select="ram:CustomerOrderReferencedDocument"> + <xsl:for-each select="ram:ID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Kundenbestellung              : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <span style="empty-cells:hide; "> + <xsl:text> vom </xsl:text> + </span> + <xsl:for-each select="ram:IssueDateTime"> + <span> + <xsl:variable name="altova:seqContentStrings_5"> + <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00', 'format1')"/> + <xsl:variable name="sText" as="xs:string?"> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:value-of select="$sText"/> + <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00', 'format1')"/> + <xsl:variable name="sText" as="xs:string?"> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:value-of select="$sText"/> + <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_5" select="string($altova:seqContentStrings_5)"/> + <xsl:value-of select="$altova:sContent_5"/> + </span> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeAgreement"> + <xsl:for-each select="ram:AdditionalReferencedDocument"> + <xsl:for-each select="ram:ID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Weitere Referenz              : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <span style="empty-cells:hide; "> + <xsl:text> vom </xsl:text> + </span> + <xsl:for-each select="ram:IssueDateTime"> + <span> + <xsl:variable name="altova:seqContentStrings_6"> + <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00', 'format1')"/> + <xsl:variable name="sText" as="xs:string?"> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:value-of select="$sText"/> + <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00', 'format1')"/> + <xsl:variable name="sText" as="xs:string?"> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:value-of select="$sText"/> + <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_6" select="string($altova:seqContentStrings_6)"/> + <xsl:value-of select="$altova:sContent_6"/> + </span> + </xsl:for-each> + <xsl:for-each select="ram:TypeCode"> + <span style="empty-cells:hide; "> + <xsl:text>, Art der Referenz: </xsl:text> + </span> + <xsl:call-template name="ram:Referenz"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <br/> + <span style="empty-cells:hide; "> + <xsl:text> </xsl:text> + </span> + </td> + </tr> + <tr> + <td> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeAgreement"> + <xsl:for-each select="ram:SellerTradeParty"> + <br/> + <span style="empty-cells:hide; font-weight:bold; text-decoration:underline; "> + <xsl:text>Verkäufer:</xsl:text> + </span> + <br/> + <xsl:call-template name="ram:Party"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeAgreement"> + <xsl:for-each select="ram:BuyerTradeParty"> + <br/> + <span style="empty-cells:hide; font-weight:bold; text-decoration:underline; "> + <xsl:text>Käufer:</xsl:text> + </span> + <br/> + <xsl:call-template name="ram:Party"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeAgreement"> + <xsl:for-each select="ram:ProductEndUserTradeParty"> + <br/> + <span style="empty-cells:hide; font-weight:bold; text-decoration:underline; "> + <xsl:text>Endverbraucher:</xsl:text> + </span> + <br/> + <xsl:call-template name="ram:Party"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeDelivery"> + <xsl:for-each select="ram:ShipToTradeParty"> + <br/> + <span style="empty-cells:hide; font-weight:bold; text-decoration:underline; "> + <xsl:text>Abweichender Warenempfänger:</xsl:text> + </span> + <br/> + <xsl:call-template name="ram:Party"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeDelivery"> + <xsl:for-each select="ram:UltimateShipToTradeParty"> + <br/> + <span style="empty-cells:hide; font-weight:bold; text-decoration:underline; "> + <xsl:text>Abweichender Endempfänger:</xsl:text> + </span> + <br/> + <xsl:call-template name="ram:Party"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeDelivery"> + <xsl:for-each select="ram:ShipFromTradeParty"> + <br/> + <span style="empty-cells:hide; font-weight:bold; text-decoration:underline; "> + <xsl:text>Abweichender Versender:</xsl:text> + </span> + <br/> + <xsl:call-template name="ram:Party"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeSettlement"> + <xsl:for-each select="ram:InvoiceeTradeParty"> + <br/> + <span style="empty-cells:hide; font-weight:bold; text-decoration:underline; "> + <xsl:text>Abweichender Rechnungsempfänger:</xsl:text> + </span> + <br/> + <xsl:call-template name="ram:Party"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeSettlement"> + <xsl:for-each select="ram:PayeeTradeParty"> + <br/> + <span style="empty-cells:hide; font-weight:bold; text-decoration:underline; "> + <xsl:text>Abweichender Zahlungsempfänger:</xsl:text> + </span> + <br/> + <xsl:call-template name="ram:Party"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </td> + </tr> + <tr> + <td> + <xsl:for-each select="rsm:HeaderExchangedDocument"> + <br/> + <xsl:for-each select="ram:IncludedNote"> + <xsl:for-each select="ram:SubjectCode"> + <span style="color:gray; empty-cells:hide; "> + <xsl:text>Qualifizierung der Textart: </xsl:text> + </span> + <span style="font-weight:bold; "> + <xsl:apply-templates/> + </span> + </xsl:for-each> + <xsl:for-each select="ram:ContentCode"> + <span style="color:gray; empty-cells:hide; "> + <xsl:text>, Qualifizierung des Textes: </xsl:text> + </span> + <span style="font-weight:bold; "> + <xsl:apply-templates/> + </span> + </xsl:for-each> + <xsl:for-each select="ram:Content"> + <br/> + <span style="font-weight:bold; white-space:pre-wrap; "> + <xsl:apply-templates/> + </span> + <br/> + <br/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </td> + </tr> + <tr> + <td style="border-bottom-style:none; "> + <xsl:variable name="altova:table"> + <table style="border:0px; border-collapse:collapse; border-spacing:0px; padding:0px; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_7" select="."/> + <xsl:variable name="altova:ColumnData"/> + <tbody> + <tr style="text-align:center; vertical-align:middle; "> + <td style="border-bottom-style:solid; border-collapse:collapse; border-left-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:center; width:30px; "> + <span style="font-weight:bold; "> + <xsl:text>Pos</xsl:text> + </span> + </td> + <td style="border-bottom-style:solid; border-collapse:collapse; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:left; width:110px; "> + <span style="font-weight:bold; "> + <xsl:text>Art-Nr-Kunde</xsl:text> + </span> + <br/> + <span style="font-weight:bold; "> + <xsl:text>Art-Nr-Lief.</xsl:text> + </span> + <br/> + <span style="font-weight:bold; "> + <xsl:text>Art-Nr</xsl:text> + </span> + <br/> + <span style="font-weight:bold; "> + <xsl:text>(Art)</xsl:text> + </span> + </td> + <td style="border-bottom-style:solid; border-collapse:collapse; border-spacing:0px; border-top-style:none; empty-cells:hide; "> + <span style="font-weight:bold; "> + <xsl:text>Beschreibung</xsl:text> + </span> + </td> + <td style="border-bottom-style:solid; border-collapse:collapse; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; width:110px; "> + <span style="font-weight:bold; "> + <xsl:text>E-Preis</xsl:text> + </span> + </td> + <td style="border-bottom-style:solid; border-collapse:collapse; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; width:120px; "> + <span style="font-weight:bold; "> + <xsl:text>Menge</xsl:text> + </span> + </td> + <td style="border-bottom-style:solid; border-collapse:collapse; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; width:110px; "> + <span style="font-weight:bold; "> + <xsl:text>Steuer</xsl:text> + </span> + </td> + <td style="border-bottom-style:solid; border-collapse:collapse; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; width:110px; "> + <span style="font-weight:bold; "> + <xsl:text>Entgelt</xsl:text> + </span> + </td> + </tr> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:IncludedSupplyChainTradeLineItem"> + <xsl:if test="fn:not( fn:empty(ram:SpecifiedTradeProduct))"> + <xsl:variable name="altova:table"> + <table style="border:0px; border-collapse:collapse; border-spacing:0px; padding:0px; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_8" select="."/> + <xsl:variable name="altova:ColumnData"/> + <tbody> + <tr style="vertical-align:top; "> + <td style="border-bottom-style:none; border-collapse:collapse; border-left-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:center; width:30px; "> + <xsl:for-each select="ram:AssociatedDocumentLineDocument"> + <xsl:if test="fn:empty(ram:IncludedNote)"> + <xsl:for-each select="ram:LineID"> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:if> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-collapse:collapse; border-spacing:0px; border-top-style:none; empty-cells:hide; width:110px; "> + <xsl:for-each select="ram:SpecifiedTradeProduct"> + <xsl:for-each select="ram:BuyerAssignedID"> + <xsl:apply-templates/> + </xsl:for-each> + <br/> + <xsl:for-each select="ram:SellerAssignedID"> + <xsl:apply-templates/> + </xsl:for-each> + <br/> + <xsl:for-each select="ram:GlobalID"> + <xsl:apply-templates/> + <br/> + <xsl:for-each select="@schemeID"> + <xsl:call-template name="ram:Global_Identifier"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-collapse:collapse; border-spacing:0px; border-top-style:none; empty-cells:hide; "> + <xsl:for-each select="ram:SpecifiedTradeProduct"> + <xsl:for-each select="ram:Name"> + <span style="white-space:pre-wrap; "> + <xsl:apply-templates/> + </span> + <br/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:SpecifiedSupplyChainTradeAgreement"> + <xsl:if test="fn:exists(ram:GrossPriceProductTradePrice)"> + <xsl:for-each select="ram:GrossPriceProductTradePrice"> + <xsl:for-each select="ram:BasisQuantity"> + <span> + <xsl:text>Preisbasismenge: </xsl:text> + </span> + <xsl:call-template name="ram:Menge"/> + </xsl:for-each> + </xsl:for-each> + </xsl:if> + <xsl:if test="fn:not(fn:exists(ram:GrossPriceProductTradePrice))"> + <xsl:for-each select="ram:NetPriceProductTradePrice"> + <xsl:for-each select="ram:BasisQuantity"> + <br/> + <span> + <xsl:text>Preisbasismenge: </xsl:text> + </span> + <xsl:call-template name="ram:Menge"/> + </xsl:for-each> + </xsl:for-each> + </xsl:if> + </xsl:for-each> + </td> + <td style="border-bottom-style:solid; border-collapse:collapse; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; width:110px; "> + <xsl:for-each select="ram:SpecifiedSupplyChainTradeAgreement"> + <xsl:if test="fn:exists(ram:GrossPriceProductTradePrice)"> + <xsl:for-each select="ram:GrossPriceProductTradePrice"> + <xsl:for-each select="ram:ChargeAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_9"> + <xsl:value-of select="format-number(number(string(.)), '##0,0000', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_9" select="string($altova:seqContentStrings_9)"/> + <xsl:value-of select="$altova:sContent_9"/> + </span> + </xsl:for-each> + </xsl:for-each> + </xsl:if> + <xsl:if test="not(fn:exists(ram:GrossPriceProductTradePrice))"> + <xsl:for-each select="ram:NetPriceProductTradePrice"> + <xsl:for-each select="ram:ChargeAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_10"> + <xsl:value-of select="format-number(number(string(.)), '###.##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_10" select="string($altova:seqContentStrings_10)"/> + <xsl:value-of select="$altova:sContent_10"/> + </span> + </xsl:for-each> + </xsl:for-each> + </xsl:if> + </xsl:for-each> + </td> + <td style="border-bottom-style:solid; border-collapse:collapse; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; width:120px; "> + <xsl:for-each select="ram:SpecifiedSupplyChainTradeDelivery"> + <xsl:for-each select="ram:BilledQuantity"> + <xsl:call-template name="ram:Menge"/> + </xsl:for-each> + <xsl:for-each select="ram:ChargeFreeQuantity"> + <br/> + <span> + <xsl:text>kostenfrei:</xsl:text> + </span> + <br/> + <xsl:call-template name="ram:Menge"/> + </xsl:for-each> + </xsl:for-each> + </td> + <td style="border-bottom-style:solid; border-collapse:collapse; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; width:110px; "> + <xsl:for-each select="ram:SpecifiedSupplyChainTradeSettlement"> + <xsl:for-each select="ram:ApplicableTradeTax"> + <xsl:call-template name="ram:TradeTax"/> + </xsl:for-each> + </xsl:for-each> + </td> + <td style="border-bottom-style:solid; border-collapse:collapse; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; width:110px; "> + <xsl:for-each select="ram:SpecifiedSupplyChainTradeSettlement"> + <xsl:for-each select="ram:SpecifiedTradeSettlementMonetarySummation"> + <xsl:for-each select="ram:LineTotalAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_11"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_11" select="string($altova:seqContentStrings_11)"/> + <xsl:value-of select="$altova:sContent_11"/> + </span> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </td> + </tr> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:if> + <xsl:for-each select="ram:AssociatedDocumentLineDocument"> + <xsl:if test="fn:not( fn:empty(ram:IncludedNote))"> + <xsl:variable name="altova:table"> + <table style="border:0px; border-collapse:collapse; border-spacing:0px; border-top-style:none; padding:0px; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_12" select="."/> + <xsl:variable name="altova:ColumnData"/> + <tbody> + <tr style="empty-cells:hide; vertical-align:top; "> + <td style="border-bottom-style:none; border-collapse:collapse; border-left-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:center; width:30px; "> + <xsl:for-each select="ram:LineID"> + <xsl:apply-templates/> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-collapse:collapse; border-spacing:0px; border-top-style:none; empty-cells:hide; width:110px; "/> + <td style="border-bottom-style:none; border-collapse:collapse; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; "> + <xsl:for-each select="ram:IncludedNote"> + <xsl:for-each select="ram:Content"> + <span style="white-space:pre-wrap; "> + <xsl:apply-templates/> + </span> + </xsl:for-each> + <xsl:for-each select="ram:SubjectCode"> + <br/> + <span style="color:gray; empty-cells:hide; "> + <xsl:text>Qualifizierung der Textart: </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:ContentCode"> + <span style="color:gray; empty-cells:hide; "> + <xsl:text>, Qualifizierung des Textes: </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <br/> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-collapse:collapse; border-left-style:none; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; width:110px; "/> + </tr> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:if> + </xsl:for-each> + <xsl:for-each select="ram:SpecifiedSupplyChainTradeAgreement"> + <xsl:for-each select="ram:GrossPriceProductTradePrice"> + <xsl:if test="fn:not( fn:empty(ram:AppliedTradeAllowanceCharge))"> + <xsl:variable name="altova:table"> + <table style="border:0px; border-collapse:collapse; border-spacing:0px; padding:0px; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_13" select="."/> + <xsl:variable name="altova:ColumnData"/> + <tbody> + <tr style="empty-cells:hide; vertical-align:top; "> + <td style="border-bottom-style:none; border-left-style:none; border-top-style:none; width:30px; "/> + <td style="border-bottom-style:none; border-top-style:none; width:110px; "/> + <td style="border-bottom-style:none; border-right-style:none; border-top-style:none; "> + <xsl:variable name="altova:table"> + <table style="border:0px; border-style:none; padding:0px; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_14" select="."/> + <xsl:variable name="altova:ColumnData"/> + <thead> + <tr> + <th style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; font-weight:normal; text-align:left; width:70px; "> + <span style="font-style:italic; "> + <xsl:text>Art</xsl:text> + </span> + </th> + <th style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; font-weight:normal; text-align:left; "> + <span style="font-style:italic; "> + <xsl:text>Grund</xsl:text> + </span> + </th> + <th style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; font-weight:normal; text-align:right; width:70px; "> + <span style="font-style:italic; "> + <xsl:text>%</xsl:text> + </span> + </th> + <th style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; font-weight:normal; text-align:right; width:110px; "> + <span style="font-style:italic; "> + <xsl:text>Basisbetrag</xsl:text> + </span> + </th> + <th style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; font-weight:normal; text-align:right; width:120px; "> + <span style="font-style:italic; "> + <xsl:text>Basismenge</xsl:text> + </span> + </th> + <th style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; font-weight:normal; text-align:right; width:110px; "> + <span style="font-style:italic; "> + <xsl:text>Betrag</xsl:text> + </span> + </th> + <th style="border-bottom-style:none; border-left-style:none; border-right-style:none; border-top-style:none; width:112px; "/> + </tr> + </thead> + <tbody> + <xsl:for-each select="ram:AppliedTradeAllowanceCharge"> + <xsl:sort select="ram:SequenceNumeric" data-type="text" order="ascending"/> + <tr> + <td style="border-bottom-style:none; border-collapse:collapse; border-left-style:none; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; vertical-align:top; width:70px; "> + <xsl:for-each select="ram:ChargeIndicator"> + <xsl:for-each select="udt:Indicator"> + <span> + <xsl:value-of select="if (. eq fn:true())then 'Zuschlag' else 'Abschlag'"/> + </span> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:SequenceNumeric"> + <span> + <xsl:text> Nr. </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-collapse:collapse; border-left-style:none; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; vertical-align:top; "> + <xsl:for-each select="ram:Reason"> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:ReasonCode"> + <span> + <xsl:text> </xsl:text> + </span> + <xsl:call-template name="AllowanceChargeReasonCode"/> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-collapse:collapse; border-left-style:none; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; vertical-align:top; width:70px; "> + <xsl:for-each select="ram:CalculationPercent"> + <span> + <xsl:variable name="altova:seqContentStrings_15"> + <xsl:value-of select="format-number(number(string(.)), '###.##0,####', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_15" select="string($altova:seqContentStrings_15)"/> + <xsl:value-of select="$altova:sContent_15"/> + </span> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-collapse:collapse; border-left-style:none; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; vertical-align:top; width:110px; "> + <xsl:for-each select="ram:BasisAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_16"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_16" select="string($altova:seqContentStrings_16)"/> + <xsl:value-of select="$altova:sContent_16"/> + </span> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-collapse:collapse; border-left-style:none; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; vertical-align:top; width:120px; "> + <xsl:for-each select="ram:BasisQuantity"> + <xsl:call-template name="ram:Menge"/> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-collapse:collapse; border-left-style:none; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; vertical-align:top; width:110px; "> + <xsl:for-each select="ram:ActualAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_17"> + <xsl:value-of select="format-number(number(if(../ram:ChargeIndicator/udt:Indicator = fn:false()) then -1*. else .), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_17" select="string($altova:seqContentStrings_17)"/> + <xsl:value-of select="$altova:sContent_17"/> + </span> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-collapse:collapse; border-left-style:none; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; width:108px; "/> + </tr> + </xsl:for-each> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </td> + </tr> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:if> + <xsl:if test="fn:exists(../../ram:SpecifiedSupplyChainTradeSettlement/ram:SpecifiedTradeSettlementMonetarySummation/ram:TotalAllowanceChargeAmount)"> + <xsl:variable name="altova:table"> + <table style="border:0px; border-collapse:collapse; border-spacing:0px; padding:0px; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_18" select="."/> + <xsl:variable name="altova:ColumnData"/> + <tbody> + <tr style="empty-cells:hide; vertical-align:top; "> + <td style="border-bottom-style:none; border-collapse:collapse; border-left-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; width:30px; "/> + <td style="border-bottom-style:none; border-collapse:collapse; border-spacing:0px; border-top-style:none; empty-cells:hide; width:110px; "/> + <td style="border-bottom-style:none; border-collapse:collapse; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; "> + <br/> + </td> + <td style="border-bottom-style:none; border-collapse:collapse; border-left-style:none; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; width:110px; "> + <span> + <xsl:text>Summe:</xsl:text> + </span> + </td> + <td style="border-bottom-style:none; border-collapse:collapse; border-left-style:none; border-right-style:none; border-spacing:0px; border-top-style:double; empty-cells:hide; text-align:right; width:110px; "> + <xsl:for-each select="$XML"> + <xsl:for-each select="rsm:CrossIndustryDocument"> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:IncludedSupplyChainTradeLineItem"> + <xsl:for-each select="ram:SpecifiedSupplyChainTradeSettlement"> + <xsl:for-each select="ram:SpecifiedTradeSettlementMonetarySummation"> + <xsl:for-each select="ram:TotalAllowanceChargeAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_19"> + <xsl:value-of select="format-number(number(-1*.), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_19" select="string($altova:seqContentStrings_19)"/> + <xsl:value-of select="$altova:sContent_19"/> + </span> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-collapse:collapse; border-left-style:none; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; text-align:right; width:110px; "/> + </tr> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:if> + </xsl:for-each> + </xsl:for-each> + <xsl:variable name="altova:table"> + <table style="border:0px; border-collapse:collapse; border-spacing:0px; border-top-style:none; padding:0px; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_20" select="."/> + <xsl:variable name="altova:ColumnData"/> + <tbody> + <tr style="empty-cells:hide; vertical-align:top; "> + <td style="border-collapse:collapse; border-left-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; width:30px; "/> + <td style="border-collapse:collapse; border-spacing:0px; border-top-style:none; empty-cells:hide; width:110px; "/> + <td style="border-collapse:collapse; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; "> + <xsl:for-each select="ram:SpecifiedTradeProduct"> + <xsl:for-each select="ram:Description"> + <br/> + <span style="white-space:pre-wrap; "> + <xsl:apply-templates/> + </span> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:SpecifiedSupplyChainTradeDelivery"> + <xsl:for-each select="ram:ActualDeliverySupplyChainEvent"> + <xsl:for-each select="ram:OccurrenceDateTime"> + <br/> + <span> + <xsl:text>* Leistungsdatum: </xsl:text> + </span> + <xsl:for-each select="udt:DateTimeString"> + <xsl:call-template name="ram:Datum"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:SpecifiedSupplyChainTradeSettlement"> + <xsl:for-each select="ram:BillingSpecifiedPeriod"> + <br/> + <span> + <xsl:text>* Berechnungszeitraum: </xsl:text> + </span> + <xsl:for-each select="ram:StartDateTime"> + <xsl:for-each select="udt:DateTimeString"> + <xsl:call-template name="ram:Datum"/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:EndDateTime"> + <span> + <xsl:text> bis </xsl:text> + </span> + <xsl:for-each select="udt:DateTimeString"> + <xsl:call-template name="ram:Datum"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:SpecifiedTradeProduct"> + <xsl:for-each select="ram:OriginTradeCountry"> + <xsl:for-each select="ram:ID"> + <br/> + <span> + <xsl:text>* Herkunftsland: </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:SpecifiedSupplyChainTradeDelivery"> + <xsl:for-each select="ram:PackageQuantity"> + <br/> + <span> + <xsl:text>* Anzahl Packstücke: </xsl:text> + </span> + <span> + <xsl:variable name="altova:seqContentStrings_21"> + <xsl:value-of select="format-number(number(string(.)), '##0', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_21" select="string($altova:seqContentStrings_21)"/> + <xsl:value-of select="$altova:sContent_21"/> + </span> + </xsl:for-each> + <xsl:call-template name="PackageQuantity"/> + </xsl:for-each> + <xsl:for-each select="ram:SpecifiedSupplyChainTradeAgreement"> + <xsl:for-each select="ram:BuyerOrderReferencedDocument"> + <br/> + <span> + <xsl:text>* Bestellung</xsl:text> + </span> + <xsl:call-template name="ram:Positionsreferenz"/> + </xsl:for-each> + <xsl:for-each select="ram:ContractReferencedDocument"> + <br/> + <span> + <xsl:text>* Vertrag</xsl:text> + </span> + <xsl:call-template name="ram:Positionsreferenz"/> + </xsl:for-each> + <xsl:for-each select="ram:AdditionalReferencedDocument"> + <br/> + <span> + <xsl:text>* Dokument (</xsl:text> + </span> + <xsl:for-each select="ram:ReferenceTypeCode"> + <xsl:call-template name="ram:Referenz"/> + </xsl:for-each> + <span> + <xsl:text>)</xsl:text> + </span> + <xsl:call-template name="ram:Positionsreferenz"/> + </xsl:for-each> + <xsl:for-each select="ram:CustomerOrderReferencedDocument"> + <br/> + <span> + <xsl:text>* Kundenbestellung</xsl:text> + </span> + <xsl:call-template name="ram:Positionsreferenz"/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:SpecifiedSupplyChainTradeDelivery"> + <xsl:for-each select="ram:DespatchAdviceReferencedDocument"> + <br/> + <span> + <xsl:text>* Lieferavis</xsl:text> + </span> + <xsl:call-template name="ram:Positionsreferenz"/> + </xsl:for-each> + <xsl:for-each select="ram:ReceivingAdviceReferencedDocument"> + <br/> + <span> + <xsl:text>* Wareneingang </xsl:text> + </span> + <xsl:call-template name="ram:Positionsreferenz"/> + </xsl:for-each> + <xsl:for-each select="ram:DeliveryNoteReferencedDocument"> + <br/> + <span> + <xsl:text>* Lieferschein</xsl:text> + </span> + <xsl:call-template name="ram:Positionsreferenz"/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:SpecifiedSupplyChainTradeSettlement"> + <xsl:for-each select="ram:SpecifiedTradeAccountingAccount"> + <xsl:for-each select="ram:ID"> + <br/> + <span> + <xsl:text>* Buchungsreferenz: </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:SpecifiedTradeProduct"> + <xsl:for-each select="ram:DesignatedProductClassification"> + <br/> + <span> + <xsl:text>* Klassifikation: </xsl:text> + </span> + <xsl:for-each select="ram:ClassCode"> + <span> + <xsl:text>[</xsl:text> + </span> + <xsl:apply-templates/> + <span> + <xsl:text>] </xsl:text> + </span> + </xsl:for-each> + <xsl:for-each select="ram:ClassName"> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:ClassCode"> + <xsl:call-template name="Klassifikationsart"/> + <xsl:for-each select="@listVersionID"> + <span> + <xsl:text>, Version: </xsl:text> + </span> + <span> + <xsl:value-of select="string(.)"/> + </span> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:SpecifiedSupplyChainTradeDelivery"> + <xsl:for-each select="ram:ShipToTradeParty"> + <br/> + <span style="text-decoration:underline; "> + <xsl:text>Abweichender Warenempfänger:</xsl:text> + </span> + <br/> + <xsl:call-template name="ram:Party"/> + </xsl:for-each> + <xsl:for-each select="ram:UltimateShipToTradeParty"> + <br/> + <span style="text-decoration:underline; "> + <xsl:text>Abweichender Endempfänger:</xsl:text> + </span> + <br/> + <xsl:call-template name="ram:Party"/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:SpecifiedTradeProduct"> + <xsl:if test="fn:exists(ram:ApplicableProductCharacteristic)"> + <br/> + <br/> + <span style="text-decoration:underline; "> + <xsl:text>Weitere Eigenschaften:</xsl:text> + </span> + <br/> + </xsl:if> + <xsl:for-each select="ram:ApplicableProductCharacteristic"> + <xsl:for-each select="ram:Description"> + <br/> + <xsl:apply-templates/> + </xsl:for-each> + <span> + <xsl:text>: </xsl:text> + </span> + <xsl:for-each select="ram:TypeCode"> + <xsl:apply-templates/> + </xsl:for-each> + <span> + <xsl:text> = </xsl:text> + </span> + <xsl:for-each select="ram:Value"> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:ValueMeasure"> + <xsl:call-template name="ram:Menge"/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:if test="fn:exists(ram:SpecifiedTradeProduct/ram:IncludedReferencedProduct)"> + <br/> + <br/> + <span style="text-decoration:underline; "> + <xsl:text>Basisartikel:</xsl:text> + </span> + <br/> + </xsl:if> + <xsl:for-each select="ram:SpecifiedTradeProduct"> + <xsl:if test="fn:exists(ram:IncludedReferencedProduct)"> + <xsl:variable name="altova:table"> + <table style="border:0px; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_22" select="."/> + <xsl:variable name="altova:ColumnData"/> + <thead> + <tr> + <th style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; text-align:left; width:110px; "> + <span style="font-weight:bold; "> + <xsl:text>Art-Nr-Kunde</xsl:text> + </span> + <br/> + </th> + <th style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; width:110px; "> + <span style="font-weight:bold; "> + <xsl:text>Art-Nr-Lief.</xsl:text> + </span> + </th> + <th style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; width:110px; "> + <span> + <xsl:text>Art-Nr. (Art)</xsl:text> + </span> + </th> + <th style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; "> + <span> + <xsl:text>Beschreibung</xsl:text> + </span> + </th> + <th style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; text-align:right; width:120px; "> + <span> + <xsl:text>Menge</xsl:text> + </span> + </th> + </tr> + </thead> + <tbody> + <xsl:for-each select="ram:IncludedReferencedProduct"> + <tr> + <td style="border-bottom-style:none; border-left-style:none; border-right-style:none; border-top-style:none; text-align:left; vertical-align:top; width:110px; "> + <xsl:for-each select="ram:BuyerAssignedID"> + <xsl:apply-templates/> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-left-style:none; border-right-style:none; border-top-style:none; vertical-align:top; width:110px; "> + <xsl:for-each select="ram:SellerAssignedID"> + <xsl:apply-templates/> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-left-style:none; border-right-style:none; border-top-style:none; vertical-align:top; width:110px; "> + <xsl:for-each select="ram:GlobalID"> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:GlobalID"> + <xsl:for-each select="@schemeID"> + <xsl:call-template name="ram:Global_Identifier"/> + </xsl:for-each> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-left-style:none; border-right-style:none; border-top-style:none; vertical-align:top; "> + <xsl:for-each select="ram:Name"> + <xsl:apply-templates/> + </xsl:for-each> + <br/> + <xsl:for-each select="ram:Description"> + <xsl:apply-templates/> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-left-style:none; border-right-style:none; border-top-style:none; text-align:right; vertical-align:top; width:120px; "> + <xsl:for-each select="ram:UnitQuantity"> + <xsl:call-template name="ram:Menge"/> + </xsl:for-each> + </td> + </tr> + </xsl:for-each> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:if> + </xsl:for-each> + </td> + <td style="border-collapse:collapse; border-left-style:none; border-right-style:none; border-spacing:0px; border-top-style:none; empty-cells:hide; width:110px; "/> + </tr> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:for-each> + </xsl:for-each> + <br/> + </td> + </tr> + <tr> + <td style="border-bottom-style:none; border-top-style:none; "> + <xsl:if test="fn:exists(rsm:SpecifiedSupplyChainTradeTransaction/ram:ApplicableSupplyChainTradeSettlement/ram:SpecifiedTradePaymentTerms)"> + <br/> + <span style="empty-cells:hide; font-weight:bold; text-decoration:underline; "> + <xsl:text>Zahlungsbedingungen:</xsl:text> + </span> + <br/> + <br/> + <xsl:variable name="altova:table"> + <table style="border:0px; border-collapse:collapse; border-right-style:none; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_23" select="."/> + <xsl:variable name="altova:ColumnData"/> + <thead> + <tr> + <th style="border-left-style:none; "> + <span> + <xsl:text>Beschreibung</xsl:text> + </span> + </th> + <th style="width:110px; "> + <span> + <xsl:text>Fälligkeit</xsl:text> + </span> + </th> + <th style="border-right-style:none; width:110px; "> + <span> + <xsl:text>Teilzahlung</xsl:text> + </span> + </th> + </tr> + </thead> + <tbody> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeSettlement"> + <xsl:for-each select="ram:SpecifiedTradePaymentTerms"> + <tr> + <td style="border-bottom-style:none; border-left-style:none; "> + <xsl:for-each select="ram:Description"> + <span style="white-space:pre-wrap; "> + <xsl:apply-templates/> + </span> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; text-align:center; width:110px; "> + <xsl:for-each select="ram:DueDateDateTime"> + <xsl:for-each select="udt:DateTimeString"> + <xsl:call-template name="ram:Datum"/> + </xsl:for-each> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-right-style:none; text-align:right; width:110px; "> + <xsl:for-each select="ram:PartialPaymentAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_24"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_24" select="string($altova:seqContentStrings_24)"/> + <xsl:value-of select="$altova:sContent_24"/> + </span> + </xsl:for-each> + </td> + </tr> + <tr> + <td colspan="3" style="border-left-style:none; border-right-style:none; border-top-style:none; min-height:0px; "> + <xsl:if test="fn:exists(ram:ApplicableTradePaymentPenaltyTerms) or fn:exists(ram:ApplicableTradePaymentDiscountTerms)"> + <xsl:variable name="altova:table"> + <table style="border:0px; border-collapse:collapse; border-left-style:none; border-top-style:none; margin:0px; padding:0px; " border="1" width="100%"> + <xsl:variable name="altova:CurrContextGrid_25" select="."/> + <xsl:variable name="altova:ColumnData"/> + <tbody> + <tr style="border-bottom-style:none; border-top-style:none; "> + <td style="border-bottom-style:none; border-left-style:none; border-top-style:none; min-height:0px; "/> + <td style="border-bottom-style:none; min-height:0px; text-align:center; width:110px; "> + <span style="font-weight:bold; "> + <xsl:text>Bezug</xsl:text> + </span> + </td> + <td style="border-bottom-style:none; min-height:0px; text-align:center; width:110px; "> + <span style="font-weight:bold; "> + <xsl:text>Innerhalb</xsl:text> + </span> + </td> + <td style="border-bottom-style:none; min-height:0px; text-align:center; width:110px; "> + <span style="font-weight:bold; "> + <xsl:text>Basisbetrag</xsl:text> + </span> + </td> + <td style="border-bottom-style:none; min-height:0px; text-align:center; width:110px; "> + <span style="font-weight:bold; "> + <xsl:text>%</xsl:text> + </span> + </td> + <td style="border-bottom-style:none; border-right-style:none; min-height:0px; text-align:center; width:108px; "> + <span style="font-weight:bold; "> + <xsl:text>Betrag</xsl:text> + </span> + </td> + </tr> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:if> + <xsl:if test="fn:exists(ram:ApplicableTradePaymentPenaltyTerms)"> + <xsl:variable name="altova:table"> + <table style="border:0px; border-bottom-style:none; border-collapse:collapse; margin:0px; padding:0px; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_26" select="."/> + <xsl:variable name="altova:ColumnData"/> + <tbody> + <xsl:for-each select="ram:ApplicableTradePaymentPenaltyTerms"> + <tr> + <td style="border-bottom-style:none; border-left-style:none; min-height:0px; text-align:right; "> + <span> + <xsl:text>Zuschlag  </xsl:text> + </span> + </td> + <td style="border-bottom-style:none; min-height:0px; text-align:center; width:110px; "> + <xsl:for-each select="ram:BasisDateTime"> + <xsl:for-each select="udt:DateTimeString"> + <xsl:call-template name="ram:Datum"/> + </xsl:for-each> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; min-height:0px; text-align:right; width:110px; "> + <xsl:for-each select="ram:BasisPeriodMeasure"> + <xsl:call-template name="ram:Menge"/> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; min-height:0px; text-align:right; width:110px; "> + <xsl:for-each select="ram:BasisAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_27"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_27" select="string($altova:seqContentStrings_27)"/> + <xsl:value-of select="$altova:sContent_27"/> + </span> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; min-height:0px; text-align:right; width:110px; "> + <xsl:for-each select="ram:CalculationPercent"> + <span> + <xsl:variable name="altova:seqContentStrings_28"> + <xsl:value-of select="format-number(number(string(.)), '###.##0,####', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_28" select="string($altova:seqContentStrings_28)"/> + <xsl:value-of select="$altova:sContent_28"/> + </span> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-right-style:none; min-height:0px; text-align:right; width:108px; "> + <xsl:for-each select="ram:ActualPenaltyAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_29"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_29" select="string($altova:seqContentStrings_29)"/> + <xsl:value-of select="$altova:sContent_29"/> + </span> + </xsl:for-each> + </td> + </tr> + </xsl:for-each> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:if> + <xsl:if test="fn:exists(ram:ApplicableTradePaymentDiscountTerms)"> + <xsl:variable name="altova:table"> + <table style="border:0px; border-collapse:collapse; margin:0px; padding:0px; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_30" select="."/> + <xsl:variable name="altova:ColumnData"/> + <tbody> + <xsl:for-each select="ram:ApplicableTradePaymentDiscountTerms"> + <tr> + <td style="border-bottom-style:none; border-left-style:none; min-height:0px; text-align:right; "> + <span> + <xsl:text>Skonto  </xsl:text> + </span> + </td> + <td style="border-bottom-style:none; min-height:0px; text-align:center; width:110px; "> + <xsl:for-each select="ram:BasisDateTime"> + <xsl:for-each select="udt:DateTimeString"> + <xsl:call-template name="ram:Datum"/> + </xsl:for-each> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; min-height:0px; text-align:right; width:110px; "> + <xsl:for-each select="ram:BasisPeriodMeasure"> + <xsl:call-template name="ram:Menge"/> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; min-height:0px; text-align:right; width:110px; "> + <xsl:for-each select="ram:BasisAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_31"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_31" select="string($altova:seqContentStrings_31)"/> + <xsl:value-of select="$altova:sContent_31"/> + </span> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; min-height:0px; text-align:right; width:110px; "> + <xsl:for-each select="ram:CalculationPercent"> + <span> + <xsl:variable name="altova:seqContentStrings_32"> + <xsl:value-of select="format-number(number(string(.)), '###.##0,####', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_32" select="string($altova:seqContentStrings_32)"/> + <xsl:value-of select="$altova:sContent_32"/> + </span> + </xsl:for-each> + </td> + <td style="border-bottom-style:none; border-right-style:none; min-height:0px; text-align:right; width:108px; "> + <xsl:for-each select="ram:ActualDiscountAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_33"> + <xsl:value-of select="format-number(number(-1 * .), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_33" select="string($altova:seqContentStrings_33)"/> + <xsl:value-of select="$altova:sContent_33"/> + </span> + </xsl:for-each> + </td> + </tr> + </xsl:for-each> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:if> + </td> + </tr> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:if> + <xsl:if test="fn:exists(rsm:SpecifiedSupplyChainTradeTransaction/ram:ApplicableSupplyChainTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans)"> + <br/> + <span style="font-weight:bold; text-decoration:underline; "> + <xsl:text>Zahlungsart:</xsl:text> + </span> + <br/> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeSettlement"> + <xsl:for-each select="ram:SpecifiedTradeSettlementPaymentMeans"> + <xsl:for-each select="ram:Information"> + <br/> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:TypeCode"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Zahlungstyp (codiert): </xsl:text> + </span> + <xsl:call-template name="ram:PaymentType"/> + </xsl:for-each> + <xsl:for-each select="ram:ID"> + <xsl:for-each select="@schemeAgencyID"> + <br/> + <span> + <xsl:text>Gläubiger-ID         : </xsl:text> + </span> + <span> + <xsl:value-of select="string(.)"/> + </span> + </xsl:for-each> + <br/> + <span> + <xsl:text>Mandatsreferenz      : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:PayerPartyDebtorFinancialAccount"> + <xsl:for-each select="ram:IBANID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Käufer-IBAN          : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:ProprietaryID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Käufer-Kontonummer   : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:PayerSpecifiedDebtorFinancialInstitution"> + <xsl:for-each select="ram:BICID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Käufer-BIC           : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:GermanBankleitzahlID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Käufer-Bankleitzahl  : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:Name"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Käufer-Kreditinstitut: </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + <br/> + <xsl:for-each select="ram:PayeePartyCreditorFinancialAccount"> + <xsl:for-each select="ram:AccountName"> + <br/> + <span> + <xsl:text>Verkäufer-Kontoname  : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:IBANID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Verkäufer-IBAN       : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:ProprietaryID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Verkäufer-Kontonummer: </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:PayeeSpecifiedCreditorFinancialInstitution"> + <xsl:for-each select="ram:BICID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Verkäufer-BIC        : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:GermanBankleitzahlID"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Verkäufer-BLZ        : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:Name"> + <br/> + <span style="empty-cells:hide; "> + <xsl:text>Verkäufer-Kreditinst.: </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </xsl:if> + </td> + </tr> + <tr> + <td style="border-bottom-style:none; border-right-style:none; border-top-style:none; "> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeSettlement"> + <br/> + <xsl:if test="fn:exists(ram:SpecifiedTradeAllowanceCharge) or fn:exists(ram:SpecifiedLogisticsServiceCharge)"> + <span style="font-weight:bold; text-decoration:underline; "> + <xsl:text>Zu- und Abschläge:</xsl:text> + </span> + <br/> + <br/> + <xsl:variable name="altova:table"> + <table style="border:0px; border-collapse:collapse; empty-cells:hide; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_34" select="."/> + <xsl:variable name="altova:ColumnData"/> + <thead> + <tr> + <th colspan="2" style="border-left-style:none; "> + <span> + <xsl:text>Art</xsl:text> + </span> + </th> + <th> + <span> + <xsl:text>%</xsl:text> + </span> + </th> + <th> + <span> + <xsl:text>Basisbetrag</xsl:text> + </span> + </th> + <th style="width:110px; "> + <span> + <xsl:text>Basismenge</xsl:text> + </span> + </th> + <th style="width:110px; "> + <span> + <xsl:text>Steuer</xsl:text> + </span> + </th> + <th style="border-right-style:none; width:110px; "> + <span> + <xsl:text>Betrag</xsl:text> + </span> + </th> + </tr> + </thead> + <tbody> + <xsl:for-each select="ram:SpecifiedTradeAllowanceCharge"> + <xsl:sort select="ram:SequenceNumeric" data-type="text" order="ascending"/> + <tr> + <td style="border-left-style:none; "> + <xsl:for-each select="ram:ChargeIndicator"> + <xsl:for-each select="udt:Indicator"> + <span> + <xsl:value-of select="if (. eq fn:true())then 'Zuschlag' else 'Abschlag'"/> + </span> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:SequenceNumeric"> + <span> + <xsl:text> Nr. </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </td> + <td> + <xsl:for-each select="ram:Reason"> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:ReasonCode"> + <span> + <xsl:text> </xsl:text> + </span> + <xsl:call-template name="AllowanceChargeReasonCode"/> + </xsl:for-each> + </td> + <td style="text-align:right; "> + <xsl:for-each select="ram:CalculationPercent"> + <span> + <xsl:variable name="altova:seqContentStrings_35"> + <xsl:value-of select="format-number(number(string(.)), '###.##0,####', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_35" select="string($altova:seqContentStrings_35)"/> + <xsl:value-of select="$altova:sContent_35"/> + </span> + </xsl:for-each> + </td> + <td style="text-align:right; "> + <xsl:for-each select="ram:BasisAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_36"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_36" select="string($altova:seqContentStrings_36)"/> + <xsl:value-of select="$altova:sContent_36"/> + </span> + </xsl:for-each> + </td> + <td style="text-align:right; width:110px; "> + <xsl:for-each select="ram:BasisQuantity"> + <xsl:call-template name="ram:Menge"/> + </xsl:for-each> + </td> + <td style="text-align:right; width:110px; "> + <xsl:for-each select="ram:CategoryTradeTax"> + <xsl:call-template name="ram:TradeTax"/> + </xsl:for-each> + </td> + <td style="border-right-style:none; text-align:right; width:110px; "> + <xsl:for-each select="ram:ActualAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_37"> + <xsl:value-of select="format-number(number(if (../ram:ChargeIndicator/udt:Indicator eq fn:true()) then . else -1 * .), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_37" select="string($altova:seqContentStrings_37)"/> + <xsl:value-of select="$altova:sContent_37"/> + </span> + </xsl:for-each> + </td> + </tr> + </xsl:for-each> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + <xsl:if test="fn:exists(ram:SpecifiedLogisticsServiceCharge)"> + <xsl:if test="fn:not(fn:exists(ram:SpecifiedTradeAllowanceCharge))"> + <xsl:variable name="altova:table"> + <table style="border:0px; border-top-style:none; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_38" select="."/> + <xsl:variable name="altova:ColumnData"/> + <tbody> + <xsl:for-each select="ram:SpecifiedLogisticsServiceCharge"> + <tr> + <td style="border-left-style:none; border-top-style:solid; text-align:center; "> + <span style="font-weight:bold; "> + <xsl:text>Art</xsl:text> + </span> + </td> + <td style="border-top-style:solid; text-align:center; width:110px; "> + <span style="font-weight:bold; "> + <xsl:text>Steuer</xsl:text> + </span> + </td> + <td style="border-right-style:none; border-top-style:solid; text-align:center; width:110px; "> + <span style="font-weight:bold; "> + <xsl:text>Betrag</xsl:text> + </span> + </td> + </tr> + </xsl:for-each> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:if> + <xsl:variable name="altova:table"> + <table style="border:0px; border-top-style:none; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_39" select="."/> + <xsl:variable name="altova:ColumnData"/> + <tbody> + <xsl:for-each select="ram:SpecifiedLogisticsServiceCharge"> + <tr> + <td style="border-left-style:none; border-top-style:none; "> + <xsl:for-each select="ram:Description"> + <span style="white-space:pre-wrap; "> + <xsl:apply-templates/> + </span> + </xsl:for-each> + </td> + <td style="border-top-style:none; text-align:right; width:110px; "> + <xsl:for-each select="ram:AppliedTradeTax"> + <xsl:call-template name="ram:TradeTax"/> + </xsl:for-each> + </td> + <td style="border-right-style:none; border-top-style:none; text-align:right; width:110px; "> + <xsl:for-each select="ram:AppliedAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_40"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_40" select="string($altova:seqContentStrings_40)"/> + <xsl:value-of select="$altova:sContent_40"/> + </span> + </xsl:for-each> + </td> + </tr> + </xsl:for-each> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:if> + </xsl:if> + <br/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeSettlement"/> + </xsl:for-each> + </td> + </tr> + <tr> + <td style="border-bottom-style:none; border-top-style:none; "> + <xsl:if test="fn:exists(rsm:SpecifiedSupplyChainTradeTransaction/ram:ApplicableSupplyChainTradeSettlement/ram:ApplicableTradeTax)"> + <br/> + <span style="font-weight:bold; text-decoration:underline; "> + <xsl:text>Steuern:</xsl:text> + </span> + <br/> + <br/> + <xsl:variable name="altova:table"> + <table style="border:0px; border-collapse:collapse; border-right-style:none; width:100%; " border="1"> + <xsl:variable name="altova:CurrContextGrid_41" select="."/> + <xsl:variable name="altova:ColumnData"/> + <thead> + <tr> + <th style="border-left-style:none; "> + <span> + <xsl:text>Art (Kategorie)</xsl:text> + </span> + </th> + <th> + <span> + <xsl:text>Warenwert</xsl:text> + </span> + </th> + <th> + <span> + <xsl:text>Zu-/Abschlag</xsl:text> + </span> + </th> + <th style="width:110px; "> + <span> + <xsl:text>Nettobetrag</xsl:text> + </span> + </th> + <th style="width:110px; "> + <span> + <xsl:text>USt. %</xsl:text> + </span> + </th> + <th style="border-right-style:none; width:110px; "> + <span> + <xsl:text>USt.-Betrag</xsl:text> + </span> + </th> + </tr> + </thead> + <tbody> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeSettlement"> + <xsl:for-each select="ram:ApplicableTradeTax"> + <tr> + <td style="border-left-style:none; "> + <xsl:for-each select="ram:TypeCode"> + <xsl:apply-templates/> + </xsl:for-each> + <span> + <xsl:text> </xsl:text> + </span> + <xsl:for-each select="ram:CategoryCode"> + <span> + <xsl:text>(</xsl:text> + </span> + <xsl:apply-templates/> + <span> + <xsl:text>)</xsl:text> + </span> + </xsl:for-each> + <xsl:for-each select="ram:ExemptionReason"> + <br/> + <xsl:apply-templates/> + </xsl:for-each> + </td> + <td style="text-align:right; "> + <xsl:for-each select="ram:LineTotalBasisAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_42"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_42" select="string($altova:seqContentStrings_42)"/> + <xsl:value-of select="$altova:sContent_42"/> + </span> + </xsl:for-each> + </td> + <td style="text-align:right; "> + <xsl:for-each select="ram:AllowanceChargeBasisAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_43"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_43" select="string($altova:seqContentStrings_43)"/> + <xsl:value-of select="$altova:sContent_43"/> + </span> + </xsl:for-each> + </td> + <td style="text-align:right; width:110px; "> + <xsl:for-each select="ram:BasisAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_44"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_44" select="string($altova:seqContentStrings_44)"/> + <xsl:value-of select="$altova:sContent_44"/> + </span> + </xsl:for-each> + </td> + <td style="text-align:right; width:110px; "> + <xsl:for-each select="ram:ApplicablePercent"> + <span> + <xsl:variable name="altova:seqContentStrings_45"> + <xsl:value-of select="format-number(number(string(.)), '###.##0,####', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_45" select="string($altova:seqContentStrings_45)"/> + <xsl:value-of select="$altova:sContent_45"/> + </span> + </xsl:for-each> + </td> + <td style="border-right-style:none; text-align:right; width:110px; "> + <xsl:for-each select="ram:CalculatedAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_46"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_46" select="string($altova:seqContentStrings_46)"/> + <xsl:value-of select="$altova:sContent_46"/> + </span> + </xsl:for-each> + </td> + </tr> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:if> + </td> + </tr> + <tr> + <td style="border-bottom-style:none; text-align:left; "> + <br/> + <span style="font-weight:bold; text-decoration:underline; "> + <xsl:text>Belegsummen:</xsl:text> + </span> + <br/> + <xsl:for-each select="rsm:SpecifiedSupplyChainTradeTransaction"> + <xsl:for-each select="ram:ApplicableSupplyChainTradeSettlement"> + <xsl:for-each select="ram:SpecifiedTradeSettlementMonetarySummation"> + <xsl:variable name="altova:table"> + <table style="border:0px; " border="1" width="100%"> + <xsl:variable name="altova:CurrContextGrid_47" select="."/> + <xsl:variable name="altova:ColumnData"/> + <tbody> + <tr> + <td style="border-style:none; "/> + <td style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; padding:1px; text-align:left; width:220px; "> + <span style="font-weight:bold; "> + <xsl:text>Positionssumme</xsl:text> + </span> + </td> + <td style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; padding:1px; text-align:right; width:110px; "> + <xsl:for-each select="ram:LineTotalAmount"> + <span style="font-weight:bold; "> + <xsl:variable name="altova:seqContentStrings_48"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_48" select="string($altova:seqContentStrings_48)"/> + <xsl:value-of select="$altova:sContent_48"/> + </span> + </xsl:for-each> + </td> + </tr> + <tr> + <td style="border-style:none; "/> + <td style="border:0px; border-top-style:double; padding:1px; text-align:left; width:220px; "> + <span> + <xsl:text>Gesamtbetrag der Zuschläge</xsl:text> + </span> + </td> + <td style="border:0px; border-top-style:double; padding:1px; text-align:right; width:110px; "> + <xsl:for-each select="ram:ChargeTotalAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_49"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_49" select="string($altova:seqContentStrings_49)"/> + <xsl:value-of select="$altova:sContent_49"/> + </span> + </xsl:for-each> + </td> + </tr> + <tr> + <td style="border-style:none; "/> + <td style="border:0px; border-top-style:double; padding:1px; text-align:left; width:220px; "> + <span> + <xsl:text>Gesamtbetrag der Abschläge</xsl:text> + </span> + </td> + <td style="border:0px; border-top-style:double; padding:1px; text-align:right; width:110px; "> + <xsl:for-each select="ram:AllowanceTotalAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_50"> + <xsl:value-of select="format-number(number(-1*.), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_50" select="string($altova:seqContentStrings_50)"/> + <xsl:value-of select="$altova:sContent_50"/> + </span> + </xsl:for-each> + </td> + </tr> + <tr> + <td style="border-style:none; "/> + <td style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; padding:1px; text-align:left; width:220px; "> + <span style="font-weight:bold; "> + <xsl:text>Rechnungssumme ohne USt.</xsl:text> + </span> + </td> + <td style="border-bottom-style:solid; border-left-style:none; border-right-style:none; border-top-style:none; padding:1px; text-align:right; width:110px; "> + <xsl:for-each select="ram:TaxBasisTotalAmount"> + <span style="font-weight:bold; "> + <xsl:variable name="altova:seqContentStrings_51"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_51" select="string($altova:seqContentStrings_51)"/> + <xsl:value-of select="$altova:sContent_51"/> + </span> + </xsl:for-each> + </td> + </tr> + <tr> + <td style="border-style:none; "/> + <td style="border:0px; border-top-style:double; padding:1px; text-align:left; width:220px; "> + <span> + <xsl:text>Steuerbetrag</xsl:text> + </span> + </td> + <td style="border:0px; border-top-style:double; padding:1px; text-align:right; width:110px; "> + <xsl:for-each select="ram:TaxTotalAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_52"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_52" select="string($altova:seqContentStrings_52)"/> + <xsl:value-of select="$altova:sContent_52"/> + </span> + </xsl:for-each> + </td> + </tr> + <tr> + <td style="border-style:none; "/> + <td style="border-bottom-style:double; border-bottom-width:medium; border-left-style:none; border-right-style:none; border-top-style:none; padding:1px; text-align:left; width:220px; "> + <span style="font-weight:bold; "> + <xsl:text>Bruttosumme</xsl:text> + </span> + </td> + <td style="border-bottom-style:double; border-bottom-width:medium; border-left-style:none; border-right-style:none; border-top-style:none; padding:1px; text-align:right; width:110px; "> + <xsl:for-each select="ram:GrandTotalAmount"> + <span style="font-weight:bold; "> + <xsl:variable name="altova:seqContentStrings_53"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_53" select="string($altova:seqContentStrings_53)"/> + <xsl:value-of select="$altova:sContent_53"/> + </span> + </xsl:for-each> + </td> + </tr> + <tr> + <td style="border-style:none; "/> + <td style="border:0px; border-top-style:double; padding:1px; text-align:left; width:220px; "> + <xsl:if test="(ram:TotalPrepaidAmount>=0 and fn:exists(ram:TotalPrepaidAmount)) or(fn:not(fn:exists(ram:TotalPrepaidAmount)) and fn:not(ends-with( ../../../rsm:SpecifiedExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID , 'basic' )))"> + <span> + <xsl:text>Erhaltene Anzahlungen</xsl:text> + </span> + <br/> + </xsl:if> + <xsl:if test="ram:TotalPrepaidAmount<0 and fn:exists(ram:TotalPrepaidAmount)"> + <span> + <xsl:text>Offene Zahlungen</xsl:text> + </span> + <br/> + </xsl:if> + </td> + <td style="border:0px; border-top-style:double; padding:1px; text-align:right; width:110px; "> + <xsl:if test="fn:exists(TotalPrepaidAmount) or fn:not(ends-with( ../../../rsm:SpecifiedExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID , 'basic' ))"> + <xsl:for-each select="ram:TotalPrepaidAmount"> + <span> + <xsl:variable name="altova:seqContentStrings_54"> + <xsl:value-of select="format-number(number(-1*.), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_54" select="string($altova:seqContentStrings_54)"/> + <xsl:value-of select="$altova:sContent_54"/> + </span> + </xsl:for-each> + </xsl:if> + </td> + </tr> + <tr> + <td style="border-style:none; "/> + <td style="border:0px; border-top-style:double; padding:1px; text-align:left; width:220px; "> + <xsl:if test="fn:exists(ram:DuePayableAmount) or fn:not(ends-with( ../../../rsm:SpecifiedExchangedDocumentContext/GuidelineSpecifiedDocumentContextParameter/ID , 'basic' ))"> + <span style="font-weight:bold; "> + <xsl:text>Zahlbetrag</xsl:text> + </span> + </xsl:if> + </td> + <td style="border:0px; border-top-style:double; padding:1px; text-align:right; width:110px; "> + <xsl:if test="fn:exists(ram:DuePayableAmount) or fn:not(ends-with( ../../../rsm:SpecifiedExchangedDocumentContext/GuidelineSpecifiedDocumentContextParameter/ID , 'basic' ))"> + <xsl:for-each select="ram:DuePayableAmount"> + <span style="font-weight:bold; "> + <xsl:variable name="altova:seqContentStrings_55"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_55" select="string($altova:seqContentStrings_55)"/> + <xsl:value-of select="$altova:sContent_55"/> + </span> + </xsl:for-each> + </xsl:if> + </td> + </tr> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </td> + </tr> + </tbody> + </table> + </xsl:variable> + <xsl:variable name="altova:col-count" select="sum( for $altova:cell in $altova:table/table/(thead | tbody | tfoot)[ 1 ]/tr[ 1 ]/(th | td) return altova:col-span( $altova:cell ) )"/> + <xsl:variable name="altova:generate-cols" as="xs:boolean*" select="for $altova:pos in 1 to $altova:col-count return true()"/> + <xsl:apply-templates select="$altova:table" mode="altova:generate-table"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + <br/> + </xsl:for-each> + </xsl:for-each> + <br/> + <br/> + </body> + </html> + </xsl:template> + <xsl:template name="ram:Party"> + <xsl:for-each select="ram:ID"> + <span> + <xsl:text>Nummer        : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="@schemeID"> + <xsl:call-template name="local_Identifier"/> + </xsl:for-each> + <xsl:for-each select="ram:GlobalID"> + <br/> + <span> + <xsl:text>Globale Nummer: </xsl:text> + </span> + <xsl:apply-templates/> + <xsl:for-each select="@schemeID"> + <span> + <xsl:text> </xsl:text> + </span> + <xsl:call-template name="ram:Global_Identifier"/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:Name"> + <br/> + <span style="font-weight:bold; white-space:pre-wrap; "> + <xsl:apply-templates/> + </span> + </xsl:for-each> + <xsl:for-each select="ram:DefinedTradeContact"> + <xsl:for-each select="ram:PersonName"> + <br/> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:DepartmentName"> + <br/> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:PostalTradeAddress"> + <xsl:for-each select="ram:LineOne"> + <br/> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:LineTwo"> + <br/> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:CountryID"> + <br/> + <xsl:apply-templates/> + <span> + <xsl:text> </xsl:text> + </span> + </xsl:for-each> + <xsl:for-each select="ram:PostcodeCode"> + <xsl:apply-templates/> + <span> + <xsl:text> </xsl:text> + </span> + </xsl:for-each> + <xsl:for-each select="ram:CityName"> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + <br/> + <xsl:for-each select="ram:DefinedTradeContact"> + <xsl:for-each select="ram:TelephoneUniversalCommunication"> + <xsl:for-each select="ram:CompleteNumber"> + <br/> + <span> + <xsl:text>Telefon      : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:FaxUniversalCommunication"> + <xsl:for-each select="ram:CompleteNumber"> + <br/> + <span> + <xsl:text>Fax          : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:EmailURIUniversalCommunication"> + <xsl:for-each select="ram:URIID"> + <br/> + <span> + <xsl:text>E-Mail       : </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select="ram:SpecifiedTaxRegistration"> + <xsl:for-each select="ram:ID"> + <br/> + <xsl:call-template name="ram:TaxRegistration"/> + </xsl:for-each> + </xsl:for-each> + <br/> + </xsl:template> + <xsl:template name="ram:TradeTax"> + <xsl:for-each select="ram:ApplicablePercent"> + <span> + <xsl:variable name="altova:seqContentStrings_56"> + <xsl:value-of select="format-number(number(string(.)), '###.##0,####', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_56" select="string($altova:seqContentStrings_56)"/> + <xsl:value-of select="$altova:sContent_56"/> + </span> + <span> + <xsl:text> %</xsl:text> + </span> + </xsl:for-each> + <xsl:for-each select="ram:TypeCode"> + <span> + <xsl:text> </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:CategoryCode"> + <span> + <xsl:text> (</xsl:text> + </span> + <xsl:apply-templates/> + <span> + <xsl:text>)</xsl:text> + </span> + </xsl:for-each> + <xsl:for-each select="ram:CalculatedAmount"> + <span> + <xsl:text> entspricht </xsl:text> + </span> + <span> + <xsl:variable name="altova:seqContentStrings_57"> + <xsl:value-of select="format-number(number(string(.)), '##0,00', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_57" select="string($altova:seqContentStrings_57)"/> + <xsl:value-of select="$altova:sContent_57"/> + </span> + </xsl:for-each> + <xsl:for-each select="ram:ExemptionReason"> + <br/> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:template> + <xsl:template name="ram:Positionsreferenz"> + <xsl:for-each select="ram:ID"> + <span> + <xsl:text> Nr. </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + <xsl:for-each select="ram:IssueDateTime"> + <span> + <xsl:text> vom </xsl:text> + </span> + <span> + <xsl:variable name="altova:seqContentStrings_58"> + <xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00', 'format1')"/> + <xsl:variable name="sText" as="xs:string?"> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:value-of select="$sText"/> + <xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00', 'format1')"/> + <xsl:variable name="sText" as="xs:string?"> + <xsl:text>. </xsl:text> + </xsl:variable> + <xsl:value-of select="$sText"/> + <xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_58" select="string($altova:seqContentStrings_58)"/> + <xsl:value-of select="$altova:sContent_58"/> + </span> + </xsl:for-each> + <xsl:for-each select="ram:LineID"> + <span> + <xsl:text> Zeile </xsl:text> + </span> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:template> + <xsl:template name="ram:Datum"> + <span> + <xsl:value-of select="if ( @format = '102') then concat(substring(.,7,2),'.',substring(.,5,2),'.',substring(.,1,4)) else +if ( @format = '610') then concat(substring(.,5,2),'-',substring(.,1,4)) else +if ( @format = '616') then concat('KW ',substring(.,5,2),' ',substring(.,1,4)) else +concat('Ungültiges Datumsformat für: ', .)"/> + </span> + </xsl:template> + <xsl:template name="ram:Versand_Identifer"> + <span> + <xsl:value-of select="if(. eq 'GSIN') then . else +if(. eq 'GINC') then . else +if(. eq 'SSCC') then 'Nummer der Versandeinheit' else +if(. eq 'FLIGHT_NO') then 'Flugnummer' else +if(. eq 'NUMBER_PLATE') then 'Nummernschild' else +if(. eq 'SHIPMENT_REFERENCE') then 'Sendungs-/Ladungsbezugsnummer' else +."/> + </span> + </xsl:template> + <xsl:template name="ram:Global_Identifier"> + <span> + <xsl:text>(</xsl:text> + </span> + <span> + <xsl:value-of select="if (. eq '0021') then 'BIC' else +if (. eq '0060') then 'DUNS' else +if (. eq '0088') then 'GTIN' else +if (. eq '0160') then 'GLN' else +if (. eq '0177') then 'OSCAR' else +."/> + </span> + <span> + <xsl:text>)</xsl:text> + </span> + </xsl:template> + <xsl:template name="ram:Menge"> + <span> + <xsl:variable name="altova:seqContentStrings_59"> + <xsl:value-of select="format-number(number(string(.)), '##0', 'format1')"/> + </xsl:variable> + <xsl:variable name="altova:sContent_59" select="string($altova:seqContentStrings_59)"/> + <xsl:value-of select="$altova:sContent_59"/> + </span> + <xsl:for-each select="@unitCode"> + <span> + <xsl:text> </xsl:text> + </span> + <span> + <xsl:value-of select="if (. eq 'C62') then 'Stk' else +if (. eq 'DAY') then 'Tag(e)' else +if (. eq 'HAR') then 'ha' else +if (. eq 'HUR') then 'Std' else +if (. eq 'KGM') then 'kg' else +if (. eq 'KTM') then 'km' else +if (. eq 'LS') then 'pausch' else +if (. eq 'LTR') then 'l' else +if (. eq 'MIN') then 'min' else +if (. eq 'MMK') then 'mm²' else +if (. eq 'MMT') then 'mm' else +if (. eq 'MTK') then 'm²' else +if (. eq 'MTQ') then 'm³' else +if (. eq 'MTR') then 'm' else +if (. eq 'NAR') then 'Anz' else +if (. eq 'NPR') then 'Paar' else +if (. eq 'P1') then '%' else +if (. eq 'SET') then 'Set' else +if (. eq 'TNE') then 't' else +if (. eq 'WEE') then 'Woche(n)' else +."/> + </span> + </xsl:for-each> + </xsl:template> + <xsl:template name="ram:TaxRegistration"> + <span> + <xsl:value-of select="if ( @schemeID = 'FC') then concat('Steuernummer : ', .) else +if ( @schemeID = 'VA') then concat('USt.-Id.-Nr. : ', .) else +concat('Unbekannte Steuernummer (', @schemeID , '): ', .)"/> + </span> + </xsl:template> + <xsl:template name="ram:VersandMode"> + <span> + <xsl:value-of select="if (. eq '0')then '0 - Nicht spezifiziert' else +if (. eq '1')then '1 - Seefracht' else +if (. eq '2')then '2 - Schiene' else +if (. eq '3')then '3 - Straße' else +if (. eq '4')then '4 - Luftfracht' else +if (. eq '5')then '5 - Post/Paketversand' else +if (. eq '6')then '6 - Multimodaler Transport/kombinierter Verkehr' else +if (. eq '7')then '7 - Feste Transportinstallation' else +if (. eq '8')then '8 - Transport auf Binnengewässern' else +if (. eq '9')then '9 - Nicht anwendbar' else +fn:concat(.,' - unbekannte Transportart')"/> + </span> + </xsl:template> + <xsl:template name="ram:PaymentType"> + <span> + <xsl:value-of select="if(. eq '1') then concat(.,' - nicht definiert') else +if(. eq '3') then concat(.,' - Belastung durch automatisierte Clearingstelle') else +if(. eq '10') then concat(.,' - Barzahlung') else +if(. eq '20') then concat(.,' - per Scheck') else +if(. eq '31') then concat(.,' - per Überweisung (SEPA)') else +if(. eq '42') then concat(.,' - per Überweisung (nicht SEPA)') else +if(. eq '48') then concat(.,' - per Kreditkarte') else +if(. eq '49') then concat(.,' - per Lastschrift') else +if(. eq '97') then concat(.,' - per Ausgleich zwischen Partnern') else +."/> + </span> + </xsl:template> + <xsl:template name="ram:Referenz"> + <span> + <xsl:value-of select="if (. eq 'AAA')then 'Auftragsbestätigung' else +if (. eq 'AAB')then 'Proforma-Rechnung' else +if (. eq 'AAG') then 'Angebot' else +if (. eq 'AAJ') then 'Lieferauftrag' else +if (. eq 'AAL') then 'Zeichnung' else +if (. eq 'AAM') then 'Frachtbrief' else +if (. eq 'AAS') then 'Transportdokument' else +if (. eq 'ABT') then 'Zollerklärung' else +if (. eq 'AER') then 'Projektspezifikation' else +if (. eq 'AGG') then 'Reklamation' else +if (. eq 'AJS') then 'Vereinbarung' else +if (. eq 'ALO') then 'Wareneingang' else +if (. eq 'ALQ') then 'Rücksendungsanzeige' else +if (. eq 'API') then 'Bestandsbericht' else +if (. eq 'ASI') then 'Abliefernachweis' else +if (. eq 'AUD') then 'Inkasso-Referenz' else +if (. eq 'AWR') then 'Ursprungsbeleg' else +if (. eq 'BO') then 'Rahmenauftrag' else +if (. eq 'BC') then 'Vertrag (Käufer)' else +if (. eq 'CD') then 'Gutschrift' else +if (. eq 'DL') then 'Belastungsanzeige' else +if (. eq 'MG') then 'Zählernummer' else +if (. eq 'OI') then 'Vorherige Rechnung' else +if (. eq 'PK') then 'Packliste' else +if (. eq 'PL') then 'Preisliste' else +if (. eq 'POR') then 'Bestellantwort' else +if (. eq 'PP') then 'Bestelländerung' else +if (. eq 'TIN') then 'Transportauftrag' else +if (. eq 'VN') then 'Auftragsnummer (Lieferant)' else +."/> + </span> + </xsl:template> + <xsl:template name="PackageQuantity"> + <xsl:for-each select="ram:PackageQuantity"> + <xsl:for-each select="@unitCode"> + <span> + <xsl:text> </xsl:text> + </span> + <span> + <xsl:value-of select="if (. eq 'BA') then 'Tonne' else +if (. eq 'BC') then 'Getränkekiste' else +if (. eq 'BG') then 'Tüte, Beutel' else +if (. eq 'BO') then 'Flasche' else +if (. eq 'BX') then 'Schachtel' else +if (. eq 'CS') then 'Kiste' else +if (. eq 'CT') then 'Karton' else +if (. eq 'CX') then 'Dose' else +if (. eq 'NE') then 'Unverpackt oder ausgepackt' else +if (. eq 'PX') then 'Palette' else +if (. eq 'RO') then 'Rolle' else +if (. eq 'SA') then 'Sack' +else ."/> + </span> + </xsl:for-each> + </xsl:for-each> + </xsl:template> + <xsl:template name="local_Identifier"> + <span> + <xsl:text>(</xsl:text> + </span> + <xsl:choose> + <xsl:when test=". instance of element()"> + <xsl:apply-templates/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="."/> + </xsl:otherwise> + </xsl:choose> + <span> + <xsl:text>)</xsl:text> + </span> + </xsl:template> + <xsl:template name="Klassifikationsart"> + <xsl:for-each select="@listID"> + <span> + <xsl:text>, Art: </xsl:text> + </span> + <span> + <xsl:value-of select="if (. eq 'GPC') then 'Global Product Classification (GS1)' else +if (. eq 'ECL') then 'eCl@ass' else +if (. eq 'UNSPSC') then 'United Nations Standard Products and Services Code® (UNSPSC®)' else +if (. eq 'HS') then 'Zolltarifnummer (Harmonised System)' else +if (. eq 'CBV') then 'Gemeinsames Vokabular für öffentliche Aufträge (Common Procurement Vocabulary - CPV)' else +if (. eq 'SELLER_ASSIGNED') then 'vom Verkäufer vergeben' else +if (. eq 'BUYER_ASSIGNED') then 'vom Käufer vergeben' else +."/> + </span> + </xsl:for-each> + </xsl:template> + <xsl:template name="DeliveryTypeCode"> + <span> + <xsl:value-of select="if (. eq 'XW') then 'ab Werk' else +if (. eq 'FCA') then 'frei Frachtführer' else +if (. eq 'FAS') then 'frei längsseits Schiff' else +if (. eq 'FOB') then 'frei an Bord' else +if (. eq 'CFR') then 'Kosten und Fracht' else +if (. eq 'CIF') then 'Kosten, Versicherung und Fracht bis zum Bestimmungshafen' else +if (. eq 'DAT') then 'geliefert Terminal' else +if (. eq 'DAP') then 'geliefert benannter Ort' else +if (. eq 'CPT') then 'Fracht bezahlt bis' else +if (. eq 'CIP') then 'Fracht und Versicherung bezahlt' else +if (. eq 'DDP') then 'geliefert Zoll bezahlt' else +."/> + </span> + </xsl:template> + <xsl:template name="AllowanceChargeReasonCode"> + <span> + <xsl:text>(</xsl:text> + </span> + <span> + <xsl:value-of select="if (. eq 'AA') then 'Werbekostenzuschuß' else +if (. eq 'ADR') then 'Andere Dienste' else +if (. eq 'AEO') then 'Sammel- und Recyclingservice' else +if (. eq 'DI') then 'Abzug (Rabatt)' else +if (. eq 'EAB') then 'Skonto' else +if (. eq 'FC') then 'Frachtgebühren' else +if (. eq 'IN') then 'Versicherung' else +if (. eq 'MAC') then 'Mindermengenzuschlag' else +if (. eq 'NAA') then 'Einwegbehälter' else +if (. eq 'PC') then 'Verpacken' else +if (. eq 'RAA') then 'Rückvergütung' else +if (. eq 'SH') then 'Spezielle Handhabungsdienstleistungen' else +."/> + </span> + <span> + <xsl:text>)</xsl:text> + </span> + </xsl:template> + <xsl:function name="altova:is-cell-empty" as="xs:boolean"> + <xsl:param name="altova:cell" as="element()"/> + <xsl:sequence select="altova:is-node-empty( $altova:cell )"/> + </xsl:function> + <xsl:function name="altova:is-node-empty" as="xs:boolean"> + <xsl:param name="altova:node" as="element()"/> + <xsl:sequence select="every $altova:child in $altova:node/child::node() satisfies ( ( boolean( $altova:child/self::text() ) and string-length( $altova:child ) = 0 ) or ( ( boolean( $altova:child/self::div ) or boolean( $altova:child/self::span ) or boolean( $altova:child/self::a ) ) and altova:is-node-empty( $altova:child ) ) )"/> + </xsl:function> + <xsl:function name="altova:col-span" as="xs:integer"> + <xsl:param name="altova:cell" as="element()"/> + <xsl:sequence select="if ( exists( $altova:cell/@colspan ) ) then xs:integer( $altova:cell/@colspan ) else 1"/> + </xsl:function> + <xsl:template match="@* | node()" mode="altova:generate-table"> + <xsl:param name="altova:generate-cols"/> + <xsl:copy> + <xsl:apply-templates select="@* | node()" mode="#current"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:copy> + </xsl:template> + <xsl:template match="tbody" mode="altova:generate-table"> + <xsl:param name="altova:generate-cols"/> + <xsl:choose> + <xsl:when test="empty(tr)"> + <xsl:copy> + <tr> + <td/> + </tr> + </xsl:copy> + </xsl:when> + <xsl:otherwise> + <xsl:copy> + <xsl:apply-templates select="@* | node()" mode="#current"> + <xsl:with-param name="altova:generate-cols" select="$altova:generate-cols"/> + </xsl:apply-templates> + </xsl:copy> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + <xsl:template match="th | td" mode="altova:generate-table"> + <xsl:choose> + <xsl:when test="altova:is-cell-empty( . )"> + <xsl:copy> + <xsl:apply-templates select="@*" mode="#current"/> + <xsl:text> </xsl:text> + </xsl:copy> + </xsl:when> + <xsl:otherwise> + <xsl:copy> + <xsl:apply-templates select="@* | node()" mode="#current"/> + </xsl:copy> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + <xsl:function name="altova:GetChartYValuesForSingleSeries"> + <xsl:param name="seqCategoryLeafPos" as="node()*"/> + <xsl:param name="nodeSeriesLeafPos" as="node()"/> + <xsl:param name="bValuesInCategory" as="xs:boolean"/> + <xsl:for-each select="$seqCategoryLeafPos"> + <xsl:element name="altova:Value"> + <xsl:value-of select="altova:GetChartYValueForSingleSeriesPos($nodeSeriesLeafPos, ., $bValuesInCategory)"/> + </xsl:element> + </xsl:for-each> + </xsl:function> + <xsl:function name="altova:GetChartYValueForSingleSeriesPos"> + <xsl:param name="nodeSeriesLeafPos" as="node()"/> + <xsl:param name="nodeCategoryLeafPos" as="node()"/> + <xsl:param name="bValuesInCategory" as="xs:boolean"/> + <xsl:variable name="altova:seqCategoryContextIds" select="$nodeCategoryLeafPos/altova:Context/@altova:ContextId" as="xs:string*"/> + <xsl:variable name="altova:seqSeriesContextIds" select="$nodeSeriesLeafPos/altova:Context/@altova:ContextId" as="xs:string*"/> + <xsl:variable name="altova:sCommonContextId" select="for $i in $altova:seqCategoryContextIds return if (some $j in $altova:seqSeriesContextIds satisfies $i eq $j) then $i else ()" as="xs:string*"/> + <xsl:choose> + <xsl:when test="count($altova:sCommonContextId) gt 1"> + <xsl:message select="concat('Es wurden mehrere Werte anstatt eines einzigen gefunden (Contexts: ', string-join($altova:sCommonContextId, ', '), ').')" terminate="yes"/> + </xsl:when> + <xsl:when test="count($altova:sCommonContextId) lt 1"> + <xsl:message select="concat('XBRL Chart: Info: No value found for position labeled "', $nodeCategoryLeafPos/@altova:sLabel, '"')" terminate="no"/> + <xsl:sequence select="'altova:no-value'"/> + </xsl:when> + <xsl:when test="$bValuesInCategory"> + <xsl:sequence select="xs:string($nodeCategoryLeafPos/altova:Context[@altova:ContextId eq $altova:sCommonContextId]/@altova:Value)"/> + </xsl:when> + <xsl:otherwise> + <xsl:sequence select="xs:string($nodeSeriesLeafPos/altova:Context[@altova:ContextId eq $altova:sCommonContextId]/@altova:Value)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:function> + <xsl:function name="altova:GetChartLabelForPos" as="xs:string"> + <xsl:param name="nodeParam" as="node()"/> + <xsl:value-of select="string-join($nodeParam/ancestor-or-self::altova:Pos/@altova:sLabel, ' ')"/> + </xsl:function> + <xsl:function name="altova:convert-length-to-pixel" as="xs:decimal"> + <xsl:param name="altova:length"/> + <xsl:variable name="normLength" select="normalize-space($altova:length)"/> + <xsl:choose> + <xsl:when test="ends-with($normLength, 'px')"> + <xsl:value-of select="substring-before($normLength, 'px')"/> + </xsl:when> + <xsl:when test="ends-with($normLength, 'in')"> + <xsl:value-of select="xs:decimal(substring-before($normLength, 'in')) * $altova:nPxPerIn"/> + </xsl:when> + <xsl:when test="ends-with($normLength, 'cm')"> + <xsl:value-of select="xs:decimal(substring-before($normLength, 'cm')) * $altova:nPxPerIn div 2.54"/> + </xsl:when> + <xsl:when test="ends-with($normLength, 'mm')"> + <xsl:value-of select="xs:decimal(substring-before($normLength, 'mm')) * $altova:nPxPerIn div 25.4"/> + </xsl:when> + <xsl:when test="ends-with($normLength, 'pt')"> + <xsl:value-of select="xs:decimal(substring-before($normLength, 'pt')) * $altova:nPxPerIn div 72.0"/> + </xsl:when> + <xsl:when test="ends-with($normLength, 'pc')"> + <xsl:value-of select="xs:decimal(substring-before($normLength, 'pc')) * $altova:nPxPerIn div 6.0"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$normLength"/> + </xsl:otherwise> + </xsl:choose> + </xsl:function> + <xsl:function name="altova:convert-length-to-mm" as="xs:decimal"> + <xsl:param name="altova:length"/> + <xsl:variable name="normLength" select="normalize-space($altova:length)"/> + <xsl:choose> + <xsl:when test="ends-with($normLength, 'px')"> + <xsl:value-of select="xs:decimal(substring-before($normLength, 'px')) div $altova:nPxPerIn * 25.4"/> + </xsl:when> + <xsl:when test="ends-with($normLength, 'in')"> + <xsl:value-of select="xs:decimal(substring-before($normLength, 'in')) * 25.4"/> + </xsl:when> + <xsl:when test="ends-with($normLength, 'cm')"> + <xsl:value-of select="xs:decimal(substring-before($normLength, 'cm')) * 10"/> + </xsl:when> + <xsl:when test="ends-with($normLength, 'mm')"> + <xsl:value-of select="substring-before($normLength, 'mm') "/> + </xsl:when> + <xsl:when test="ends-with($normLength, 'pt')"> + <xsl:value-of select="xs:decimal(substring-before($normLength, 'pt')) * 25.4 div 72.0"/> + </xsl:when> + <xsl:when test="ends-with($normLength, 'pc')"> + <xsl:value-of select="xs:decimal(substring-before($normLength, 'pc')) * 25.4 div 6.0"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="number($normLength) div $altova:nPxPerIn * 25.4"/> + </xsl:otherwise> + </xsl:choose> + </xsl:function> +</xsl:stylesheet> diff --git a/src/main/resources/stylesheets/cii-xr.xsl b/src/main/resources/stylesheets/cii-xr.xsl new file mode 100644 index 00000000..5fca7b9d --- /dev/null +++ b/src/main/resources/stylesheets/cii-xr.xsl @@ -0,0 +1,2202 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xr="urn:ce.eu:en16931:2017:xoev-de:kosit:standard:xrechnung-1" + xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" + xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" + xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" + xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" + xmlns:saxon="http://saxon.sf.net/" + exclude-result-prefixes="#all" + version="2.0"> + <xd:doc scope="stylesheet"> + <xd:desc> + <xd:p> + <xd:b>Author:</xd:b> KoSIT Bremen (kosit@finanzen.bremen.de)</xd:p> + <xd:b>Fassung vom: 2019-03-18+01:00</xd:b> + <xd:p>Überführt eine zur EN 16931 konforme elektronische Rechnung in der konkreten Syntax UNCEFACT.CII.D16B in eine Instanz gemäß des Schemas für den Namensraum urn:ce.eu:en16931:2017:xoev-de:kosit:standard:xrechnung-1.</xd:p> + <xd:p>Das Skript setzt voraus, dass das zu verarbeitende Dokument valide bzgl. des XML Schemas und der Schematron-Regeln der Quelle ist. Für nicht valide Dokumente ist das Ergebnis nicht definiert.</xd:p> + </xd:desc> + </xd:doc> + + <xsl:output method="xml" indent="yes"/> + + <xsl:template match="/rsm:CrossIndustryInvoice"> + <xr:invoice> + <xsl:variable name="current-bg" as="element()" select="."/> + <xsl:apply-templates mode="BT-1" select="./rsm:ExchangedDocument/ram:ID"/> + <xsl:apply-templates mode="BT-2" + select="./rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString[@format = '102']"/> + <xsl:apply-templates mode="BT-3" select="./rsm:ExchangedDocument/ram:TypeCode"/> + <xsl:apply-templates mode="BT-5" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode"/> + <xsl:apply-templates mode="BT-6" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode"/> + <xsl:apply-templates mode="BT-7" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:TaxPointDate/udt:DateString[@format = '102']"/> + <xsl:apply-templates mode="BT-8" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:DueDateTypeCode"/> + <xsl:apply-templates mode="BT-9" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:DueDateDateTime/udt:DateTimeString[@format = '102']"/> + <xsl:apply-templates mode="BT-10" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerReference"/> + <xsl:apply-templates mode="BT-11" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SpecifiedProcuringProject/ram:ID"/> + <xsl:apply-templates mode="BT-12" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:ContractReferencedDocument/ram:IssuerAssignedID"/> + <xsl:apply-templates mode="BT-13" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerOrderReferencedDocument/ram:IssuerAssignedID"/> + <xsl:apply-templates mode="BT-14" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerOrderReferencedDocument/ram:IssuerAssignedID"/> + <xsl:apply-templates mode="BT-15" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ReceivingAdviceReferencedDocument/ram:IssuerAssignedID"/> + <xsl:apply-templates mode="BT-16" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:DespatchAdviceReferencedDocument/ram:IssuerAssignedID"/> + <xsl:apply-templates mode="BT-17" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID[following-sibling::ram:TypeCode='50']"/> + <xsl:apply-templates mode="BT-18" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID[following-sibling::ram:TypeCode='130']"/> + <xsl:apply-templates mode="BT-19" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ReceivableSpecifiedTradeAccountingAccount/ram:ID"/> + <xsl:apply-templates mode="BT-20" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:Description"/> + <xsl:apply-templates mode="BG-1" select="./rsm:ExchangedDocument/ram:IncludedNote"/> + <xsl:apply-templates mode="BG-2" select="./rsm:ExchangedDocumentContext"/> + <xsl:apply-templates mode="BG-3" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument"/> + <xsl:apply-templates mode="BG-4" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty"/> + <xsl:apply-templates mode="BG-7" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty"/> + <xsl:apply-templates mode="BG-10" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty"/> + <xsl:apply-templates mode="BG-11" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty"/> + <xsl:apply-templates mode="BG-13" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty"/> + <!--Manuell: angepasst für BG-16--> + <xsl:for-each-group select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans" + group-by="ram:TypeCode"> + <xr:PAYMENT_INSTRUCTIONS> + <xsl:attribute name="xr:id" select="'BG-16'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:apply-templates mode="BT-81" select="current-group()[1]/ram:TypeCode"/> + <xsl:apply-templates mode="BT-82" select="./ram:Information"/> + <xsl:apply-templates mode="BT-83" + select="current-group()[1]/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PaymentReference"/> + <xsl:apply-templates mode="BG-17" + select="current-group()/ram:PayeePartyCreditorFinancialAccount"/> + <xsl:apply-templates mode="BG-18" + select="current-group()/ram:ApplicableTradeSettlementFinancialCard"/> + <xsl:apply-templates mode="BG-19" + select="current-group()/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement"/> + </xr:PAYMENT_INSTRUCTIONS> + </xsl:for-each-group> + <xsl:apply-templates mode="BG-20" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator='false']"/> + <xsl:apply-templates mode="BG-21" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator='true']"/> + <xsl:apply-templates mode="BG-22" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation"/> + <xsl:apply-templates mode="BG-23" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax"/> + <xsl:apply-templates mode="BG-24" + select="./rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument"/> + <xsl:apply-templates mode="BG-25" + select="./rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem"/> + </xr:invoice> + </xsl:template> + <xsl:template mode="BT-1" + match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:ID"> + <xr:Invoice_number> + <xsl:attribute name="xr:id" select="'BT-1'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Invoice_number> + </xsl:template> + <xsl:template mode="BT-2" + match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString[@format = '102']"> + <xr:Invoice_issue_date> + <xsl:attribute name="xr:id" select="'BT-2'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="date"/> + </xr:Invoice_issue_date> + </xsl:template> + <xsl:template mode="BT-3" + match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:TypeCode"> + <xr:Invoice_type_code> + <xsl:attribute name="xr:id" select="'BT-3'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Invoice_type_code> + </xsl:template> + <xsl:template mode="BT-5" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode"> + <xr:Invoice_currency_code> + <xsl:attribute name="xr:id" select="'BT-5'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Invoice_currency_code> + </xsl:template> + <xsl:template mode="BT-6" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode"> + <xr:VAT_accounting_currency_code> + <xsl:attribute name="xr:id" select="'BT-6'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:VAT_accounting_currency_code> + </xsl:template> + <xsl:template mode="BT-7" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:TaxPointDate/udt:DateString[@format = '102']"> + <xr:Value_added_tax_point_date> + <xsl:attribute name="xr:id" select="'BT-7'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="date"/> + </xr:Value_added_tax_point_date> + </xsl:template> + <xsl:template mode="BT-8" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:DueDateTypeCode"> + <xr:Value_added_tax_point_date_code> + <xsl:attribute name="xr:id" select="'BT-8'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Value_added_tax_point_date_code> + </xsl:template> + <xsl:template mode="BT-9" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:DueDateDateTime/udt:DateTimeString[@format = '102']"> + <xr:Payment_due_date> + <xsl:attribute name="xr:id" select="'BT-9'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="date"/> + </xr:Payment_due_date> + </xsl:template> + <xsl:template mode="BT-10" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerReference"> + <xr:Buyer_reference> + <xsl:attribute name="xr:id" select="'BT-10'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Buyer_reference> + </xsl:template> + <xsl:template mode="BT-11" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SpecifiedProcuringProject/ram:ID"> + <xr:Project_reference> + <xsl:attribute name="xr:id" select="'BT-11'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="document_reference"/> + </xr:Project_reference> + </xsl:template> + <xsl:template mode="BT-12" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:ContractReferencedDocument/ram:IssuerAssignedID"> + <xr:Contract_reference> + <xsl:attribute name="xr:id" select="'BT-12'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="document_reference"/> + </xr:Contract_reference> + </xsl:template> + <xsl:template mode="BT-13" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerOrderReferencedDocument/ram:IssuerAssignedID"> + <xr:Purchase_order_reference> + <xsl:attribute name="xr:id" select="'BT-13'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="document_reference"/> + </xr:Purchase_order_reference> + </xsl:template> + <xsl:template mode="BT-14" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerOrderReferencedDocument/ram:IssuerAssignedID"> + <xr:Sales_order_reference> + <xsl:attribute name="xr:id" select="'BT-14'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="document_reference"/> + </xr:Sales_order_reference> + </xsl:template> + <xsl:template mode="BT-15" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ReceivingAdviceReferencedDocument/ram:IssuerAssignedID"> + <xr:Receiving_advice_reference> + <xsl:attribute name="xr:id" select="'BT-15'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="document_reference"/> + </xr:Receiving_advice_reference> + </xsl:template> + <xsl:template mode="BT-16" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:DespatchAdviceReferencedDocument/ram:IssuerAssignedID"> + <xr:Despatch_advice_reference> + <xsl:attribute name="xr:id" select="'BT-16'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="document_reference"/> + </xr:Despatch_advice_reference> + </xsl:template> + <xsl:template mode="BT-17" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID[following-sibling::ram:TypeCode='50']"> + <xr:Tender_or_lot_reference> + <xsl:attribute name="xr:id" select="'BT-17'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="document_reference"/> + </xr:Tender_or_lot_reference> + </xsl:template> + <xsl:template mode="BT-18" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID[following-sibling::ram:TypeCode='130']"> + <xr:Invoiced_object_identifier> + <xsl:attribute name="xr:id" select="'BT-18'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"> + <xsl:with-param name="schemeID" select="following-sibling::ram:ReferenceTypeCode"/> + </xsl:call-template> + </xr:Invoiced_object_identifier> + </xsl:template> + <xsl:template mode="BT-19" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ReceivableSpecifiedTradeAccountingAccount/ram:ID"> + <xr:Buyer_accounting_reference> + <xsl:attribute name="xr:id" select="'BT-19'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Buyer_accounting_reference> + </xsl:template> + <xsl:template mode="BT-20" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:Description"> + <xr:Payment_terms> + <xsl:attribute name="xr:id" select="'BT-20'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Payment_terms> + </xsl:template> + <xsl:template mode="BG-1" + match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote der Instanz in konkreter Syntax wird auf 2 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-21" select="./ram:SubjectCode"/> + <xsl:apply-templates mode="BT-22" select="./ram:Content"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:INVOICE_NOTE> + <xsl:attribute name="xr:id" select="'BG-1'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:INVOICE_NOTE> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-21" + match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote/ram:SubjectCode"> + <xr:Invoice_note_subject_code> + <xsl:attribute name="xr:id" select="'BT-21'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Invoice_note_subject_code> + </xsl:template> + <xsl:template mode="BT-22" + match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote/ram:Content"> + <xr:Invoice_note> + <xsl:attribute name="xr:id" select="'BT-22'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Invoice_note> + </xsl:template> + <xsl:template mode="BG-2" + match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext der Instanz in konkreter Syntax wird auf 2 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-23" + select="./ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID"/> + <xsl:apply-templates mode="BT-24" + select="./ram:GuidelineSpecifiedDocumentContextParameter/ram:ID"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:PROCESS_CONTROL> + <xsl:attribute name="xr:id" select="'BG-2'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:PROCESS_CONTROL> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-23" + match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID"> + <xr:Business_process_type> + <xsl:attribute name="xr:id" select="'BT-23'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Business_process_type> + </xsl:template> + <xsl:template mode="BT-24" + match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID"> + <xr:Specification_identifier> + <xsl:attribute name="xr:id" select="'BT-24'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Specification_identifier> + </xsl:template> + <xsl:template mode="BG-3" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument der Instanz in konkreter Syntax wird auf 2 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-25" select="./ram:IssuerAssignedID"/> + <xsl:apply-templates mode="BT-26" + select="./ram:FormattedIssueDateTime/qdt:DateTimeString[@format = '102']"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:PRECEDING_INVOICE_REFERENCE> + <xsl:attribute name="xr:id" select="'BG-3'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:PRECEDING_INVOICE_REFERENCE> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-25" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument/ram:IssuerAssignedID"> + <xr:Preceding_Invoice_reference> + <xsl:attribute name="xr:id" select="'BT-25'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="document_reference"/> + </xr:Preceding_Invoice_reference> + </xsl:template> + <xsl:template mode="BT-26" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument/ram:FormattedIssueDateTime/qdt:DateTimeString[@format = '102']"> + <xr:Preceding_Invoice_issue_date> + <xsl:attribute name="xr:id" select="'BT-26'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="date"/> + </xr:Preceding_Invoice_issue_date> + </xsl:template> + <xsl:template mode="BG-4" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty der Instanz in konkreter Syntax wird auf 10 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-27" select="./ram:Name"/> + <xsl:apply-templates mode="BT-28" + select="./ram:SpecifiedLegalOrganization/ram:TradingBusinessName"/> + <xsl:apply-templates mode="BT-29" select="./ram:GlobalID[exists(@schemeID)]"/> + <xsl:apply-templates mode="BT-29" + select="./ram:ID[empty(following-sibling::ram:GlobalID/@schemeID)]"/> + <xsl:apply-templates mode="BT-30" select="./ram:SpecifiedLegalOrganization/ram:ID"/> + <xsl:apply-templates mode="BT-31" + select="./ram:SpecifiedTaxRegistration/ram:ID[@schemeID=('VA', 'VAT')]"/> + <xsl:apply-templates mode="BT-32" + select="./ram:SpecifiedTaxRegistration/ram:ID[@schemeID='FC']"/> + <xsl:apply-templates mode="BT-33" select="./ram:Description"/> + <xsl:apply-templates mode="BT-34" select="./ram:URIUniversalCommunication/ram:URIID"/> + <xsl:apply-templates mode="BG-5" select="./ram:PostalTradeAddress"/> + <xsl:apply-templates mode="BG-6" select="./ram:DefinedTradeContact"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:SELLER> + <xsl:attribute name="xr:id" select="'BG-4'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:SELLER> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-27" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:Name"> + <xr:Seller_name> + <xsl:attribute name="xr:id" select="'BT-27'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Seller_name> + </xsl:template> + <xsl:template mode="BT-28" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedLegalOrganization/ram:TradingBusinessName"> + <xr:Seller_trading_name> + <xsl:attribute name="xr:id" select="'BT-28'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Seller_trading_name> + </xsl:template> + <xsl:template mode="BT-29" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:GlobalID[exists(@schemeID)]"> + <xr:Seller_identifier> + <xsl:attribute name="xr:id" select="'BT-29'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"/> + </xr:Seller_identifier> + </xsl:template> + <xsl:template mode="BT-29" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:ID[empty(following-sibling::ram:GlobalID/@schemeID)]"> + <xr:Seller_identifier> + <xsl:attribute name="xr:id" select="'BT-29'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"/> + </xr:Seller_identifier> + </xsl:template> + <xsl:template mode="BT-30" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedLegalOrganization/ram:ID"> + <xr:Seller_legal_registration_identifier> + <xsl:attribute name="xr:id" select="'BT-30'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"/> + </xr:Seller_legal_registration_identifier> + </xsl:template> + <xsl:template mode="BT-31" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID=('VA', 'VAT')]"> + <xr:Seller_VAT_identifier> + <xsl:attribute name="xr:id" select="'BT-31'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Seller_VAT_identifier> + </xsl:template> + <xsl:template mode="BT-32" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID='FC']"> + <xr:Seller_tax_registration_identifier> + <xsl:attribute name="xr:id" select="'BT-32'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Seller_tax_registration_identifier> + </xsl:template> + <xsl:template mode="BT-33" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:Description"> + <xr:Seller_additional_legal_information> + <xsl:attribute name="xr:id" select="'BT-33'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Seller_additional_legal_information> + </xsl:template> + <xsl:template mode="BT-34" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:URIUniversalCommunication/ram:URIID"> + <xr:Seller_electronic_address> + <xsl:attribute name="xr:id" select="'BT-34'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"/> + </xr:Seller_electronic_address> + </xsl:template> + <xsl:template mode="BG-5" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress der Instanz in konkreter Syntax wird auf 7 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-35" select="./ram:LineOne"/> + <xsl:apply-templates mode="BT-36" select="./ram:LineTwo"/> + <xsl:apply-templates mode="BT-162" select="./ram:LineThree"/> + <xsl:apply-templates mode="BT-37" select="./ram:CityName"/> + <xsl:apply-templates mode="BT-38" select="./ram:PostcodeCode"/> + <xsl:apply-templates mode="BT-39" select="./ram:CountrySubDivisionName"/> + <xsl:apply-templates mode="BT-40" select="./ram:CountryID"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:SELLER_POSTAL_ADDRESS> + <xsl:attribute name="xr:id" select="'BG-5'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:SELLER_POSTAL_ADDRESS> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-35" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:LineOne"> + <xr:Seller_address_line_1> + <xsl:attribute name="xr:id" select="'BT-35'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Seller_address_line_1> + </xsl:template> + <xsl:template mode="BT-36" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:LineTwo"> + <xr:Seller_address_line_2> + <xsl:attribute name="xr:id" select="'BT-36'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Seller_address_line_2> + </xsl:template> + <xsl:template mode="BT-162" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:LineThree"> + <xr:Seller_address_line_3> + <xsl:attribute name="xr:id" select="'BT-162'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Seller_address_line_3> + </xsl:template> + <xsl:template mode="BT-37" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CityName"> + <xr:Seller_city> + <xsl:attribute name="xr:id" select="'BT-37'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Seller_city> + </xsl:template> + <xsl:template mode="BT-38" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"> + <xr:Seller_post_code> + <xsl:attribute name="xr:id" select="'BT-38'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Seller_post_code> + </xsl:template> + <xsl:template mode="BT-39" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"> + <xr:Seller_country_subdivision> + <xsl:attribute name="xr:id" select="'BT-39'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Seller_country_subdivision> + </xsl:template> + <xsl:template mode="BT-40" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID"> + <xr:Seller_country_code> + <xsl:attribute name="xr:id" select="'BT-40'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Seller_country_code> + </xsl:template> + <xsl:template mode="BG-6" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact der Instanz in konkreter Syntax wird auf 3 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-41" select="./ram:DepartmentName"/> + <xsl:apply-templates mode="BT-41" select="./ram:PersonName"/> + <xsl:apply-templates mode="BT-42" + select="./ram:TelephoneUniversalCommunication/ram:CompleteNumber"/> + <xsl:apply-templates mode="BT-43" select="./ram:EmailURIUniversalCommunication/ram:URIID"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:SELLER_CONTACT> + <xsl:attribute name="xr:id" select="'BG-6'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:SELLER_CONTACT> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-41" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact/ram:DepartmentName"> + <xr:Seller_contact_point> + <xsl:attribute name="xr:id" select="'BT-41'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Seller_contact_point> + </xsl:template> + <xsl:template mode="BT-41" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact/ram:PersonName"> + <xr:Seller_contact_point> + <xsl:attribute name="xr:id" select="'BT-41'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Seller_contact_point> + </xsl:template> + <xsl:template mode="BT-42" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact/ram:TelephoneUniversalCommunication/ram:CompleteNumber"> + <xr:Seller_contact_telephone_number> + <xsl:attribute name="xr:id" select="'BT-42'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Seller_contact_telephone_number> + </xsl:template> + <xsl:template mode="BT-43" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact/ram:EmailURIUniversalCommunication/ram:URIID"> + <xr:Seller_contact_email_address> + <xsl:attribute name="xr:id" select="'BT-43'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Seller_contact_email_address> + </xsl:template> + <xsl:template mode="BG-7" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty der Instanz in konkreter Syntax wird auf 8 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-44" select="./ram:Name"/> + <xsl:apply-templates mode="BT-45" + select="./ram:SpecifiedLegalOrganization/ram:TradingBusinessName"/> + <xsl:apply-templates mode="BT-46" + select="./ram:ID[empty(following-sibling::ram:GlobalID/@schemeID)]"/> + <xsl:apply-templates mode="BT-46" select="./ram:GlobalID[exists(@schemeID)]"/> + <xsl:apply-templates mode="BT-47" select="./ram:SpecifiedLegalOrganization/ram:ID"/> + <xsl:apply-templates mode="BT-48" + select="./ram:SpecifiedTaxRegistration/ram:ID[@schemeID=('VA', 'VAT')]"/> + <xsl:apply-templates mode="BT-49" select="./ram:URIUniversalCommunication/ram:URIID"/> + <xsl:apply-templates mode="BG-8" select="./ram:PostalTradeAddress"/> + <xsl:apply-templates mode="BG-9" select="./ram:DefinedTradeContact"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:BUYER> + <xsl:attribute name="xr:id" select="'BG-7'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:BUYER> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-44" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:Name"> + <xr:Buyer_name> + <xsl:attribute name="xr:id" select="'BT-44'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Buyer_name> + </xsl:template> + <xsl:template mode="BT-45" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:TradingBusinessName"> + <xr:Buyer_trading_name> + <xsl:attribute name="xr:id" select="'BT-45'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Buyer_trading_name> + </xsl:template> + <xsl:template mode="BT-46" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:ID[empty(following-sibling::ram:GlobalID/@schemeID)]"> + <xr:Buyer_identifier> + <xsl:attribute name="xr:id" select="'BT-46'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"/> + </xr:Buyer_identifier> + </xsl:template> + <xsl:template mode="BT-46" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:GlobalID[exists(@schemeID)]"> + <xr:Buyer_identifier> + <xsl:attribute name="xr:id" select="'BT-46'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"/> + </xr:Buyer_identifier> + </xsl:template> + <xsl:template mode="BT-47" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID"> + <xr:Buyer_legal_registration_identifier> + <xsl:attribute name="xr:id" select="'BT-47'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"/> + </xr:Buyer_legal_registration_identifier> + </xsl:template> + <xsl:template mode="BT-48" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID=('VA', 'VAT')]"> + <xr:Buyer_VAT_identifier> + <xsl:attribute name="xr:id" select="'BT-48'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Buyer_VAT_identifier> + </xsl:template> + <xsl:template mode="BT-49" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication/ram:URIID"> + <xr:Buyer_electronic_address> + <xsl:attribute name="xr:id" select="'BT-49'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"/> + </xr:Buyer_electronic_address> + </xsl:template> + <xsl:template mode="BG-8" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress der Instanz in konkreter Syntax wird auf 7 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-50" select="./ram:LineOne"/> + <xsl:apply-templates mode="BT-51" select="./ram:LineTwo"/> + <xsl:apply-templates mode="BT-163" select="./ram:LineThree"/> + <xsl:apply-templates mode="BT-52" select="./ram:CityName"/> + <xsl:apply-templates mode="BT-53" select="./ram:PostcodeCode"/> + <xsl:apply-templates mode="BT-54" select="./ram:CountrySubDivisionName"/> + <xsl:apply-templates mode="BT-55" select="./ram:CountryID"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:BUYER_POSTAL_ADDRESS> + <xsl:attribute name="xr:id" select="'BG-8'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:BUYER_POSTAL_ADDRESS> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-50" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:LineOne"> + <xr:Buyer_address_line_1> + <xsl:attribute name="xr:id" select="'BT-50'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Buyer_address_line_1> + </xsl:template> + <xsl:template mode="BT-51" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:LineTwo"> + <xr:Buyer_address_line_2> + <xsl:attribute name="xr:id" select="'BT-51'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Buyer_address_line_2> + </xsl:template> + <xsl:template mode="BT-163" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:LineThree"> + <xr:Buyer_address_line_3> + <xsl:attribute name="xr:id" select="'BT-163'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Buyer_address_line_3> + </xsl:template> + <xsl:template mode="BT-52" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CityName"> + <xr:Buyer_city> + <xsl:attribute name="xr:id" select="'BT-52'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Buyer_city> + </xsl:template> + <xsl:template mode="BT-53" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"> + <xr:Buyer_post_code> + <xsl:attribute name="xr:id" select="'BT-53'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Buyer_post_code> + </xsl:template> + <xsl:template mode="BT-54" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"> + <xr:Buyer_country_subdivision> + <xsl:attribute name="xr:id" select="'BT-54'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Buyer_country_subdivision> + </xsl:template> + <xsl:template mode="BT-55" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountryID"> + <xr:Buyer_country_code> + <xsl:attribute name="xr:id" select="'BT-55'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Buyer_country_code> + </xsl:template> + <xsl:template mode="BG-9" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact der Instanz in konkreter Syntax wird auf 3 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-56" select="./ram:DepartmentName"/> + <xsl:apply-templates mode="BT-56" select="./ram:PersonName"/> + <xsl:apply-templates mode="BT-57" + select="./ram:TelephoneUniversalCommunication/ram:CompleteNumber"/> + <xsl:apply-templates mode="BT-58" select="./ram:EmailURIUniversalCommunication/ram:URIID"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:BUYER_CONTACT> + <xsl:attribute name="xr:id" select="'BG-9'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:BUYER_CONTACT> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-56" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact/ram:DepartmentName"> + <xr:Buyer_contact_point> + <xsl:attribute name="xr:id" select="'BT-56'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Buyer_contact_point> + </xsl:template> + <xsl:template mode="BT-56" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact/ram:PersonName"> + <xr:Buyer_contact_point> + <xsl:attribute name="xr:id" select="'BT-56'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Buyer_contact_point> + </xsl:template> + <xsl:template mode="BT-57" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact/ram:TelephoneUniversalCommunication/ram:CompleteNumber"> + <xr:Buyer_contact_telephone_number> + <xsl:attribute name="xr:id" select="'BT-57'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Buyer_contact_telephone_number> + </xsl:template> + <xsl:template mode="BT-58" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact/ram:EmailURIUniversalCommunication/ram:URIID"> + <xr:Buyer_contact_email_address> + <xsl:attribute name="xr:id" select="'BT-58'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Buyer_contact_email_address> + </xsl:template> + <xsl:template mode="BG-10" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty der Instanz in konkreter Syntax wird auf 3 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-59" select="./ram:Name"/> + <xsl:apply-templates mode="BT-60" select="./ram:GlobalID[exists(@schemeID)]"/> + <xsl:apply-templates mode="BT-60" + select="./ram:ID[empty(following-sibling::ram:GlobalID/@schemeID)]"/> + <xsl:apply-templates mode="BT-61" select="./ram:SpecifiedLegalOrganization/ram:ID/@schemeID"/> + <xsl:apply-templates mode="BT-61" select="./ram:SpecifiedLegalOrganization/ram:ID"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:PAYEE> + <xsl:attribute name="xr:id" select="'BG-10'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:PAYEE> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-59" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:Name"> + <xr:Payee_name> + <xsl:attribute name="xr:id" select="'BT-59'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Payee_name> + </xsl:template> + <xsl:template mode="BT-60" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:GlobalID[exists(@schemeID)]"> + <xr:Payee_identifier> + <xsl:attribute name="xr:id" select="'BT-60'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"/> + </xr:Payee_identifier> + </xsl:template> + <xsl:template mode="BT-60" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:ID[empty(following-sibling::ram:GlobalID/@schemeID)]"> + <xr:Payee_identifier> + <xsl:attribute name="xr:id" select="'BT-60'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"/> + </xr:Payee_identifier> + </xsl:template> + <xsl:template mode="BT-61" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ram:ID/@schemeID"> + <xr:Payee_legal_registration_identifier> + <xsl:attribute name="xr:id" select="'BT-61'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"/> + </xr:Payee_legal_registration_identifier> + </xsl:template> + <xsl:template mode="BT-61" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ram:ID"> + <xr:Payee_legal_registration_identifier> + <xsl:attribute name="xr:id" select="'BT-61'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Payee_legal_registration_identifier> + </xsl:template> + <xsl:template mode="BG-11" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty der Instanz in konkreter Syntax wird auf 3 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-62" select="./ram:Name"/> + <xsl:apply-templates mode="BT-63" select="./ram:SpecifiedTaxRegistration/ram:ID"/> + <xsl:apply-templates mode="BG-12" select="./ram:PostalTradeAddress"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:SELLER_TAX_REPRESENTATIVE_PARTY> + <xsl:attribute name="xr:id" select="'BG-11'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:SELLER_TAX_REPRESENTATIVE_PARTY> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-62" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:Name"> + <xr:Seller_tax_representative_name> + <xsl:attribute name="xr:id" select="'BT-62'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Seller_tax_representative_name> + </xsl:template> + <xsl:template mode="BT-63" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID"> + <xr:Seller_tax_representative_VAT_identifier> + <xsl:attribute name="xr:id" select="'BT-63'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Seller_tax_representative_VAT_identifier> + </xsl:template> + <xsl:template mode="BG-12" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress der Instanz in konkreter Syntax wird auf 7 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-64" select="./ram:LineOne"/> + <xsl:apply-templates mode="BT-65" select="./ram:LineTwo"/> + <xsl:apply-templates mode="BT-164" select="./ram:LineThree"/> + <xsl:apply-templates mode="BT-66" select="./ram:CityName"/> + <xsl:apply-templates mode="BT-67" select="./ram:PostcodeCode"/> + <xsl:apply-templates mode="BT-68" select="./ram:CountrySubDivisionName"/> + <xsl:apply-templates mode="BT-69" select="./ram:CountryID"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:SELLER_TAX_REPRESENTATIVE_POSTAL_ADDRESS> + <xsl:attribute name="xr:id" select="'BG-12'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:SELLER_TAX_REPRESENTATIVE_POSTAL_ADDRESS> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-64" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:LineOne"> + <xr:Tax_representative_address_line_1> + <xsl:attribute name="xr:id" select="'BT-64'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Tax_representative_address_line_1> + </xsl:template> + <xsl:template mode="BT-65" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:LineTwo"> + <xr:Tax_representative_address_line_2> + <xsl:attribute name="xr:id" select="'BT-65'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Tax_representative_address_line_2> + </xsl:template> + <xsl:template mode="BT-164" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:LineThree"> + <xr:Tax_representative_address_line_3> + <xsl:attribute name="xr:id" select="'BT-164'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Tax_representative_address_line_3> + </xsl:template> + <xsl:template mode="BT-66" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CityName"> + <xr:Tax_representative_city> + <xsl:attribute name="xr:id" select="'BT-66'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Tax_representative_city> + </xsl:template> + <xsl:template mode="BT-67" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"> + <xr:Tax_representative_post_code> + <xsl:attribute name="xr:id" select="'BT-67'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Tax_representative_post_code> + </xsl:template> + <xsl:template mode="BT-68" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"> + <xr:Tax_representative_country_subdivision> + <xsl:attribute name="xr:id" select="'BT-68'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Tax_representative_country_subdivision> + </xsl:template> + <xsl:template mode="BT-69" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CountryID"> + <xr:Tax_representative_country_code> + <xsl:attribute name="xr:id" select="'BT-69'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Tax_representative_country_code> + </xsl:template> + <xsl:template mode="BG-13" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty der Instanz in konkreter Syntax wird auf 5 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-70" select="./ram:Name"/> + <xsl:apply-templates mode="BT-71" select="./ram:GlobalID[exists(@schemeID)]"/> + <xsl:apply-templates mode="BT-71" + select="./ram:ID[empty(following-sibling::ram:GlobalID/@schemeID)]"/> + <xsl:apply-templates mode="BT-72" + select="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ActualDeliverySupplyChainEvent/ram:OccurrenceDateTime/udt:DateTimeString[@format = '102']"/> + <xsl:apply-templates mode="BG-14" + select="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod"/> + <xsl:apply-templates mode="BG-15" select="./ram:PostalTradeAddress"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:DELIVERY_INFORMATION> + <xsl:attribute name="xr:id" select="'BG-13'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:DELIVERY_INFORMATION> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-70" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:Name"> + <xr:Deliver_to_party_name> + <xsl:attribute name="xr:id" select="'BT-70'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Deliver_to_party_name> + </xsl:template> + <xsl:template mode="BT-71" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:GlobalID[exists(@schemeID)]"> + <xr:Deliver_to_location_identifier> + <xsl:attribute name="xr:id" select="'BT-71'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"/> + </xr:Deliver_to_location_identifier> + </xsl:template> + <xsl:template mode="BT-71" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:ID[empty(following-sibling::ram:GlobalID/@schemeID)]"> + <xr:Deliver_to_location_identifier> + <xsl:attribute name="xr:id" select="'BT-71'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"/> + </xr:Deliver_to_location_identifier> + </xsl:template> + <xsl:template mode="BT-72" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ActualDeliverySupplyChainEvent/ram:OccurrenceDateTime/udt:DateTimeString[@format = '102']"> + <xr:Actual_delivery_date> + <xsl:attribute name="xr:id" select="'BT-72'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="date"/> + </xr:Actual_delivery_date> + </xsl:template> + <xsl:template mode="BG-14" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod der Instanz in konkreter Syntax wird auf 2 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-73" + select="./ram:StartDateTime/udt:DateTimeString[@format = '102']"/> + <xsl:apply-templates mode="BT-74" + select="./ram:EndDateTime/udt:DateTimeString[@format = '102']"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:INVOICING_PERIOD> + <xsl:attribute name="xr:id" select="'BG-14'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:INVOICING_PERIOD> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-73" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod/ram:StartDateTime/udt:DateTimeString[@format = '102']"> + <xr:Invoicing_period_start_date> + <xsl:attribute name="xr:id" select="'BT-73'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="date"/> + </xr:Invoicing_period_start_date> + </xsl:template> + <xsl:template mode="BT-74" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod/ram:EndDateTime/udt:DateTimeString[@format = '102']"> + <xr:Invoicing_period_end_date> + <xsl:attribute name="xr:id" select="'BT-74'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="date"/> + </xr:Invoicing_period_end_date> + </xsl:template> + <xsl:template mode="BG-15" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress der Instanz in konkreter Syntax wird auf 7 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-75" select="./ram:LineOne"/> + <xsl:apply-templates mode="BT-76" select="./ram:LineTwo"/> + <xsl:apply-templates mode="BT-165" select="./ram:LineThree"/> + <xsl:apply-templates mode="BT-77" select="./ram:CityName"/> + <xsl:apply-templates mode="BT-78" select="./ram:PostcodeCode"/> + <xsl:apply-templates mode="BT-79" select="./ram:CountrySubDivisionName"/> + <xsl:apply-templates mode="BT-80" select="./ram:CountryID"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:DELIVER_TO_ADDRESS> + <xsl:attribute name="xr:id" select="'BG-15'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:DELIVER_TO_ADDRESS> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-75" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:LineOne"> + <xr:Deliver_to_address_line_1> + <xsl:attribute name="xr:id" select="'BT-75'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Deliver_to_address_line_1> + </xsl:template> + <xsl:template mode="BT-76" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:LineTwo"> + <xr:Deliver_to_address_line_2> + <xsl:attribute name="xr:id" select="'BT-76'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Deliver_to_address_line_2> + </xsl:template> + <xsl:template mode="BT-165" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:LineThree"> + <xr:Deliver_to_address_line_3> + <xsl:attribute name="xr:id" select="'BT-165'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Deliver_to_address_line_3> + </xsl:template> + <xsl:template mode="BT-77" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CityName"> + <xr:Deliver_to_city> + <xsl:attribute name="xr:id" select="'BT-77'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Deliver_to_city> + </xsl:template> + <xsl:template mode="BT-78" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"> + <xr:Deliver_to_post_code> + <xsl:attribute name="xr:id" select="'BT-78'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Deliver_to_post_code> + </xsl:template> + <xsl:template mode="BT-79" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"> + <xr:Deliver_to_country_subdivision> + <xsl:attribute name="xr:id" select="'BT-79'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Deliver_to_country_subdivision> + </xsl:template> + <xsl:template mode="BT-80" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID"> + <xr:Deliver_to_country_code> + <xsl:attribute name="xr:id" select="'BT-80'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Deliver_to_country_code> + </xsl:template> + <xsl:template mode="BG-16" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans der Instanz in konkreter Syntax wird auf 6 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-81" select="./ram:TypeCode"/> + <xsl:apply-templates mode="BT-82" select="./ram:Information"/> + <xsl:apply-templates mode="BT-83" + select="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PaymentReference"/> + <xsl:apply-templates mode="BG-17" select="./ram:PayeePartyCreditorFinancialAccount"/> + <xsl:apply-templates mode="BG-18" select="./ram:ApplicableTradeSettlementFinancialCard"/> + <xsl:apply-templates mode="BG-19" + select="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:PAYMENT_INSTRUCTIONS> + <xsl:attribute name="xr:id" select="'BG-16'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:PAYMENT_INSTRUCTIONS> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-81" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:TypeCode"> + <xr:Payment_means_type_code> + <xsl:attribute name="xr:id" select="'BT-81'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Payment_means_type_code> + </xsl:template> + <xsl:template mode="BT-82" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:Information"> + <xr:Payment_means_text> + <xsl:attribute name="xr:id" select="'BT-82'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Payment_means_text> + </xsl:template> + <xsl:template mode="BT-83" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PaymentReference"> + <xr:Remittance_information> + <xsl:attribute name="xr:id" select="'BT-83'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Remittance_information> + </xsl:template> + <xsl:template mode="BG-17" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount der Instanz in konkreter Syntax wird auf 3 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-84" select="./ram:ProprietaryID"/> + <xsl:apply-templates mode="BT-84" select="./ram:IBANID"/> + <xsl:apply-templates mode="BT-85" select="./ram:AccountName"/> + <xsl:apply-templates mode="BT-86" + select="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeeSpecifiedCreditorFinancialInstitution/ram:BICID"/> + <xsl:apply-templates mode="BT-86" + select="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeeSpecifiedCreditorFinancialInstitution/ram:BICID"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:CREDIT_TRANSFER> + <xsl:attribute name="xr:id" select="'BG-17'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:CREDIT_TRANSFER> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-84" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount/ram:ProprietaryID"> + <xr:Payment_account_identifier> + <xsl:attribute name="xr:id" select="'BT-84'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Payment_account_identifier> + </xsl:template> + <xsl:template mode="BT-84" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount/ram:IBANID"> + <xr:Payment_account_identifier> + <xsl:attribute name="xr:id" select="'BT-84'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Payment_account_identifier> + </xsl:template> + <xsl:template mode="BT-85" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount/ram:AccountName"> + <xr:Payment_account_name> + <xsl:attribute name="xr:id" select="'BT-85'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Payment_account_name> + </xsl:template> + <xsl:template mode="BT-86" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeeSpecifiedCreditorFinancialInstitution/ram:BICID"> + <xr:Payment_service_provider_identifier> + <xsl:attribute name="xr:id" select="'BT-86'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Payment_service_provider_identifier> + </xsl:template> + <xsl:template mode="BT-86" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeeSpecifiedCreditorFinancialInstitution/ram:BICID"> + <xr:Payment_service_provider_identifier> + <xsl:attribute name="xr:id" select="'BT-86'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Payment_service_provider_identifier> + </xsl:template> + <xsl:template mode="BG-18" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard der Instanz in konkreter Syntax wird auf 2 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-87" select="./ram:ID"/> + <xsl:apply-templates mode="BT-88" select="./ram:CardholderName"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:PAYMENT_CARD_INFORMATION> + <xsl:attribute name="xr:id" select="'BG-18'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:PAYMENT_CARD_INFORMATION> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-87" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard/ram:ID"> + <xr:Payment_card_primary_account_number> + <xsl:attribute name="xr:id" select="'BT-87'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Payment_card_primary_account_number> + </xsl:template> + <xsl:template mode="BT-88" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard/ram:CardholderName"> + <xr:Payment_card_holder_name> + <xsl:attribute name="xr:id" select="'BT-88'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Payment_card_holder_name> + </xsl:template> + <xsl:template mode="BG-19" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement der Instanz in konkreter Syntax wird auf 3 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-89" + select="./ram:SpecifiedTradePaymentTerms/ram:DirectDebitMandateID"/> + <xsl:apply-templates mode="BT-90" select="./ram:CreditorReferenceID"/> + <xsl:apply-templates mode="BT-91" + select="./ram:SpecifiedTradeSettlementPaymentMeans/ram:PayerPartyDebtorFinancialAccount/ram:IBANID"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:DIRECT_DEBIT> + <xsl:attribute name="xr:id" select="'BG-19'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:DIRECT_DEBIT> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-89" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:DirectDebitMandateID"> + <xr:Mandate_reference_identifier> + <xsl:attribute name="xr:id" select="'BT-89'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Mandate_reference_identifier> + </xsl:template> + <xsl:template mode="BT-90" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:CreditorReferenceID"> + <xr:Bank_assigned_creditor_identifier> + <xsl:attribute name="xr:id" select="'BT-90'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Bank_assigned_creditor_identifier> + </xsl:template> + <xsl:template mode="BT-91" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayerPartyDebtorFinancialAccount/ram:IBANID"> + <xr:Debited_account_identifier> + <xsl:attribute name="xr:id" select="'BT-91'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Debited_account_identifier> + </xsl:template> + <xsl:template mode="BG-20" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator='false']"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator='false'] der Instanz in konkreter Syntax wird auf 7 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-92" select="./ram:ActualAmount"/> + <xsl:apply-templates mode="BT-93" select="./ram:BasisAmount"/> + <xsl:apply-templates mode="BT-94" select="./ram:CalculationPercent"/> + <xsl:apply-templates mode="BT-95" select="./ram:CategoryTradeTax/ram:CategoryCode"/> + <xsl:apply-templates mode="BT-96" select="./ram:CategoryTradeTax/ram:RateApplicablePercent"/> + <xsl:apply-templates mode="BT-97" select="./ram:Reason"/> + <xsl:apply-templates mode="BT-98" select="./ram:ReasonCode"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:DOCUMENT_LEVEL_ALLOWANCES> + <xsl:attribute name="xr:id" select="'BG-20'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:DOCUMENT_LEVEL_ALLOWANCES> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-92" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"> + <xr:Document_level_allowance_amount> + <xsl:attribute name="xr:id" select="'BT-92'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Document_level_allowance_amount> + </xsl:template> + <xsl:template mode="BT-93" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"> + <xr:Document_level_allowance_base_amount> + <xsl:attribute name="xr:id" select="'BT-93'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Document_level_allowance_base_amount> + </xsl:template> + <xsl:template mode="BT-94" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"> + <xr:Document_level_allowance_percentage> + <xsl:attribute name="xr:id" select="'BT-94'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="percentage"/> + </xr:Document_level_allowance_percentage> + </xsl:template> + <xsl:template mode="BT-95" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:CategoryCode"> + <xr:Document_level_allowance_VAT_category_code> + <xsl:attribute name="xr:id" select="'BT-95'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Document_level_allowance_VAT_category_code> + </xsl:template> + <xsl:template mode="BT-96" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:RateApplicablePercent"> + <xr:Document_level_allowance_VAT_rate> + <xsl:attribute name="xr:id" select="'BT-96'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="percentage"/> + </xr:Document_level_allowance_VAT_rate> + </xsl:template> + <xsl:template mode="BT-97" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"> + <xr:Document_level_allowance_reason> + <xsl:attribute name="xr:id" select="'BT-97'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Document_level_allowance_reason> + </xsl:template> + <xsl:template mode="BT-98" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"> + <xr:Document_level_allowance_reason_code> + <xsl:attribute name="xr:id" select="'BT-98'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Document_level_allowance_reason_code> + </xsl:template> + <xsl:template mode="BG-21" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator='true']"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator='true'] der Instanz in konkreter Syntax wird auf 7 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-99" select="./ram:ActualAmount"/> + <xsl:apply-templates mode="BT-100" select="./ram:BasisAmount"/> + <xsl:apply-templates mode="BT-101" select="./ram:CalculationPercent"/> + <xsl:apply-templates mode="BT-102" select="./ram:CategoryTradeTax/ram:CategoryCode"/> + <xsl:apply-templates mode="BT-103" select="./ram:CategoryTradeTax/ram:RateApplicablePercent"/> + <xsl:apply-templates mode="BT-104" select="./ram:Reason"/> + <xsl:apply-templates mode="BT-105" select="./ram:ReasonCode"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:DOCUMENT_LEVEL_CHARGES> + <xsl:attribute name="xr:id" select="'BG-21'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:DOCUMENT_LEVEL_CHARGES> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-99" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"> + <xr:Document_level_charge_amount> + <xsl:attribute name="xr:id" select="'BT-99'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Document_level_charge_amount> + </xsl:template> + <xsl:template mode="BT-100" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"> + <xr:Document_level_charge_base_amount> + <xsl:attribute name="xr:id" select="'BT-100'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Document_level_charge_base_amount> + </xsl:template> + <xsl:template mode="BT-101" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"> + <xr:Document_level_charge_percentage> + <xsl:attribute name="xr:id" select="'BT-101'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="percentage"/> + </xr:Document_level_charge_percentage> + </xsl:template> + <xsl:template mode="BT-102" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:CategoryCode"> + <xr:Document_level_charge_VAT_category_code> + <xsl:attribute name="xr:id" select="'BT-102'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Document_level_charge_VAT_category_code> + </xsl:template> + <xsl:template mode="BT-103" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:RateApplicablePercent"> + <xr:Document_level_charge_VAT_rate> + <xsl:attribute name="xr:id" select="'BT-103'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="percentage"/> + </xr:Document_level_charge_VAT_rate> + </xsl:template> + <xsl:template mode="BT-104" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"> + <xr:Document_level_charge_reason> + <xsl:attribute name="xr:id" select="'BT-104'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Document_level_charge_reason> + </xsl:template> + <xsl:template mode="BT-105" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"> + <xr:Document_level_charge_reason_code> + <xsl:attribute name="xr:id" select="'BT-105'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Document_level_charge_reason_code> + </xsl:template> + <xsl:template mode="BG-22" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation der Instanz in konkreter Syntax wird auf 10 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-106" select="./ram:LineTotalAmount"/> + <xsl:apply-templates mode="BT-107" select="./ram:AllowanceTotalAmount"/> + <xsl:apply-templates mode="BT-108" select="./ram:ChargeTotalAmount"/> + <xsl:apply-templates mode="BT-109" select="./ram:TaxBasisTotalAmount"/> + <xsl:apply-templates mode="BT-110" + select="./ram:TaxTotalAmount[@currencyID = parent::ram:SpecifiedTradeSettlementHeaderMonetarySummation/preceding-sibling::ram:TaxCurrencyCode]"/> + <xsl:apply-templates mode="BT-111" + select="./ram:TaxTotalAmount[@currencyID = parent::ram:SpecifiedTradeSettlementHeaderMonetarySummation/preceding-sibling::ram:InvoiceCurrencyCode]"/> + <xsl:apply-templates mode="BT-112" select="./ram:GrandTotalAmount"/> + <xsl:apply-templates mode="BT-113" select="./ram:TotalPrepaidAmount"/> + <xsl:apply-templates mode="BT-114" select="./ram:RoundingAmount"/> + <xsl:apply-templates mode="BT-115" select="./ram:DuePayableAmount"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:DOCUMENT_TOTALS> + <xsl:attribute name="xr:id" select="'BG-22'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:DOCUMENT_TOTALS> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-106" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:LineTotalAmount"> + <xr:Sum_of_Invoice_line_net_amount> + <xsl:attribute name="xr:id" select="'BT-106'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Sum_of_Invoice_line_net_amount> + </xsl:template> + <xsl:template mode="BT-107" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:AllowanceTotalAmount"> + <xr:Sum_of_allowances_on_document_level> + <xsl:attribute name="xr:id" select="'BT-107'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Sum_of_allowances_on_document_level> + </xsl:template> + <xsl:template mode="BT-108" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount"> + <xr:Sum_of_charges_on_document_level> + <xsl:attribute name="xr:id" select="'BT-108'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Sum_of_charges_on_document_level> + </xsl:template> + <xsl:template mode="BT-109" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxBasisTotalAmount"> + <xr:Invoice_total_amount_without_VAT> + <xsl:attribute name="xr:id" select="'BT-109'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Invoice_total_amount_without_VAT> + </xsl:template> + <xsl:template mode="BT-110" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount[@currencyID = parent::ram:SpecifiedTradeSettlementHeaderMonetarySummation/preceding-sibling::ram:TaxCurrencyCode]"> + <xr:Invoice_total_VAT_amount> + <xsl:attribute name="xr:id" select="'BT-110'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Invoice_total_VAT_amount> + </xsl:template> + <xsl:template mode="BT-111" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount[@currencyID = parent::ram:SpecifiedTradeSettlementHeaderMonetarySummation/preceding-sibling::ram:InvoiceCurrencyCode]"> + <xr:Invoice_total_VAT_amount_in_accounting_currency> + <xsl:attribute name="xr:id" select="'BT-111'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Invoice_total_VAT_amount_in_accounting_currency> + </xsl:template> + <xsl:template mode="BT-112" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:GrandTotalAmount"> + <xr:Invoice_total_amount_with_VAT> + <xsl:attribute name="xr:id" select="'BT-112'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Invoice_total_amount_with_VAT> + </xsl:template> + <xsl:template mode="BT-113" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TotalPrepaidAmount"> + <xr:Paid_amount> + <xsl:attribute name="xr:id" select="'BT-113'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Paid_amount> + </xsl:template> + <xsl:template mode="BT-114" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:RoundingAmount"> + <xr:Rounding_amount> + <xsl:attribute name="xr:id" select="'BT-114'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Rounding_amount> + </xsl:template> + <xsl:template mode="BT-115" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:DuePayableAmount"> + <xr:Amount_due_for_payment> + <xsl:attribute name="xr:id" select="'BT-115'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Amount_due_for_payment> + </xsl:template> + <xsl:template mode="BG-23" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax der Instanz in konkreter Syntax wird auf 6 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-116" select="./ram:BasisAmount"/> + <xsl:apply-templates mode="BT-117" select="./ram:CalculatedAmount"/> + <xsl:apply-templates mode="BT-118" select="./ram:CategoryCode"/> + <xsl:apply-templates mode="BT-119" select="./ram:RateApplicablePercent"/> + <xsl:apply-templates mode="BT-120" select="./ram:ExemptionReason"/> + <xsl:apply-templates mode="BT-121" select="./ram:ExemptionReasonCode"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:VAT_BREAKDOWN> + <xsl:attribute name="xr:id" select="'BG-23'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:VAT_BREAKDOWN> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-116" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:BasisAmount"> + <xr:VAT_category_taxable_amount> + <xsl:attribute name="xr:id" select="'BT-116'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:VAT_category_taxable_amount> + </xsl:template> + <xsl:template mode="BT-117" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CalculatedAmount"> + <xr:VAT_category_tax_amount> + <xsl:attribute name="xr:id" select="'BT-117'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:VAT_category_tax_amount> + </xsl:template> + <xsl:template mode="BT-118" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCode"> + <xr:VAT_category_code> + <xsl:attribute name="xr:id" select="'BT-118'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:VAT_category_code> + </xsl:template> + <xsl:template mode="BT-119" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:RateApplicablePercent"> + <xr:VAT_category_rate> + <xsl:attribute name="xr:id" select="'BT-119'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="percentage"/> + </xr:VAT_category_rate> + </xsl:template> + <xsl:template mode="BT-120" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:ExemptionReason"> + <xr:VAT_exemption_reason_text> + <xsl:attribute name="xr:id" select="'BT-120'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:VAT_exemption_reason_text> + </xsl:template> + <xsl:template mode="BT-121" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:ExemptionReasonCode"> + <xr:VAT_exemption_reason_code> + <xsl:attribute name="xr:id" select="'BT-121'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:VAT_exemption_reason_code> + </xsl:template> + <xsl:template mode="BG-24" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument der Instanz in konkreter Syntax wird auf 4 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-122" + select="./ram:IssuerAssignedID[following-sibling::ram:TypeCode='916']"/> + <xsl:apply-templates mode="BT-123" select="./ram:Name"/> + <xsl:apply-templates mode="BT-124" select="./ram:URIID"/> + <xsl:apply-templates mode="BT-125" select="./ram:AttachmentBinaryObject"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:ADDITIONAL_SUPPORTING_DOCUMENTS> + <xsl:attribute name="xr:id" select="'BG-24'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:ADDITIONAL_SUPPORTING_DOCUMENTS> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-122" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID[following-sibling::ram:TypeCode='916']"> + <xr:Supporting_document_reference> + <xsl:attribute name="xr:id" select="'BT-122'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="document_reference"/> + </xr:Supporting_document_reference> + </xsl:template> + <xsl:template mode="BT-123" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:Name"> + <xr:Supporting_document_description> + <xsl:attribute name="xr:id" select="'BT-123'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Supporting_document_description> + </xsl:template> + <xsl:template mode="BT-124" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:URIID"> + <xr:External_document_location> + <xsl:attribute name="xr:id" select="'BT-124'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:External_document_location> + </xsl:template> + <xsl:template mode="BT-125" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject"> + <xr:Attached_document> + <xsl:attribute name="xr:id" select="'BT-125'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="binary_object"/> + </xr:Attached_document> + </xsl:template> + <xsl:template mode="BG-25" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem der Instanz in konkreter Syntax wird auf 14 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-126" select="./ram:AssociatedDocumentLineDocument/ram:LineID"/> + <xsl:apply-templates mode="BT-127" + select="./ram:AssociatedDocumentLineDocument/ram:IncludedNote/ram:Content"/> + <xsl:apply-templates mode="BT-128" + select="./ram:SpecifiedLineTradeSettlement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID[following-sibling::ram:TypeCode='130']"/> + <xsl:apply-templates mode="BT-129" + select="./ram:SpecifiedLineTradeDelivery/ram:BilledQuantity"/> + <xsl:apply-templates mode="BT-130" + select="./ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode"/> + <xsl:apply-templates mode="BT-131" + select="./ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount"/> + <xsl:apply-templates mode="BT-132" + select="./ram:SpecifiedLineTradeAgreement/ram:BuyerOrderReferencedDocument/ram:LineID"/> + <xsl:apply-templates mode="BT-133" + select="./ram:SpecifiedLineTradeSettlement/ram:ReceivableSpecifiedTradeAccountingAccount/ram:ID"/> + <xsl:apply-templates mode="BG-26" + select="./ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod"/> + <xsl:apply-templates mode="BG-27" + select="./ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator='false']"/> + <xsl:apply-templates mode="BG-28" + select="./ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator='true']"/> + <xsl:apply-templates mode="BG-29" select="./ram:SpecifiedLineTradeAgreement"/> + <xsl:apply-templates mode="BG-30" + select="./ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax"/> + <xsl:apply-templates mode="BG-31" select="./ram:SpecifiedTradeProduct"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:INVOICE_LINE> + <xsl:attribute name="xr:id" select="'BG-25'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:INVOICE_LINE> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-126" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument/ram:LineID"> + <xr:Invoice_line_identifier> + <xsl:attribute name="xr:id" select="'BT-126'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Invoice_line_identifier> + </xsl:template> + <xsl:template mode="BT-127" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument/ram:IncludedNote/ram:Content"> + <xr:Invoice_line_note> + <xsl:attribute name="xr:id" select="'BT-127'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Invoice_line_note> + </xsl:template> + <xsl:template mode="BT-128" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID[following-sibling::ram:TypeCode='130']"> + <xr:Invoice_line_object_identifier> + <xsl:attribute name="xr:id" select="'BT-128'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"> + <xsl:with-param name="schemeID" select="following-sibling::ram:ReferenceTypeCode"/> + </xsl:call-template> + </xr:Invoice_line_object_identifier> + </xsl:template> + <xsl:template mode="BT-129" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity"> + <xr:Invoiced_quantity> + <xsl:attribute name="xr:id" select="'BT-129'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="quantity"/> + </xr:Invoiced_quantity> + </xsl:template> + <xsl:template mode="BT-130" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode"> + <xr:Invoiced_quantity_unit_of_measure_code> + <xsl:attribute name="xr:id" select="'BT-130'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Invoiced_quantity_unit_of_measure_code> + </xsl:template> + <xsl:template mode="BT-131" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount"> + <xr:Invoice_line_net_amount> + <xsl:attribute name="xr:id" select="'BT-131'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Invoice_line_net_amount> + </xsl:template> + <xsl:template mode="BT-132" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:BuyerOrderReferencedDocument/ram:LineID"> + <xr:Referenced_purchase_order_line_reference> + <xsl:attribute name="xr:id" select="'BT-132'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="document_reference"/> + </xr:Referenced_purchase_order_line_reference> + </xsl:template> + <xsl:template mode="BT-133" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ReceivableSpecifiedTradeAccountingAccount/ram:ID"> + <xr:Invoice_line_Buyer_accounting_reference> + <xsl:attribute name="xr:id" select="'BT-133'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Invoice_line_Buyer_accounting_reference> + </xsl:template> + <xsl:template mode="BG-26" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod der Instanz in konkreter Syntax wird auf 2 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-134" + select="./ram:StartDateTime/udt:DateTimeString[@format='102']"/> + <xsl:apply-templates mode="BT-135" + select="./ram:EndDateTime/udt:DateTimeString[@format='102']"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:INVOICE_LINE_PERIOD> + <xsl:attribute name="xr:id" select="'BG-26'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:INVOICE_LINE_PERIOD> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-134" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod/ram:StartDateTime/udt:DateTimeString[@format='102']"> + <xr:Invoice_line_period_start_date> + <xsl:attribute name="xr:id" select="'BT-134'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="date"/> + </xr:Invoice_line_period_start_date> + </xsl:template> + <xsl:template mode="BT-135" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod/ram:EndDateTime/udt:DateTimeString[@format='102']"> + <xr:Invoice_line_period_end_date> + <xsl:attribute name="xr:id" select="'BT-135'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="date"/> + </xr:Invoice_line_period_end_date> + </xsl:template> + <xsl:template mode="BG-27" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator='false']"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator='false'] der Instanz in konkreter Syntax wird auf 5 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-136" select="./ram:ActualAmount"/> + <xsl:apply-templates mode="BT-137" select="./ram:BasisAmount"/> + <xsl:apply-templates mode="BT-138" select="./ram:CalculationPercent"/> + <xsl:apply-templates mode="BT-139" select="./ram:Reason"/> + <xsl:apply-templates mode="BT-140" select="./ram:ReasonCode"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:INVOICE_LINE_ALLOWANCES> + <xsl:attribute name="xr:id" select="'BG-27'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:INVOICE_LINE_ALLOWANCES> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-136" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"> + <xr:Invoice_line_allowance_amount> + <xsl:attribute name="xr:id" select="'BT-136'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Invoice_line_allowance_amount> + </xsl:template> + <xsl:template mode="BT-137" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"> + <xr:Invoice_line_allowance_base_amount> + <xsl:attribute name="xr:id" select="'BT-137'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Invoice_line_allowance_base_amount> + </xsl:template> + <xsl:template mode="BT-138" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"> + <xr:Invoice_line_allowance_percentage> + <xsl:attribute name="xr:id" select="'BT-138'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="percentage"/> + </xr:Invoice_line_allowance_percentage> + </xsl:template> + <xsl:template mode="BT-139" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"> + <xr:Invoice_line_allowance_reason> + <xsl:attribute name="xr:id" select="'BT-139'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Invoice_line_allowance_reason> + </xsl:template> + <xsl:template mode="BT-140" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"> + <xr:Invoice_line_allowance_reason_code> + <xsl:attribute name="xr:id" select="'BT-140'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Invoice_line_allowance_reason_code> + </xsl:template> + <xsl:template mode="BG-28" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator='true']"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator='true'] der Instanz in konkreter Syntax wird auf 5 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-141" select="./ram:ActualAmount"/> + <xsl:apply-templates mode="BT-142" select="./ram:BasisAmount"/> + <xsl:apply-templates mode="BT-143" select="./ram:CalculationPercent"/> + <xsl:apply-templates mode="BT-144" select="./ram:Reason"/> + <xsl:apply-templates mode="BT-145" select="./ram:ReasonCode"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:INVOICE_LINE_CHARGES> + <xsl:attribute name="xr:id" select="'BG-28'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:INVOICE_LINE_CHARGES> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-141" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"> + <xr:Invoice_line_charge_amount> + <xsl:attribute name="xr:id" select="'BT-141'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Invoice_line_charge_amount> + </xsl:template> + <xsl:template mode="BT-142" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"> + <xr:Invoice_line_charge_base_amount> + <xsl:attribute name="xr:id" select="'BT-142'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="amount"/> + </xr:Invoice_line_charge_base_amount> + </xsl:template> + <xsl:template mode="BT-143" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"> + <xr:Invoice_line_charge_percentage> + <xsl:attribute name="xr:id" select="'BT-143'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="percentage"/> + </xr:Invoice_line_charge_percentage> + </xsl:template> + <xsl:template mode="BT-144" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"> + <xr:Invoice_line_charge_reason> + <xsl:attribute name="xr:id" select="'BT-144'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Invoice_line_charge_reason> + </xsl:template> + <xsl:template mode="BT-145" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"> + <xr:Invoice_line_charge_reason_code> + <xsl:attribute name="xr:id" select="'BT-145'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Invoice_line_charge_reason_code> + </xsl:template> + <xsl:template mode="BG-29" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement der Instanz in konkreter Syntax wird auf 5 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-146" select="./ram:NetPriceProductTradePrice/ram:ChargeAmount"/> + <xsl:apply-templates mode="BT-147" + select="./ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge/ram:ActualAmount"/> + <xsl:apply-templates mode="BT-148" + select="./ram:GrossPriceProductTradePrice/ram:ChargeAmount"/> + <xsl:apply-templates mode="BT-149" + select="./ram:NetPriceProductTradePrice/ram:BasisQuantity"/> + <xsl:apply-templates mode="BT-149" + select="./ram:GrossPriceProductTradePrice/ram:BasisQuantity"/> + <xsl:apply-templates mode="BT-150" + select="./ram:GrossPriceProductTradePrice/ram:BasisQuantity/@unitCode"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:PRICE_DETAILS> + <xsl:attribute name="xr:id" select="'BG-29'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:PRICE_DETAILS> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-146" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount"> + <xr:Item_net_price> + <xsl:attribute name="xr:id" select="'BT-146'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="unit_price_amount"/> + </xr:Item_net_price> + </xsl:template> + <xsl:template mode="BT-147" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge/ram:ActualAmount"> + <xr:Item_price_discount> + <xsl:attribute name="xr:id" select="'BT-147'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="unit_price_amount"/> + </xr:Item_price_discount> + </xsl:template> + <xsl:template mode="BT-148" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:ChargeAmount"> + <xr:Item_gross_price> + <xsl:attribute name="xr:id" select="'BT-148'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="unit_price_amount"/> + </xr:Item_gross_price> + </xsl:template> + <xsl:template mode="BT-149" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:BasisQuantity"> + <xr:Item_price_base_quantity> + <xsl:attribute name="xr:id" select="'BT-149'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="quantity"/> + </xr:Item_price_base_quantity> + </xsl:template> + <xsl:template mode="BT-149" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:BasisQuantity"> + <xr:Item_price_base_quantity> + <xsl:attribute name="xr:id" select="'BT-149'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="quantity"/> + </xr:Item_price_base_quantity> + </xsl:template> + <xsl:template mode="BT-150" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:BasisQuantity/@unitCode"> + <xr:Item_price_base_quantity_unit_of_measure> + <xsl:attribute name="xr:id" select="'BT-150'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Item_price_base_quantity_unit_of_measure> + </xsl:template> + <xsl:template mode="BG-30" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax der Instanz in konkreter Syntax wird auf 2 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-151" select="./ram:CategoryCode"/> + <xsl:apply-templates mode="BT-152" select="./ram:RateApplicablePercent"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:LINE_VAT_INFORMATION> + <xsl:attribute name="xr:id" select="'BG-30'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:LINE_VAT_INFORMATION> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-151" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCode"> + <xr:Invoiced_item_VAT_category_code> + <xsl:attribute name="xr:id" select="'BT-151'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Invoiced_item_VAT_category_code> + </xsl:template> + <xsl:template mode="BT-152" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:RateApplicablePercent"> + <xr:Invoiced_item_VAT_rate> + <xsl:attribute name="xr:id" select="'BT-152'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="percentage"/> + </xr:Invoiced_item_VAT_rate> + </xsl:template> + <xsl:template mode="BG-31" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct der Instanz in konkreter Syntax wird auf 8 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-153" select="./ram:Name"/> + <xsl:apply-templates mode="BT-154" select="./ram:Description"/> + <xsl:apply-templates mode="BT-155" select="./ram:SellerAssignedID"/> + <xsl:apply-templates mode="BT-156" select="./ram:BuyerAssignedID"/> + <xsl:apply-templates mode="BT-157" select="./ram:GlobalID"/> + <xsl:apply-templates mode="BT-158" + select="./ram:DesignatedProductClassification/ram:ClassCode"/> + <xsl:apply-templates mode="BT-159" select="./ram:OriginTradeCountry/ram:ID"/> + <xsl:apply-templates mode="BG-32" select="./ram:ApplicableProductCharacteristic"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:ITEM_INFORMATION> + <xsl:attribute name="xr:id" select="'BG-31'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:ITEM_INFORMATION> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-153" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:Name"> + <xr:Item_name> + <xsl:attribute name="xr:id" select="'BT-153'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Item_name> + </xsl:template> + <xsl:template mode="BT-154" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:Description"> + <xr:Item_description> + <xsl:attribute name="xr:id" select="'BT-154'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Item_description> + </xsl:template> + <xsl:template mode="BT-155" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:SellerAssignedID"> + <xr:Item_Sellers_identifier> + <xsl:attribute name="xr:id" select="'BT-155'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Item_Sellers_identifier> + </xsl:template> + <xsl:template mode="BT-156" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:BuyerAssignedID"> + <xr:Item_Buyers_identifier> + <xsl:attribute name="xr:id" select="'BT-156'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier"/> + </xr:Item_Buyers_identifier> + </xsl:template> + <xsl:template mode="BT-157" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:GlobalID"> + <xr:Item_standard_identifier> + <xsl:attribute name="xr:id" select="'BT-157'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme"/> + </xr:Item_standard_identifier> + </xsl:template> + <xsl:template mode="BT-158" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode"> + <xr:Item_classification_identifier> + <xsl:attribute name="xr:id" select="'BT-158'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="identifier-with-scheme-and-version"/> + </xr:Item_classification_identifier> + </xsl:template> + <xsl:template mode="BT-159" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:OriginTradeCountry/ram:ID"> + <xr:Item_country_of_origin> + <xsl:attribute name="xr:id" select="'BT-159'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="code"/> + </xr:Item_country_of_origin> + </xsl:template> + <xsl:template mode="BG-32" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic"> + <xsl:variable name="bg-contents" as="item()*"><!--Der Pfad /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic der Instanz in konkreter Syntax wird auf 2 Objekte der EN 16931 abgebildet. --> + <xsl:apply-templates mode="BT-160" select="./ram:Description"/> + <xsl:apply-templates mode="BT-161" select="./ram:Value"/> + </xsl:variable> + <xsl:if test="$bg-contents"> + <xr:ITEM_ATTRIBUTES> + <xsl:attribute name="xr:id" select="'BG-32'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:sequence select="$bg-contents"/> + </xr:ITEM_ATTRIBUTES> + </xsl:if> + </xsl:template> + <xsl:template mode="BT-160" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic/ram:Description"> + <xr:Item_attribute_name> + <xsl:attribute name="xr:id" select="'BT-160'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Item_attribute_name> + </xsl:template> + <xsl:template mode="BT-161" + match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic/ram:Value"> + <xr:Item_attribute_value> + <xsl:attribute name="xr:id" select="'BT-161'"/> + <xsl:attribute name="xr:src" select="xr:src-path(.)"/> + <xsl:call-template name="text"/> + </xr:Item_attribute_value> + </xsl:template> + <xsl:template name="text"> + <xsl:value-of select="."/> + </xsl:template> + <xsl:template name="date"> + <xsl:choose> + <xsl:when test="matches(normalize-space(.), '^[0-9]{8}$')"> + <xsl:value-of select="xs:date( concat(substring(.,1,4), '-', substring(.,5,2), '-', substring(.,7,2) ) )"/> + </xsl:when> + <xsl:otherwise>ILLEGAL DATE FORMAT: <para>Mit diesem Datentyp wird ein kalendarisches Datum abgebildet, wie es in der ISO 8601 Spezifikation <quote>Calendar date complete representation</quote> beschrieben ist (siehe ISO 8601:2004, Abschnitt 5.2.1.1). Das Datum beinhaltet keine Zeitangabe. Das konkret zu verwendende Format ist abhängig von der genutzten Syntax.</para> +<para>Der Datentyp basiert auf dem Typ <quote>Date Time. Type</quote>, wie in ISO 15000-5:2014 Anhang B definiert.</para></xsl:otherwise> + </xsl:choose> + </xsl:template> + <xsl:template name="identifier-with-scheme-and-version"> + <xsl:param name="schemeID" as="element()?"/> + <xsl:if test="@listID | @schemeID"> + <xsl:attribute name="scheme_identifier" select="($schemeID, @listID, @schemeID)[1]"/> + </xsl:if> + <xsl:if test="@schemeVersionID | @listVersionID"> + <xsl:attribute name="scheme_version_identifier" + select="(@listVersionID, @schemeVersionID)[1]"/> + </xsl:if> + <xsl:value-of select="."/> + </xsl:template> + <xsl:template name="identifier-with-scheme"> + <xsl:param name="schemeID" as="element()?"/> + <xsl:if test="@schemeID"> + <xsl:attribute name="scheme_identifier" select="($schemeID, @listID, @schemeID)[1]"/> + </xsl:if> + <xsl:value-of select="."/> + </xsl:template> + <xsl:template name="identifier"> + <xsl:value-of select="."/> + </xsl:template> + <xsl:template name="code"> + <xsl:value-of select="."/> + </xsl:template> + <xsl:template name="amount"> + <xsl:value-of select="."/> + </xsl:template> + <xsl:template name="percentage"> + <xsl:value-of select="."/> + </xsl:template> + <xsl:template name="binary_object"> + <xsl:if test="@mimeCode"> + <xsl:attribute name="mime_code"> + <xsl:value-of select="@mimeCode"/> + </xsl:attribute> + </xsl:if> + <xsl:if test="@filename"> + <xsl:attribute name="filename"> + <xsl:value-of select="@filename"/> + </xsl:attribute> + </xsl:if> + <xsl:value-of select="."/> + </xsl:template> + <xsl:template name="unit_price_amount"> + <xsl:value-of select="."/> + </xsl:template> + <xsl:template name="quantity"> + <xsl:value-of select="."/> + </xsl:template> + <xsl:template name="document_reference"> + <xsl:value-of select="."/> + </xsl:template> + <xd:doc> + <xd:desc> Liefert einen XPath-Pfad, welches $n eindeutig identifiziert. </xd:desc> + <xd:param name="n"/> + </xd:doc> + <xsl:function name="xr:src-path" as="xs:string"> + <xsl:param name="n" as="node()"/> + <xsl:variable name="segments" as="xs:string*"> + <xsl:apply-templates select="$n" mode="xr:src-path"/> + </xsl:variable> + <xsl:sequence select="string-join($segments, '')"/> + </xsl:function> + <xd:doc> + <xd:desc> Liefert einen XPath-Pfad, welches $n eindeutig identifiziert. </xd:desc> + <xd:param name="n"/> + </xd:doc> + <xsl:template match="node() | @*" mode="xr:src-path"> + <xsl:for-each select="ancestor-or-self::*"> + <xsl:text>/</xsl:text> + <xsl:value-of select="name(.)"/> + <xsl:if test="preceding-sibling::*[name(.) = name(current())] or following-sibling::*[name(.) = name(current())]"> + <xsl:text>[</xsl:text> + <xsl:value-of select="count(preceding-sibling::*[name(.) = name(current())]) + 1"/> + <xsl:text>]</xsl:text> + </xsl:if> + </xsl:for-each> + <xsl:if test="not(self::*)"> + <xsl:text/>/@<xsl:value-of select="name(.)"/> + </xsl:if> + </xsl:template> +</xsl:stylesheet> diff --git a/src/main/resources/stylesheets/xrechnung-html.xsl b/src/main/resources/stylesheets/xrechnung-html.xsl new file mode 100644 index 00000000..5e15f314 --- /dev/null +++ b/src/main/resources/stylesheets/xrechnung-html.xsl @@ -0,0 +1,1188 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="2.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:xr="urn:ce.eu:en16931:2017:xoev-de:kosit:standard:xrechnung-1" + xmlns:xrv="http://www.example.org/XRechnung-Viewer"> + + <xsl:output indent="yes" method="html" encoding="UTF-8" /> + + <xsl:decimal-format name="decimal" decimal-separator="," grouping-separator="." NaN="" /> + + + <!-- MAIN HTML --> + <xsl:template match="/xr:invoice"> + + <html lang="de"> + <head> + <meta charset="UTF-8"/> + <title>XRechnung + + + + +
+ +
+
+
+ + + + + +
+
+ + + +
+ + + +
+
Wir übernehmen keine Haftung für die Richtigkeit der Daten.
+
+
+ + + +
+ + + +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ +
+
+
+
+ + + +
+
Informationen zum Käufer
+
+
+
Leitweg-ID:
+
+
+
+
Name:
+
+
+
+
Straße / Hausnummer:
+
+
+
+
Postfach:
+
+
+
+
Adresszusatz:
+
+
+
+
PLZ:
+
+
+
+
Ort:
+
+
+
+
Land:
+
+
+
+
Kennung:
+
+
+
+
Schema der Kennung:
+
+
+
+
Name:
+
+
+
+
Telefon:
+
+
+
+
E-Mail-Adresse:
+
+
+
+
+
+ + + +
+
Informationen zum Verkäufer
+
+
+
Firmenname:
+
+
+
+
Straße / Hausnummer:
+
+
+
+
Postfach:
+
+
+
+
Adresszusatz:
+
+
+
+
PLZ:
+
+
+
+
Ort:
+
+
+
+
Bundesland:
+
+
+
+
Ländercode:
+
+
+
+
Kennung:
+
+
+
+
Schema der Kennung:
+
+
+
+
Name:
+
+
+
+
Telefon:
+
+
+
+
E-Mail-Adresse:
+
+
+
+
+
+ + + +
+
+
Rechnungsdaten
+
+
+
+
+
Rechnungsnummer:
+
+
+
+
Rechnungsdatum:
+
+
+
+
Rechnungsart:
+
+
+
+
Währung:
+
+
+
+

Abrechnungszeitraum:

+
+
+
von:
+
+
+
+
bis:
+
+
+
+
+
+
+
+
+
Projektnummer:
+
+
+
+
Vertragsnummer:
+
+
+
+
Bestellnummer:
+
+
+
+
Auftragsnummer:
+
+
+
+

Vorausgegangene Rechnungen:

+ +
+
+
+
+
+ + +
+
+
Rechnungsnummer:
+
+
+
+
Rechnungsdatum:
+
+
+
+
+ + + +
+
+
Gesamtbeträge der Rechnung
+
+
+
Summe aller Positionen
+
netto
+
+
+
+
Summe Nachlässe
+
netto
+
+
+
+
Summe Zuschläge
+
netto
+
+
+
+
Gesamtsumme
+
netto
+
+
+
+
Summe Umsatzsteuer
+
+
+
+
+
Summe Umsatzsteuer in Abrechnungswährung
+
+
+
+
+
Gesamtsumme
+
brutto
+
+
+
+
Gezahlter Betrag
+
brutto
+
+
+
+
Rundungsbetrag
+
brutto
+
+
+
+
Fälliger Betrag
+
brutto
+
+
+
+
+
+
+ + + +
+
+
Aufschlüsselung der Umsatzsteuer auf Ebene der Rechnung
+
+
+
Umsatzsteuerkategorie:
+
+
+
+
+
Gesamtsumme
+
netto
+
+
+
+
Umsatzsteuersatz
+
+
%
+
+
+
Umsatzsteuerbetrag
+
+
+
+
+ +
+
Befreiungsgrund:
+
Kennung für den Befreiungsgrund:
+
+
+
+
+ + + +
+
+
Nachlass auf Ebene der Rechnung
+
+
+
Umsatzsteuerkategorie des Nachlasses:
+
+
+
+
+
Grundbetrag
+
netto
+
+
+
+
Prozentsatz
+
+
%
+
+
+
Nachlass
+
netto
+
+
+
+
Umsatzsteuersatz des Nachlasses
+
+
+
+
+
+
Grund für den Nachlass:
+
Document level allowance reason code:
+
+
+
+
+
+ + + +
+
+
Zuschlag auf Ebene der Rechnung
+
+
+
Umsatzsteuerkategorie des Zuschlages:
+
+
+
+
+
Grundbetrag
+
netto
+
+
+
+
Prozentsatz
+
+
%
+
+
+
Zuschlag
+
netto
+
+
+
+
Umsatzsteuersatz des Zuschlages
+
+
+
+
+
+
Grund für den Zuschlag:
+
Document level charge reason code:
+
+
+
+
+
+ + + +
+
Zahlungsdaten
+
+
+
Skonto; weitere Zahlungsbedingungen:
+
+
+
+
Fälligkeitsdatum:
+
+
+
+
Code für das Zahlungsmittel:
+
+
+
+
Zahlungsmittel:
+
+
+
+
Verwendungszweck:
+
+
+
+
+
+ + + +
+
Karteninformation
+
+
+
Kartennummer:
+
+
+
+
Karteninhaber:
+
+
+
+
+
+ + + +
+
Lastschrift
+
+
+
Mandatsreferenznr.:
+
+
+
+
IBAN:
+
+
+
+
Gläubiger-ID:
+
+
+
+
+
+ + + +
+
Überweisung
+
+
+
Kontoinhaber:
+
+
+
+
IBAN:
+
+
+
+
BIC:
+
+
+
+
+
+ + + +
+
Bemerkung zur Rechnung
+
+
+
Betreff:
+
+
+
+
Bemerkung:
+
+
+
+
+
+ + + +
+
Wir übernehmen keine Haftung für die Richtigkeit der Daten.
+ +
+
+ + + +
+
+
+
Position
+
+
+
Freitext:
+
+
+
+
Objektkennung:
+
+
+
+
Schema der Objektkennung:
+
+
+
+
Nummer der Auftragsposition:
+
+
+
+
Kontierungshinweis:
+
+
+

Abrechnungszeitraum:

+
+
von:
+
+
+
+
bis:
+
+
+
+
+
+
Preiseinzelheiten
+
+
+
Menge
+
+
+
+
Einheit
+
+
+
+
Preis pro Einheit (netto)
+
+
+
+
Gesamtpreis (netto)
+
+
+
+
+
+
Rabatt (netto):
+
+
+
+
Listenpreis (netto):
+
+
+
+
Anzahl der Einheit:
+
+
+
+
Code der Maßeinheit:
+
+
+
+
Umsatzsteuer:
+
+
+
+
Umsatzsteuersatz in Prozent:
+
%
+
+
+
+
+
+
+
+
+
Nachlässe auf Ebene der Rechnungsposition
+
+
+
Grundbetrag (netto)
+
+
+
+
Prozentsatz
+
%
+
+
+
Nachlass (netto)
+
+
+
+
+
Grund des Nachlasses:
+
Code für den Nachlassgrund:
+
+
+
+
Zuschläge auf Ebene der Rechnungsposition
+
+
+
Grundbetrag (netto)
+
+
+
+
Prozentsatz
+
%
+
+
+
Zuschlag (netto)
+
+
+
+
+
Grund des Zuschlags:
+
Code für den Zuschlagsgrund:
+
+
+
+
+
+
+
+
Artikelinformationen
+
+
+
+
+
+
Bezeichnung:
+
+
+
+
Beschreibung:
+
+
+
+
Artikelnummer:
+
+
+
+
Artikelkennung des Käufers:
+
+
+

Eigenschaften des Artikels:

+ +
+
+
+
+
+
+
Artikelkennung:
+
+
+
+
Schema der Artikelkennung:
+
+
+
+
Code der Artikelklassifizierung:
+
+
+
+
Kennung zur Bildung des Schemas:
+
+
+
+
Version zur Bildung des Schemas:
+
+
+
+
Code des Herkunftslandes:
+
+
+
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+ + + +
+
Wir übernehmen keine Haftung für die Richtigkeit der Daten.
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+ + + +
+
Informationen zum Verkäufer
+
+
+
Abweichender Handelsname:
+
+
+
+
Bundesland:
+
+
+
+
Elektronische Adresse:
+
+
+
+
Schema der elektronischen Adresse:
+
+
+
+
Register-/Registriernummer:
+
+
+
+
Umsatzsteuer-ID:
+
+
+
+
Steuernummer:
+
+
+
+
Schema der Steuernummer:
+
+
+
+
Weitere rechtliche Informationen:
+
+
+
+
Code der Umsatzsteuerwährung:
+
+
+
+
+
+ + + +
+
Steuervertreter des Verkäufers
+
+
+
Name:
+
+
+
+
Straße / Hausnummer:
+
+
+
+
Postfach:
+
+
+
+
Adresszusatz:
+
+
+
+
PLZ:
+
+
+
+
Ort:
+
+
+
+
Bundesland:
+
+
+
+
Ländercode:
+
+
+
+
Umsatzsteuer-ID:
+
+
+
+
+
+ + + +
+
Informationen zum Käufer
+
+
+
Abweichender Handelsname:
+
+
+
+
Bundesland:
+
+
+
+
Elektronische Adresse:
+
+
+
+
Schema der elektronischen Adresse:
+
+
+
+
Register-/Registriernummer:
+
+
+
+
Schema der Register-/Registriernummer:
+
+
+
+
Umsatzsteuer-ID:
+
+
+
+
Abrechnungsdatum der Umsatzsteuer:
+
+
+
+
Code des Umsatzsteuer-Abrechnungsdatums:
+
+
+
+
Kontierungsinformation:
+
+
+
+
+
+ + + +
+
Lieferinformationen
+
+
+
Kennung des Lieferorts:
+
+
+
+
Schema der Kennung:
+
+
+
+
Lieferdatum:
+
+
+
+
Name des Empfängers:
+
+
+
+
Straße / Hausnummer:
+
+
+
+
Postfach:
+
+
+
+
Adresszusatz:
+
+
+
+
PLZ:
+
+
+
+
Ort:
+
+
+
+
Bundesland:
+
+
+
+
Land:
+
+
+
+
+
+ + + +
+
Informationen zum Vertrag
+
+
+
Vergabenummer:
+
+
+
+
Kennung der Empfangsbestätigung:
+
+
+
+
Kennung der Versandanzeige:
+
+
+
+
Prozesskennung:
+
+
+
+
Spezifikationskennung:
+
+
+
+
Objektkennung:
+
+
+
+
Schema der Objektkennung:
+
+
+
+
+
+ + + +
+
Vom Verkäufer abweichender Zahlungsempfänger
+
+
+
Name:
+
+
+
+
Kennung:
+
+
+
+
Schema der Kennung:
+
+
+
+
Register-/Registriernummer:
+
+
+
+
Schema der Register-/Registriernummer:
+
+
+
+
+
+ + + +
+
Wir übernehmen keine Haftung für die Richtigkeit der Daten.
+
+
+
+
Rechnungsbegründende Unterlagen
+ +
+
+
+
+
+ + + +
+
+
Kennung:
+
+
+
+
Beschreibung:
+
+
+
+
Verweis (z.B. Internetadresse):
+
+
+
+
Anhangsdokument:
+
+ Öffnen +
+ + +
+
+
Format des Anhangdokuments:
+
+
+
+
Name des Anhangsdokuments:
+
+
+
+
+ + + +
+
+
+
+
Bearbeitungshistorie
+ +
+
+
+
+
+ + + +
+
+
Datum/Uhrzeit:
+
+
+
+
Betreff:
+
+
+
+
Text:
+
+
+
+
Details:
+
+
+
+
+ +
diff --git a/src/test/resources/MustangGnuaccountingBeispielRE-20190610_507blanko.pdf b/src/test/resources/MustangGnuaccountingBeispielRE-20190610_507blanko.pdf new file mode 100644 index 00000000..9c4ae558 Binary files /dev/null and b/src/test/resources/MustangGnuaccountingBeispielRE-20190610_507blanko.pdf differ