From 5dbb3a72cca95e072be9392d01c3d3a88d2c67b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20Sta=CC=88rk?= Date: Thu, 11 Jun 2020 15:22:40 +0200 Subject: [PATCH] first attempt to remove jaxb from zfv1 --- library/pom.xml | 56 +- .../ZUGFeRD/ZUGFeRD1PullProvider.java | 637 +++- .../ZUGFeRD/ZUGFeRDExporter.java | 1 + .../ZUGFeRDTransactionModelConverter.java | 1263 ------- .../ZUGFeRD/model/NoteTypeConstants.java | 27 - .../model/PaymentMeansCodeTypeConstants.java | 31 - .../ZUGFeRD/model/QuantityTypeConstants.java | 43 - .../model/TaxRegistrationTypeConstants.java | 24 - .../model/TaxTypeCodeTypeConstants.java | 25 - .../model/ZFNamespacePrefixMapper.java | 49 - .../src/main/resources/schema/ZUGFeRD1p0.xsd | 23 - ...act_data_standard_QualifiedDataType_12.xsd | 77 - ...eAggregateBusinessInformationEntity_12.xsd | 391 --- ...t_data_standard_UnqualifiedDataType_15.xsd | 95 - .../stylesheets/ZUGFeRD_1p0_c1p0_s1p0.xslt | 3008 ----------------- .../ZUGFeRD/ResourceUtilities.java | 2 +- .../ZUGFeRDTransactionModelConverterTest.java | 173 - .../ZUGFeRD/ZUGFeRDXMLAssert.java | 56 - log/ZUV-2019-12.log | 9 - log/ZUV-2020-01.log | 54 - log/ZUV-2020-02.log | 154 - 21 files changed, 586 insertions(+), 5612 deletions(-) delete mode 100644 library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverter.java delete mode 100644 library/src/main/java/org/mustangproject/ZUGFeRD/model/NoteTypeConstants.java delete mode 100644 library/src/main/java/org/mustangproject/ZUGFeRD/model/PaymentMeansCodeTypeConstants.java delete mode 100644 library/src/main/java/org/mustangproject/ZUGFeRD/model/QuantityTypeConstants.java delete mode 100644 library/src/main/java/org/mustangproject/ZUGFeRD/model/TaxRegistrationTypeConstants.java delete mode 100644 library/src/main/java/org/mustangproject/ZUGFeRD/model/TaxTypeCodeTypeConstants.java delete mode 100644 library/src/main/java/org/mustangproject/ZUGFeRD/model/ZFNamespacePrefixMapper.java delete mode 100644 library/src/main/resources/schema/ZUGFeRD1p0.xsd delete mode 100644 library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_QualifiedDataType_12.xsd delete mode 100644 library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_12.xsd delete mode 100644 library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd delete mode 100644 library/src/main/resources/stylesheets/ZUGFeRD_1p0_c1p0_s1p0.xslt delete mode 100644 library/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverterTest.java delete mode 100644 library/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDXMLAssert.java delete mode 100644 log/ZUV-2019-12.log delete mode 100644 log/ZUV-2020-01.log delete mode 100644 log/ZUV-2020-02.log diff --git a/library/pom.xml b/library/pom.xml index c42c3b97f..b70b04e96 100644 --- a/library/pom.xml +++ b/library/pom.xml @@ -11,8 +11,8 @@ library 2.0.0-SNAPSHOT jar - Library to write and read FacturX 1.0 and ZUGFeRD 1.0 and 2.1 e-invoices. A PDF/A file is required, the XML can be generated or provided. - The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs + Library to write and read FacturX and ZUGFeRD e-invoices. + The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs. To write files, a provided PDF/A will be combined with generated or provided XML. http://www.mustangproject.org/ @@ -56,26 +56,6 @@ Saxon-HE 9.8.0-11 - - com.sun.xml.bind - jaxb-impl - 2.2.11 - - - com.sun.xml.bind - jaxb-core - 2.2.11 - - - org.glassfish.jaxb - jaxb-runtime - 2.2.11 - - - javax.xml.bind - jaxb-api - 2.3.0 - javax.activation activation @@ -246,18 +226,6 @@ ** - - com.sun.xml.bind:jaxb-impl - - ** - - - - com.sun.xml.bind:jaxb-core - - ** - - @@ -291,26 +259,6 @@ - - org.codehaus.mojo - jaxb2-maven-plugin - 2.5.0 - - - xjc - - xjc - - - - - 2.1 - org.mustangproject.ZUGFeRD.model - - src/main/resources/schema/ZUGFeRD1p0.xsd - - - diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD1PullProvider.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD1PullProvider.java index f8278a320..ecec99fb7 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD1PullProvider.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD1PullProvider.java @@ -18,102 +18,629 @@ *********************************************************************** */ package org.mustangproject.ZUGFeRD; -import org.mustangproject.ZUGFeRD.model.CrossIndustryDocumentType; -import org.mustangproject.ZUGFeRD.model.DocumentContextParameterTypeConstants; -import org.mustangproject.ZUGFeRD.model.ZFNamespacePrefixMapper; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.DocumentHelper; +import org.dom4j.io.OutputFormat; +import org.dom4j.io.XMLWriter; +import org.mustangproject.XMLTools; +import org.mustangproject.ZUGFeRD.*; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.StringWriter; +import java.io.UnsupportedEncodingException; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.logging.Level; +import java.util.logging.Logger; public class ZUGFeRD1PullProvider implements IXMLProvider, IProfileProvider { + private class LineCalc { + private BigDecimal totalGross; + private BigDecimal priceGross; + private BigDecimal itemTotalNetAmount; + private BigDecimal itemTotalVATAmount; - protected byte[] zugferdData; - private Marshaller marshaller; + public LineCalc(IZUGFeRDExportableItem currentItem) { + BigDecimal multiplicator = currentItem.getProduct().getVATPercent().divide(new BigDecimal(100)) + .add(new BigDecimal(1)); + priceGross = currentItem.getPrice().multiply(multiplicator); + totalGross = currentItem.getQuantity().multiply(currentItem.getPrice()).divide(currentItem.getBasisQuantity()) + .multiply(multiplicator); + itemTotalNetAmount = currentItem.getQuantity().multiply(currentItem.getPrice()).divide(currentItem.getBasisQuantity()) + .setScale(2, BigDecimal.ROUND_HALF_UP); + itemTotalVATAmount = totalGross.subtract(itemTotalNetAmount); + } - private boolean isTest; - private ZUGFeRDConformanceLevel level; + public BigDecimal getItemTotalNetAmount() { + return itemTotalNetAmount; + } + public BigDecimal getItemTotalVATAmount() { + return itemTotalVATAmount; + } - public void setProfile(ZUGFeRDConformanceLevel level) { - this.level = level; - } + public BigDecimal getItemTotalGrossAmount() { + return itemTotalVATAmount; + } - public String getProfile() { - switch (level) { - case BASIC: return DocumentContextParameterTypeConstants.BASIC; - case COMFORT: return DocumentContextParameterTypeConstants.COMFORT; - default: return DocumentContextParameterTypeConstants.EXTENDED; + public BigDecimal getPriceGross() { + return priceGross; } + } + //// MAIN CLASS + + protected byte[] zugferdData; + private IZUGFeRDExportableTransaction trans; + private ZUGFeRDConformanceLevel level; + private String paymentTermsDescription; + + @Override + public void setProfile(ZUGFeRDConformanceLevel level) { + this.level = level; + } /** * enables the flag to indicate a test invoice in the XML structure */ + @Override public void setTest() { - isTest = true; } - public ZUGFeRD1PullProvider() { - // TODO Auto-generated constructor stub + public static String nDigitFormat(BigDecimal value, int scale) { + /* + * I needed 123,45, locale independent.I tried + * NumberFormat.getCurrencyInstance().format( 12345.6789 ); but that is locale + * specific.I also tried DecimalFormat df = new DecimalFormat( "0,00" ); + * df.setDecimalSeparatorAlwaysShown(true); df.setGroupingUsed(false); + * DecimalFormatSymbols symbols = new DecimalFormatSymbols(); + * symbols.setDecimalSeparator(','); symbols.setGroupingSeparator(' '); + * df.setDecimalFormatSymbols(symbols); + * + * but that would not switch off grouping. Although I liked very much the + * (incomplete) "BNF diagram" in + * http://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html in the + * end I decided to calculate myself and take eur+sparator+cents + * + */ + return value.setScale(scale, RoundingMode.HALF_UP).toPlainString(); + + } + + private String vatFormat(BigDecimal value) { + return ZUGFeRD1PullProvider.nDigitFormat(value, 2); + } + + private String currencyFormat(BigDecimal value) { + return ZUGFeRD1PullProvider.nDigitFormat(value, 2); + } + + private String priceFormat(BigDecimal value) { + return ZUGFeRD1PullProvider.nDigitFormat(value, 4); + } + + private String quantityFormat(BigDecimal value) { + return ZUGFeRD1PullProvider.nDigitFormat(value, 4); + } + + @Override + public byte[] getXML() { + + byte[] res = zugferdData; + + StringWriter sw = new StringWriter(); + Document document = null; + try { + document = DocumentHelper.parseText(new String(zugferdData)); + } catch (DocumentException e1) { + Logger.getLogger(ZUGFeRD1PullProvider.class.getName()).log(Level.SEVERE, null, e1); + } try { - marshaller = JAXBContext.newInstance("org.mustangproject.ZUGFeRD.model").createMarshaller(); - marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8"); - marshaller.setProperty("com.sun.xml.bind.namespacePrefixMapper", new ZFNamespacePrefixMapper()); - } catch (JAXBException e) { - throw new ZUGFeRDExportException("Could not initialize JAXB", e); + OutputFormat format = OutputFormat.createPrettyPrint(); + XMLWriter writer = new XMLWriter(sw, format); + writer.write(document); + res = sw.toString().getBytes("UTF-8"); + + } catch (IOException e) { + Logger.getLogger(ZUGFeRD1PullProvider.class.getName()).log(Level.SEVERE, null, e); } + return res; + } - private String createZugferdXMLForTransaction(IZUGFeRDExportableTransaction trans) { + private BigDecimal getTotalPrepaid() { + if (trans.getTotalPrepaidAmount() == null) { + return new BigDecimal(0); + } else { + return trans.getTotalPrepaidAmount(); + } + } - JAXBElement jaxElement = - new ZUGFeRDTransactionModelConverter(trans).withTest(isTest).withProfile(getProfile()).convertToModel(); + private BigDecimal getTotalGross() { - try { - return marshalJaxToXMLString(jaxElement); - } catch (JAXBException e) { - throw new ZUGFeRDExportException("Could not marshal ZUGFeRD transaction to XML", e); + BigDecimal res = getTotal(); + HashMap VATPercentAmountMap = getVATPercentAmountMap(); + for (BigDecimal currentTaxPercent : VATPercentAmountMap.keySet()) { + VATAmount amount = VATPercentAmountMap.get(currentTaxPercent); + res = res.add(amount.getCalculated()); } + return res; } - private String marshalJaxToXMLString(Object jaxElement) throws JAXBException { - ByteArrayOutputStream outputXml = new ByteArrayOutputStream(); - marshaller.marshal(jaxElement, outputXml); - return outputXml.toString(); + private BigDecimal getTotal() { + BigDecimal res = new BigDecimal(0); + for (IZUGFeRDExportableItem currentItem : trans.getZFItems()) { + LineCalc lc = new LineCalc(currentItem); + res = res.add(lc.getItemTotalNetAmount()); + } + return res; } + /** + * which taxes have been used with which amounts in this transaction, empty for + * no taxes, or e.g. 19=>190 and 7=>14 if 1000 Eur were applicable to 19% VAT + * (=>190 EUR VAT) and 200 EUR were applicable to 7% (=>14 EUR VAT) 190 Eur + * + * @return which taxes have been used with which amounts in this invoice + */ + private HashMap getVATPercentAmountMap() { + HashMap hm = new HashMap<>(); + + for (IZUGFeRDExportableItem currentItem : trans.getZFItems()) { + BigDecimal percent = currentItem.getProduct().getVATPercent(); + LineCalc lc = new LineCalc(currentItem); + VATAmount itemVATAmount = new VATAmount(lc.getItemTotalNetAmount(), lc.getItemTotalVATAmount(), + trans.getDocumentCode()); + VATAmount current = hm.get(percent); + if (current == null) { + hm.put(percent, itemVATAmount); + } else { + hm.put(percent, current.add(itemVATAmount)); + } + } + return hm; + } @Override - public byte[] getXML() { - return zugferdData; + public String getProfile() { + return "urn:ferd:CrossIndustryDocument:invoice:1p0:comfort"; } + protected String getContactAsXML(IZUGFeRDExportableContact contact) { + String xml = " " + XMLTools.encodeXML(contact.getName()) + "\n" //$NON-NLS-2$ + // + " \n" + // + " xxx\n" + // + " \n" + + " \n" + + " " + XMLTools.encodeXML(contact.getZIP()) + + "\n" + + " " + XMLTools.encodeXML(contact.getStreet()) + + "\n"; + if (trans.getRecipient().getAdditionalAddress() != null) { + xml += " " + XMLTools.encodeXML(contact.getAdditionalAddress()) + + "\n"; + } + xml += " " + XMLTools.encodeXML(contact.getLocation()) + + "\n" + + " " + XMLTools.encodeXML(contact.getCountry()) + + "\n" + + " \n"; + if (contact.getVATID() != null) { + xml += " \n" + + " " + XMLTools.encodeXML(contact.getVATID()) + + "\n" + + " \n"; + } + return xml; + + } @Override public void generateXML(IZUGFeRDExportableTransaction trans) { - // create a dummy file stream, this would probably normally be a - // FileInputStream - - byte[] zugferdRaw = createZugferdXMLForTransaction(trans).getBytes(); //$NON-NLS-1$ - - if ((zugferdRaw[0] == (byte) 0xEF) - && (zugferdRaw[1] == (byte) 0xBB) - && (zugferdRaw[2] == (byte) 0xBF)) { - // I don't like BOMs, lets remove it - zugferdData = new byte[zugferdRaw.length - 3]; - System.arraycopy(zugferdRaw, 3, zugferdData, 0, - zugferdRaw.length - 3); + this.trans = trans; + + boolean hasDueDate=false; + String taxCategoryCode=""; + SimpleDateFormat germanDateFormat = new SimpleDateFormat("dd.MM.yyyy"); + SimpleDateFormat zugferdDateFormat = new SimpleDateFormat("yyyyMMdd"); + String exemptionReason=""; + + if (trans.getPaymentTermDescription()!=null) { + paymentTermsDescription=trans.getPaymentTermDescription(); + } + + if (paymentTermsDescription==null) { + paymentTermsDescription= "Zahlbar ohne Abzug bis " + germanDateFormat.format(trans.getDueDate()); + + } + + String senderReg = ""; + if (trans.getOwnOrganisationFullPlaintextInfo() != null) { + senderReg = "" + "\n" + " \n" + + XMLTools.encodeXML(trans.getOwnOrganisationFullPlaintextInfo()) + " \n" + + "REG\n" + "\n"; + + } + + String rebateAgreement = ""; + if (trans.rebateAgreementExists()) { + rebateAgreement = "\n" + " " + + "Es bestehen Rabatt- und Bonusvereinbarungen.\n" + + "AAK\n" + "\n"; + } + + String subjectNote = ""; + if (trans.getSubjectNote()!=null) { + subjectNote = "\n" + " " + + XMLTools.encodeXML(trans.getSubjectNote())+ "\n" + + "\n"; + } + + String xml = "\n" + + + "\n" + + " \n" + // + " + // "+testBooleanStr+"\n" + // + + " \n" + + " " + getProfile() + "\n" + + " \n" + + " \n" + + " \n" + + " " + XMLTools.encodeXML(trans.getNumber()) + "\n" //$NON-NLS-2$ + + " RECHNUNG\n" + + " 380\n" + + " " + + zugferdDateFormat.format(trans.getIssueDate()) + "\n" // date + // format + // was + // 20130605 + + subjectNote + + rebateAgreement + + senderReg + + + " \n" + + " \n"; + int lineID = 0; + for (IZUGFeRDExportableItem currentItem : trans.getZFItems()) { + lineID++; + taxCategoryCode=currentItem.getProduct().getTaxCategoryCode(); + if (currentItem.getProduct().getTaxExemptionReason() != null) { + exemptionReason="" + XMLTools.encodeXML(currentItem.getProduct().getTaxExemptionReason()) + ""; + } + + LineCalc lc = new LineCalc(currentItem); + xml = xml + " \n" + + " \n" + + " " + lineID + "\n" //$NON-NLS-2$ + + " \n" + + " \n" + + " \n" + + " " + priceFormat(lc.getPriceGross()) + + "\n" + + " " + quantityFormat(currentItem.getBasisQuantity()) +"\n" + // + " \n" + // + " false\n" + // + " 0.6667\n" + // + " Rabatt\n" + // + " \n" + + " \n" + + " \n" + + " " + priceFormat(currentItem.getPrice()) + + "\n" + + " " + quantityFormat(currentItem.getBasisQuantity()) +"\n" + + " \n" + + " \n" + + + + " \n" + + " " //$NON-NLS-2$ + + quantityFormat(currentItem.getQuantity()) + "\n" + + " \n" + + " \n" + + " \n" + + " VAT\n" + + exemptionReason + + " "+currentItem.getProduct().getTaxCategoryCode()+"\n" + + + " " + + vatFormat(currentItem.getProduct().getVATPercent()) + "\n" + + " \n" + + " \n" + + " " + currencyFormat(lc.getItemTotalNetAmount()) + + "\n" + + " \n"; + if (currentItem.getAdditionalReferencedDocumentID()!=null) { + xml=xml + " "+currentItem.getAdditionalReferencedDocumentID()+"130\n"; + + } + xml=xml + " \n" + + " \n"; + // + " 4012345001235\n" + if (currentItem.getProduct().getSellerAssignedID() != null) { + xml = xml + " " + + XMLTools.encodeXML(currentItem.getProduct().getSellerAssignedID()) + "\n"; + } + if (currentItem.getProduct().getBuyerAssignedID() != null) { + xml = xml + " " + + XMLTools.encodeXML(currentItem.getProduct().getBuyerAssignedID()) + "\n"; + } + xml = xml + " " + XMLTools.encodeXML(currentItem.getProduct().getName()) + "\n" //$NON-NLS-2$ + + " " + XMLTools.encodeXML(currentItem.getProduct().getDescription()) + + "\n" + + " \n" + + + " \n"; + + } + + xml = xml + " \n"; + if (trans.getReferenceNumber() != null) { + xml = xml + " " + XMLTools.encodeXML(trans.getReferenceNumber()) + "\n"; + + } + xml = xml + " \n"; + if (trans.getOwnForeignOrganisationID()!=null) { + xml = xml + " " + XMLTools.encodeXML(trans.getOwnForeignOrganisationID()) + "\n"; + } + + if ((trans.getOwnContact()!=null)&&(trans.getOwnContact().getGlobalID()!=null)&&(trans.getOwnContact().getGlobalIDScheme()!=null)) { + xml = xml + " " + + XMLTools.encodeXML(trans.getOwnContact().getGlobalID()) + "\n"; + } + xml = xml + " " + XMLTools.encodeXML(trans.getOwnOrganisationName()) + "\n"; //$NON-NLS-2$ + + if ((trans.getOwnVATID()!=null)&&(trans.getOwnOrganisationName()!=null)) { + + xml = xml + " \n" + " " + + XMLTools.encodeXML(trans.getOwnVATID()) + "\n" + + " "; + } + + if (trans.getOwnContact() != null) { + xml = xml + "\n" + " " + XMLTools.encodeXML(trans.getOwnContact().getName()) + + "\n"; + if (trans.getOwnContact().getPhone() != null) { + + xml = xml + " \n" + " " + + XMLTools.encodeXML(trans.getOwnContact().getPhone()) + "\n" + + " \n"; + } + if (trans.getOwnContact().getEMail() != null) { + + xml = xml + " \n" + " " + + XMLTools.encodeXML(trans.getOwnContact().getEMail()) + "\n" + + " \n"; + } + xml = xml + " "; + + } + + xml = xml + " \n" + " " + + XMLTools.encodeXML(trans.getOwnZIP()) + "\n" + " " + + XMLTools.encodeXML(trans.getOwnStreet()) + "\n" + " " + XMLTools.encodeXML(trans.getOwnLocation()) + + "\n" + " " + XMLTools.encodeXML(trans.getOwnCountry()) + + "\n" + " \n" + + " \n" + + " " + XMLTools.encodeXML(trans.getOwnTaxID()) + "\n" //$NON-NLS-2$ + + " \n" + + " \n" + + " " + XMLTools.encodeXML(trans.getOwnVATID()) + "\n" //$NON-NLS-2$ + + " \n" + + " \n" + + " \n"; + // + " GE2020211\n" + // + " 4000001987658\n" + + xml+=getContactAsXML(trans.getRecipient()); + xml += " \n"; + + if (trans.getBuyerOrderReferencedDocumentID()!=null) { + xml = xml + " \n" + + " " + + XMLTools.encodeXML(trans.getBuyerOrderReferencedDocumentID()) + "\n" + + " \n"; + } + xml = xml + " \n" + + " \n" ; + if (this.trans.getDeliveryAddress()!=null) { + xml += ""+ + getContactAsXML(this.trans.getDeliveryAddress())+ + ""; + } + + xml+= " \n" + + " "; + + if (trans.getZFDeliveryDate() != null) { + ZUGFeRDDateFormat dateFormat = trans.getZFDeliveryDate().getFormat(); + Date date = trans.getZFDeliveryDate().getDate(); + xml += "" + + dateFormat.getFormatter().format(date) + ""; + } else if (trans.getDeliveryDate() != null) { + xml += "" + zugferdDateFormat.format(trans.getDeliveryDate()) + + ""; + } else { + throw new IllegalStateException("No delivery date provided"); + } + xml += "\n"; + xml += " \n" + /* + * + " \n" + + * " 20130603\n" + + * " 2013-51112\n" + + * " \n" + */ + + " \n" + " \n" //$NON-NLS-2$ + + " " + XMLTools.encodeXML(trans.getNumber()) + "\n" //$NON-NLS-2$ + + " " + trans.getCurrency() + "\n"; + + if (trans.getTradeSettlementPayment()!=null) { + for (IZUGFeRDTradeSettlementPayment payment : trans.getTradeSettlementPayment()) { + if(payment!=null) { + hasDueDate=true; + xml+=payment.getSettlementXML(); + } + } + } + if (trans.getTradeSettlement()!=null) { + for (IZUGFeRDTradeSettlement payment : trans.getTradeSettlement()) { + if(payment!=null) { + if (payment instanceof IZUGFeRDTradeSettlementPayment) { + hasDueDate=true; + } + xml+=payment.getSettlementXML(); + } + } + } + + HashMap VATPercentAmountMap = getVATPercentAmountMap(); + for (BigDecimal currentTaxPercent : VATPercentAmountMap.keySet()) { + VATAmount amount = VATPercentAmountMap.get(currentTaxPercent); + if (amount != null) { + xml += " \n" + + " " + currencyFormat(amount.getCalculated()) + + "\n" //currencyID=\"EUR\" + + " VAT\n" + + exemptionReason + + " " + currencyFormat(amount.getBasis()) + "\n" // currencyID=\"EUR\" + + " "+taxCategoryCode+"\n" + + " " + vatFormat(currentTaxPercent) + + "\n" + " \n"; //$NON-NLS-2$ + + } + } + + if (trans.getPaymentTerms() == null) { + xml = xml + " \n" + + " " + paymentTermsDescription + "\n"; + + if (trans.getTradeSettlement() != null) { + for (IZUGFeRDTradeSettlement payment : trans.getTradeSettlement()) { + if ((payment != null) && (payment instanceof IZUGFeRDTradeSettlementDebit)) { + xml += payment.getPaymentXML(); + } + } + } + + if (hasDueDate && (trans.getDueDate()!=null)) { + xml = xml + " " // $NON-NLS-2$ + + zugferdDateFormat.format(trans.getDueDate()) + + "\n";// 20130704 + + } + xml = xml + " \n"; } else { - zugferdData = zugferdRaw; + xml = xml + buildPaymentTermsXml(); } + + xml = xml + " \n" + + " " + currencyFormat(getTotal()) + "\n" //$NON-NLS-2$ + // currencyID=\"EUR\" + + " 0.00\n" // currencyID=\"EUR\" + + " 0.00\n" // + // currencyID=\"EUR\" + // + " 5.80\n" + // + " 14.73\n" + + " " + currencyFormat(getTotal()) + "\n" //$NON-NLS-2$ + // // + // currencyID=\"EUR\" + + " " + + currencyFormat(getTotalGross().subtract(getTotal())) + "\n" + + " " + currencyFormat(getTotalGross()) + "\n" //$NON-NLS-2$ + // // + // currencyID=\"EUR\" + + " " + currencyFormat(getTotalPrepaid()) + "\n" + + " " + currencyFormat(getTotalGross().subtract(getTotalPrepaid())) + "\n" //$NON-NLS-2$ + // // + // currencyID=\"EUR\" + + " \n" + + " \n"; + // + " \n" + // + " \n" + // + " \n" + // + " Wir erlauben uns Ihnen folgende Positionen aus der Lieferung Nr. + // 2013-51112 in Rechnung zu stellen:\n" + // + " \n" + // + " \n" + // + " \n"; + + xml = xml + " \n" + + ""; + + byte[] zugferdRaw; + try { + zugferdRaw = xml.getBytes("UTF-8"); + + if ((zugferdRaw[0] == (byte) 0xEF) && (zugferdRaw[1] == (byte) 0xBB) && (zugferdRaw[2] == (byte) 0xBF)) { + // I don't like BOMs, lets remove it + zugferdData = new byte[zugferdRaw.length - 3]; + System.arraycopy(zugferdRaw, 3, zugferdData, 0, zugferdRaw.length - 3); + } else { + zugferdData = zugferdRaw; + } + } catch (UnsupportedEncodingException e) { + Logger.getLogger(ZUGFeRD1PullProvider.class.getName()).log(Level.SEVERE, null, e); + } // $NON-NLS-1$ } + private String buildPaymentTermsXml() { + String paymentTermsXml = ""; + + IZUGFeRDPaymentTerms paymentTerms = trans.getPaymentTerms(); + IZUGFeRDPaymentDiscountTerms discountTerms = paymentTerms.getDiscountTerms(); + IZUGFeRDDate dueDate = paymentTerms.getDueDate(); + if (dueDate != null && discountTerms != null && discountTerms.getBaseDate() != null) { + throw new IllegalStateException( + "if paymentTerms.dueDate is specified, paymentTerms.discountTerms.baseDate has not to be specified"); + } + paymentTermsXml += "" + paymentTerms.getDescription() + ""; + if (dueDate != null) { + paymentTermsXml += ""; + paymentTermsXml += "" + + dueDate.getFormat().getFormatter().format(dueDate.getDate()) + ""; + paymentTermsXml += ""; + } + + if (discountTerms != null) { + paymentTermsXml += ""; + String currency = trans.getCurrency(); + String basisAmount = currencyFormat(getTotalGross()); + paymentTermsXml += "" + basisAmount + ""; + paymentTermsXml += "" + discountTerms.getCalculationPercentage().toString() + + ""; + + if (discountTerms.getBaseDate() != null) { + Date baseDate = discountTerms.getBaseDate().getDate(); + ZUGFeRDDateFormat baseDateFormat = discountTerms.getBaseDate().getFormat(); + paymentTermsXml += ""; + paymentTermsXml += "" + baseDateFormat.getFormatter().format(baseDate) + ""; + paymentTermsXml += ""; + + paymentTermsXml += "" + + discountTerms.getBasePeriodMeasure() + ""; + } + + paymentTermsXml += ""; + } + + paymentTermsXml += ""; + return paymentTermsXml; + } } diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporter.java index 7d5db9acd..2d31038a0 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporter.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporter.java @@ -192,6 +192,7 @@ public String getFilenameForVersion(int ver) { public void setZUGFeRDVersion(int ver) { if (ver == 1) { ZUGFeRD1PullProvider z1p = new ZUGFeRD1PullProvider(); + disableFacturX(); this.xmlProvider = z1p; } else if (ver == 2) { ZUGFeRD2PullProvider z2p = new ZUGFeRD2PullProvider(); diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverter.java deleted file mode 100644 index b89f17de0..000000000 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverter.java +++ /dev/null @@ -1,1263 +0,0 @@ -/** ********************************************************************** - * - * 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 java.math.BigDecimal; -import java.math.RoundingMode; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; - -import javax.xml.bind.JAXBElement; - -import org.mustangproject.ZUGFeRD.model.AmountType; -import org.mustangproject.ZUGFeRD.model.CodeType; -import org.mustangproject.ZUGFeRD.model.CountryIDType; -import org.mustangproject.ZUGFeRD.model.CreditorFinancialAccountType; -import org.mustangproject.ZUGFeRD.model.CreditorFinancialInstitutionType; -import org.mustangproject.ZUGFeRD.model.CrossIndustryDocumentType; -import org.mustangproject.ZUGFeRD.model.DateTimeType; -import org.mustangproject.ZUGFeRD.model.DateTimeTypeConstants; -import org.mustangproject.ZUGFeRD.model.DocumentCodeType; -import org.mustangproject.ZUGFeRD.model.DocumentContextParameterType; -import org.mustangproject.ZUGFeRD.model.DocumentLineDocumentType; -import org.mustangproject.ZUGFeRD.model.ExchangedDocumentContextType; -import org.mustangproject.ZUGFeRD.model.ExchangedDocumentType; -import org.mustangproject.ZUGFeRD.model.IDType; -import org.mustangproject.ZUGFeRD.model.IndicatorType; -import org.mustangproject.ZUGFeRD.model.LogisticsServiceChargeType; -import org.mustangproject.ZUGFeRD.model.MeasureType; -import org.mustangproject.ZUGFeRD.model.NoteType; -import org.mustangproject.ZUGFeRD.model.NoteTypeConstants; -import org.mustangproject.ZUGFeRD.model.ObjectFactory; -import org.mustangproject.ZUGFeRD.model.PaymentMeansCodeType; -import org.mustangproject.ZUGFeRD.model.PaymentMeansCodeTypeConstants; -import org.mustangproject.ZUGFeRD.model.PercentType; -import org.mustangproject.ZUGFeRD.model.QuantityType; -import org.mustangproject.ZUGFeRD.model.ReferencedDocumentType; -import org.mustangproject.ZUGFeRD.model.SupplyChainEventType; -import org.mustangproject.ZUGFeRD.model.SupplyChainTradeAgreementType; -import org.mustangproject.ZUGFeRD.model.SupplyChainTradeDeliveryType; -import org.mustangproject.ZUGFeRD.model.SupplyChainTradeLineItemType; -import org.mustangproject.ZUGFeRD.model.SupplyChainTradeSettlementType; -import org.mustangproject.ZUGFeRD.model.SupplyChainTradeTransactionType; -import org.mustangproject.ZUGFeRD.model.TaxCategoryCodeType; -import org.mustangproject.ZUGFeRD.model.TaxRegistrationType; -import org.mustangproject.ZUGFeRD.model.TaxRegistrationTypeConstants; -import org.mustangproject.ZUGFeRD.model.TaxTypeCodeType; -import org.mustangproject.ZUGFeRD.model.TaxTypeCodeTypeConstants; -import org.mustangproject.ZUGFeRD.model.TextType; -import org.mustangproject.ZUGFeRD.model.TradeAddressType; -import org.mustangproject.ZUGFeRD.model.TradeAllowanceChargeType; -import org.mustangproject.ZUGFeRD.model.TradePartyType; -import org.mustangproject.ZUGFeRD.model.TradePaymentDiscountTermsType; -import org.mustangproject.ZUGFeRD.model.TradePaymentTermsType; -import org.mustangproject.ZUGFeRD.model.TradePriceType; -import org.mustangproject.ZUGFeRD.model.TradeProductType; -import org.mustangproject.ZUGFeRD.model.TradeSettlementMonetarySummationType; -import org.mustangproject.ZUGFeRD.model.TradeSettlementPaymentMeansType; -import org.mustangproject.ZUGFeRD.model.TradeTaxType; - -class ZUGFeRDTransactionModelConverter { - private static final SimpleDateFormat zugferdDateFormat = new SimpleDateFormat("yyyyMMdd"); - private static final ObjectFactory xmlFactory = new ObjectFactory(); - - private final IZUGFeRDExportableTransaction trans; - private final Totals totals; - private boolean isTest; - private String currency = "EUR"; - private String profile; - - - ZUGFeRDTransactionModelConverter(IZUGFeRDExportableTransaction trans) { - this.trans = trans; - totals = new Totals(); - currency = trans.getCurrency() != null ? trans.getCurrency() : currency; - } - - - JAXBElement convertToModel() { - CrossIndustryDocumentType invoice = xmlFactory - .createCrossIndustryDocumentType(); - - invoice.setSpecifiedExchangedDocumentContext(getDocumentContext()); - invoice.setHeaderExchangedDocument(getDocument()); - invoice.setSpecifiedSupplyChainTradeTransaction(getTradeTransaction()); - - return xmlFactory - .createCrossIndustryDocument(invoice); - } - - - private ExchangedDocumentContextType getDocumentContext() { - - ExchangedDocumentContextType context = xmlFactory - .createExchangedDocumentContextType(); - DocumentContextParameterType contextParameter = xmlFactory - .createDocumentContextParameterType(); - IDType idType = xmlFactory.createIDType(); - idType.setValue(profile); - contextParameter.setID(idType); - context.getGuidelineSpecifiedDocumentContextParameter().add( - contextParameter); - - IndicatorType testIndicator = xmlFactory.createIndicatorType(); - testIndicator.setIndicator(isTest); - context.setTestIndicator(testIndicator); - - return context; - } - - - private ExchangedDocumentType getDocument() { - - ExchangedDocumentType document = xmlFactory - .createExchangedDocumentType(); - - IDType id = xmlFactory.createIDType(); - id.setValue(trans.getNumber()); - document.setID(id); - - DateTimeType issueDateTime = xmlFactory.createDateTimeType(); - DateTimeType.DateTimeString issueDateTimeString = xmlFactory - .createDateTimeTypeDateTimeString(); - issueDateTimeString.setFormat(DateTimeTypeConstants.DATE); - issueDateTimeString.setValue(zugferdDateFormat.format(trans - .getIssueDate())); - issueDateTime.setDateTimeString(issueDateTimeString); - document.setIssueDateTime(issueDateTime); - - DocumentCodeType documentCodeType = xmlFactory.createDocumentCodeType(); - documentCodeType.setValue(trans.getDocumentCode()); - document.setTypeCode(documentCodeType); - - TextType name = xmlFactory.createTextType(); - name.setValue(trans.getDocumentName()); - document.getName().add(name); - - if (trans.getOwnOrganisationFullPlaintextInfo() != null) { - NoteType regularInfo = xmlFactory.createNoteType(); - CodeType regularInfoSubjectCode = xmlFactory.createCodeType(); - regularInfoSubjectCode.setValue(NoteTypeConstants.REGULARINFO); - regularInfo.setSubjectCode(regularInfoSubjectCode); - TextType regularInfoContent = xmlFactory.createTextType(); - regularInfoContent.setValue(trans - .getOwnOrganisationFullPlaintextInfo()); - regularInfo.getContent().add(regularInfoContent); - document.getIncludedNote().add(regularInfo); - } - - if (trans.getReferenceNumber() != null && !"".equals(trans.getReferenceNumber())) { - NoteType referenceInfo = xmlFactory.createNoteType(); - TextType referenceInfoContent = xmlFactory.createTextType(); - referenceInfoContent.setValue(trans.getReferenceNumber()); - referenceInfo.getContent().add(referenceInfoContent); - document.getIncludedNote().add(referenceInfo); - } - - return document; - } - - - private SupplyChainTradeTransactionType getTradeTransaction() { - - SupplyChainTradeTransactionType transaction = xmlFactory - .createSupplyChainTradeTransactionType(); - transaction.getApplicableSupplyChainTradeAgreement().add( - getTradeAgreement()); - transaction.setApplicableSupplyChainTradeDelivery(getTradeDelivery()); - transaction.setApplicableSupplyChainTradeSettlement(getTradeSettlement()); - transaction.getIncludedSupplyChainTradeLineItem().addAll( - getLineItems()); - - return transaction; - } - - - private SupplyChainTradeAgreementType getTradeAgreement() { - - SupplyChainTradeAgreementType tradeAgreement = xmlFactory - .createSupplyChainTradeAgreementType(); - - tradeAgreement.setBuyerTradeParty(getBuyer()); - tradeAgreement.setSellerTradeParty(getSeller()); - - if (trans.getBuyerOrderReferencedDocumentID() != null) { - ReferencedDocumentType refdoc = xmlFactory.createReferencedDocumentType(); - IDType id = xmlFactory.createIDType(); - id.setValue(trans.getBuyerOrderReferencedDocumentID()); - refdoc.getID().add(id); - - if (trans.getBuyerOrderReferencedDocumentIssueDateTime() != null) { - refdoc.setIssueDateTime(trans.getBuyerOrderReferencedDocumentIssueDateTime()); - } - - tradeAgreement.getBuyerOrderReferencedDocument().add(refdoc); - } - - return tradeAgreement; - } - - - private TradePartyType getBuyer() { - - TradePartyType buyerTradeParty = xmlFactory.createTradePartyType(); - - if (trans.getRecipient().getID() != null) { - IDType buyerID = xmlFactory.createIDType(); - buyerID.setValue(trans.getRecipient().getID()); - buyerTradeParty.getID().add(buyerID); - } - if (trans.getRecipient().getGlobalID() != null) { - IDType globalID = xmlFactory.createIDType(); - globalID.setValue(trans.getRecipient().getGlobalID()); - globalID.setSchemeID(trans.getRecipient().getGlobalIDScheme()); - buyerTradeParty.getGlobalID().add(globalID); - } - - TextType buyerName = xmlFactory.createTextType(); - buyerName.setValue(trans.getRecipient().getName()); - buyerTradeParty.setName(buyerName); - - TradeAddressType buyerAddressType = xmlFactory.createTradeAddressType(); - TextType buyerCityName = xmlFactory.createTextType(); - buyerCityName.setValue(trans.getRecipient().getLocation()); - buyerAddressType.setCityName(buyerCityName); - - CountryIDType buyerCountryId = xmlFactory.createCountryIDType(); - buyerCountryId.setValue(trans.getRecipient().getCountry()); - buyerAddressType.setCountryID(buyerCountryId); - - TextType buyerAddress = xmlFactory.createTextType(); - buyerAddress.setValue(trans.getRecipient().getStreet()); - buyerAddressType.setLineOne(buyerAddress); - - if (trans.getRecipient().getAdditionalAddress() != null) { - TextType buyerAdditionalAddress = xmlFactory.createTextType(); - buyerAdditionalAddress.setValue(trans.getRecipient().getAdditionalAddress()); - buyerAddressType.setLineTwo(buyerAdditionalAddress); - } - - CodeType buyerPostcode = xmlFactory.createCodeType(); - buyerPostcode.setValue(trans.getRecipient().getZIP()); - buyerAddressType.getPostcodeCode().add(buyerPostcode); - - buyerTradeParty.setPostalTradeAddress(buyerAddressType); - - // Ust-ID - TaxRegistrationType buyerTaxRegistration = xmlFactory - .createTaxRegistrationType(); - IDType buyerUstId = xmlFactory.createIDType(); - buyerUstId.setValue(trans.getRecipient().getVATID()); - buyerUstId.setSchemeID(TaxRegistrationTypeConstants.USTID); - buyerTaxRegistration.setID(buyerUstId); - buyerTradeParty.getSpecifiedTaxRegistration().add(buyerTaxRegistration); - - return buyerTradeParty; - } - - - private TradePartyType getSeller() { - - TradePartyType sellerTradeParty = xmlFactory.createTradePartyType(); - - if (trans.getOwnForeignOrganisationID() != null) { - IDType sellerID = xmlFactory.createIDType(); - sellerID.setValue(trans.getOwnForeignOrganisationID()); - sellerTradeParty.getID().add(sellerID); - } - - TextType sellerName = xmlFactory.createTextType(); - sellerName.setValue(trans.getOwnOrganisationName()); - sellerTradeParty.setName(sellerName); - - TradeAddressType sellerAddressType = xmlFactory - .createTradeAddressType(); - TextType sellerCityName = xmlFactory.createTextType(); - sellerCityName.setValue(trans.getOwnLocation()); - sellerAddressType.setCityName(sellerCityName); - - CountryIDType sellerCountryId = xmlFactory.createCountryIDType(); - sellerCountryId.setValue(trans.getOwnCountry()); - sellerAddressType.setCountryID(sellerCountryId); - - TextType sellerAddress = xmlFactory.createTextType(); - sellerAddress.setValue(trans.getOwnStreet()); - sellerAddressType.setLineOne(sellerAddress); - - CodeType sellerPostcode = xmlFactory.createCodeType(); - sellerPostcode.setValue(trans.getOwnZIP()); - sellerAddressType.getPostcodeCode().add(sellerPostcode); - - sellerTradeParty.setPostalTradeAddress(sellerAddressType); - - // Steuernummer - TaxRegistrationType sellerTaxRegistration = xmlFactory - .createTaxRegistrationType(); - IDType sellerTaxId = xmlFactory.createIDType(); - sellerTaxId.setValue(trans.getOwnTaxID()); - sellerTaxId.setSchemeID(TaxRegistrationTypeConstants.TAXID); - sellerTaxRegistration.setID(sellerTaxId); - sellerTradeParty.getSpecifiedTaxRegistration().add( - sellerTaxRegistration); - - // Ust-ID - sellerTaxRegistration = xmlFactory.createTaxRegistrationType(); - IDType sellerUstId = xmlFactory.createIDType(); - sellerUstId.setValue(trans.getOwnVATID()); - sellerUstId.setSchemeID(TaxRegistrationTypeConstants.USTID); - sellerTaxRegistration.setID(sellerUstId); - sellerTradeParty.getSpecifiedTaxRegistration().add( - sellerTaxRegistration); - - return sellerTradeParty; - } - - - /** - * If the ship-to party (e.g. in the case of international transactions) or, in the case of virtual goods, the recipient has to be shown separately on an - * invoice, then this is done by adding the ShipToTradeParty - */ - private TradePartyType getShipToParty() { - if (trans.getShipToOrganisationName() == null) { - return null; - } - - TradePartyType shipToParty = xmlFactory.createTradePartyType(); - - if (trans.getShipToOrganisationID() != null) { - IDType sellerID = xmlFactory.createIDType(); - sellerID.setValue(trans.getShipToOrganisationID()); - shipToParty.getID().add(sellerID); - } - - TextType shipToName = xmlFactory.createTextType(); - shipToName.setValue(trans.getShipToOrganisationName()); - shipToParty.setName(shipToName); - - if (trans.getShipToLocation() != null) { - TradeAddressType shipToAddressType = xmlFactory - .createTradeAddressType(); - TextType shipToCityName = xmlFactory.createTextType(); - shipToCityName.setValue(trans.getShipToLocation()); - shipToAddressType.setCityName(shipToCityName); - - CountryIDType shipToCountryId = xmlFactory.createCountryIDType(); - shipToCountryId.setValue(trans.getShipToCountry()); - shipToAddressType.setCountryID(shipToCountryId); - - TextType shipToAddress = xmlFactory.createTextType(); - shipToAddress.setValue(trans.getShipToStreet()); - shipToAddressType.setLineOne(shipToAddress); - - CodeType shipToPostcode = xmlFactory.createCodeType(); - shipToPostcode.setValue(trans.getShipToZIP()); - shipToAddressType.getPostcodeCode().add(shipToPostcode); - - shipToParty.setPostalTradeAddress(shipToAddressType); - } - - return shipToParty; - } - - - private SupplyChainTradeDeliveryType getTradeDelivery() { - - SupplyChainTradeDeliveryType tradeDelivery = xmlFactory - .createSupplyChainTradeDeliveryType(); - - if (getShipToParty() != null) { - tradeDelivery.setShipToTradeParty(getShipToParty()); - } - - SupplyChainEventType deliveryEvent = xmlFactory - .createSupplyChainEventType(); - DateTimeType deliveryDate = xmlFactory.createDateTimeType(); - DateTimeType.DateTimeString deliveryDateString = xmlFactory - .createDateTimeTypeDateTimeString(); - IZUGFeRDDate zfDeliveryDate = trans.getZFDeliveryDate(); - if (zfDeliveryDate != null) { - ZUGFeRDDateFormat deliveryDateFormat = zfDeliveryDate.getFormat(); - deliveryDateString.setFormat(deliveryDateFormat.getDateTimeType()); - deliveryDateString.setValue( - deliveryDateFormat.getFormatter().format(zfDeliveryDate.getDate())); - } else if (trans.getDeliveryDate() != null) { - deliveryDateString.setFormat(DateTimeTypeConstants.DATE); - deliveryDateString.setValue(zugferdDateFormat.format(trans.getDeliveryDate())); - } else { - throw new IllegalStateException("No delivery date provided"); - } - deliveryDate.setDateTimeString(deliveryDateString); - deliveryEvent.getOccurrenceDateTime().add(deliveryDate); - tradeDelivery.getActualDeliverySupplyChainEvent().add(deliveryEvent); - - return tradeDelivery; - } - - - private SupplyChainTradeSettlementType getTradeSettlement() { - SupplyChainTradeSettlementType tradeSettlement = xmlFactory - .createSupplyChainTradeSettlementType(); - - TextType paymentReference = xmlFactory.createTextType(); - paymentReference.setValue(trans.getNumber()); - tradeSettlement.getPaymentReference().add(paymentReference); - - CodeType currencyCode = xmlFactory.createCodeType(); - currencyCode.setValue(currency); - tradeSettlement.setInvoiceCurrencyCode(currencyCode); - - tradeSettlement.getSpecifiedTradeSettlementPaymentMeans().addAll( - getPaymentData()); - tradeSettlement.getApplicableTradeTax().addAll(getTradeTax()); - tradeSettlement.getSpecifiedTradePaymentTerms().addAll( - getPaymentTerms()); - if (trans.getZFAllowances() != null) { - tradeSettlement.getSpecifiedTradeAllowanceCharge().addAll( - getHeaderAllowances()); - } - if (trans.getZFLogisticsServiceCharges() != null) { - tradeSettlement.getSpecifiedLogisticsServiceCharge().addAll( - getHeaderLogisticsServiceCharges()); - } - if (trans.getZFCharges() != null) { - tradeSettlement.getSpecifiedTradeAllowanceCharge().addAll( - getHeaderCharges()); - } - - tradeSettlement.setSpecifiedTradeSettlementMonetarySummation(getMonetarySummation()); - - return tradeSettlement; - } - - - private List getPaymentData() { - List result = new ArrayList<>(); - for (IZUGFeRDTradeSettlementPayment settlementPayment : trans.getTradeSettlementPayment()) { - TradeSettlementPaymentMeansType paymentData = xmlFactory - .createTradeSettlementPaymentMeansType(); - PaymentMeansCodeType paymentDataType = xmlFactory - .createPaymentMeansCodeType(); - paymentDataType.setValue(PaymentMeansCodeTypeConstants.BANKACCOUNT); - paymentData.setTypeCode(paymentDataType); - - TextType paymentInfo = xmlFactory.createTextType(); - String paymentInfoText = settlementPayment.getOwnPaymentInfoText(); - if (paymentInfoText == null) { - paymentInfoText = ""; - } - paymentInfo.setValue(paymentInfoText); - paymentData.getInformation().add(paymentInfo); - - CreditorFinancialAccountType bankAccount = xmlFactory - .createCreditorFinancialAccountType(); - IDType iban = xmlFactory.createIDType(); - iban.setValue(settlementPayment.getOwnIBAN()); - bankAccount.setIBANID(iban); - IDType kto = xmlFactory.createIDType(); - kto.setValue(settlementPayment.getOwnKto()); - bankAccount.setProprietaryID(kto); - paymentData.setPayeePartyCreditorFinancialAccount(bankAccount); - - CreditorFinancialInstitutionType bankData = xmlFactory - .createCreditorFinancialInstitutionType(); - IDType bicId = xmlFactory.createIDType(); - bicId.setValue(settlementPayment.getOwnBIC()); - bankData.setBICID(bicId); - TextType bankName = xmlFactory.createTextType(); - bankName.setValue(settlementPayment.getOwnBankName()); - bankData.setName(bankName); - IDType blz = xmlFactory.createIDType(); - blz.setValue(settlementPayment.getOwnBLZ()); - bankData.setGermanBankleitzahlID(blz); - - paymentData.setPayeeSpecifiedCreditorFinancialInstitution(bankData); - result.add(paymentData); - } - return result; - } - - - private Collection getTradeTax() { - List tradeTaxTypes = new ArrayList<>(); - - HashMap VATPercentAmountMap = this.getVATPercentAmountMap(); - for (BigDecimal currentTaxPercent : VATPercentAmountMap.keySet()) { - - TradeTaxType tradeTax = xmlFactory.createTradeTaxType(); - TaxTypeCodeType taxTypeCode = xmlFactory.createTaxTypeCodeType(); - taxTypeCode.setValue(TaxTypeCodeTypeConstants.SALESTAX); - tradeTax.setTypeCode(taxTypeCode); - - TaxCategoryCodeType taxCategoryCode = xmlFactory.createTaxCategoryCodeType(); - VATAmount vatAmount = VATPercentAmountMap.get(currentTaxPercent); - taxCategoryCode.setValue(vatAmount.getCategoryCode()); - tradeTax.setCategoryCode(taxCategoryCode); - - VATAmount amount = VATPercentAmountMap.get(currentTaxPercent); - - PercentType taxPercent = xmlFactory.createPercentType(); - taxPercent.setValue(vatFormat(currentTaxPercent)); - tradeTax.setApplicablePercent(taxPercent); - - AmountType calculatedTaxAmount = xmlFactory.createAmountType(); - calculatedTaxAmount.setCurrencyID(currency); - calculatedTaxAmount.setValue(currencyFormat(amount.getCalculated())); - tradeTax.getCalculatedAmount().add(calculatedTaxAmount); - - AmountType basisTaxAmount = xmlFactory.createAmountType(); - basisTaxAmount.setCurrencyID(currency); - basisTaxAmount.setValue(currencyFormat(amount.getBasis())); - tradeTax.getBasisAmount().add(basisTaxAmount); - - tradeTaxTypes.add(tradeTax); - } - - return tradeTaxTypes; - } - - - private Collection getHeaderAllowances() { - List headerAllowances = new ArrayList<>(); - - for (IZUGFeRDAllowanceCharge iAllowance : trans.getZFAllowances()) { - - TradeAllowanceChargeType allowance = xmlFactory.createTradeAllowanceChargeType(); - IndicatorType chargeIndicator = xmlFactory.createIndicatorType(); - chargeIndicator.setIndicator(false); - allowance.setChargeIndicator(chargeIndicator); - - AmountType actualAmount = xmlFactory.createAmountType(); - actualAmount.setCurrencyID(currency); - actualAmount.setValue(currencyFormat(iAllowance.getTotalAmount())); - allowance.getActualAmount().add(actualAmount); - - TextType reason = xmlFactory.createTextType(); - reason.setValue(iAllowance.getReason()); - allowance.setReason(reason); - - TradeTaxType tradeTax = xmlFactory.createTradeTaxType(); - PercentType vatPercent = xmlFactory.createPercentType(); - vatPercent.setValue(currencyFormat(iAllowance.getTaxPercent())); - tradeTax.setApplicablePercent(vatPercent); - - /* - * Only in extended AmountType basisAmount = - * xmlFactory.createAmountType(); - * basisAmount.setCurrencyID(trans.getInvoiceCurrency()); - * basisAmount.setValue(amount.getBasis()); - * allowance.setBasisAmount(basisAmount); - */ - TaxCategoryCodeType taxType = xmlFactory.createTaxCategoryCodeType(); - taxType.setValue(iAllowance.getCategoryCode()); - tradeTax.setCategoryCode(taxType); - - TaxTypeCodeType taxCode = xmlFactory.createTaxTypeCodeType(); - taxCode.setValue(TaxTypeCodeTypeConstants.SALESTAX); - tradeTax.setTypeCode(taxCode); - - allowance.getCategoryTradeTax().add(tradeTax); - headerAllowances.add(allowance); - } - - return headerAllowances; - } - - - private Collection getHeaderCharges() { - List headerCharges = new ArrayList<>(); - - for (IZUGFeRDAllowanceCharge iCharge : trans.getZFCharges()) { - - TradeAllowanceChargeType charge = xmlFactory.createTradeAllowanceChargeType(); - IndicatorType chargeIndicator = xmlFactory.createIndicatorType(); - chargeIndicator.setIndicator(true); - charge.setChargeIndicator(chargeIndicator); - - AmountType actualAmount = xmlFactory.createAmountType(); - actualAmount.setCurrencyID(currency); - actualAmount.setValue(currencyFormat(iCharge.getTotalAmount())); - charge.getActualAmount().add(actualAmount); - - TextType reason = xmlFactory.createTextType(); - reason.setValue(iCharge.getReason()); - charge.setReason(reason); - - TradeTaxType tradeTax = xmlFactory.createTradeTaxType(); - PercentType vatPercent = xmlFactory.createPercentType(); - vatPercent.setValue(currencyFormat(iCharge.getTaxPercent())); - tradeTax.setApplicablePercent(vatPercent); - - /* - * Only in extended AmountType basisAmount = - * xmlFactory.createAmountType(); - * basisAmount.setCurrencyID(trans.getInvoiceCurrency()); - * basisAmount.setValue(amount.getBasis()); - * allowance.setBasisAmount(basisAmount); - */ - TaxCategoryCodeType taxType = xmlFactory.createTaxCategoryCodeType(); - taxType.setValue(iCharge.getCategoryCode()); - tradeTax.setCategoryCode(taxType); - - TaxTypeCodeType taxCode = xmlFactory.createTaxTypeCodeType(); - taxCode.setValue(TaxTypeCodeTypeConstants.SALESTAX); - tradeTax.setTypeCode(taxCode); - - charge.getCategoryTradeTax().add(tradeTax); - headerCharges.add(charge); - - } - - return headerCharges; - } - - - private Collection getHeaderLogisticsServiceCharges() { - List headerServiceCharge = new ArrayList<>(); - - for (IZUGFeRDAllowanceCharge iServiceCharge : trans.getZFLogisticsServiceCharges()) { - - LogisticsServiceChargeType serviceCharge = xmlFactory.createLogisticsServiceChargeType(); - - AmountType actualAmount = xmlFactory.createAmountType(); - actualAmount.setCurrencyID(currency); - actualAmount.setValue(currencyFormat(iServiceCharge.getTotalAmount())); - serviceCharge.getAppliedAmount().add(actualAmount); - - TextType reason = xmlFactory.createTextType(); - reason.setValue(iServiceCharge.getReason()); - serviceCharge.getDescription().add(reason); - - TradeTaxType tradeTax = xmlFactory.createTradeTaxType(); - - PercentType vatPercent = xmlFactory.createPercentType(); - vatPercent.setValue(currencyFormat(iServiceCharge.getTaxPercent())); - tradeTax.setApplicablePercent(vatPercent); - - /* - * Only in extended AmountType basisAmount = - * xmlFactory.createAmountType(); - * basisAmount.setCurrencyID(trans.getInvoiceCurrency()); - * basisAmount.setValue(amount.getBasis()); - * allowance.setBasisAmount(basisAmount); - */ - TaxCategoryCodeType taxType = xmlFactory.createTaxCategoryCodeType(); - taxType.setValue(iServiceCharge.getCategoryCode()); - tradeTax.setCategoryCode(taxType); - - TaxTypeCodeType taxCode = xmlFactory.createTaxTypeCodeType(); - taxCode.setValue(TaxTypeCodeTypeConstants.SALESTAX); - tradeTax.setTypeCode(taxCode); - - serviceCharge.getAppliedTradeTax().add(tradeTax); - headerServiceCharge.add(serviceCharge); - - } - - return headerServiceCharge; - } - - - private Collection getPaymentTerms() { - if (trans.getPaymentTerms() != null) { - return handlePaymentTermsObject(trans.getPaymentTerms()); - } - List paymentTerms = new ArrayList<>(); - - TradePaymentTermsType paymentTerm = xmlFactory - .createTradePaymentTermsType(); - DateTimeType dueDate = xmlFactory.createDateTimeType(); - DateTimeType.DateTimeString dueDateString = xmlFactory - .createDateTimeTypeDateTimeString(); - dueDateString.setFormat(DateTimeTypeConstants.DATE); - dueDateString.setValue(zugferdDateFormat.format(trans.getDueDate())); - dueDate.setDateTimeString(dueDateString); - paymentTerm.setDueDateDateTime(dueDate); - - TextType paymentTermDescr = xmlFactory.createTextType(); - - String paymentTermDescription = trans.getPaymentTermDescription(); - if (paymentTermDescription == null) { - paymentTermDescription = ""; - } - paymentTermDescr.setValue(paymentTermDescription); - paymentTerm.getDescription().add(paymentTermDescr); - - paymentTerms.add(paymentTerm); - - return paymentTerms; - } - - private Collection handlePaymentTermsObject(IZUGFeRDPaymentTerms paymentTerms) { - List xmlPaymentTerms = new ArrayList<>(); - - TradePaymentTermsType paymentTerm = xmlFactory.createTradePaymentTermsType(); - - TextType paymentTermDescr = xmlFactory.createTextType(); - - String paymentTermDescription = paymentTerms.getDescription(); - if (paymentTermDescription == null) { - paymentTermDescription = ""; - } - paymentTermDescr.setValue(paymentTermDescription); - paymentTerm.getDescription().add(paymentTermDescr); - - IZUGFeRDPaymentDiscountTerms discountTerms = paymentTerms.getDiscountTerms(); - if (paymentTerms.getDueDate() != null && discountTerms != null && discountTerms.getBaseDate() != null) { - throw new IllegalStateException( - "if paymentTerms.dueDate is specified, paymentTerms.discountTerms.baseDate has not to be specified"); - } - - if (paymentTerms.getDueDate() != null) { - DateTimeType dueDate = xmlFactory.createDateTimeType(); - DateTimeType.DateTimeString dueDateString = xmlFactory.createDateTimeTypeDateTimeString(); - dueDateString.setFormat(paymentTerms.getDueDate().getFormat().getDateTimeType()); - dueDateString.setValue( - paymentTerms.getDueDate().getFormat().getFormatter().format(paymentTerms.getDueDate().getDate())); - dueDate.setDateTimeString(dueDateString); - paymentTerm.setDueDateDateTime(dueDate); - } - - if (discountTerms != null) { - TradePaymentDiscountTermsType tradePaymentDiscountTerms = xmlFactory.createTradePaymentDiscountTermsType(); - - PercentType calculationPercent = xmlFactory.createPercentType(); - calculationPercent.setValue(discountTerms.getCalculationPercentage()); - tradePaymentDiscountTerms.setCalculationPercent(calculationPercent); - - AmountType basisAmount = xmlFactory.createAmountType(); - basisAmount.setCurrencyID(currency); - basisAmount.setValue(currencyFormat(totals.totalGrossAmount)); - tradePaymentDiscountTerms.getBasisAmount().add(basisAmount); - - if (discountTerms.getBaseDate() != null) { - DateTimeType baseDate = xmlFactory.createDateTimeType(); - DateTimeType.DateTimeString baseDateString = xmlFactory.createDateTimeTypeDateTimeString(); - baseDateString.setFormat(discountTerms.getBaseDate().getFormat().getDateTimeType()); - baseDateString.setValue(discountTerms.getBaseDate().getFormat().getFormatter() - .format(discountTerms.getBaseDate().getDate())); - baseDate.setDateTimeString(baseDateString); - tradePaymentDiscountTerms.setBasisDateTime(baseDate); - - MeasureType basisPeriodMeasure = xmlFactory.createMeasureType(); - basisPeriodMeasure.setUnitCode(discountTerms.getBasePeriodUnitCode()); - basisPeriodMeasure.setValue(new BigDecimal(discountTerms.getBasePeriodMeasure())); - tradePaymentDiscountTerms.setBasisPeriodMeasure(basisPeriodMeasure); - } - paymentTerm.getApplicableTradePaymentDiscountTerms().add(tradePaymentDiscountTerms); - } - xmlPaymentTerms.add(paymentTerm); - - return xmlPaymentTerms; - } - - - private TradeSettlementMonetarySummationType getMonetarySummation() { - TradeSettlementMonetarySummationType monetarySummation = xmlFactory - .createTradeSettlementMonetarySummationType(); - - // AllowanceTotalAmount = sum of all allowances - AmountType allowanceTotalAmount = xmlFactory.createAmountType(); - allowanceTotalAmount.setCurrencyID(currency); - if (trans.getZFAllowances() != null) { - BigDecimal totalHeaderAllowance = BigDecimal.ZERO; - for (IZUGFeRDAllowanceCharge headerAllowance : trans - .getZFAllowances()) { - totalHeaderAllowance = headerAllowance.getTotalAmount().add( - totalHeaderAllowance); - } - allowanceTotalAmount.setValue(currencyFormat(totalHeaderAllowance)); - } else { - allowanceTotalAmount.setValue(currencyFormat(BigDecimal.ZERO)); - } - monetarySummation.getAllowanceTotalAmount().add(allowanceTotalAmount); - - // ChargeTotalAmount = sum of all Logistic service charges + normal - // charges - BigDecimal totalCharge = BigDecimal.ZERO; - AmountType totalChargeAmount = xmlFactory.createAmountType(); - totalChargeAmount.setCurrencyID(currency); - if (trans.getZFLogisticsServiceCharges() != null) { - for (IZUGFeRDAllowanceCharge logisticsServiceCharge : trans - .getZFLogisticsServiceCharges()) { - totalCharge = logisticsServiceCharge.getTotalAmount().add( - totalCharge); - } - } - if (trans.getZFCharges() != null) { - for (IZUGFeRDAllowanceCharge charge : trans.getZFCharges()) { - totalCharge = charge.getTotalAmount().add(totalCharge); - } - } - - totalChargeAmount.setValue(currencyFormat(totalCharge)); - - monetarySummation.getChargeTotalAmount().add(totalChargeAmount); - - /* - * AmountType chargeTotalAmount = xmlFactory.createAmountType(); - * chargeTotalAmount.setCurrencyID(trans.getInvoiceCurrency()); - * chargeTotalAmount.setValue(currencyFormat(BigDecimal.ZERO)); - * monetarySummation.getChargeTotalAmount().add(chargeTotalAmount); - */ - - AmountType lineTotalAmount = xmlFactory.createAmountType(); - lineTotalAmount.setCurrencyID(currency); - lineTotalAmount.setValue(currencyFormat(totals.getLineTotal())); - monetarySummation.getLineTotalAmount().add(lineTotalAmount); - - AmountType taxBasisTotalAmount = xmlFactory.createAmountType(); - taxBasisTotalAmount.setCurrencyID(currency); - taxBasisTotalAmount.setValue(currencyFormat(totals.getTotalNet())); - monetarySummation.getTaxBasisTotalAmount().add(taxBasisTotalAmount); - - AmountType taxTotalAmount = xmlFactory.createAmountType(); - taxTotalAmount.setCurrencyID(currency); - taxTotalAmount.setValue(currencyFormat(totals.getTaxTotal())); - monetarySummation.getTaxTotalAmount().add(taxTotalAmount); - - AmountType grandTotalAmount = xmlFactory.createAmountType(); - grandTotalAmount.setCurrencyID(currency); - grandTotalAmount.setValue(currencyFormat(totals.getTotalGross())); - monetarySummation.getGrandTotalAmount().add(grandTotalAmount); - - AmountType totalPrepaidAmount = xmlFactory.createAmountType(); - totalPrepaidAmount.setCurrencyID(currency); - totalPrepaidAmount.setValue(currencyFormat(trans.getTotalPrepaidAmount())); - monetarySummation.getTotalPrepaidAmount().add(totalPrepaidAmount); - - AmountType duePayableAmount = xmlFactory.createAmountType(); - duePayableAmount.setCurrencyID(currency); - duePayableAmount.setValue(currencyFormat(totals.getTotalGross().subtract(trans.getTotalPrepaidAmount()))); - monetarySummation.getDuePayableAmount().add(duePayableAmount); - - return monetarySummation; - } - - - private Collection getLineItems() { - - ArrayList lineItems = new ArrayList<>(); - int lineID = 0; - for (IZUGFeRDExportableItem currentItem : trans.getZFItems()) { - lineID++; - LineCalc lc = new LineCalc(currentItem); - SupplyChainTradeLineItemType lineItem = xmlFactory - .createSupplyChainTradeLineItemType(); - - DocumentLineDocumentType lineDocument = xmlFactory - .createDocumentLineDocumentType(); - IDType lineNumber = xmlFactory.createIDType(); - lineNumber.setValue(Integer.toString(lineID)); - lineDocument.setLineID(lineNumber); - lineItem.setAssociatedDocumentLineDocument(lineDocument); - - SupplyChainTradeAgreementType tradeAgreement = xmlFactory - .createSupplyChainTradeAgreementType(); - TradePriceType grossTradePrice = xmlFactory.createTradePriceType(); - QuantityType grossQuantity = xmlFactory.createQuantityType(); - grossQuantity.setUnitCode(currentItem.getProduct().getUnit()); - grossQuantity.setValue(quantityFormat(BigDecimal.ONE)); - grossTradePrice.setBasisQuantity(grossQuantity); - - AmountType grossChargeAmount = xmlFactory.createAmountType(); - grossChargeAmount.setCurrencyID(currency); - grossChargeAmount.setValue(priceFormat(currentItem.getPrice())); - grossTradePrice.getChargeAmount().add(grossChargeAmount); - tradeAgreement.getGrossPriceProductTradePrice() - .add(grossTradePrice); - - if (currentItem.getItemAllowances() != null) { - for (IZUGFeRDAllowanceCharge itemAllowance : currentItem - .getItemAllowances()) { - TradeAllowanceChargeType eItemAllowance = xmlFactory - .createTradeAllowanceChargeType(); - IndicatorType chargeIndicator = xmlFactory - .createIndicatorType(); - chargeIndicator.setIndicator(false); - eItemAllowance.setChargeIndicator(chargeIndicator); - AmountType actualAmount = xmlFactory.createAmountType(); - actualAmount.setCurrencyID(currency); - actualAmount.setValue(priceFormat(itemAllowance - .getTotalAmount().divide(currentItem.getQuantity(), - 4, BigDecimal.ROUND_HALF_UP))); - eItemAllowance.getActualAmount().add(actualAmount); - TextType reason = xmlFactory.createTextType(); - reason.setValue(itemAllowance.getReason()); - eItemAllowance.setReason(reason); - grossTradePrice.getAppliedTradeAllowanceCharge().add( - eItemAllowance); - } - } - - if (currentItem.getItemCharges() != null) { - for (IZUGFeRDAllowanceCharge itemCharge : currentItem - .getItemCharges()) { - TradeAllowanceChargeType eItemCharge = xmlFactory - .createTradeAllowanceChargeType(); - AmountType actualAmount = xmlFactory.createAmountType(); - actualAmount.setCurrencyID(currency); - actualAmount.setValue(priceFormat(itemCharge - .getTotalAmount().divide(currentItem.getQuantity(), - 4, BigDecimal.ROUND_HALF_UP))); - eItemCharge.getActualAmount().add(actualAmount); - TextType reason = xmlFactory.createTextType(); - reason.setValue(itemCharge.getReason()); - eItemCharge.setReason(reason); - IndicatorType chargeIndicator = xmlFactory - .createIndicatorType(); - chargeIndicator.setIndicator(true); - eItemCharge.setChargeIndicator(chargeIndicator); - grossTradePrice.getAppliedTradeAllowanceCharge().add( - eItemCharge); - } - } - - TradePriceType netTradePrice = xmlFactory.createTradePriceType(); - QuantityType netQuantity = xmlFactory.createQuantityType(); - netQuantity.setUnitCode(currentItem.getProduct().getUnit()); - netQuantity.setValue(quantityFormat(BigDecimal.ONE)); - netTradePrice.setBasisQuantity(netQuantity); - - AmountType netChargeAmount = xmlFactory.createAmountType(); - netChargeAmount.setCurrencyID(currency); - netChargeAmount.setValue(priceFormat(lc.getItemNetAmount())); - netTradePrice.getChargeAmount().add(netChargeAmount); - tradeAgreement.getNetPriceProductTradePrice().add(netTradePrice); - - lineItem.setSpecifiedSupplyChainTradeAgreement(tradeAgreement); - - SupplyChainTradeDeliveryType tradeDelivery = xmlFactory - .createSupplyChainTradeDeliveryType(); - QuantityType billedQuantity = xmlFactory.createQuantityType(); - billedQuantity.setUnitCode(currentItem.getProduct().getUnit()); - billedQuantity.setValue(quantityFormat(currentItem.getQuantity())); - tradeDelivery.setBilledQuantity(billedQuantity); - lineItem.setSpecifiedSupplyChainTradeDelivery(tradeDelivery); - - SupplyChainTradeSettlementType tradeSettlement = xmlFactory - .createSupplyChainTradeSettlementType(); - TradeTaxType tradeTax = xmlFactory.createTradeTaxType(); - - TaxCategoryCodeType taxCategoryCode = xmlFactory.createTaxCategoryCodeType(); - taxCategoryCode.setValue(currentItem.getCategoryCode()); - tradeTax.setCategoryCode(taxCategoryCode); - - TaxTypeCodeType taxCode = xmlFactory.createTaxTypeCodeType(); - taxCode.setValue(TaxTypeCodeTypeConstants.SALESTAX); - tradeTax.setTypeCode(taxCode); - - PercentType taxPercent = xmlFactory.createPercentType(); - taxPercent.setValue(vatFormat(currentItem.getProduct() - .getVATPercent())); - tradeTax.setApplicablePercent(taxPercent); - tradeSettlement.getApplicableTradeTax().add(tradeTax); - - TradeSettlementMonetarySummationType monetarySummation = xmlFactory - .createTradeSettlementMonetarySummationType(); - AmountType itemAmount = xmlFactory.createAmountType(); - itemAmount.setCurrencyID(currency); - itemAmount.setValue(currencyFormat(lc.getItemTotalNetAmount())); - monetarySummation.getLineTotalAmount().add(itemAmount); - tradeSettlement - .setSpecifiedTradeSettlementMonetarySummation(monetarySummation); - - lineItem.setSpecifiedSupplyChainTradeSettlement(tradeSettlement); - - TradeProductType tradeProduct = xmlFactory.createTradeProductType(); - TextType productName = xmlFactory.createTextType(); - productName.setValue(currentItem.getProduct().getName()); - tradeProduct.getName().add(productName); - - TextType productDescription = xmlFactory.createTextType(); - productDescription.setValue(currentItem.getProduct() - .getDescription()); - tradeProduct.getDescription().add(productDescription); - lineItem.setSpecifiedTradeProduct(tradeProduct); - - lineItems.add(lineItem); - } - - return lineItems; - } - - - private BigDecimal vatFormat(BigDecimal value) { - return value.setScale(2, RoundingMode.HALF_UP); - } - - - private BigDecimal currencyFormat(BigDecimal value) { - return value.setScale(2, RoundingMode.HALF_UP); - } - - - private BigDecimal priceFormat(BigDecimal value) { - return value.setScale(4, RoundingMode.HALF_UP); - } - - - private BigDecimal quantityFormat(BigDecimal value) { - return value.setScale(4, RoundingMode.HALF_UP); - } - - - /** - * which taxes have been used with which amounts in this transaction, empty for no taxes, or e.g. 19=>190 and 7=>14 if 1000 Eur were applicable to 19% VAT - * (=>190 EUR VAT) and 200 EUR were applicable to 7% (=>14 EUR VAT) 190 Eur - * - * @return HashMap which taxes have been used with which amounts - */ - private HashMap getVATPercentAmountMap() { - return getVATPercentAmountMap(false); - } - - - private HashMap getVATPercentAmountMap(Boolean itemOnly) { - HashMap hm = new HashMap<>(); - - for (IZUGFeRDExportableItem currentItem : trans.getZFItems()) { - BigDecimal percent = currentItem.getProduct().getVATPercent(); - LineCalc lc = new LineCalc(currentItem); - VATAmount itemVATAmount = new VATAmount(lc.getItemTotalNetAmount(), lc.getItemTotalVATAmount(), lc.getCategoryCode()); - VATAmount current = hm.get(percent); - if (current == null) { - hm.put(percent, itemVATAmount); - } else { - hm.put(percent, current.add(itemVATAmount)); - } - } - if (itemOnly) { - return hm; - } - if (trans.getZFAllowances() != null) { - for (IZUGFeRDAllowanceCharge headerAllowance : trans.getZFAllowances()) { - BigDecimal percent = headerAllowance.getTaxPercent(); - VATAmount itemVATAmount = new VATAmount( - headerAllowance.getTotalAmount(), headerAllowance - .getTotalAmount().multiply(percent) - .divide(new BigDecimal(100)), - trans.getDocumentCode()); - VATAmount current = hm.get(percent); - if (current == null) { - hm.put(percent, itemVATAmount); - } else { - hm.put(percent, current.subtract(itemVATAmount)); - } - } - } - - if (trans.getZFLogisticsServiceCharges() != null) { - for (IZUGFeRDAllowanceCharge logisticsServiceCharge : trans - .getZFLogisticsServiceCharges()) { - BigDecimal percent = logisticsServiceCharge.getTaxPercent(); - VATAmount itemVATAmount = new VATAmount( - logisticsServiceCharge.getTotalAmount(), - logisticsServiceCharge.getTotalAmount() - .multiply(percent).divide(new BigDecimal(100)), - logisticsServiceCharge.getCategoryCode()); - VATAmount current = hm.get(percent); - if (current == null) { - hm.put(percent, itemVATAmount); - } else { - hm.put(percent, current.add(itemVATAmount)); - } - } - } - - if (trans.getZFCharges() != null) { - for (IZUGFeRDAllowanceCharge charge : trans.getZFCharges()) { - BigDecimal percent = charge.getTaxPercent(); - VATAmount itemVATAmount = new VATAmount( - charge.getTotalAmount(), charge.getTotalAmount() - .multiply(percent).divide(new BigDecimal(100)), - charge.getCategoryCode()); - VATAmount current = hm.get(percent); - if (current == null) { - hm.put(percent, itemVATAmount); - } else { - hm.put(percent, current.add(itemVATAmount)); - } - } - } - - return hm; - } - - - ZUGFeRDTransactionModelConverter withTest(boolean isTest) { - this.isTest = isTest; - return this; - } - - - public ZUGFeRDTransactionModelConverter withProfile(String profile) { - this.profile = profile; - return this; - } - - private class LineCalc { - - private BigDecimal totalGross; - private BigDecimal itemTotalNetAmount; - private BigDecimal itemTotalVATAmount; - private BigDecimal itemNetAmount; - private String categoryCode; - - - public LineCalc(IZUGFeRDExportableItem currentItem) { - BigDecimal totalAllowance = BigDecimal.ZERO; - BigDecimal totalCharge = BigDecimal.ZERO; - - if (currentItem.getItemAllowances() != null) { - for (IZUGFeRDAllowanceCharge itemAllowance : currentItem - .getItemAllowances()) { - totalAllowance = itemAllowance.getTotalAmount().add( - totalAllowance); - } - } - - if (currentItem.getItemCharges() != null) { - for (IZUGFeRDAllowanceCharge itemCharge : currentItem - .getItemCharges()) { - totalCharge = itemCharge.getTotalAmount().add(totalCharge); - } - } - - BigDecimal multiplicator = currentItem.getProduct().getVATPercent() - .divide(new BigDecimal(100), 4, BigDecimal.ROUND_HALF_UP) - .add(BigDecimal.ONE); - // priceGross=currentItem.getPrice().multiply(multiplicator); - - totalGross = currentItem.getPrice() - .multiply(currentItem.getQuantity()) - .subtract(totalAllowance).add(totalCharge) - .multiply(multiplicator); - itemTotalNetAmount = currentItem.getPrice() - .multiply(currentItem.getQuantity()) - .subtract(totalAllowance).add(totalCharge) - .setScale(2, BigDecimal.ROUND_HALF_UP); - itemTotalVATAmount = totalGross.subtract(itemTotalNetAmount); - itemNetAmount = currentItem - .getPrice() - .multiply(currentItem.getQuantity()) - .subtract(totalAllowance) - .add(totalCharge) - .divide(currentItem.getQuantity(), 4, - BigDecimal.ROUND_HALF_UP); - categoryCode = currentItem.getCategoryCode(); - } - - - public BigDecimal getItemTotalNetAmount() { - return itemTotalNetAmount; - } - - - public BigDecimal getItemTotalVATAmount() { - return itemTotalVATAmount; - } - - - public BigDecimal getItemNetAmount() { - return itemNetAmount; - } - - - public String getCategoryCode() { - return categoryCode; - } - - } - - private class Totals { - private BigDecimal totalNetAmount; - private BigDecimal totalGrossAmount; - private BigDecimal lineTotalAmount; - private BigDecimal totalTaxAmount; - - - public Totals() { - BigDecimal res = BigDecimal.ZERO; - for (IZUGFeRDExportableItem currentItem : trans.getZFItems()) { - LineCalc lc = new LineCalc(currentItem); - res = res.add(lc.getItemTotalNetAmount()); - } - // Set line total - lineTotalAmount = res; - - if (trans.getZFAllowances() != null) { - for (IZUGFeRDAllowanceCharge headerAllowance : trans - .getZFAllowances()) { - res = res.subtract(headerAllowance.getTotalAmount()); - } - } - - if (trans.getZFLogisticsServiceCharges() != null) { - for (IZUGFeRDAllowanceCharge logisticsServiceCharge : trans - .getZFLogisticsServiceCharges()) { - res = res.add(logisticsServiceCharge.getTotalAmount()); - } - } - - if (trans.getZFCharges() != null) { - for (IZUGFeRDAllowanceCharge charge : trans.getZFCharges()) { - res = res.add(charge.getTotalAmount()); - } - } - - // Set total net amount - totalNetAmount = res; - - HashMap vatAmountHashMap = getVATPercentAmountMap(); - for (VATAmount amount : vatAmountHashMap.values()) { - res = res.add(amount.getCalculated()); - } - - // Set total gross amount - totalGrossAmount = res; - - totalTaxAmount = totalGrossAmount - .subtract(totalNetAmount); - } - - - public BigDecimal getTotalNet() { - return totalNetAmount; - } - - - public BigDecimal getTotalGross() { - return totalGrossAmount; - } - - - public BigDecimal getLineTotal() { - return lineTotalAmount; - } - - - public BigDecimal getTaxTotal() { - return totalTaxAmount; - } - - } -} diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/model/NoteTypeConstants.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/NoteTypeConstants.java deleted file mode 100644 index 6b868dc6c..000000000 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/model/NoteTypeConstants.java +++ /dev/null @@ -1,27 +0,0 @@ -/** ********************************************************************** - * - * 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.model; - -public class NoteTypeConstants { - public static final String GENERAL = ""; - public static final String REGULARINFO = "REG"; - public static final String PRICECONDITION = "AAK"; - public static final String CONDITIONS = "AAJ"; - public static final String PAYMENTINFO = "PMT"; -} diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/model/PaymentMeansCodeTypeConstants.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/PaymentMeansCodeTypeConstants.java deleted file mode 100644 index fda92820c..000000000 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/model/PaymentMeansCodeTypeConstants.java +++ /dev/null @@ -1,31 +0,0 @@ -/** ********************************************************************** - * - * 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.model; - -public class PaymentMeansCodeTypeConstants { - public static final String BANKACCOUNT = "42"; - public static final String NOTSPECIFIED = "1"; - public static final String AUTOMATICCLEARING = "3"; - public static final String CASH = "10"; - public static final String CHECK = "20"; - public static final String DEBITADVICE = "31"; - public static final String CREDITCARD = "48"; - public static final String DEBIT = "49"; - public static final String COMPENSATION = "97"; -} diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/model/QuantityTypeConstants.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/QuantityTypeConstants.java deleted file mode 100644 index 99bc70331..000000000 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/model/QuantityTypeConstants.java +++ /dev/null @@ -1,43 +0,0 @@ -/** ********************************************************************** - * - * 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.model; - -public class QuantityTypeConstants { - public static final String PIECE = "C62"; - public static final String DAY = "DAY"; - public static final String HECTARE = "HAR"; - public static final String HOUR = "HUR"; - public static final String KILOGRAM = "KGM"; - public static final String KILOMETER = "KTM"; - public static final String KILOWATTHOUR = "KWH"; - public static final String FIXEDRATE = "LS"; - public static final String LITRE = "LTR"; - public static final String MINUTE = "MIN"; - public static final String SQUAREMILLIMETER = "MMK"; - public static final String MILLIMETER = "MMT"; - public static final String SQUAREMETER = "MTK"; - public static final String CUBICMETER = "MTQ"; - public static final String METER = "MTR"; - public static final String PRODUCTCOUNT = "NAR"; - public static final String PRODUCTPAIR = "NPR"; - public static final String PERCENT = "P1"; - public static final String SET = "SET"; - public static final String TON = "TNE"; - public static final String WEEK = "WEE"; -} diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/model/TaxRegistrationTypeConstants.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/TaxRegistrationTypeConstants.java deleted file mode 100644 index ff5c03f50..000000000 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/model/TaxRegistrationTypeConstants.java +++ /dev/null @@ -1,24 +0,0 @@ -/** ********************************************************************** - * - * 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.model; - -public class TaxRegistrationTypeConstants { - public static final String USTID = "VA"; - public static final String TAXID = "FC"; -} diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/model/TaxTypeCodeTypeConstants.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/TaxTypeCodeTypeConstants.java deleted file mode 100644 index 46bb3e750..000000000 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/model/TaxTypeCodeTypeConstants.java +++ /dev/null @@ -1,25 +0,0 @@ -/** ********************************************************************** - * - * 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.model; - -public class TaxTypeCodeTypeConstants { - public static final String SALESTAX = "VAT"; - public static final String INSURANCETAX = "ZF_INSURANCE_TAX"; - public static final String OLDPART = "AAJ"; -} diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/model/ZFNamespacePrefixMapper.java b/library/src/main/java/org/mustangproject/ZUGFeRD/model/ZFNamespacePrefixMapper.java deleted file mode 100644 index 4b3f2915f..000000000 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/model/ZFNamespacePrefixMapper.java +++ /dev/null @@ -1,49 +0,0 @@ -/** ********************************************************************** - * - * 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.model; - -import com.sun.xml.bind.marshaller.NamespacePrefixMapper; - -import java.util.HashMap; -import java.util.Map; - -public class ZFNamespacePrefixMapper extends NamespacePrefixMapper { - - private Map namespaceMap = new HashMap<>(); - - /** - * Create mappings. - */ - public ZFNamespacePrefixMapper() { - - namespaceMap.put("urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12", "ram"); - namespaceMap.put("urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15", "udt"); - namespaceMap.put("urn:ferd:CrossIndustryDocument:invoice:1p0", "rsm"); - } - - /* (non-Javadoc) - * Returning null when not found based on spec. - * @see com.sun.xml.bind.marshaller.NamespacePrefixMapper#getPreferredPrefix(java.lang.String, java.lang.String, boolean) - */ - @Override - public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) { - return namespaceMap.getOrDefault(namespaceUri, suggestion); - } - -} diff --git a/library/src/main/resources/schema/ZUGFeRD1p0.xsd b/library/src/main/resources/schema/ZUGFeRD1p0.xsd deleted file mode 100644 index 41e2cc9c6..000000000 --- a/library/src/main/resources/schema/ZUGFeRD1p0.xsd +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - diff --git a/library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_QualifiedDataType_12.xsd b/library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_QualifiedDataType_12.xsd deleted file mode 100644 index 77d4e7ed1..000000000 --- a/library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_QualifiedDataType_12.xsd +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_12.xsd b/library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_12.xsd deleted file mode 100644 index c26479602..000000000 --- a/library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_12.xsd +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd b/library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd deleted file mode 100644 index 9a8e41c46..000000000 --- a/library/src/main/resources/schema/ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/library/src/main/resources/stylesheets/ZUGFeRD_1p0_c1p0_s1p0.xslt b/library/src/main/resources/stylesheets/ZUGFeRD_1p0_c1p0_s1p0.xslt deleted file mode 100644 index 8b015f28d..000000000 --- a/library/src/main/resources/stylesheets/ZUGFeRD_1p0_c1p0_s1p0.xslt +++ /dev/null @@ -1,3008 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - <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 (. = 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 (. = 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 = 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/library/src/test/java/org/mustangproject/ZUGFeRD/ResourceUtilities.java b/library/src/test/java/org/mustangproject/ZUGFeRD/ResourceUtilities.java index cf908e72a..fde431360 100644 --- a/library/src/test/java/org/mustangproject/ZUGFeRD/ResourceUtilities.java +++ b/library/src/test/java/org/mustangproject/ZUGFeRD/ResourceUtilities.java @@ -27,7 +27,7 @@ /** - * This test utility class is providing usability functions for test file resources + * This test utility class is providing usability functions to test file resources */ public class ResourceUtilities { private static final Logger LOG = Logger.getLogger(ResourceUtilities.class.getName()); diff --git a/library/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverterTest.java b/library/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverterTest.java deleted file mode 100644 index 1f1a071d8..000000000 --- a/library/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverterTest.java +++ /dev/null @@ -1,173 +0,0 @@ -/** ********************************************************************** - * - * 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 java.math.BigDecimal; -import java.util.Date; -import java.util.GregorianCalendar; - -import javax.xml.bind.JAXBElement; - -import org.junit.Test; -import org.mustangproject.ZUGFeRD.model.CrossIndustryDocumentType; - -public class ZUGFeRDTransactionModelConverterTest { - @Test - public void convertToModel_convertsMinimalTransactionToValidXml() throws Exception { - // setup - IZUGFeRDExportableTransaction transaction = new IZUGFeRDExportableTransactionImpl() - .setIssueDate(createDate(2000, 1, 1)) - .setDeliveryDate(createDate(2000, 1, 2)) - .setDueDate(createDate(2000, 1, 3)) - .setNumber("num") - .setRecipient(new IZUGFeRDExportableContactImpl() - .setName("recipient name") - .setStreet("recipient street") - .setLocation("recipient city") - .setCountry("recipient country") - ) - .setOwnOrganisationName("own org") - .setOwnStreet("own street") - .setOwnCountry("own country") - .setOwnLocation("own city") - .setTradeSettlementPayment(new IZUGFeRDTradeSettlementPaymentImpl().setOwnBankName("own bank")) - .setZFItems( - new IZUGFeRDExportableItemImpl() - .setProduct(new IZUGFeRDExportableProductImpl() - .setVatPercent(new BigDecimal("1.19")) - .setName("product name") - .setDescription("product description") - .setUnit("product unit") - ) - .setQuantity(BigDecimal.ONE) - .setPrice(BigDecimal.TEN) - ); - - // execution - final JAXBElement<CrossIndustryDocumentType> actual = - new ZUGFeRDTransactionModelConverter(transaction).convertToModel(); - - // evaluation - ZUGFeRDXMLAssert.assertValidZugferd(actual); - } - - @Test - public void convertToModel_convertsWithDateFormatToValidXml() throws Exception { - // setup - IZUGFeRDExportableTransaction transaction = new IZUGFeRDExportableTransactionImpl() - .setIssueDate(createDate(2000, 1, 1)) - .setZfDeliveryDate(createZfDate(2000, 1, 2, ZUGFeRDDateFormat.DATE)).setDueDate(createDate(2000, 1, 3)) - .setNumber("num") - .setRecipient(new IZUGFeRDExportableContactImpl().setName("recipient name") - .setStreet("recipient street").setLocation("recipient city").setCountry("recipient country")) - .setOwnOrganisationName("own org").setOwnStreet("own street").setOwnCountry("own country") - .setOwnLocation("own city") - .setTradeSettlementPayment(new IZUGFeRDTradeSettlementPaymentImpl().setOwnBankName("own bank")) - .setZFItems(new IZUGFeRDExportableItemImpl() - .setProduct(new IZUGFeRDExportableProductImpl().setVatPercent(new BigDecimal("1.19")) - .setName("product name").setDescription("product description").setUnit("product unit")) - .setQuantity(BigDecimal.ONE).setPrice(BigDecimal.TEN)); - - // execution - final JAXBElement<CrossIndustryDocumentType> actual = new ZUGFeRDTransactionModelConverter(transaction) - .convertToModel(); - - // evaluation - ZUGFeRDXMLAssert.assertValidZugferd(actual); - } - - @Test - public void convertToModel_convertsWithWeekFormatToValidXml() throws Exception { - // setup - IZUGFeRDExportableTransaction transaction = new IZUGFeRDExportableTransactionImpl() - .setIssueDate(createDate(2000, 1, 1)) - .setZfDeliveryDate(createZfDate(2000, 1, 2, ZUGFeRDDateFormat.WEEK_OF_YEAR)) - .setDueDate(createDate(2000, 1, 3)).setNumber("num") - .setRecipient(new IZUGFeRDExportableContactImpl().setName("recipient name") - .setStreet("recipient street").setLocation("recipient city").setCountry("recipient country")) - .setOwnOrganisationName("own org").setOwnStreet("own street").setOwnCountry("own country") - .setOwnLocation("own city") - .setTradeSettlementPayment(new IZUGFeRDTradeSettlementPaymentImpl().setOwnBankName("own bank")) - .setZFItems(new IZUGFeRDExportableItemImpl() - .setProduct(new IZUGFeRDExportableProductImpl().setVatPercent(new BigDecimal("1.19")) - .setName("product name").setDescription("product description").setUnit("product unit")) - .setQuantity(BigDecimal.ONE).setPrice(BigDecimal.TEN)); - - // execution - final JAXBElement<CrossIndustryDocumentType> actual = new ZUGFeRDTransactionModelConverter(transaction) - .convertToModel(); - - // evaluation - ZUGFeRDXMLAssert.assertValidZugferd(actual); - } - - @Test - public void convertToModel_convertsWithMonthFormatToValidXml() throws Exception { - // setup - IZUGFeRDExportableTransaction transaction = new IZUGFeRDExportableTransactionImpl() - .setIssueDate(createDate(2000, 1, 1)) - .setZfDeliveryDate(createZfDate(2000, 1, 2, ZUGFeRDDateFormat.MONTH_OF_YEAR)) - .setDueDate(createDate(2000, 1, 3)) - .setNumber("num") - .setRecipient(new IZUGFeRDExportableContactImpl() - .setName("recipient name") - .setStreet("recipient street") - .setLocation("recipient city") - .setCountry("recipient country") - ) - .setOwnOrganisationName("own org") - .setOwnStreet("own street") - .setOwnCountry("own country") - .setOwnLocation("own city") - .setTradeSettlementPayment(new IZUGFeRDTradeSettlementPaymentImpl().setOwnBankName("own bank")) - .setZFItems( - new IZUGFeRDExportableItemImpl() - .setProduct(new IZUGFeRDExportableProductImpl() - .setVatPercent(new BigDecimal("1.19")) - .setName("product name") - .setDescription("product description") - .setUnit("product unit") - ) - .setQuantity(BigDecimal.ONE) - .setPrice(BigDecimal.TEN) - ); - - // execution - final JAXBElement<CrossIndustryDocumentType> actual = - new ZUGFeRDTransactionModelConverter(transaction).convertToModel(); - - // evaluation - ZUGFeRDXMLAssert.assertValidZugferd(actual); - } - - private static Date createDate(int year, int month, int day) { - final GregorianCalendar calendar = new GregorianCalendar(); - calendar.set(year, month - 1, day); - return calendar.getTime(); - } - - private static IZUGFeRDDate createZfDate(int year, int month, int day, ZUGFeRDDateFormat format) { - final GregorianCalendar calendar = new GregorianCalendar(); - calendar.set(year, month - 1, day); - IZUGFeRDDateImpl date = new IZUGFeRDDateImpl(); - date.setDate(calendar.getTime()); - date.setFormat(format); - return date; - } -} diff --git a/library/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDXMLAssert.java b/library/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDXMLAssert.java deleted file mode 100644 index 55c3313e9..000000000 --- a/library/src/test/java/org/mustangproject/ZUGFeRD/ZUGFeRDXMLAssert.java +++ /dev/null @@ -1,56 +0,0 @@ -/** ********************************************************************** - * - * 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 com.helger.schematron.ISchematronResource; -import com.helger.schematron.pure.SchematronResourcePure; -import org.junit.Assert; -import org.mustangproject.ZUGFeRD.model.CrossIndustryDocumentType; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.parsers.DocumentBuilderFactory; - -public class ZUGFeRDXMLAssert { - private static final ISchematronResource SCHEMATRON = loadSchematron(); - - public static void assertValidZugferd(JAXBElement<CrossIndustryDocumentType> xml) throws Exception { - assertValidZugferd(toDocument(xml)); - } - - public static void assertValidZugferd(Node xml) throws Exception { - Assert.assertTrue("schema valid", SCHEMATRON.getSchematronValidity(xml, null).isValid()); - } - - private static Document toDocument(Object jaxbElement) throws Exception { - final Document result = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); - JAXBContext.newInstance("org.mustangproject.ZUGFeRD.model").createMarshaller().marshal(jaxbElement, result); - return result; - } - - private static SchematronResourcePure loadSchematron() { - final SchematronResourcePure result = SchematronResourcePure.fromClassPath("/ZUGFeRD_1p0.scmt"); - if (!result.isValidSchematron()) { - throw new IllegalArgumentException("Invalid Schematron!"); - } - return result; - } -} diff --git a/log/ZUV-2019-12.log b/log/ZUV-2019-12.log deleted file mode 100644 index 0434c06f2..000000000 --- a/log/ZUV-2019-12.log +++ /dev/null @@ -1,9 +0,0 @@ -2019-12-05 18:48:02.579 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd2p0_en16931.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.3.jar!/xslt/zugferd2p0_en16931.xslt] -2019-12-05 18:48:07.897 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2019-12-05 18:48:08.088 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:8CD3349F0AFAF8086D78762980755AD24F85A1E1 Profile:urn:cen.eu:en16931:2017 Version:2 Took:1575568088088ms -2019-12-07 19:06:29.130 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd2p0_en16931.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.3.jar!/xslt/zugferd2p0_en16931.xslt] -2019-12-07 19:06:34.454 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2019-12-07 19:06:34.643 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:D8EB22DB33F15DCAF90707A09914CBF97036EBDD Profile:urn:cen.eu:en16931:2017 Version:2 Took:1575741994643ms -2019-12-07 20:00:02.369 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd2p0_en16931.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.3.jar!/xslt/zugferd2p0_en16931.xslt] -2019-12-07 20:00:07.315 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2019-12-07 20:00:07.496 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:6DBF5C054063C60E22AB35BBB425740164659FFF Profile:urn:cen.eu:en16931:2017 Version:2 Took:1575745207496ms diff --git a/log/ZUV-2020-01.log b/log/ZUV-2020-01.log deleted file mode 100644 index 2140c488d..000000000 --- a/log/ZUV-2020-01.log +++ /dev/null @@ -1,54 +0,0 @@ -2020-01-26 17:29:11.357 [main] ERROR ZUV.ZUGFeRDValidator - Fatal Error 1: File testout-ZF2newEdge.pdf not found -2020-01-26 17:29:11.360 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:null Checksum:null Profile:null Version:null Took:1580056151360ms -2020-01-26 17:29:25.858 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-01-26 17:29:26.007 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 42; columnNumber: 32; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "ram:ExemptionReason" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":ExemptionReasonCode, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":TaxPointDate, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":DueDateTypeCode, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":RateApplicablePercent}" wird erwartet. -2020-01-26 17:29:26.059 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd2p0_en16931.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-Restricted.jar!/xslt/zugferd2p0_en16931.xslt] -2020-01-26 17:29:31.328 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-01-26 17:29:31.510 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Eine Rechnung (INVOICE), die eine Position enthält, in der als Code der Umsatzsteuerkategorie für den in Rechnung gestellten Posten „Invoiced item VAT category code“ (BT-151) der Wert „intra-community supply“ angegeben ist, müssen die Umsatzsteuer-Identifikationsnummer des Verkäufers „Seller VAT identifier“ (BT-31) oder die Umsatzsteuer-Identifikationsnummer des Steuervertreters des Verkäufers „Seller tax representative VAT identifier“ (BT-63) sowie die Umsatzsteuer-Identifikationsnummer des Erwerbers „Buyer VAT identifier“ (BT-48) enthalten. -2020-01-26 17:29:31.511 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Eine Rechnung (INVOICE), die eine Position enthält, in der als Code der Umsatzsteuerkategorie für den in Rechnung gestellten Posten „Invoiced item VAT category code“ (BT-151) der Wert „intra-community supply“ angegeben ist, müssen die Umsatzsteuer-Identifikationsnummer des Verkäufers „Seller VAT identifier“ (BT-31) oder die Umsatzsteuer-Identifikationsnummer des Steuervertreters des Verkäufers „Seller tax representative VAT identifier“ (BT-63) sowie die Umsatzsteuer-Identifikationsnummer des Erwerbers „Buyer VAT identifier“ (BT-48) enthalten. -2020-01-26 17:29:31.511 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Eine Rechnung (INVOICE), die eine Position enthält, in der als Code der Umsatzsteuerkategorie für den in Rechnung gestellten Posten „Invoiced item VAT category code“ (BT-151) der Wert „intra-community supply“ angegeben ist, müssen die Umsatzsteuer-Identifikationsnummer des Verkäufers „Seller VAT identifier“ (BT-31) oder die Umsatzsteuer-Identifikationsnummer des Steuervertreters des Verkäufers „Seller tax representative VAT identifier“ (BT-63) sowie die Umsatzsteuer-Identifikationsnummer des Erwerbers „Buyer VAT identifier“ (BT-48) enthalten. -2020-01-26 17:29:31.511 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Wert von '@schemeID' ist unzulässig. -2020-01-26 17:29:31.511 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-Restricted.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-01-26 17:29:32.060 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [BR-IC-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Intra-community supply" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48). -2020-01-26 17:29:32.061 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [BR-IC-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Intra-community supply" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48). -2020-01-26 17:29:32.061 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [BR-IC-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Intra-community supply" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48). -2020-01-26 17:29:32.061 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [CII-SR-314] - SpecifiedTaxRegistration should not be present -2020-01-26 17:29:32.062 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:59A2B532135AA3119808DCAA8AED16FAF4F788B0 Profile:urn:cen.eu:en16931:2017 Version:2 Took:1580056172061ms -2020-01-26 17:39:27.383 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-01-26 17:39:27.533 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 42; columnNumber: 32; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "ram:ExemptionReason" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":ExemptionReasonCode, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":TaxPointDate, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":DueDateTypeCode, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":RateApplicablePercent}" wird erwartet. -2020-01-26 17:39:27.587 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd2p0_en16931.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-Restricted.jar!/xslt/zugferd2p0_en16931.xslt] -2020-01-26 17:39:32.791 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-01-26 17:39:32.982 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Wert von '@schemeID' ist unzulässig. -2020-01-26 17:39:32.983 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-Restricted.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-01-26 17:39:33.600 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [CII-SR-314] - SpecifiedTaxRegistration should not be present -2020-01-26 17:39:33.601 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:4A9DEA3CCBE63E46BA17CE6FC082A6FA546F0E85 Profile:urn:cen.eu:en16931:2017 Version:2 Took:1580056773600ms -2020-01-26 17:42:57.546 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-01-26 17:42:57.692 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 42; columnNumber: 32; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "ram:ExemptionReason" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":ExemptionReasonCode, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":TaxPointDate, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":DueDateTypeCode, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":RateApplicablePercent}" wird erwartet. -2020-01-26 17:42:57.736 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd2p0_en16931.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-Restricted.jar!/xslt/zugferd2p0_en16931.xslt] -2020-01-26 17:43:03.385 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-01-26 17:43:03.564 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Wert von '@schemeID' ist unzulässig. -2020-01-26 17:43:03.565 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-Restricted.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-01-26 17:43:04.141 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [CII-SR-314] - SpecifiedTaxRegistration should not be present -2020-01-26 17:43:04.142 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:4CE0D1B4B33A8BE26442B0634894FC1E772753EA Profile:urn:cen.eu:en16931:2017 Version:2 Took:1580056984142ms -2020-01-26 17:45:39.295 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-01-26 17:45:39.501 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd2p0_en16931.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-Restricted.jar!/xslt/zugferd2p0_en16931.xslt] -2020-01-26 17:45:45.516 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-01-26 17:45:45.699 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Wert von '@schemeID' ist unzulässig. -2020-01-26 17:45:45.699 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-Restricted.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-01-26 17:45:46.226 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [CII-SR-314] - SpecifiedTaxRegistration should not be present -2020-01-26 17:45:46.227 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:4BFEF5BC4A69634E50A5AEBA459E90B5341F1999 Profile:urn:cen.eu:en16931:2017 Version:2 Took:1580057146227ms -2020-01-26 17:46:51.337 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-01-26 17:46:51.529 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd2p0_en16931.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-Restricted.jar!/xslt/zugferd2p0_en16931.xslt] -2020-01-26 17:46:56.709 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-01-26 17:46:56.885 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Wert von '@schemeID' ist unzulässig. -2020-01-26 17:46:56.886 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-Restricted.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-01-26 17:46:57.463 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [CII-SR-314] - SpecifiedTaxRegistration should not be present -2020-01-26 17:46:57.464 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:4BFEF5BC4A69634E50A5AEBA459E90B5341F1999 Profile:urn:cen.eu:en16931:2017 Version:2 Took:1580057217464ms diff --git a/log/ZUV-2020-02.log b/log/ZUV-2020-02.log deleted file mode 100644 index 4be62727a..000000000 --- a/log/ZUV-2020-02.log +++ /dev/null @@ -1,154 +0,0 @@ -2020-02-15 13:37:39.633 [main] ERROR ZUV.ZUGFeRDValidator - Fatal Error 1: File testout-ZF2new.pdf not found -2020-02-15 13:37:39.636 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:null Checksum:null Profile:null Version:null Took:1581770259636ms -2020-02-15 13:37:50.241 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-02-15 13:37:50.569 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 116; columnNumber: 16; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "test" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":ID, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":GlobalID, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":Name, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":Description, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":SpecifiedLegalOrganization, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":DefinedTradeContact, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":PostalTradeAddress, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":URIUniversalCommunication, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":SpecifiedTaxRegistration}" wird erwartet. -2020-02-15 13:37:50.634 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-15 13:37:57.381 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-15 13:37:57.612 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-15 13:37:57.613 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-15 13:37:58.291 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:E861C5CF2CD9FC00C1DB0AA47A95077573C09A69 Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581770278291ms -2020-02-15 13:41:45.916 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-02-15 13:41:46.223 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 119; columnNumber: 19; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "ram:Name" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":SpecifiedTaxRegistration}" wird erwartet. -2020-02-15 13:41:46.304 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-15 13:41:52.739 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-15 13:41:52.970 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-15 13:41:52.976 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Attribute '@schemeID' is required in this context. -2020-02-15 13:41:52.977 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-15 13:41:53.655 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:395996F7EE3669289A084C89E0770CF54ED7A4CB Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581770513655ms -2020-02-16 12:58:12.795 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-02-16 12:58:13.073 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 119; columnNumber: 19; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "ram:Name" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":SpecifiedTaxRegistration}" wird erwartet. -2020-02-16 12:58:13.130 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-16 12:58:18.847 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-16 12:58:19.012 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-16 12:58:19.012 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Attribute '@schemeID' is required in this context. -2020-02-16 12:58:19.012 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-16 12:58:19.557 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:395996F7EE3669289A084C89E0770CF54ED7A4CB Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581854299557ms -2020-02-16 12:58:30.404 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-02-16 12:58:30.656 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 42; columnNumber: 29; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "ram:CategoryCode" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":TaxPointDate, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":DueDateTypeCode, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":RateApplicablePercent}" wird erwartet. -2020-02-16 12:58:30.708 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-16 12:58:36.341 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-16 12:58:36.494 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-16 12:58:36.494 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Attribute '@schemeID' is required in this context. -2020-02-16 12:58:36.494 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Element 'ram:TypeCode' must occur exactly 1 times. -2020-02-16 12:58:36.495 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-16 12:58:37.086 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [CII-SR-314] - SpecifiedTaxRegistration should not be present -2020-02-16 12:58:37.086 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list -2020-02-16 12:58:37.086 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list -2020-02-16 12:58:37.086 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list -2020-02-16 12:58:37.087 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:533BAFD37E73C9FFC716BBFBECBF42E8C085989C Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581854317087ms -2020-02-16 13:04:02.397 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-02-16 13:04:02.638 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 119; columnNumber: 19; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "ram:Name" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":SpecifiedTaxRegistration}" wird erwartet. -2020-02-16 13:04:02.679 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-16 13:04:07.972 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-16 13:04:08.141 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-16 13:04:08.141 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Attribute '@schemeID' is required in this context. -2020-02-16 13:04:08.142 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-16 13:04:08.662 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:395996F7EE3669289A084C89E0770CF54ED7A4CB Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581854648661ms -2020-02-16 13:06:27.607 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 119; columnNumber: 19; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "ram:Name" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":SpecifiedTaxRegistration}" wird erwartet. -2020-02-16 13:06:27.730 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-16 13:06:32.856 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-16 13:06:33.201 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-16 13:06:33.202 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Attribute '@schemeID' is required in this context. -2020-02-16 13:06:33.202 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-16 13:06:33.961 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:valid XML:invalid Signature:null Checksum:798F1730147F6D54FD4A43A822792B5ACF1D641A Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581854793961ms -2020-02-16 13:09:33.633 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 119; columnNumber: 19; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "ram:Name" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":SpecifiedTaxRegistration}" wird erwartet. -2020-02-16 13:09:33.760 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-16 13:09:38.398 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-16 13:09:38.696 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-16 13:09:38.696 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Attribute '@schemeID' is required in this context. -2020-02-16 13:09:38.696 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-16 13:09:39.293 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:valid XML:invalid Signature:null Checksum:798F1730147F6D54FD4A43A822792B5ACF1D641A Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581854979293ms -2020-02-16 13:10:56.568 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 119; columnNumber: 19; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "ram:Name" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":SpecifiedTaxRegistration}" wird erwartet. -2020-02-16 13:10:56.687 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-16 13:11:01.688 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-16 13:11:02.004 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-16 13:11:02.004 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Attribute '@schemeID' is required in this context. -2020-02-16 13:11:02.004 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-16 13:11:02.670 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:valid XML:invalid Signature:null Checksum:798F1730147F6D54FD4A43A822792B5ACF1D641A Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581855062670ms -2020-02-16 13:12:45.837 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-16 13:12:50.536 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-16 13:12:50.826 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-16 13:12:50.826 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-16 13:12:51.423 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:valid XML:invalid Signature:null Checksum:488E84CBDBEE6199C04ABFBF396B710BAF9F3C60 Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581855171423ms -2020-02-16 18:19:02.676 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-02-16 18:19:02.946 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 42; columnNumber: 29; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "ram:CategoryCode" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":TaxPointDate, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":DueDateTypeCode, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":RateApplicablePercent}" wird erwartet. -2020-02-16 18:19:03.006 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-16 18:19:08.256 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-16 18:19:08.419 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-16 18:19:08.420 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Element 'ram:TypeCode' must occur exactly 1 times. -2020-02-16 18:19:08.420 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-16 18:19:08.946 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [CII-SR-314] - SpecifiedTaxRegistration should not be present -2020-02-16 18:19:08.946 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list -2020-02-16 18:19:08.946 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list -2020-02-16 18:19:08.947 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list -2020-02-16 18:19:08.947 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:F5FFC130AEEC4F207F5E963F911FA7B1AEE2EE0F Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581873548947ms -2020-02-16 18:20:16.445 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 42; columnNumber: 29; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "ram:CategoryCode" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":TaxPointDate, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":DueDateTypeCode, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":RateApplicablePercent}" wird erwartet. -2020-02-16 18:20:16.576 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-16 18:20:21.333 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-16 18:20:21.665 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-16 18:20:21.666 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Element 'ram:TypeCode' must occur exactly 1 times. -2020-02-16 18:20:21.667 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-16 18:20:22.325 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [CII-SR-314] - SpecifiedTaxRegistration should not be present -2020-02-16 18:20:22.326 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list -2020-02-16 18:20:22.326 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list -2020-02-16 18:20:22.326 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list -2020-02-16 18:20:22.326 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:valid XML:invalid Signature:null Checksum:DBC2A919CAE8B16DE5FC88D20F9EBA3C5B118D11 Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581873622326ms -2020-02-16 18:28:59.161 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-02-16 18:28:59.441 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-16 18:29:04.802 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-16 18:29:04.947 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-16 18:29:04.947 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Element 'ram:TypeCode' must occur exactly 1 times. -2020-02-16 18:29:04.948 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-16 18:29:05.453 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [CII-SR-314] - SpecifiedTaxRegistration should not be present -2020-02-16 18:29:05.454 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:B80EC65A33D7D814438A37B0B83BE9D1783C9296 Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581874145454ms -2020-02-16 18:32:54.102 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-02-16 18:32:54.346 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 50; columnNumber: 33; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "ram:IssuerAssignedID" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":Name, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":AttachmentBinaryObject, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":ReferenceTypeCode, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":FormattedIssueDateTime}" wird erwartet. -2020-02-16 18:32:54.391 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-16 18:32:59.721 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-16 18:32:59.880 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-16 18:32:59.881 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of 'ram:TypeCode' is not allowed. -2020-02-16 18:32:59.882 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-16 18:33:00.447 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [CII-SR-314] - SpecifiedTaxRegistration should not be present -2020-02-16 18:33:00.448 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:B928C63AB3C095182BBC0284B62135A06702B8B0 Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581874380448ms -2020-02-16 18:33:50.670 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-02-16 18:33:50.915 [main] ERROR ZUV.ZUGFeRDValidator - Error 18: schema validation fails:org.xml.sax.SAXParseException; lineNumber: 50; columnNumber: 33; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "ram:IssuerAssignedID" gefunden. "{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":Name, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":AttachmentBinaryObject, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":ReferenceTypeCode, "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":FormattedIssueDateTime}" wird erwartet. -2020-02-16 18:33:50.961 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-16 18:33:56.532 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-16 18:33:56.702 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-16 18:33:56.703 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-16 18:33:57.235 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [CII-SR-314] - SpecifiedTaxRegistration should not be present -2020-02-16 18:33:57.236 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:29EA6307544F95F8234E0A67FC1384585E80DE27 Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581874437236ms -2020-02-16 18:35:38.449 [main] ERROR ZUV.ZUGFeRDValidator - Error 23: Not a PDF/A-3 -2020-02-16 18:35:38.743 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/zugferd21_en16931.xsl; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/zugferd21_en16931.xsl] -2020-02-16 18:35:44.171 [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@55f96302 -2020-02-16 18:35:44.328 [main] ERROR ZUV.ZUGFeRDValidator - Error 4: - Value of '@schemeID' is not allowed. -2020-02-16 18:35:44.329 [main] INFO c.h.s.x.SchematronResourceXSLTCache - Compiling XSLT instance [cpPath=/xslt/cii16931schematron/EN16931-CII-validation.xslt; urlResolved=true; URL=jar:file:/Users/jstaerk/workspace/ZUV/target/ZUV-0.8.4-RESTRICTED.jar!/xslt/cii16931schematron/EN16931-CII-validation.xslt] -2020-02-16 18:35:44.883 [main] ERROR ZUV.ZUGFeRDValidator - Error 24: [CII-SR-314] - SpecifiedTaxRegistration should not be present -2020-02-16 18:35:44.884 [main] INFO ZUV.ZUGFeRDValidator - Parsed PDF:invalid XML:invalid Signature:Mustang Checksum:B980F2EA3D5E16700C2C82CB6ECA3E32045FB5C7 Profile:urn:cen.eu:en16931:2017 Version:2 Took:1581874544884ms