first attempt to remove jaxb from zfv1
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
<artifactId>library</artifactId>
|
<artifactId>library</artifactId>
|
||||||
<version>2.0.0-SNAPSHOT</version>
|
<version>2.0.0-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>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. </name>
|
<name>Library to write and read FacturX and ZUGFeRD e-invoices. </name>
|
||||||
<description>The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs
|
<description>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.
|
||||||
</description>
|
</description>
|
||||||
<url>http://www.mustangproject.org/</url>
|
<url>http://www.mustangproject.org/</url>
|
||||||
<scm>
|
<scm>
|
||||||
@@ -56,26 +56,6 @@
|
|||||||
<artifactId>Saxon-HE</artifactId>
|
<artifactId>Saxon-HE</artifactId>
|
||||||
<version>9.8.0-11</version>
|
<version>9.8.0-11</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.sun.xml.bind</groupId>
|
|
||||||
<artifactId>jaxb-impl</artifactId>
|
|
||||||
<version>2.2.11</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.sun.xml.bind</groupId>
|
|
||||||
<artifactId>jaxb-core</artifactId>
|
|
||||||
<version>2.2.11</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.glassfish.jaxb</groupId>
|
|
||||||
<artifactId>jaxb-runtime</artifactId>
|
|
||||||
<version>2.2.11</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.xml.bind</groupId>
|
|
||||||
<artifactId>jaxb-api</artifactId>
|
|
||||||
<version>2.3.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.activation</groupId>
|
<groupId>javax.activation</groupId>
|
||||||
<artifactId>activation</artifactId>
|
<artifactId>activation</artifactId>
|
||||||
@@ -246,18 +226,6 @@
|
|||||||
<include>**</include>
|
<include>**</include>
|
||||||
</includes>
|
</includes>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
|
||||||
<artifact>com.sun.xml.bind:jaxb-impl</artifact>
|
|
||||||
<includes>
|
|
||||||
<include>**</include>
|
|
||||||
</includes>
|
|
||||||
</filter>
|
|
||||||
<filter>
|
|
||||||
<artifact>com.sun.xml.bind:jaxb-core</artifact>
|
|
||||||
<includes>
|
|
||||||
<include>**</include>
|
|
||||||
</includes>
|
|
||||||
</filter>
|
|
||||||
</filters>
|
</filters>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
@@ -291,26 +259,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>jaxb2-maven-plugin</artifactId>
|
|
||||||
<version>2.5.0</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>xjc</id>
|
|
||||||
<goals>
|
|
||||||
<goal>xjc</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<target>2.1</target>
|
|
||||||
<packageName>org.mustangproject.ZUGFeRD.model</packageName>
|
|
||||||
<sources>
|
|
||||||
<source>src/main/resources/schema/ZUGFeRD1p0.xsd</source>
|
|
||||||
</sources>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<mailingLists>
|
<mailingLists>
|
||||||
|
|||||||
@@ -18,102 +18,629 @@
|
|||||||
*********************************************************************** */
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import org.mustangproject.ZUGFeRD.model.CrossIndustryDocumentType;
|
import org.dom4j.Document;
|
||||||
import org.mustangproject.ZUGFeRD.model.DocumentContextParameterTypeConstants;
|
import org.dom4j.DocumentException;
|
||||||
import org.mustangproject.ZUGFeRD.model.ZFNamespacePrefixMapper;
|
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 java.io.IOException;
|
||||||
import javax.xml.bind.JAXBElement;
|
import java.io.StringWriter;
|
||||||
import javax.xml.bind.JAXBException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import javax.xml.bind.Marshaller;
|
import java.math.BigDecimal;
|
||||||
import java.io.ByteArrayOutputStream;
|
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 {
|
public class ZUGFeRD1PullProvider implements IXMLProvider, IProfileProvider {
|
||||||
|
|
||||||
|
private class LineCalc {
|
||||||
|
private BigDecimal totalGross;
|
||||||
|
private BigDecimal priceGross;
|
||||||
|
private BigDecimal itemTotalNetAmount;
|
||||||
|
private BigDecimal itemTotalVATAmount;
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getItemTotalNetAmount() {
|
||||||
|
return itemTotalNetAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getItemTotalVATAmount() {
|
||||||
|
return itemTotalVATAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getItemTotalGrossAmount() {
|
||||||
|
return itemTotalVATAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPriceGross() {
|
||||||
|
return priceGross;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//// MAIN CLASS
|
||||||
|
|
||||||
protected byte[] zugferdData;
|
protected byte[] zugferdData;
|
||||||
private Marshaller marshaller;
|
private IZUGFeRDExportableTransaction trans;
|
||||||
|
|
||||||
private boolean isTest;
|
|
||||||
private ZUGFeRDConformanceLevel level;
|
private ZUGFeRDConformanceLevel level;
|
||||||
|
private String paymentTermsDescription;
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setProfile(ZUGFeRDConformanceLevel level) {
|
public void setProfile(ZUGFeRDConformanceLevel level) {
|
||||||
this.level = level;
|
this.level = level;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getProfile() {
|
|
||||||
switch (level) {
|
|
||||||
case BASIC: return DocumentContextParameterTypeConstants.BASIC;
|
|
||||||
case COMFORT: return DocumentContextParameterTypeConstants.COMFORT;
|
|
||||||
default: return DocumentContextParameterTypeConstants.EXTENDED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enables the flag to indicate a test invoice in the XML structure
|
* enables the flag to indicate a test invoice in the XML structure
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setTest() {
|
public void setTest() {
|
||||||
isTest = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ZUGFeRD1PullProvider() {
|
public static String nDigitFormat(BigDecimal value, int scale) {
|
||||||
// TODO Auto-generated constructor stub
|
/*
|
||||||
try {
|
* I needed 123,45, locale independent.I tried
|
||||||
marshaller = JAXBContext.newInstance("org.mustangproject.ZUGFeRD.model").createMarshaller();
|
* NumberFormat.getCurrencyInstance().format( 12345.6789 ); but that is locale
|
||||||
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
|
* specific.I also tried DecimalFormat df = new DecimalFormat( "0,00" );
|
||||||
marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
|
* df.setDecimalSeparatorAlwaysShown(true); df.setGroupingUsed(false);
|
||||||
marshaller.setProperty("com.sun.xml.bind.namespacePrefixMapper", new ZFNamespacePrefixMapper());
|
* DecimalFormatSymbols symbols = new DecimalFormatSymbols();
|
||||||
} catch (JAXBException e) {
|
* symbols.setDecimalSeparator(','); symbols.setGroupingSeparator(' ');
|
||||||
throw new ZUGFeRDExportException("Could not initialize JAXB", e);
|
* 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 createZugferdXMLForTransaction(IZUGFeRDExportableTransaction trans) {
|
private String vatFormat(BigDecimal value) {
|
||||||
|
return ZUGFeRD1PullProvider.nDigitFormat(value, 2);
|
||||||
JAXBElement<CrossIndustryDocumentType> jaxElement =
|
|
||||||
new ZUGFeRDTransactionModelConverter(trans).withTest(isTest).withProfile(getProfile()).convertToModel();
|
|
||||||
|
|
||||||
try {
|
|
||||||
return marshalJaxToXMLString(jaxElement);
|
|
||||||
} catch (JAXBException e) {
|
|
||||||
throw new ZUGFeRDExportException("Could not marshal ZUGFeRD transaction to XML", e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String marshalJaxToXMLString(Object jaxElement) throws JAXBException {
|
private String currencyFormat(BigDecimal value) {
|
||||||
ByteArrayOutputStream outputXml = new ByteArrayOutputStream();
|
return ZUGFeRD1PullProvider.nDigitFormat(value, 2);
|
||||||
marshaller.marshal(jaxElement, outputXml);
|
|
||||||
return outputXml.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String priceFormat(BigDecimal value) {
|
||||||
|
return ZUGFeRD1PullProvider.nDigitFormat(value, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String quantityFormat(BigDecimal value) {
|
||||||
|
return ZUGFeRD1PullProvider.nDigitFormat(value, 4);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte[] getXML() {
|
public byte[] getXML() {
|
||||||
return zugferdData;
|
|
||||||
|
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 {
|
||||||
|
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 BigDecimal getTotalPrepaid() {
|
||||||
@Override
|
if (trans.getTotalPrepaidAmount() == null) {
|
||||||
public void generateXML(IZUGFeRDExportableTransaction trans) {
|
return new BigDecimal(0);
|
||||||
// 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);
|
|
||||||
} else {
|
} else {
|
||||||
zugferdData = zugferdRaw;
|
return trans.getTotalPrepaidAmount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private BigDecimal getTotalGross() {
|
||||||
|
|
||||||
|
BigDecimal res = getTotal();
|
||||||
|
HashMap<BigDecimal, VATAmount> VATPercentAmountMap = getVATPercentAmountMap();
|
||||||
|
for (BigDecimal currentTaxPercent : VATPercentAmountMap.keySet()) {
|
||||||
|
VATAmount amount = VATPercentAmountMap.get(currentTaxPercent);
|
||||||
|
res = res.add(amount.getCalculated());
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
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<BigDecimal, VATAmount> getVATPercentAmountMap() {
|
||||||
|
HashMap<BigDecimal, VATAmount> 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 String getProfile() {
|
||||||
|
return "urn:ferd:CrossIndustryDocument:invoice:1p0:comfort";
|
||||||
|
}
|
||||||
|
|
||||||
|
protected String getContactAsXML(IZUGFeRDExportableContact contact) {
|
||||||
|
String xml = " <ram:Name>" + XMLTools.encodeXML(contact.getName()) + "</ram:Name>\n" //$NON-NLS-2$
|
||||||
|
// + " <DefinedTradeContact>\n"
|
||||||
|
// + " <PersonName>xxx</PersonName>\n"
|
||||||
|
// + " </DefinedTradeContact>\n"
|
||||||
|
+ " <ram:PostalTradeAddress>\n"
|
||||||
|
+ " <ram:PostcodeCode>" + XMLTools.encodeXML(contact.getZIP())
|
||||||
|
+ "</ram:PostcodeCode>\n"
|
||||||
|
+ " <ram:LineOne>" + XMLTools.encodeXML(contact.getStreet())
|
||||||
|
+ "</ram:LineOne>\n";
|
||||||
|
if (trans.getRecipient().getAdditionalAddress() != null) {
|
||||||
|
xml += " <ram:LineTwo>" + XMLTools.encodeXML(contact.getAdditionalAddress())
|
||||||
|
+ "</ram:LineTwo>\n";
|
||||||
|
}
|
||||||
|
xml += " <ram:CityName>" + XMLTools.encodeXML(contact.getLocation())
|
||||||
|
+ "</ram:CityName>\n"
|
||||||
|
+ " <ram:CountryID>" + XMLTools.encodeXML(contact.getCountry())
|
||||||
|
+ "</ram:CountryID>\n"
|
||||||
|
+ " </ram:PostalTradeAddress>\n";
|
||||||
|
if (contact.getVATID() != null) {
|
||||||
|
xml += " <ram:SpecifiedTaxRegistration>\n"
|
||||||
|
+ " <ram:ID schemeID=\"VA\">" + XMLTools.encodeXML(contact.getVATID())
|
||||||
|
+ "</ram:ID>\n"
|
||||||
|
+ " </ram:SpecifiedTaxRegistration>\n";
|
||||||
|
}
|
||||||
|
return xml;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateXML(IZUGFeRDExportableTransaction trans) {
|
||||||
|
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 = "" + "<ram:IncludedNote>\n" + " <ram:Content>\n"
|
||||||
|
+ XMLTools.encodeXML(trans.getOwnOrganisationFullPlaintextInfo()) + " </ram:Content>\n"
|
||||||
|
+ "<ram:SubjectCode>REG</ram:SubjectCode>\n" + "</ram:IncludedNote>\n";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
String rebateAgreement = "";
|
||||||
|
if (trans.rebateAgreementExists()) {
|
||||||
|
rebateAgreement = "<ram:IncludedNote>\n" + " <ram:Content>"
|
||||||
|
+ "Es bestehen Rabatt- und Bonusvereinbarungen.</ram:Content>\n"
|
||||||
|
+ "<ram:SubjectCode>AAK</ram:SubjectCode>\n" + "</ram:IncludedNote>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
String subjectNote = "";
|
||||||
|
if (trans.getSubjectNote()!=null) {
|
||||||
|
subjectNote = "<ram:IncludedNote>\n" + " <ram:Content>"
|
||||||
|
+ XMLTools.encodeXML(trans.getSubjectNote())+ "</ram:Content>\n"
|
||||||
|
+ "</ram:IncludedNote>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||||
|
|
||||||
|
+ "<rsm:CrossIndustryDocument xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:rsm=\"urn:ferd:CrossIndustryDocument:invoice:1p0\""
|
||||||
|
// + "
|
||||||
|
// xsi:schemaLocation=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100
|
||||||
|
// ../Schema/ZUGFeRD1p0.xsd\""
|
||||||
|
+ " xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12\""
|
||||||
|
+ " xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15\">\n"
|
||||||
|
+ " <rsm:SpecifiedExchangedDocumentContext>\n"
|
||||||
|
// + "
|
||||||
|
// <ram:TestIndicator><udt:Indicator>"+testBooleanStr+"</udt:Indicator></ram:TestIndicator>\n"
|
||||||
|
//
|
||||||
|
+ " <ram:GuidelineSpecifiedDocumentContextParameter>\n"
|
||||||
|
+ " <ram:ID>" + getProfile() + "</ram:ID>\n"
|
||||||
|
+ " </ram:GuidelineSpecifiedDocumentContextParameter>\n"
|
||||||
|
+ " </rsm:SpecifiedExchangedDocumentContext>\n"
|
||||||
|
+ " <rsm:HeaderExchangedDocument>\n"
|
||||||
|
+ " <ram:ID>" + XMLTools.encodeXML(trans.getNumber()) + "</ram:ID>\n" //$NON-NLS-2$
|
||||||
|
+ " <ram:Name>RECHNUNG</ram:Name>\n"
|
||||||
|
+ " <ram:TypeCode>380</ram:TypeCode>\n"
|
||||||
|
+ " <ram:IssueDateTime><udt:DateTimeString format=\"102\">"
|
||||||
|
+ zugferdDateFormat.format(trans.getIssueDate()) + "</udt:DateTimeString></ram:IssueDateTime>\n" // date
|
||||||
|
// format
|
||||||
|
// was
|
||||||
|
// 20130605
|
||||||
|
+ subjectNote
|
||||||
|
+ rebateAgreement
|
||||||
|
+ senderReg
|
||||||
|
|
||||||
|
+ " </rsm:HeaderExchangedDocument>\n"
|
||||||
|
+ " <rsm:SpecifiedSupplyChainTradeTransaction>\n";
|
||||||
|
int lineID = 0;
|
||||||
|
for (IZUGFeRDExportableItem currentItem : trans.getZFItems()) {
|
||||||
|
lineID++;
|
||||||
|
taxCategoryCode=currentItem.getProduct().getTaxCategoryCode();
|
||||||
|
if (currentItem.getProduct().getTaxExemptionReason() != null) {
|
||||||
|
exemptionReason="<ram:ExemptionReason>" + XMLTools.encodeXML(currentItem.getProduct().getTaxExemptionReason()) + "</ram:ExemptionReason>";
|
||||||
|
}
|
||||||
|
|
||||||
|
LineCalc lc = new LineCalc(currentItem);
|
||||||
|
xml = xml + " <ram:IncludedSupplyChainTradeLineItem>\n" +
|
||||||
|
" <ram:AssociatedDocumentLineDocument>\n"
|
||||||
|
+ " <ram:LineID>" + lineID + "</ram:LineID>\n" //$NON-NLS-2$
|
||||||
|
+ " </ram:AssociatedDocumentLineDocument>\n"
|
||||||
|
+ " <ram:SpecifiedSupplyChainTradeAgreement>\n"
|
||||||
|
+ " <ram:GrossPriceProductTradePrice>\n"
|
||||||
|
+ " <ram:ChargeAmount currencyID=\""+trans.getCurrency()+"\">" + priceFormat(lc.getPriceGross())
|
||||||
|
+ "</ram:ChargeAmount>\n"
|
||||||
|
+ " <ram:BasisQuantity unitCode=\"" + XMLTools.encodeXML(currentItem.getProduct().getUnit())
|
||||||
|
+ "\">" + quantityFormat(currentItem.getBasisQuantity()) +"</ram:BasisQuantity>\n"
|
||||||
|
// + " <AppliedTradeAllowanceCharge>\n"
|
||||||
|
// + " <ChargeIndicator>false</ChargeIndicator>\n"
|
||||||
|
// + " <ActualAmount currencyID=\"EUR\">0.6667</ActualAmount>\n"
|
||||||
|
// + " <Reason>Rabatt</Reason>\n"
|
||||||
|
// + " </AppliedTradeAllowanceCharge>\n"
|
||||||
|
+ " </ram:GrossPriceProductTradePrice>\n"
|
||||||
|
+ " <ram:NetPriceProductTradePrice>\n"
|
||||||
|
+ " <ram:ChargeAmount currencyID=\""+trans.getCurrency()+"\">" + priceFormat(currentItem.getPrice())
|
||||||
|
+ "</ram:ChargeAmount>\n"
|
||||||
|
+ " <ram:BasisQuantity unitCode=\"" + XMLTools.encodeXML(currentItem.getProduct().getUnit())
|
||||||
|
+ "\">" + quantityFormat(currentItem.getBasisQuantity()) +"</ram:BasisQuantity>\n"
|
||||||
|
+ " </ram:NetPriceProductTradePrice>\n"
|
||||||
|
+ " </ram:SpecifiedSupplyChainTradeAgreement>\n"
|
||||||
|
|
||||||
|
|
||||||
|
+ " <ram:SpecifiedSupplyChainTradeDelivery>\n"
|
||||||
|
+ " <ram:BilledQuantity unitCode=\"" + XMLTools.encodeXML(currentItem.getProduct().getUnit()) + "\">" //$NON-NLS-2$
|
||||||
|
+ quantityFormat(currentItem.getQuantity()) + "</ram:BilledQuantity>\n"
|
||||||
|
+ " </ram:SpecifiedSupplyChainTradeDelivery>\n"
|
||||||
|
+ " <ram:SpecifiedSupplyChainTradeSettlement>\n"
|
||||||
|
+ " <ram:ApplicableTradeTax>\n"
|
||||||
|
+ " <ram:TypeCode>VAT</ram:TypeCode>\n"
|
||||||
|
+ exemptionReason
|
||||||
|
+ " <ram:CategoryCode>"+currentItem.getProduct().getTaxCategoryCode()+"</ram:CategoryCode>\n"
|
||||||
|
|
||||||
|
+ " <ram:ApplicablePercent>"
|
||||||
|
+ vatFormat(currentItem.getProduct().getVATPercent()) + "</ram:ApplicablePercent>\n"
|
||||||
|
+ " </ram:ApplicableTradeTax>\n"
|
||||||
|
+ " <ram:SpecifiedTradeSettlementMonetarySummation>\n"
|
||||||
|
+ " <ram:LineTotalAmount currencyID=\""+trans.getCurrency()+"\">" + currencyFormat(lc.getItemTotalNetAmount())
|
||||||
|
+ "</ram:LineTotalAmount>\n"
|
||||||
|
+ " </ram:SpecifiedTradeSettlementMonetarySummation>\n";
|
||||||
|
if (currentItem.getAdditionalReferencedDocumentID()!=null) {
|
||||||
|
xml=xml + " <ram:AdditionalReferencedDocument><ram:ID>"+currentItem.getAdditionalReferencedDocumentID()+"</ram:ID><ram:TypeCode>130</ram:TypeCode></ram:AdditionalReferencedDocument>\n";
|
||||||
|
|
||||||
|
}
|
||||||
|
xml=xml + " </ram:SpecifiedSupplyChainTradeSettlement>\n"
|
||||||
|
+ " <ram:SpecifiedTradeProduct>\n";
|
||||||
|
// + " <GlobalID schemeID=\"0160\">4012345001235</GlobalID>\n"
|
||||||
|
if (currentItem.getProduct().getSellerAssignedID() != null) {
|
||||||
|
xml = xml + " <ram:SellerAssignedID>"
|
||||||
|
+ XMLTools.encodeXML(currentItem.getProduct().getSellerAssignedID()) + "</ram:SellerAssignedID>\n";
|
||||||
|
}
|
||||||
|
if (currentItem.getProduct().getBuyerAssignedID() != null) {
|
||||||
|
xml = xml + " <ram:BuyerAssignedID>"
|
||||||
|
+ XMLTools.encodeXML(currentItem.getProduct().getBuyerAssignedID()) + "</ram:BuyerAssignedID>\n";
|
||||||
|
}
|
||||||
|
xml = xml + " <ram:Name>" + XMLTools.encodeXML(currentItem.getProduct().getName()) + "</ram:Name>\n" //$NON-NLS-2$
|
||||||
|
+ " <ram:Description>" + XMLTools.encodeXML(currentItem.getProduct().getDescription())
|
||||||
|
+ "</ram:Description>\n"
|
||||||
|
+ " </ram:SpecifiedTradeProduct>\n"
|
||||||
|
|
||||||
|
+ " </ram:IncludedSupplyChainTradeLineItem>\n";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
xml = xml + " <ram:ApplicableSupplyChainTradeAgreement>\n";
|
||||||
|
if (trans.getReferenceNumber() != null) {
|
||||||
|
xml = xml + " <ram:BuyerReference>" + XMLTools.encodeXML(trans.getReferenceNumber()) + "</ram:BuyerReference>\n";
|
||||||
|
|
||||||
|
}
|
||||||
|
xml = xml + " <ram:SellerTradeParty>\n";
|
||||||
|
if (trans.getOwnForeignOrganisationID()!=null) {
|
||||||
|
xml = xml + " <ram:ID>" + XMLTools.encodeXML(trans.getOwnForeignOrganisationID()) + "</ram:ID>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((trans.getOwnContact()!=null)&&(trans.getOwnContact().getGlobalID()!=null)&&(trans.getOwnContact().getGlobalIDScheme()!=null)) {
|
||||||
|
xml = xml + " <ram:GlobalID schemeID=\"" + XMLTools.encodeXML(trans.getOwnContact().getGlobalIDScheme()) + "\">"
|
||||||
|
+ XMLTools.encodeXML(trans.getOwnContact().getGlobalID()) + "</ram:GlobalID>\n";
|
||||||
|
}
|
||||||
|
xml = xml + " <ram:Name>" + XMLTools.encodeXML(trans.getOwnOrganisationName()) + "</ram:Name>\n"; //$NON-NLS-2$
|
||||||
|
|
||||||
|
if ((trans.getOwnVATID()!=null)&&(trans.getOwnOrganisationName()!=null)) {
|
||||||
|
|
||||||
|
xml = xml + " <ram:SpecifiedTaxRegistration>\n" + " <ram:ID schemeID=\"VA\">"
|
||||||
|
+ XMLTools.encodeXML(trans.getOwnVATID()) + "</ram:ID>\n"
|
||||||
|
+ " </ram:SpecifiedTaxRegistration>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (trans.getOwnContact() != null) {
|
||||||
|
xml = xml + "<ram:DefinedTradeContact>\n" + " <ram:PersonName>" + XMLTools.encodeXML(trans.getOwnContact().getName())
|
||||||
|
+ "</ram:PersonName>\n";
|
||||||
|
if (trans.getOwnContact().getPhone() != null) {
|
||||||
|
|
||||||
|
xml = xml + " <ram:TelephoneUniversalCommunication>\n" + " <ram:CompleteNumber>"
|
||||||
|
+ XMLTools.encodeXML(trans.getOwnContact().getPhone()) + "</ram:CompleteNumber>\n"
|
||||||
|
+ " </ram:TelephoneUniversalCommunication>\n";
|
||||||
|
}
|
||||||
|
if (trans.getOwnContact().getEMail() != null) {
|
||||||
|
|
||||||
|
xml = xml + " <ram:EmailURIUniversalCommunication>\n" + " <ram:URIID>"
|
||||||
|
+ XMLTools.encodeXML(trans.getOwnContact().getEMail()) + "</ram:URIID>\n"
|
||||||
|
+ " </ram:EmailURIUniversalCommunication>\n";
|
||||||
|
}
|
||||||
|
xml = xml + " </ram:DefinedTradeContact>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
xml = xml + " <ram:PostalTradeAddress>\n" + " <ram:PostcodeCode>"
|
||||||
|
+ XMLTools.encodeXML(trans.getOwnZIP()) + "</ram:PostcodeCode>\n" + " <ram:LineOne>"
|
||||||
|
+ XMLTools.encodeXML(trans.getOwnStreet()) + "</ram:LineOne>\n" + " <ram:CityName>" + XMLTools.encodeXML(trans.getOwnLocation())
|
||||||
|
+ "</ram:CityName>\n" + " <ram:CountryID>" + XMLTools.encodeXML(trans.getOwnCountry())
|
||||||
|
+ "</ram:CountryID>\n" + " </ram:PostalTradeAddress>\n"
|
||||||
|
+ " <ram:SpecifiedTaxRegistration>\n"
|
||||||
|
+ " <ram:ID schemeID=\"FC\">" + XMLTools.encodeXML(trans.getOwnTaxID()) + "</ram:ID>\n" //$NON-NLS-2$
|
||||||
|
+ " </ram:SpecifiedTaxRegistration>\n"
|
||||||
|
+ " <ram:SpecifiedTaxRegistration>\n"
|
||||||
|
+ " <ram:ID schemeID=\"VA\">" + XMLTools.encodeXML(trans.getOwnVATID()) + "</ram:ID>\n" //$NON-NLS-2$
|
||||||
|
+ " </ram:SpecifiedTaxRegistration>\n"
|
||||||
|
+ " </ram:SellerTradeParty>\n"
|
||||||
|
+ " <ram:BuyerTradeParty>\n";
|
||||||
|
// + " <ID>GE2020211</ID>\n"
|
||||||
|
// + " <GlobalID schemeID=\"0088\">4000001987658</GlobalID>\n"
|
||||||
|
|
||||||
|
xml+=getContactAsXML(trans.getRecipient());
|
||||||
|
xml += " </ram:BuyerTradeParty>\n";
|
||||||
|
|
||||||
|
if (trans.getBuyerOrderReferencedDocumentID()!=null) {
|
||||||
|
xml = xml + " <ram:BuyerOrderReferencedDocument>\n"
|
||||||
|
+ " <ram:IssuerAssignedID>"
|
||||||
|
+ XMLTools.encodeXML(trans.getBuyerOrderReferencedDocumentID()) + "</ram:IssuerAssignedID>\n"
|
||||||
|
+ " </ram:BuyerOrderReferencedDocument>\n";
|
||||||
|
}
|
||||||
|
xml = xml + " </ram:ApplicableSupplyChainTradeAgreement>\n"
|
||||||
|
+ " <ram:ApplicableSupplyChainTradeDelivery>\n" ;
|
||||||
|
if (this.trans.getDeliveryAddress()!=null) {
|
||||||
|
xml += "<ram:ShipToTradeParty>"+
|
||||||
|
getContactAsXML(this.trans.getDeliveryAddress())+
|
||||||
|
"</ram:ShipToTradeParty>";
|
||||||
|
}
|
||||||
|
|
||||||
|
xml+= " <ram:ActualDeliverySupplyChainEvent>\n"
|
||||||
|
+ " <ram:OccurrenceDateTime>";
|
||||||
|
|
||||||
|
if (trans.getZFDeliveryDate() != null) {
|
||||||
|
ZUGFeRDDateFormat dateFormat = trans.getZFDeliveryDate().getFormat();
|
||||||
|
Date date = trans.getZFDeliveryDate().getDate();
|
||||||
|
xml += "<udt:DateTimeString format=\"" + dateFormat.getDateTimeType() + "\">"
|
||||||
|
+ dateFormat.getFormatter().format(date) + "</udt:DateTimeString>";
|
||||||
|
} else if (trans.getDeliveryDate() != null) {
|
||||||
|
xml += "<udt:DateTimeString format=\"102\">" + zugferdDateFormat.format(trans.getDeliveryDate())
|
||||||
|
+ "</udt:DateTimeString>";
|
||||||
|
} else {
|
||||||
|
throw new IllegalStateException("No delivery date provided");
|
||||||
|
}
|
||||||
|
xml += "</ram:OccurrenceDateTime>\n";
|
||||||
|
xml += " </ram:ActualDeliverySupplyChainEvent>\n"
|
||||||
|
/*
|
||||||
|
* + " <DeliveryNoteReferencedDocument>\n" +
|
||||||
|
* " <IssueDateTime format=\"102\">20130603</IssueDateTime>\n" +
|
||||||
|
* " <ID>2013-51112</ID>\n" +
|
||||||
|
* " </DeliveryNoteReferencedDocument>\n"
|
||||||
|
*/
|
||||||
|
+ " </ram:ApplicableSupplyChainTradeDelivery>\n" + " <ram:ApplicableSupplyChainTradeSettlement>\n" //$NON-NLS-2$
|
||||||
|
+ " <ram:PaymentReference>" + XMLTools.encodeXML(trans.getNumber()) + "</ram:PaymentReference>\n" //$NON-NLS-2$
|
||||||
|
+ " <ram:InvoiceCurrencyCode>" + trans.getCurrency() + "</ram:InvoiceCurrencyCode>\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<BigDecimal, VATAmount> VATPercentAmountMap = getVATPercentAmountMap();
|
||||||
|
for (BigDecimal currentTaxPercent : VATPercentAmountMap.keySet()) {
|
||||||
|
VATAmount amount = VATPercentAmountMap.get(currentTaxPercent);
|
||||||
|
if (amount != null) {
|
||||||
|
xml += " <ram:ApplicableTradeTax>\n"
|
||||||
|
+ " <ram:CalculatedAmount currencyID=\"" + trans.getCurrency() + "\">" + currencyFormat(amount.getCalculated())
|
||||||
|
+ "</ram:CalculatedAmount>\n" //currencyID=\"EUR\"
|
||||||
|
+ " <ram:TypeCode>VAT</ram:TypeCode>\n"
|
||||||
|
+ exemptionReason
|
||||||
|
+ " <ram:BasisAmount currencyID=\"" + trans.getCurrency() + "\">" + currencyFormat(amount.getBasis()) + "</ram:BasisAmount>\n" // currencyID=\"EUR\"
|
||||||
|
+ " <ram:CategoryCode>"+taxCategoryCode+"</ram:CategoryCode>\n"
|
||||||
|
+ " <ram:ApplicablePercent>" + vatFormat(currentTaxPercent)
|
||||||
|
+ "</ram:ApplicablePercent>\n" + " </ram:ApplicableTradeTax>\n"; //$NON-NLS-2$
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (trans.getPaymentTerms() == null) {
|
||||||
|
xml = xml + " <ram:SpecifiedTradePaymentTerms>\n"
|
||||||
|
+ " <ram:Description>" + paymentTermsDescription + "</ram:Description>\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 + " <ram:DueDateDateTime><udt:DateTimeString format=\"102\">" // $NON-NLS-2$
|
||||||
|
+ zugferdDateFormat.format(trans.getDueDate())
|
||||||
|
+ "</udt:DateTimeString></ram:DueDateDateTime>\n";// 20130704
|
||||||
|
|
||||||
|
}
|
||||||
|
xml = xml + " </ram:SpecifiedTradePaymentTerms>\n";
|
||||||
|
} else {
|
||||||
|
xml = xml + buildPaymentTermsXml();
|
||||||
|
}
|
||||||
|
|
||||||
|
xml = xml + " <ram:SpecifiedTradeSettlementMonetarySummation>\n"
|
||||||
|
+ " <ram:LineTotalAmount currencyID=\""+trans.getCurrency()+"\">" + currencyFormat(getTotal()) + "</ram:LineTotalAmount>\n" //$NON-NLS-2$
|
||||||
|
// currencyID=\"EUR\"
|
||||||
|
+ " <ram:ChargeTotalAmount currencyID=\"" + trans.getCurrency() + "\">0.00</ram:ChargeTotalAmount>\n" // currencyID=\"EUR\"
|
||||||
|
+ " <ram:AllowanceTotalAmount currencyID=\"" + trans.getCurrency() + "\">0.00</ram:AllowanceTotalAmount>\n" //
|
||||||
|
// currencyID=\"EUR\"
|
||||||
|
// + " <ChargeTotalAmount currencyID=\"EUR\">5.80</ChargeTotalAmount>\n"
|
||||||
|
// + " <AllowanceTotalAmount currencyID=\"EUR\">14.73</AllowanceTotalAmount>\n"
|
||||||
|
+ " <ram:TaxBasisTotalAmount currencyID=\"" + trans.getCurrency() + "\">" + currencyFormat(getTotal()) + "</ram:TaxBasisTotalAmount>\n" //$NON-NLS-2$
|
||||||
|
// //
|
||||||
|
// currencyID=\"EUR\"
|
||||||
|
+ " <ram:TaxTotalAmount currencyID=\"" + trans.getCurrency() + "\">"
|
||||||
|
+ currencyFormat(getTotalGross().subtract(getTotal())) + "</ram:TaxTotalAmount>\n"
|
||||||
|
+ " <ram:GrandTotalAmount currencyID=\"" + trans.getCurrency() + "\">" + currencyFormat(getTotalGross()) + "</ram:GrandTotalAmount>\n" //$NON-NLS-2$
|
||||||
|
// //
|
||||||
|
// currencyID=\"EUR\"
|
||||||
|
+ " <ram:TotalPrepaidAmount currencyID=\"" + trans.getCurrency() + "\">" + currencyFormat(getTotalPrepaid()) + "</ram:TotalPrepaidAmount>\n"
|
||||||
|
+ " <ram:DuePayableAmount currencyID=\"" + trans.getCurrency() + "\">" + currencyFormat(getTotalGross().subtract(getTotalPrepaid())) + "</ram:DuePayableAmount>\n" //$NON-NLS-2$
|
||||||
|
// //
|
||||||
|
// currencyID=\"EUR\"
|
||||||
|
+ " </ram:SpecifiedTradeSettlementMonetarySummation>\n"
|
||||||
|
+ " </ram:ApplicableSupplyChainTradeSettlement>\n";
|
||||||
|
// + " <IncludedSupplyChainTradeLineItem>\n"
|
||||||
|
// + " <AssociatedDocumentLineDocument>\n"
|
||||||
|
// + " <IncludedNote>\n"
|
||||||
|
// + " <Content>Wir erlauben uns Ihnen folgende Positionen aus der Lieferung Nr.
|
||||||
|
// 2013-51112 in Rechnung zu stellen:</Content>\n"
|
||||||
|
// + " </IncludedNote>\n"
|
||||||
|
// + " </AssociatedDocumentLineDocument>\n"
|
||||||
|
// + " </IncludedSupplyChainTradeLineItem>\n";
|
||||||
|
|
||||||
|
xml = xml + " </rsm:SpecifiedSupplyChainTradeTransaction>\n"
|
||||||
|
+ "</rsm:CrossIndustryDocument>";
|
||||||
|
|
||||||
|
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 = "<ram:SpecifiedTradePaymentTerms>";
|
||||||
|
|
||||||
|
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 += "<ram:Description>" + paymentTerms.getDescription() + "</ram:Description>";
|
||||||
|
if (dueDate != null) {
|
||||||
|
paymentTermsXml += "<ram:DueDateDateTime>";
|
||||||
|
paymentTermsXml += "<udt:DateTimeString format=\"" + dueDate.getFormat().getDateTimeType() + "\">"
|
||||||
|
+ dueDate.getFormat().getFormatter().format(dueDate.getDate()) + "</udt:DateTimeString>";
|
||||||
|
paymentTermsXml += "</ram:DueDateDateTime>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (discountTerms != null) {
|
||||||
|
paymentTermsXml += "<ram:ApplicableTradePaymentDiscountTerms>";
|
||||||
|
String currency = trans.getCurrency();
|
||||||
|
String basisAmount = currencyFormat(getTotalGross());
|
||||||
|
paymentTermsXml += "<ram:BasisAmount currencyID=\"" + currency + "\">" + basisAmount + "</ram:BasisAmount>";
|
||||||
|
paymentTermsXml += "<ram:CalculationPercent>" + discountTerms.getCalculationPercentage().toString()
|
||||||
|
+ "</ram:CalculationPercent>";
|
||||||
|
|
||||||
|
if (discountTerms.getBaseDate() != null) {
|
||||||
|
Date baseDate = discountTerms.getBaseDate().getDate();
|
||||||
|
ZUGFeRDDateFormat baseDateFormat = discountTerms.getBaseDate().getFormat();
|
||||||
|
paymentTermsXml += "<ram:BasisDateTime>";
|
||||||
|
paymentTermsXml += "<udt:DateTimeString format=\"" + baseDateFormat.getDateTimeType() + "\">" + baseDateFormat.getFormatter().format(baseDate) + "</udt:DateTimeString>";
|
||||||
|
paymentTermsXml += "</ram:BasisDateTime>";
|
||||||
|
|
||||||
|
paymentTermsXml += "<ram:BasisPeriodMeasure unitCode=\"" + discountTerms.getBasePeriodUnitCode() + "\">"
|
||||||
|
+ discountTerms.getBasePeriodMeasure() + "</ram:BasisPeriodMeasure>";
|
||||||
|
}
|
||||||
|
|
||||||
|
paymentTermsXml += "</ram:ApplicableTradePaymentDiscountTerms>";
|
||||||
|
}
|
||||||
|
|
||||||
|
paymentTermsXml += "</ram:SpecifiedTradePaymentTerms>";
|
||||||
|
return paymentTermsXml;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,6 +192,7 @@ public class ZUGFeRDExporter implements Closeable {
|
|||||||
public void setZUGFeRDVersion(int ver) {
|
public void setZUGFeRDVersion(int ver) {
|
||||||
if (ver == 1) {
|
if (ver == 1) {
|
||||||
ZUGFeRD1PullProvider z1p = new ZUGFeRD1PullProvider();
|
ZUGFeRD1PullProvider z1p = new ZUGFeRD1PullProvider();
|
||||||
|
disableFacturX();
|
||||||
this.xmlProvider = z1p;
|
this.xmlProvider = z1p;
|
||||||
} else if (ver == 2) {
|
} else if (ver == 2) {
|
||||||
ZUGFeRD2PullProvider z2p = new ZUGFeRD2PullProvider();
|
ZUGFeRD2PullProvider z2p = new ZUGFeRD2PullProvider();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -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";
|
|
||||||
}
|
|
||||||
@@ -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";
|
|
||||||
}
|
|
||||||
@@ -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";
|
|
||||||
}
|
|
||||||
@@ -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";
|
|
||||||
}
|
|
||||||
@@ -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";
|
|
||||||
}
|
|
||||||
@@ -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<String, String> 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<xs:schema xmlns:rsm="urn:ferd:CrossIndustryDocument:invoice:1p0"
|
|
||||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
||||||
xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:12"
|
|
||||||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12"
|
|
||||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15"
|
|
||||||
targetNamespace="urn:ferd:CrossIndustryDocument:invoice:1p0"
|
|
||||||
elementFormDefault="qualified">
|
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:QualifiedDataType:12"
|
|
||||||
schemaLocation="ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_QualifiedDataType_12.xsd"/>
|
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12"
|
|
||||||
schemaLocation="ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_12.xsd"/>
|
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15"
|
|
||||||
schemaLocation="ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd"/>
|
|
||||||
<xs:element name="CrossIndustryDocument" type="rsm:CrossIndustryDocumentType"/>
|
|
||||||
<xs:complexType name="CrossIndustryDocumentType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="SpecifiedExchangedDocumentContext" type="ram:ExchangedDocumentContextType"/>
|
|
||||||
<xs:element name="HeaderExchangedDocument" type="ram:ExchangedDocumentType"/>
|
|
||||||
<xs:element name="SpecifiedSupplyChainTradeTransaction" type="ram:SupplyChainTradeTransactionType"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:schema>
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<xs:schema xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:12"
|
|
||||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
||||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15"
|
|
||||||
targetNamespace="urn:un:unece:uncefact:data:standard:QualifiedDataType:12"
|
|
||||||
elementFormDefault="qualified"
|
|
||||||
version="12.0">
|
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15"
|
|
||||||
schemaLocation="ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd"/>
|
|
||||||
<xs:simpleType name="AllowanceChargeReasonCodeContentType">
|
|
||||||
<xs:restriction base="xs:token"/>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:complexType name="AllowanceChargeReasonCodeType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="qdt:AllowanceChargeReasonCodeContentType"/>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:simpleType name="CountryIDContentType">
|
|
||||||
<xs:restriction base="xs:token"/>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:complexType name="CountryIDType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="qdt:CountryIDContentType"/>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:simpleType name="DateMandatoryDateTimeType">
|
|
||||||
<xs:union memberTypes="xs:dateTime xs:date"/>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:simpleType name="DeliveryTermsCodeContentType">
|
|
||||||
<xs:restriction base="xs:token"/>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:complexType name="DeliveryTermsCodeType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="qdt:DeliveryTermsCodeContentType"/>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:simpleType name="DocumentCodeContentType">
|
|
||||||
<xs:restriction base="xs:token"/>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:complexType name="DocumentCodeType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="qdt:DocumentCodeContentType"/>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:simpleType name="PaymentMeansCodeContentType">
|
|
||||||
<xs:restriction base="xs:token"/>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:complexType name="PaymentMeansCodeType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="qdt:PaymentMeansCodeContentType"/>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:simpleType name="ReferenceCodeContentType">
|
|
||||||
<xs:restriction base="xs:token"/>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:complexType name="ReferenceCodeType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="qdt:ReferenceCodeContentType"/>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:simpleType name="TaxCategoryCodeContentType">
|
|
||||||
<xs:restriction base="xs:token"/>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:complexType name="TaxCategoryCodeType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="qdt:TaxCategoryCodeContentType"/>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:simpleType name="TaxTypeCodeContentType">
|
|
||||||
<xs:restriction base="xs:token"/>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:complexType name="TaxTypeCodeType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="qdt:TaxTypeCodeContentType"/>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:schema>
|
|
||||||
@@ -1,391 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<xs:schema xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12"
|
|
||||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
||||||
xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:12"
|
|
||||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15"
|
|
||||||
targetNamespace="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12"
|
|
||||||
elementFormDefault="qualified"
|
|
||||||
version="12.0">
|
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:QualifiedDataType:12"
|
|
||||||
schemaLocation="ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_QualifiedDataType_12.xsd"/>
|
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15"
|
|
||||||
schemaLocation="ZUGFeRD1p0_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_15.xsd"/>
|
|
||||||
<xs:complexType name="CreditorFinancialAccountType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="IBANID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
<xs:element name="AccountName" type="udt:TextType" minOccurs="0"/>
|
|
||||||
<xs:element name="ProprietaryID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="CreditorFinancialInstitutionType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="BICID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
<xs:element name="GermanBankleitzahlID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
<xs:element name="Name" type="udt:TextType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="DebtorFinancialAccountType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="IBANID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
<xs:element name="ProprietaryID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="DebtorFinancialInstitutionType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="BICID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
<xs:element name="GermanBankleitzahlID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
<xs:element name="Name" type="udt:TextType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="DocumentContextParameterType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="ID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="DocumentLineDocumentType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="LineID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
<xs:element name="IncludedNote" type="ram:NoteType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="ExchangedDocumentContextType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="TestIndicator" type="udt:IndicatorType" minOccurs="0"/>
|
|
||||||
<xs:element name="BusinessProcessSpecifiedDocumentContextParameter" type="ram:DocumentContextParameterType"
|
|
||||||
minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="GuidelineSpecifiedDocumentContextParameter" type="ram:DocumentContextParameterType"
|
|
||||||
minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="ExchangedDocumentType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="ID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
<xs:element name="Name" type="udt:TextType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="TypeCode" type="qdt:DocumentCodeType" minOccurs="0"/>
|
|
||||||
<xs:element name="IssueDateTime" type="udt:DateTimeType" minOccurs="0"/>
|
|
||||||
<xs:element name="CopyIndicator" type="udt:IndicatorType" minOccurs="0"/>
|
|
||||||
<xs:element name="LanguageID" type="udt:IDType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="IncludedNote" type="ram:NoteType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="EffectiveSpecifiedPeriod" type="ram:SpecifiedPeriodType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="LogisticsServiceChargeType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="Description" type="udt:TextType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="AppliedAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="AppliedTradeTax" type="ram:TradeTaxType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="LogisticsTransportMovementType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="ModeCode" type="udt:CodeType" minOccurs="0"/>
|
|
||||||
<xs:element name="ID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="NoteType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="ContentCode" type="udt:CodeType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="Content" type="udt:TextType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="SubjectCode" type="udt:CodeType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="ProductCharacteristicType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="TypeCode" type="udt:CodeType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="Description" type="udt:TextType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="ValueMeasure" type="udt:MeasureType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="Value" type="udt:TextType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="ProductClassificationType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="ClassCode" type="udt:CodeType" minOccurs="0"/>
|
|
||||||
<xs:element name="ClassName" type="udt:TextType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="ReferencedDocumentType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="IssueDateTime" type="qdt:DateMandatoryDateTimeType" minOccurs="0"/>
|
|
||||||
<xs:element name="LineID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
<xs:element name="TypeCode" type="qdt:DocumentCodeType" minOccurs="0"/>
|
|
||||||
<xs:element name="ID" type="udt:IDType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="ReferenceTypeCode" type="qdt:ReferenceCodeType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="ReferencedProductType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="GlobalID" type="udt:IDType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="SellerAssignedID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
<xs:element name="BuyerAssignedID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
<xs:element name="Name" type="udt:TextType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="Description" type="udt:TextType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="UnitQuantity" type="udt:QuantityType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="SpecifiedPeriodType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="StartDateTime" type="udt:DateTimeType" minOccurs="0"/>
|
|
||||||
<xs:element name="EndDateTime" type="udt:DateTimeType" minOccurs="0"/>
|
|
||||||
<xs:element name="CompleteDateTime" type="udt:DateTimeType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="SupplyChainConsignmentType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="SpecifiedLogisticsTransportMovement" type="ram:LogisticsTransportMovementType"
|
|
||||||
minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="SupplyChainEventType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="OccurrenceDateTime" type="udt:DateTimeType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="SupplyChainTradeAgreementType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="BuyerReference" type="udt:TextType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="SellerTradeParty" type="ram:TradePartyType" minOccurs="0"/>
|
|
||||||
<xs:element name="BuyerTradeParty" type="ram:TradePartyType" minOccurs="0"/>
|
|
||||||
<xs:element name="ProductEndUserTradeParty" type="ram:TradePartyType" minOccurs="0"/>
|
|
||||||
<xs:element name="ApplicableTradeDeliveryTerms" type="ram:TradeDeliveryTermsType" minOccurs="0"/>
|
|
||||||
<xs:element name="BuyerOrderReferencedDocument" type="ram:ReferencedDocumentType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="ContractReferencedDocument" type="ram:ReferencedDocumentType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="AdditionalReferencedDocument" type="ram:ReferencedDocumentType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="GrossPriceProductTradePrice" type="ram:TradePriceType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="NetPriceProductTradePrice" type="ram:TradePriceType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="CustomerOrderReferencedDocument" type="ram:ReferencedDocumentType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="SupplyChainTradeDeliveryType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="BilledQuantity" type="udt:QuantityType" minOccurs="0"/>
|
|
||||||
<xs:element name="ChargeFreeQuantity" type="udt:QuantityType" minOccurs="0"/>
|
|
||||||
<xs:element name="PackageQuantity" type="udt:QuantityType" minOccurs="0"/>
|
|
||||||
<xs:element name="RelatedSupplyChainConsignment" type="ram:SupplyChainConsignmentType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="ShipToTradeParty" type="ram:TradePartyType" minOccurs="0"/>
|
|
||||||
<xs:element name="UltimateShipToTradeParty" type="ram:TradePartyType" minOccurs="0"/>
|
|
||||||
<xs:element name="ShipFromTradeParty" type="ram:TradePartyType" minOccurs="0"/>
|
|
||||||
<xs:element name="ActualDeliverySupplyChainEvent" type="ram:SupplyChainEventType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="DespatchAdviceReferencedDocument" type="ram:ReferencedDocumentType" minOccurs="0"/>
|
|
||||||
<xs:element name="ReceivingAdviceReferencedDocument" type="ram:ReferencedDocumentType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="DeliveryNoteReferencedDocument" type="ram:ReferencedDocumentType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="SupplyChainTradeLineItemType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="AssociatedDocumentLineDocument" type="ram:DocumentLineDocumentType" minOccurs="0"/>
|
|
||||||
<xs:element name="SpecifiedSupplyChainTradeAgreement" type="ram:SupplyChainTradeAgreementType"
|
|
||||||
minOccurs="0"/>
|
|
||||||
<xs:element name="SpecifiedSupplyChainTradeDelivery" type="ram:SupplyChainTradeDeliveryType" minOccurs="0"/>
|
|
||||||
<xs:element name="SpecifiedSupplyChainTradeSettlement" type="ram:SupplyChainTradeSettlementType"
|
|
||||||
minOccurs="0"/>
|
|
||||||
<xs:element name="SpecifiedTradeProduct" type="ram:TradeProductType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="SupplyChainTradeSettlementType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="PaymentReference" type="udt:TextType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="InvoiceCurrencyCode" type="udt:CodeType" minOccurs="0"/>
|
|
||||||
<xs:element name="InvoiceeTradeParty" type="ram:TradePartyType" minOccurs="0"/>
|
|
||||||
<xs:element name="PayeeTradeParty" type="ram:TradePartyType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="SpecifiedTradeSettlementPaymentMeans" type="ram:TradeSettlementPaymentMeansType"
|
|
||||||
minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="ApplicableTradeTax" type="ram:TradeTaxType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="BillingSpecifiedPeriod" type="ram:SpecifiedPeriodType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="SpecifiedTradeAllowanceCharge" type="ram:TradeAllowanceChargeType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="SpecifiedLogisticsServiceCharge" type="ram:LogisticsServiceChargeType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="SpecifiedTradePaymentTerms" type="ram:TradePaymentTermsType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="SpecifiedTradeAccountingAccount" type="ram:TradeAccountingAccountType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="SpecifiedTradeSettlementMonetarySummation" type="ram:TradeSettlementMonetarySummationType"
|
|
||||||
minOccurs="0"/>
|
|
||||||
<xs:element name="ReceivableSpecifiedTradeAccountingAccount" type="ram:TradeAccountingAccountType"
|
|
||||||
minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="SupplyChainTradeTransactionType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="ApplicableSupplyChainTradeAgreement" type="ram:SupplyChainTradeAgreementType"
|
|
||||||
minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="ApplicableSupplyChainTradeDelivery" type="ram:SupplyChainTradeDeliveryType"
|
|
||||||
minOccurs="0"/>
|
|
||||||
<xs:element name="ApplicableSupplyChainTradeSettlement" type="ram:SupplyChainTradeSettlementType"
|
|
||||||
minOccurs="0"/>
|
|
||||||
<xs:element name="IncludedSupplyChainTradeLineItem" type="ram:SupplyChainTradeLineItemType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TaxRegistrationType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="ID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradeAccountingAccountType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="ID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradeAddressType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="PostcodeCode" type="udt:CodeType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="LineOne" type="udt:TextType" minOccurs="0"/>
|
|
||||||
<xs:element name="LineTwo" type="udt:TextType" minOccurs="0"/>
|
|
||||||
<xs:element name="CityName" type="udt:TextType" minOccurs="0"/>
|
|
||||||
<xs:element name="CountryID" type="qdt:CountryIDType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradeAllowanceChargeType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="ChargeIndicator" type="udt:IndicatorType" minOccurs="0"/>
|
|
||||||
<xs:element name="SequenceNumeric" type="udt:NumericType" minOccurs="0"/>
|
|
||||||
<xs:element name="CalculationPercent" type="udt:PercentType" minOccurs="0"/>
|
|
||||||
<xs:element name="BasisAmount" type="udt:AmountType" minOccurs="0"/>
|
|
||||||
<xs:element name="BasisQuantity" type="udt:QuantityType" minOccurs="0"/>
|
|
||||||
<xs:element name="ActualAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="ReasonCode" type="qdt:AllowanceChargeReasonCodeType" minOccurs="0"/>
|
|
||||||
<xs:element name="Reason" type="udt:TextType" minOccurs="0"/>
|
|
||||||
<xs:element name="CategoryTradeTax" type="ram:TradeTaxType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradeContactType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="PersonName" type="udt:TextType" minOccurs="0"/>
|
|
||||||
<xs:element name="DepartmentName" type="udt:TextType" minOccurs="0"/>
|
|
||||||
<xs:element name="TelephoneUniversalCommunication" type="ram:UniversalCommunicationType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="FaxUniversalCommunication" type="ram:UniversalCommunicationType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="EmailURIUniversalCommunication" type="ram:UniversalCommunicationType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradeCountryType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="ID" type="qdt:CountryIDType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradeDeliveryTermsType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="DeliveryTypeCode" type="qdt:DeliveryTermsCodeType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradePartyType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="ID" type="udt:IDType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="GlobalID" type="udt:IDType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="Name" type="udt:TextType" minOccurs="0"/>
|
|
||||||
<xs:element name="DefinedTradeContact" type="ram:TradeContactType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="PostalTradeAddress" type="ram:TradeAddressType" minOccurs="0"/>
|
|
||||||
<xs:element name="SpecifiedTaxRegistration" type="ram:TaxRegistrationType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradePaymentDiscountTermsType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="BasisDateTime" type="udt:DateTimeType" minOccurs="0"/>
|
|
||||||
<xs:element name="BasisPeriodMeasure" type="udt:MeasureType" minOccurs="0"/>
|
|
||||||
<xs:element name="BasisAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="CalculationPercent" type="udt:PercentType" minOccurs="0"/>
|
|
||||||
<xs:element name="ActualDiscountAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradePaymentPenaltyTermsType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="BasisDateTime" type="udt:DateTimeType" minOccurs="0"/>
|
|
||||||
<xs:element name="BasisPeriodMeasure" type="udt:MeasureType" minOccurs="0"/>
|
|
||||||
<xs:element name="BasisAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="CalculationPercent" type="udt:PercentType" minOccurs="0"/>
|
|
||||||
<xs:element name="ActualPenaltyAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradePaymentTermsType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="Description" type="udt:TextType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="DueDateDateTime" type="udt:DateTimeType" minOccurs="0"/>
|
|
||||||
<xs:element name="PartialPaymentAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="ApplicableTradePaymentPenaltyTerms" type="ram:TradePaymentPenaltyTermsType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="ApplicableTradePaymentDiscountTerms" type="ram:TradePaymentDiscountTermsType"
|
|
||||||
minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradePriceType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="ChargeAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="BasisQuantity" type="udt:QuantityType" minOccurs="0"/>
|
|
||||||
<xs:element name="AppliedTradeAllowanceCharge" type="ram:TradeAllowanceChargeType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradeProductType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="GlobalID" type="udt:IDType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="SellerAssignedID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
<xs:element name="BuyerAssignedID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
<xs:element name="Name" type="udt:TextType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="Description" type="udt:TextType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="ApplicableProductCharacteristic" type="ram:ProductCharacteristicType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="DesignatedProductClassification" type="ram:ProductClassificationType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="OriginTradeCountry" type="ram:TradeCountryType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="IncludedReferencedProduct" type="ram:ReferencedProductType" minOccurs="0"
|
|
||||||
maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradeSettlementMonetarySummationType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="LineTotalAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="ChargeTotalAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="AllowanceTotalAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="TaxBasisTotalAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="TaxTotalAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="GrandTotalAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="TotalPrepaidAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="TotalAllowanceChargeAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="DuePayableAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradeSettlementPaymentMeansType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="TypeCode" type="qdt:PaymentMeansCodeType" minOccurs="0"/>
|
|
||||||
<xs:element name="Information" type="udt:TextType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="ID" type="udt:IDType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="PayerPartyDebtorFinancialAccount" type="ram:DebtorFinancialAccountType" minOccurs="0"/>
|
|
||||||
<xs:element name="PayeePartyCreditorFinancialAccount" type="ram:CreditorFinancialAccountType"
|
|
||||||
minOccurs="0"/>
|
|
||||||
<xs:element name="PayerSpecifiedDebtorFinancialInstitution" type="ram:DebtorFinancialInstitutionType"
|
|
||||||
minOccurs="0"/>
|
|
||||||
<xs:element name="PayeeSpecifiedCreditorFinancialInstitution" type="ram:CreditorFinancialInstitutionType"
|
|
||||||
minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="TradeTaxType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="CalculatedAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="TypeCode" type="qdt:TaxTypeCodeType" minOccurs="0"/>
|
|
||||||
<xs:element name="ExemptionReason" type="udt:TextType" minOccurs="0"/>
|
|
||||||
<xs:element name="BasisAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="LineTotalBasisAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="AllowanceChargeBasisAmount" type="udt:AmountType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xs:element name="CategoryCode" type="qdt:TaxCategoryCodeType" minOccurs="0"/>
|
|
||||||
<xs:element name="ApplicablePercent" type="udt:PercentType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="UniversalCommunicationType">
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="URIID" type="udt:IDType" minOccurs="0"/>
|
|
||||||
<xs:element name="CompleteNumber" type="udt:TextType" minOccurs="0"/>
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:schema>
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<xs:schema xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15"
|
|
||||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
||||||
targetNamespace="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15"
|
|
||||||
elementFormDefault="qualified"
|
|
||||||
version="15.0">
|
|
||||||
<xs:complexType name="AmountType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:decimal">
|
|
||||||
<xs:attribute name="currencyID" type="udt:AmountTypeCurrencyIDContentType"/>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:simpleType name="AmountTypeCurrencyIDContentType">
|
|
||||||
<xs:restriction base="xs:token"/>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:complexType name="CodeType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:token">
|
|
||||||
<xs:attribute name="listID" type="xs:token"/>
|
|
||||||
<xs:attribute name="listVersionID" type="xs:token"/>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="DateTimeType">
|
|
||||||
<xs:choice>
|
|
||||||
<xs:element name="DateTimeString">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:string">
|
|
||||||
<xs:attribute name="format" type="xs:string"/>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
|
||||||
</xs:choice>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="IDType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:token">
|
|
||||||
<xs:attribute name="schemeID" type="xs:token"/>
|
|
||||||
<xs:attribute name="schemeAgencyID" type="udt:IDTypeSchemeAgencyIDContentType"/>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:simpleType name="IDTypeSchemeAgencyIDContentType">
|
|
||||||
<xs:restriction base="xs:token"/>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:complexType name="IndicatorType">
|
|
||||||
<xs:choice>
|
|
||||||
<xs:element name="Indicator" type="xs:boolean"/>
|
|
||||||
</xs:choice>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="MeasureType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:decimal">
|
|
||||||
<xs:attribute name="unitCode" type="udt:MeasureTypeUnitCodeContentType"/>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:simpleType name="MeasureTypeUnitCodeContentType">
|
|
||||||
<xs:restriction base="xs:token">
|
|
||||||
<xs:minLength value="1"/>
|
|
||||||
<xs:maxLength value="3"/>
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:complexType name="NumericType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:decimal"/>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="PercentType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:decimal"/>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:complexType name="QuantityType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:decimal">
|
|
||||||
<xs:attribute name="unitCode" type="udt:QuantityTypeUnitCodeContentType"/>
|
|
||||||
</xs:extension>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
<xs:simpleType name="QuantityTypeUnitCodeContentType">
|
|
||||||
<xs:restriction base="xs:token">
|
|
||||||
<xs:minLength value="1"/>
|
|
||||||
<xs:maxLength value="3"/>
|
|
||||||
</xs:restriction>
|
|
||||||
</xs:simpleType>
|
|
||||||
<xs:complexType name="TextType">
|
|
||||||
<xs:simpleContent>
|
|
||||||
<xs:extension base="xs:string"/>
|
|
||||||
</xs:simpleContent>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:schema>
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,7 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 {
|
public class ResourceUtilities {
|
||||||
private static final Logger LOG = Logger.getLogger(ResourceUtilities.class.getName());
|
private static final Logger LOG = Logger.getLogger(ResourceUtilities.class.getName());
|
||||||
|
|||||||
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user