Reorganizing to a parent project, a light and a heavy (validating) library, a commandline application and the server
This commit is contained in:
@@ -0,0 +1,432 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* Copyright 2019 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.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/***
|
||||
* This is a test to confirm the minimum steps to implement a interface are still sufficient
|
||||
*
|
||||
* @author jstaerk
|
||||
*
|
||||
*/
|
||||
public class BackwardCompatibilityTest extends TestCase implements IZUGFeRDExportableTransaction{
|
||||
|
||||
final String TARGET_PDF_ZF1 = "./target/testout-MustangGnuaccountingBeispielRE-20171118_506zf1.pdf";
|
||||
final String TARGET_PDF_ZF2 = "./target/testout-MustangGnuaccountingBeispielRE-20171118_506zf2.pdf";
|
||||
final String TARGET_PDF_FX = "./target/testout-MustangGnuaccountingBeispielRE-20171118_506fx.pdf";
|
||||
|
||||
/**
|
||||
* The exporter test bases on @{code
|
||||
* ./src/test/MustangGnuaccountingBeispielRE-20140703_502blanko.pdf}, adds
|
||||
* metadata, writes to @{code ./target/testout-*} and then imports to check the
|
||||
* values. It would not make sense to have it run before the less complex
|
||||
* importer test (which is probably redundant). As only Name Ascending is
|
||||
* supported for Test Unit sequence, I renamed the Exporter Test test-Z-Export
|
||||
*/
|
||||
public void testZF1Export() {
|
||||
|
||||
|
||||
// the writing part
|
||||
try (InputStream SOURCE_PDF = this.getClass()
|
||||
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20190610_507blanko.pdf");
|
||||
|
||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().setZUGFeRDVersion(1).setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel.EN16931).load(SOURCE_PDF)) {
|
||||
|
||||
ze.PDFattachZugferdFile(this);
|
||||
ze.disableAutoClose(true);
|
||||
ze.export(TARGET_PDF_ZF1);
|
||||
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ze.export(baos);
|
||||
ze.close();
|
||||
String pdfContent = baos.toString("UTF-8");
|
||||
assertFalse(pdfContent.indexOf("(via mustangproject.org") == -1);
|
||||
// check for pdf-a schema extension
|
||||
// assertFalse(pdfContent.indexOf("<zf:ConformanceLevel>EN 16931</zf:ConformanceLevel>") == -1);
|
||||
// assertFalse(pdfContent.indexOf("<pdfaSchema:prefix>zf</pdfaSchema:prefix>") == -1);
|
||||
// assertFalse(pdfContent.indexOf("urn:zugferd:pdfa:CrossIndustryDocument:invoice:2p0#") == -1);
|
||||
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not happen in testZExport");
|
||||
}
|
||||
|
||||
// now check the contents (like MustangReaderTest)
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(TARGET_PDF_ZF1);
|
||||
|
||||
// Reading ZUGFeRD
|
||||
assertEquals(zi.getAmount(), "571.04");
|
||||
assertEquals(zi.getBIC(), getTradeSettlementPayment()[0].getOwnBIC());
|
||||
assertEquals(zi.getIBAN(), getTradeSettlementPayment()[0].getOwnIBAN());
|
||||
assertEquals(zi.getHolder(), getOwnOrganisationName());
|
||||
assertEquals(zi.getForeignReference(), getNumber());
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void testZF2Export() {
|
||||
|
||||
|
||||
// the writing part
|
||||
try (InputStream SOURCE_PDF = this.getClass()
|
||||
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20190610_507blanko.pdf");
|
||||
|
||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().setZUGFeRDVersion(2).setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel.EN16931).load(SOURCE_PDF)) {
|
||||
|
||||
ze.PDFattachZugferdFile(this);
|
||||
ze.disableAutoClose(true);
|
||||
ze.export(TARGET_PDF_ZF2);
|
||||
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ze.export(baos);
|
||||
ze.close();
|
||||
String pdfContent = baos.toString("UTF-8");
|
||||
assertFalse(pdfContent.indexOf("(via mustangproject.org") == -1);
|
||||
// check for pdf-a schema extension
|
||||
// assertFalse(pdfContent.indexOf("<zf:ConformanceLevel>EN 16931</zf:ConformanceLevel>") == -1);
|
||||
// assertFalse(pdfContent.indexOf("<pdfaSchema:prefix>zf</pdfaSchema:prefix>") == -1);
|
||||
// assertFalse(pdfContent.indexOf("urn:zugferd:pdfa:CrossIndustryDocument:invoice:2p0#") == -1);
|
||||
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not happen in testZExport");
|
||||
}
|
||||
|
||||
// now check the contents (like MustangReaderTest)
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(TARGET_PDF_ZF2);
|
||||
|
||||
// Reading ZUGFeRD
|
||||
assertEquals(zi.getAmount(), "571.04");
|
||||
assertEquals(zi.getBIC(), getTradeSettlementPayment()[0].getOwnBIC());
|
||||
assertEquals(zi.getIBAN(), getTradeSettlementPayment()[0].getOwnIBAN());
|
||||
assertEquals(zi.getHolder(), getOwnOrganisationName());
|
||||
assertEquals(zi.getForeignReference(), getNumber());
|
||||
|
||||
|
||||
}
|
||||
public void testFXExport() {
|
||||
|
||||
// the writing part
|
||||
try (InputStream SOURCE_PDF = this.getClass()
|
||||
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20190610_507blanko.pdf");
|
||||
|
||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().setZUGFeRDVersion(2).setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel.EN16931).load(SOURCE_PDF)) {
|
||||
|
||||
ze.setFacturX();
|
||||
ze.PDFattachZugferdFile(this);
|
||||
ze.disableAutoClose(true);
|
||||
ze.export(TARGET_PDF_FX);
|
||||
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ze.export(baos);
|
||||
ze.close();
|
||||
String pdfContent = baos.toString("UTF-8");
|
||||
assertFalse(pdfContent.indexOf("(via mustangproject.org") == -1);
|
||||
// check for pdf-a schema extension
|
||||
// assertFalse(pdfContent.indexOf("<zf:ConformanceLevel>EN 16931</zf:ConformanceLevel>") == -1);
|
||||
// assertFalse(pdfContent.indexOf("<pdfaSchema:prefix>zf</pdfaSchema:prefix>") == -1);
|
||||
// assertFalse(pdfContent.indexOf("urn:zugferd:pdfa:CrossIndustryDocument:invoice:2p0#") == -1);
|
||||
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not happen in testZExport");
|
||||
}
|
||||
|
||||
// now check the contents (like MustangReaderTest)
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(TARGET_PDF_FX);
|
||||
|
||||
// Reading ZUGFeRD
|
||||
assertEquals(zi.getAmount(), "571.04");
|
||||
assertEquals(zi.getBIC(), getTradeSettlementPayment()[0].getOwnBIC());
|
||||
assertEquals(zi.getIBAN(), getTradeSettlementPayment()[0].getOwnIBAN());
|
||||
assertEquals(zi.getHolder(), getOwnOrganisationName());
|
||||
assertEquals(zi.getForeignReference(), getNumber());
|
||||
|
||||
|
||||
}
|
||||
class Contact implements IZUGFeRDExportableContact {
|
||||
public String getCountry() {
|
||||
return "DE";
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return "Spielkreis";
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return "Theodor Est";
|
||||
}
|
||||
|
||||
public String getStreet() {
|
||||
return "Bahnstr. 42";
|
||||
}
|
||||
|
||||
public String getVATID() {
|
||||
return "DE999999999";
|
||||
}
|
||||
|
||||
public String getZIP() {
|
||||
return "88802";
|
||||
}
|
||||
|
||||
}
|
||||
class Payment implements IZUGFeRDTradeSettlementPayment {
|
||||
|
||||
@Override
|
||||
public String getOwnBIC() {
|
||||
return "bla";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnBankName() {
|
||||
return "bla";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnIBAN() {
|
||||
return "bla";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Item implements IZUGFeRDExportableItem {
|
||||
public Item(BigDecimal price, BigDecimal quantity, Product product) {
|
||||
super();
|
||||
this.price = price;
|
||||
this.quantity = quantity;
|
||||
this.product = product;
|
||||
}
|
||||
|
||||
private BigDecimal price, quantity;
|
||||
private Product product;
|
||||
|
||||
public BigDecimal getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(BigDecimal price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(BigDecimal quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public Product getProduct() {
|
||||
return product;
|
||||
}
|
||||
|
||||
public void setProduct(Product product) {
|
||||
this.product = product;
|
||||
}
|
||||
|
||||
public IZUGFeRDAllowanceCharge[] getItemAllowances() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
public IZUGFeRDAllowanceCharge[] getItemCharges() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class Product implements IZUGFeRDExportableProduct {
|
||||
public Product(String description, String name, String unit, BigDecimal vATPercent) {
|
||||
super();
|
||||
this.description = description;
|
||||
this.name = name;
|
||||
this.unit = unit;
|
||||
VATPercent = vATPercent;
|
||||
}
|
||||
|
||||
private String description, name, unit;
|
||||
private BigDecimal VATPercent;
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public BigDecimal getVATPercent() {
|
||||
return VATPercent;
|
||||
}
|
||||
|
||||
public void setVATPercent(BigDecimal vATPercent) {
|
||||
VATPercent = vATPercent;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getDeliveryDate() {
|
||||
return new GregorianCalendar(2019, Calendar.JUNE, 10).getTime();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableContact getRecipient() {
|
||||
return new Contact();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
public IZUGFeRDTradeSettlementPayment[] getTradeSettlementPayment() {
|
||||
Payment P = new Payment();
|
||||
IZUGFeRDTradeSettlementPayment[] allP = new Payment[1];
|
||||
allP[0] = P;
|
||||
return allP;
|
||||
|
||||
}
|
||||
|
||||
public IZUGFeRDAllowanceCharge[] getZFAllowances() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
public IZUGFeRDAllowanceCharge[] getZFCharges() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableItem[] getZFItems() {
|
||||
Item[] allItems = new Item[3];
|
||||
Product designProduct = new Product("", "Design (hours): Of a sample invoice", "HUR",
|
||||
new BigDecimal("7.000000"));
|
||||
Product balloonProduct = new Product("", "Ballons: various colors, ~2000ml", "C62", new BigDecimal("19.000000"));
|
||||
Product airProduct = new Product("", "Hot air „heiße Luft“ (litres)", "LTR", new BigDecimal("19.000000"));
|
||||
|
||||
allItems[0] = new Item(new BigDecimal("160"), new BigDecimal("1"), designProduct);
|
||||
allItems[1] = new Item(new BigDecimal("0.79"), new BigDecimal("400"), balloonProduct);
|
||||
allItems[2] = new Item(new BigDecimal("0.025"), new BigDecimal("800"), airProduct);
|
||||
return allItems;
|
||||
}
|
||||
|
||||
public IZUGFeRDAllowanceCharge[] getZFLogisticsServiceCharges() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getDueDate() {
|
||||
return new GregorianCalendar(2019, Calendar.JULY, 1).getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getIssueDate() {
|
||||
return new GregorianCalendar(2019, Calendar.JUNE, 10).getTime();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getNumber() {
|
||||
return "RE-20190610/507";
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getOwnBIC() {
|
||||
return "COBADEFFXXX";
|
||||
}
|
||||
|
||||
public String getOwnBankName() {
|
||||
return "Commerzbank";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getOwnCountry() {
|
||||
return "DE";
|
||||
}
|
||||
|
||||
public String getOwnIBAN() {
|
||||
return "DE88 2008 0000 0970 3757 00";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getOwnLocation() {
|
||||
return "Stadthausen";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnOrganisationFullPlaintextInfo() {
|
||||
return "Bei Spiel GmbH\n" + "Ecke 12\n" + "12345 Stadthausen\n" + "Geschäftsführer: Max Mustermann";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getOwnOrganisationName() {
|
||||
return "Bei Spiel GmbH";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnStreet() {
|
||||
return "Ecke 12";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnTaxID() {
|
||||
return "22/815/0815/4";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnVATID() {
|
||||
return "DE136695976";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnZIP() {
|
||||
return "12345";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* Copyright 2019 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 junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.junit.FixMethodOrder;
|
||||
import org.junit.runners.MethodSorters;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
public class BaseTest extends TestCase {
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public BaseTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite() {
|
||||
return new TestSuite(BaseTest.class);
|
||||
}
|
||||
|
||||
public void testCorrectDigits() {
|
||||
assertEquals("0.00", ZUGFeRD2PullProvider.nDigitFormat(new BigDecimal(0),2));
|
||||
assertEquals("-1.10", ZUGFeRD2PullProvider.nDigitFormat(new BigDecimal("-1.10"),2));
|
||||
assertEquals("-1.10", ZUGFeRD2PullProvider.nDigitFormat(new BigDecimal("-1.1"),2));
|
||||
assertEquals("-1.01", ZUGFeRD2PullProvider.nDigitFormat(new BigDecimal("-1.01"),2));
|
||||
assertEquals("20000123.35", ZUGFeRD2PullProvider.nDigitFormat(new BigDecimal("20000123.3489"),2));
|
||||
assertEquals("20000123.34", ZUGFeRD2PullProvider.nDigitFormat(new BigDecimal("20000123.3419"),2));
|
||||
assertEquals("12.00", ZUGFeRD2PullProvider.nDigitFormat(new BigDecimal("12"),2));
|
||||
assertEquals("12", ZUGFeRD2PullProvider.nDigitFormat(new BigDecimal("12"),0));
|
||||
assertEquals("20000123.342", ZUGFeRD2PullProvider.nDigitFormat(new BigDecimal("20000123.3419"),3));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* 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;
|
||||
|
||||
public class IZUGFeRDAllowanceChargeImpl implements IZUGFeRDAllowanceCharge {
|
||||
private BigDecimal totalAmount;
|
||||
private String reason;
|
||||
private BigDecimal taxPercent;
|
||||
|
||||
@Override
|
||||
public BigDecimal getTotalAmount() {
|
||||
return totalAmount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getReason() {
|
||||
return reason;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getTaxPercent() {
|
||||
return taxPercent;
|
||||
}
|
||||
|
||||
public IZUGFeRDAllowanceChargeImpl setTotalAmount(BigDecimal totalAmount) {
|
||||
this.totalAmount = totalAmount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDAllowanceChargeImpl setReason(String reason) {
|
||||
this.reason = reason;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDAllowanceChargeImpl setTaxPercent(BigDecimal taxPercent) {
|
||||
this.taxPercent = taxPercent;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package org.mustangproject.ZUGFeRD;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class IZUGFeRDDateImpl implements IZUGFeRDDate {
|
||||
|
||||
private Date date;
|
||||
private ZUGFeRDDateFormat format = ZUGFeRDDateFormat.DATE;
|
||||
|
||||
public IZUGFeRDDateImpl setDate(Date date) {
|
||||
this.date = date;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDDateImpl setFormat(ZUGFeRDDateFormat format) {
|
||||
this.format = format;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZUGFeRDDateFormat getFormat() {
|
||||
return format;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* 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;
|
||||
|
||||
public class IZUGFeRDExportableContactImpl implements IZUGFeRDExportableContact {
|
||||
private String name;
|
||||
private String zIP;
|
||||
private String vATID;
|
||||
private String country;
|
||||
private String location;
|
||||
private String street;
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getZIP() {
|
||||
return zIP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVATID() {
|
||||
return vATID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStreet() {
|
||||
return street;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableContactImpl setName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableContactImpl setZIP(String zIP) {
|
||||
this.zIP = zIP;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableContactImpl setVATID(String vATID) {
|
||||
this.vATID = vATID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableContactImpl setCountry(String country) {
|
||||
this.country = country;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableContactImpl setLocation(String location) {
|
||||
this.location = location;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableContactImpl setStreet(String street) {
|
||||
this.street = street;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* 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;
|
||||
|
||||
public class IZUGFeRDExportableItemImpl implements IZUGFeRDExportableItem {
|
||||
private IZUGFeRDExportableProduct product;
|
||||
private IZUGFeRDAllowanceCharge[] itemAllowances;
|
||||
private IZUGFeRDAllowanceCharge[] itemCharges;
|
||||
private BigDecimal price;
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableProduct getProduct() {
|
||||
return product;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getItemAllowances() {
|
||||
return itemAllowances;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getItemCharges() {
|
||||
return itemCharges;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableItemImpl setProduct(IZUGFeRDExportableProduct product) {
|
||||
this.product = product;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableItemImpl setItemAllowances(IZUGFeRDAllowanceCharge[] itemAllowances) {
|
||||
this.itemAllowances = itemAllowances;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableItemImpl setItemCharges(IZUGFeRDAllowanceCharge[] itemCharges) {
|
||||
this.itemCharges = itemCharges;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableItemImpl setPrice(BigDecimal price) {
|
||||
this.price = price;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableItemImpl setQuantity(BigDecimal quantity) {
|
||||
this.quantity = quantity;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* 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;
|
||||
|
||||
public class IZUGFeRDExportableProductImpl implements IZUGFeRDExportableProduct {
|
||||
private String unit;
|
||||
private String name;
|
||||
private String description;
|
||||
private BigDecimal vatPercent;
|
||||
|
||||
@Override
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getVATPercent() {
|
||||
return vatPercent;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableProductImpl setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableProductImpl setName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableProductImpl setDescription(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableProductImpl setVatPercent(BigDecimal vatPercent) {
|
||||
this.vatPercent = vatPercent;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,267 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* 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.util.Date;
|
||||
|
||||
public class IZUGFeRDExportableTransactionImpl implements IZUGFeRDExportableTransaction {
|
||||
|
||||
private String number;
|
||||
private Date issueDate;
|
||||
private String ownOrganisationFullPlaintextInfo;
|
||||
private Date dueDate;
|
||||
private IZUGFeRDAllowanceCharge[] zFAllowances;
|
||||
private IZUGFeRDAllowanceCharge[] zFCharges;
|
||||
private IZUGFeRDAllowanceCharge[] zFLogisticsServiceCharges;
|
||||
private IZUGFeRDExportableItem[] zFItems;
|
||||
private IZUGFeRDExportableContact recipient;
|
||||
private IZUGFeRDTradeSettlementPayment[] settlementPayments;
|
||||
private IZUGFeRDDate zfDeliveryDate;
|
||||
private String ownTaxID;
|
||||
private String ownVATID;
|
||||
private String ownOrganisationName;
|
||||
private String ownStreet;
|
||||
private String ownZIP;
|
||||
private String ownLocation;
|
||||
private String ownCountry;
|
||||
private Date deliveryDate;
|
||||
private String currency;
|
||||
private String paymentTermDescription;
|
||||
private String referenceNumber;
|
||||
|
||||
@Override
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getIssueDate() {
|
||||
return issueDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnOrganisationFullPlaintextInfo() {
|
||||
return ownOrganisationFullPlaintextInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getDueDate() {
|
||||
return dueDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFAllowances() {
|
||||
return zFAllowances;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFCharges() {
|
||||
return zFCharges;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFLogisticsServiceCharges() {
|
||||
return zFLogisticsServiceCharges;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableItem[] getZFItems() {
|
||||
return zFItems;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableContact getRecipient() {
|
||||
return recipient;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDTradeSettlementPayment[] getTradeSettlementPayment() {
|
||||
return settlementPayments;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnTaxID() {
|
||||
return ownTaxID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnVATID() {
|
||||
return ownVATID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnOrganisationName() {
|
||||
return ownOrganisationName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnStreet() {
|
||||
return ownStreet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnZIP() {
|
||||
return ownZIP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnLocation() {
|
||||
return ownLocation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnCountry() {
|
||||
return ownCountry;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getDeliveryDate() {
|
||||
return deliveryDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrency() {
|
||||
return currency;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPaymentTermDescription() {
|
||||
return paymentTermDescription;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getReferenceNumber() {
|
||||
return referenceNumber;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDDate getZFDeliveryDate() {
|
||||
return zfDeliveryDate;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setNumber(String number) {
|
||||
this.number = number;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setIssueDate(Date issueDate) {
|
||||
this.issueDate = issueDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setOwnOrganisationFullPlaintextInfo(String ownOrganisationFullPlaintextInfo) {
|
||||
this.ownOrganisationFullPlaintextInfo = ownOrganisationFullPlaintextInfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setDueDate(Date dueDate) {
|
||||
this.dueDate = dueDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setZFAllowances(IZUGFeRDAllowanceCharge... zFAllowances) {
|
||||
this.zFAllowances = zFAllowances;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setZFCharges(IZUGFeRDAllowanceCharge... zFCharges) {
|
||||
this.zFCharges = zFCharges;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setZFLogisticsServiceCharges(IZUGFeRDAllowanceCharge... zFLogisticsServiceCharges) {
|
||||
this.zFLogisticsServiceCharges = zFLogisticsServiceCharges;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setZFItems(IZUGFeRDExportableItem... zFItems) {
|
||||
this.zFItems = zFItems;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setRecipient(IZUGFeRDExportableContact recipient) {
|
||||
this.recipient = recipient;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setOwnTaxID(String ownTaxID) {
|
||||
this.ownTaxID = ownTaxID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setOwnVATID(String ownVATID) {
|
||||
this.ownVATID = ownVATID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setOwnOrganisationName(String ownOrganisationName) {
|
||||
this.ownOrganisationName = ownOrganisationName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setOwnStreet(String ownStreet) {
|
||||
this.ownStreet = ownStreet;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setOwnZIP(String ownZIP) {
|
||||
this.ownZIP = ownZIP;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setOwnLocation(String ownLocation) {
|
||||
this.ownLocation = ownLocation;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setOwnCountry(String ownCountry) {
|
||||
this.ownCountry = ownCountry;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setDeliveryDate(Date deliveryDate) {
|
||||
this.deliveryDate = deliveryDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setZfDeliveryDate(IZUGFeRDDate zfDeliveryDate) {
|
||||
this.zfDeliveryDate = zfDeliveryDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setCurrency(String currency) {
|
||||
this.currency = currency;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setPaymentTermDescription(String paymentTermDescription) {
|
||||
this.paymentTermDescription = paymentTermDescription;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setReferenceNumber(String referenceNumber) {
|
||||
this.referenceNumber = referenceNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDExportableTransactionImpl setTradeSettlementPayment(IZUGFeRDTradeSettlementPayment... settlementPayments) {
|
||||
this.settlementPayments = settlementPayments;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* Copyright 2019 by ak on 12.04.19.
|
||||
*
|
||||
* 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;
|
||||
|
||||
public class IZUGFeRDTradeSettlementPaymentImpl implements IZUGFeRDTradeSettlementPayment {
|
||||
|
||||
private String ownKto;
|
||||
private String ownBLZ;
|
||||
private String ownBIC;
|
||||
private String ownBankName;
|
||||
private String ownIBAN;
|
||||
private String ownPaymentInfoText;
|
||||
|
||||
@Override
|
||||
public String getOwnKto() {
|
||||
return ownKto;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnBLZ() {
|
||||
return ownBLZ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnBIC() {
|
||||
return ownBIC;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnBankName() {
|
||||
return ownBankName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnIBAN() {
|
||||
return ownIBAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnPaymentInfoText() {
|
||||
return ownPaymentInfoText;
|
||||
}
|
||||
|
||||
public IZUGFeRDTradeSettlementPaymentImpl setOwnBLZ(String ownBLZ) {
|
||||
this.ownBLZ = ownBLZ;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDTradeSettlementPaymentImpl setOwnBIC(String ownBIC) {
|
||||
this.ownBIC = ownBIC;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDTradeSettlementPaymentImpl setOwnBankName(String ownBankName) {
|
||||
this.ownBankName = ownBankName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDTradeSettlementPaymentImpl setOwnKto(String ownKto) {
|
||||
this.ownKto = ownKto;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDTradeSettlementPaymentImpl setOwnIBAN(String ownIBAN) {
|
||||
this.ownIBAN = ownIBAN;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IZUGFeRDTradeSettlementPaymentImpl setOwnPaymentInfoText(String ownPaymentInfoText) {
|
||||
this.ownPaymentInfoText = ownPaymentInfoText;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* Copyright 2019 by ak on 12.04.19.
|
||||
*
|
||||
* 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 junit.framework.TestCase;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.mustangproject.ZUGFeRD.MustangReaderTestCase.Item;
|
||||
|
||||
public abstract class MustangReaderTestCase extends TestCase implements IZUGFeRDExportableTransaction {
|
||||
|
||||
public MustangReaderTestCase(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IZUGFeRDTradeSettlementPayment[] getTradeSettlementPayment() {
|
||||
Payment[] payments = new Payment[1];
|
||||
payments[0] = new Payment();
|
||||
return payments;
|
||||
}
|
||||
|
||||
protected class Payment implements IZUGFeRDTradeSettlementPayment {
|
||||
|
||||
@Override
|
||||
public String getOwnKto() {
|
||||
return "44421800";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnBLZ() {
|
||||
return "41441604";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnBIC() {
|
||||
return "COBADEFFXXX";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnBankName() {
|
||||
return "Commerzbank";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnPaymentInfoText() {
|
||||
return "Überweisung";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnIBAN() {
|
||||
return "DE88 2008 0000 0970 3757 00";
|
||||
}
|
||||
}
|
||||
|
||||
protected class RecipientContact implements IZUGFeRDExportableContact {
|
||||
|
||||
@Override
|
||||
public String getCountry() {
|
||||
return "DE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLocation() {
|
||||
return "Spielkreis";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Theodor Est";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStreet() {
|
||||
return "Bahnstr. 42";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVATID() {
|
||||
return "DE999999999";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getZIP() {
|
||||
return "88802";
|
||||
}
|
||||
}
|
||||
|
||||
protected class SenderContact implements IZUGFeRDExportableContact {
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Ingmar N. Fo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPhone() {
|
||||
return "++49(0)237823";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEMail() {
|
||||
return "info@localhost.local";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected class Item implements IZUGFeRDExportableItem {
|
||||
|
||||
public Item(BigDecimal price, BigDecimal quantity, IZUGFeRDExportableProduct product) {
|
||||
super();
|
||||
this.price = price;
|
||||
this.quantity = quantity;
|
||||
this.product = product;
|
||||
}
|
||||
|
||||
private BigDecimal price, quantity;
|
||||
private IZUGFeRDExportableProduct product;
|
||||
private String addReference=null;
|
||||
|
||||
public String getAdditionalReferencedDocumentID() {
|
||||
return addReference;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(BigDecimal price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(BigDecimal quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableProduct getProduct() {
|
||||
return product;
|
||||
}
|
||||
|
||||
public void setProduct(IZUGFeRDExportableProduct product) {
|
||||
this.product = product;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getItemAllowances() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getItemCharges() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getAddReference() {
|
||||
return addReference;
|
||||
}
|
||||
|
||||
public void setAddReference(String addReference) {
|
||||
this.addReference = addReference;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected class Product implements IZUGFeRDExportableProduct {
|
||||
private String description, name, unit;
|
||||
private BigDecimal VATPercent;
|
||||
|
||||
public Product(String description, String name, String unit, BigDecimal VATPercent) {
|
||||
super();
|
||||
this.description = description;
|
||||
this.name = name;
|
||||
this.unit = unit;
|
||||
this.VATPercent = VATPercent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getVATPercent() {
|
||||
return VATPercent;
|
||||
}
|
||||
|
||||
public void setVATPercent(BigDecimal VATPercent) {
|
||||
this.VATPercent = VATPercent;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,470 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* 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 junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
import org.junit.FixMethodOrder;
|
||||
import org.junit.runners.MethodSorters;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
public class MustangReaderWriterCustomXMLTest extends TestCase {
|
||||
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public MustangReaderWriterCustomXMLTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite() {
|
||||
return new TestSuite(MustangReaderWriterCustomXMLTest.class);
|
||||
}
|
||||
|
||||
// //////// TESTS
|
||||
// //////////////////////////////////////////////////////////////////////////////////////////
|
||||
public void testCustomZF2Export() {
|
||||
|
||||
final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20171118_506custom.pdf";
|
||||
// the writing part
|
||||
|
||||
try {
|
||||
InputStream SOURCE_PDF = this.getClass().getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505blanko.pdf");
|
||||
|
||||
ZUGFeRDExporter zea1 = new ZUGFeRDExporterFromA1Factory().setProducer("My Application").setCreator("Test").setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel.EN16931)
|
||||
.load(SOURCE_PDF);
|
||||
|
||||
final byte[] UTF8ByteOrderMark = new byte[]{(byte) 0xef, (byte) 0xbb, (byte) 0xbf};
|
||||
/* we have much more information than just in the basic profile (comfort or extended) but it's perfectly valid to provide more information, just not less.
|
||||
* test the export with bom (which is valid) because this will also test the import (which also needs to work and needs to be tested)
|
||||
* */
|
||||
String ownZUGFeRDXML = new String(UTF8ByteOrderMark, StandardCharsets.UTF_8) + "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
||||
"<rsm:CrossIndustryInvoice xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100\">\n" +
|
||||
" <rsm:ExchangedDocumentContext>\n" +
|
||||
" <ram:TestIndicator><udt:Indicator>false</udt:Indicator></ram:TestIndicator>\n" +
|
||||
" <ram:GuidelineSpecifiedDocumentContextParameter>\n" +
|
||||
" <ram:ID>urn:cen.eu:en16931:2017:compliant:factur-x.eu:1p0:extended</ram:ID>\n" +
|
||||
" </ram:GuidelineSpecifiedDocumentContextParameter>\n" +
|
||||
" </rsm:ExchangedDocumentContext>\n" +
|
||||
" <rsm:ExchangedDocument>\n" +
|
||||
" <ram:ID>RE-20171118/506</ram:ID>\n" +
|
||||
" <ram:Name>RECHNUNG</ram:Name>\n" +
|
||||
" <ram:TypeCode>380</ram:TypeCode>\n" +
|
||||
" <ram:IssueDateTime><udt:DateTimeString format=\"102\">20171118</udt:DateTimeString></ram:IssueDateTime>\n" +
|
||||
" </rsm:ExchangedDocument>\n" +
|
||||
" <rsm:SupplyChainTradeTransaction>\n" +
|
||||
" <ram:IncludedSupplyChainTradeLineItem>\n" +
|
||||
" <ram:AssociatedDocumentLineDocument>\n" +
|
||||
" <ram:LineID>1</ram:LineID>\n" +
|
||||
" </ram:AssociatedDocumentLineDocument>\n" +
|
||||
" <ram:SpecifiedTradeProduct>\n" +
|
||||
" <ram:Name>Künstlerische Gestaltung (Stunde): Einer Beispielrechnung</ram:Name>\n" +
|
||||
" <ram:Description></ram:Description>\n" +
|
||||
" </ram:SpecifiedTradeProduct>\n" +
|
||||
" <ram:SpecifiedLineTradeAgreement>\n" +
|
||||
" <ram:GrossPriceProductTradePrice>\n" +
|
||||
" <ram:ChargeAmount currencyID=\"EUR\">160.0000</ram:ChargeAmount>\n" +
|
||||
" <ram:BasisQuantity unitCode=\"HUR\">1.0000</ram:BasisQuantity>\n" +
|
||||
" </ram:GrossPriceProductTradePrice>\n" +
|
||||
" <ram:NetPriceProductTradePrice>\n" +
|
||||
" <ram:ChargeAmount currencyID=\"EUR\">160.0000</ram:ChargeAmount>\n" +
|
||||
" <ram:BasisQuantity unitCode=\"HUR\">1.0000</ram:BasisQuantity>\n" +
|
||||
" </ram:NetPriceProductTradePrice>\n" +
|
||||
" </ram:SpecifiedLineTradeAgreement>\n" +
|
||||
" <ram:SpecifiedLineTradeDelivery>\n" +
|
||||
" <ram:BilledQuantity unitCode=\"HUR\">1.0000</ram:BilledQuantity>\n" +
|
||||
" </ram:SpecifiedLineTradeDelivery>\n" +
|
||||
" <ram:SpecifiedLineTradeSettlement>\n" +
|
||||
" <ram:ApplicableTradeTax>\n" +
|
||||
" <ram:TypeCode>VAT</ram:TypeCode>\n" +
|
||||
" <ram:CategoryCode>S</ram:CategoryCode>\n" +
|
||||
" <ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>\n" +
|
||||
" </ram:ApplicableTradeTax>\n" +
|
||||
" <ram:SpecifiedTradeSettlementLineMonetarySummation>\n" +
|
||||
" <ram:LineTotalAmount currencyID=\"EUR\">160.00</ram:LineTotalAmount>\n" +
|
||||
" </ram:SpecifiedTradeSettlementLineMonetarySummation>\n" +
|
||||
" </ram:SpecifiedLineTradeSettlement>\n" +
|
||||
" </ram:IncludedSupplyChainTradeLineItem>\n" +
|
||||
" <ram:IncludedSupplyChainTradeLineItem>\n" +
|
||||
" <ram:AssociatedDocumentLineDocument>\n" +
|
||||
" <ram:LineID>2</ram:LineID>\n" +
|
||||
" </ram:AssociatedDocumentLineDocument>\n" +
|
||||
" <ram:SpecifiedTradeProduct>\n" +
|
||||
" <ram:Name>Luftballon: Bunt, ca. 500ml</ram:Name>\n" +
|
||||
" <ram:Description></ram:Description>\n" +
|
||||
" </ram:SpecifiedTradeProduct>\n" +
|
||||
" <ram:SpecifiedLineTradeAgreement>\n" +
|
||||
" <ram:GrossPriceProductTradePrice>\n" +
|
||||
" <ram:ChargeAmount currencyID=\"EUR\">0.7900</ram:ChargeAmount>\n" +
|
||||
" <ram:BasisQuantity unitCode=\"C62\">1.0000</ram:BasisQuantity>\n" +
|
||||
" </ram:GrossPriceProductTradePrice>\n" +
|
||||
" <ram:NetPriceProductTradePrice>\n" +
|
||||
" <ram:ChargeAmount currencyID=\"EUR\">0.7900</ram:ChargeAmount>\n" +
|
||||
" <ram:BasisQuantity unitCode=\"C62\">1.0000</ram:BasisQuantity>\n" +
|
||||
" </ram:NetPriceProductTradePrice>\n" +
|
||||
" </ram:SpecifiedLineTradeAgreement>\n" +
|
||||
" <ram:SpecifiedLineTradeDelivery>\n" +
|
||||
" <ram:BilledQuantity unitCode=\"C62\">400.0000</ram:BilledQuantity>\n" +
|
||||
" </ram:SpecifiedLineTradeDelivery>\n" +
|
||||
" <ram:SpecifiedLineTradeSettlement>\n" +
|
||||
" <ram:ApplicableTradeTax>\n" +
|
||||
" <ram:TypeCode>VAT</ram:TypeCode>\n" +
|
||||
" <ram:CategoryCode>S</ram:CategoryCode>\n" +
|
||||
" <ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>\n" +
|
||||
" </ram:ApplicableTradeTax>\n" +
|
||||
" <ram:SpecifiedTradeSettlementLineMonetarySummation>\n" +
|
||||
" <ram:LineTotalAmount currencyID=\"EUR\">316.00</ram:LineTotalAmount>\n" +
|
||||
" </ram:SpecifiedTradeSettlementLineMonetarySummation>\n" +
|
||||
" </ram:SpecifiedLineTradeSettlement>\n" +
|
||||
" </ram:IncludedSupplyChainTradeLineItem>\n" +
|
||||
" <ram:IncludedSupplyChainTradeLineItem>\n" +
|
||||
" <ram:AssociatedDocumentLineDocument>\n" +
|
||||
" <ram:LineID>3</ram:LineID>\n" +
|
||||
" </ram:AssociatedDocumentLineDocument>\n" +
|
||||
" <ram:SpecifiedTradeProduct>\n" +
|
||||
" <ram:Name>Heiße Luft pro Liter</ram:Name>\n" +
|
||||
" <ram:Description></ram:Description>\n" +
|
||||
" </ram:SpecifiedTradeProduct>\n" +
|
||||
" <ram:SpecifiedLineTradeAgreement>\n" +
|
||||
" <ram:GrossPriceProductTradePrice>\n" +
|
||||
" <ram:ChargeAmount currencyID=\"EUR\">0.1000</ram:ChargeAmount>\n" +
|
||||
" <ram:BasisQuantity unitCode=\"LTR\">1.0000</ram:BasisQuantity>\n" +
|
||||
" </ram:GrossPriceProductTradePrice>\n" +
|
||||
" <ram:NetPriceProductTradePrice>\n" +
|
||||
" <ram:ChargeAmount currencyID=\"EUR\">0.1000</ram:ChargeAmount>\n" +
|
||||
" <ram:BasisQuantity unitCode=\"LTR\">1.0000</ram:BasisQuantity>\n" +
|
||||
" </ram:NetPriceProductTradePrice>\n" +
|
||||
" </ram:SpecifiedLineTradeAgreement>\n" +
|
||||
" <ram:SpecifiedLineTradeDelivery>\n" +
|
||||
" <ram:BilledQuantity unitCode=\"LTR\">200.0000</ram:BilledQuantity>\n" +
|
||||
" </ram:SpecifiedLineTradeDelivery>\n" +
|
||||
" <ram:SpecifiedLineTradeSettlement>\n" +
|
||||
" <ram:ApplicableTradeTax>\n" +
|
||||
" <ram:TypeCode>VAT</ram:TypeCode>\n" +
|
||||
" <ram:CategoryCode>S</ram:CategoryCode>\n" +
|
||||
" <ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>\n" +
|
||||
" </ram:ApplicableTradeTax>\n" +
|
||||
" <ram:SpecifiedTradeSettlementLineMonetarySummation>\n" +
|
||||
" <ram:LineTotalAmount currencyID=\"EUR\">20.00</ram:LineTotalAmount>\n" +
|
||||
" </ram:SpecifiedTradeSettlementLineMonetarySummation>\n" +
|
||||
" </ram:SpecifiedLineTradeSettlement>\n" +
|
||||
" </ram:IncludedSupplyChainTradeLineItem>\n" +
|
||||
" <ram:ApplicableHeaderTradeAgreement>\n" +
|
||||
" <ram:SellerTradeParty>\n" +
|
||||
" <ram:Name>Bei Spiel GmbH</ram:Name>\n" +
|
||||
" <ram:PostalTradeAddress>\n" +
|
||||
" <ram:PostcodeCode>12345</ram:PostcodeCode>\n" +
|
||||
" <ram:LineOne>Ecke 12</ram:LineOne>\n" +
|
||||
" <ram:CityName>Stadthausen</ram:CityName>\n" +
|
||||
" <ram:CountryID>DE</ram:CountryID>\n" +
|
||||
" </ram:PostalTradeAddress>\n" +
|
||||
" <ram:SpecifiedTaxRegistration>\n" +
|
||||
" <ram:ID schemeID=\"FC\">22/815/0815/4</ram:ID>\n" +
|
||||
" </ram:SpecifiedTaxRegistration>\n" +
|
||||
" <ram:SpecifiedTaxRegistration>\n" +
|
||||
" <ram:ID schemeID=\"VA\">DE136695976</ram:ID>\n" +
|
||||
" </ram:SpecifiedTaxRegistration>\n" +
|
||||
" </ram:SellerTradeParty>\n" +
|
||||
" <ram:BuyerTradeParty>\n" +
|
||||
" <ram:Name>Theodor Est</ram:Name>\n" +
|
||||
" <ram:PostalTradeAddress>\n" +
|
||||
" <ram:PostcodeCode>88802</ram:PostcodeCode>\n" +
|
||||
" <ram:LineOne>Bahnstr. 42</ram:LineOne>\n" +
|
||||
" <ram:CityName>Spielkreis</ram:CityName>\n" +
|
||||
" <ram:CountryID>DE</ram:CountryID>\n" +
|
||||
" </ram:PostalTradeAddress>\n" +
|
||||
" <ram:SpecifiedTaxRegistration>\n" +
|
||||
" <ram:ID schemeID=\"VA\">DE999999999</ram:ID>\n" +
|
||||
" </ram:SpecifiedTaxRegistration>\n" +
|
||||
" </ram:BuyerTradeParty>\n" +
|
||||
" </ram:ApplicableHeaderTradeAgreement>\n" +
|
||||
" <ram:ApplicableHeaderTradeDelivery>\n" +
|
||||
" <ram:ActualDeliverySupplyChainEvent>\n" +
|
||||
" <ram:OccurrenceDateTime><udt:DateTimeString format=\"102\">20171117</udt:DateTimeString></ram:OccurrenceDateTime>\n" +
|
||||
" </ram:ActualDeliverySupplyChainEvent>\n" +
|
||||
" </ram:ApplicableHeaderTradeDelivery>\n" +
|
||||
" <ram:ApplicableHeaderTradeSettlement>\n" +
|
||||
" <ram:PaymentReference>RE-20171118/506</ram:PaymentReference>\n" +
|
||||
" <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>\n" +
|
||||
" <ram:SpecifiedTradeSettlementPaymentMeans>\n" +
|
||||
" <ram:TypeCode>42</ram:TypeCode>\n" +
|
||||
" <ram:Information>Überweisung</ram:Information>\n" +
|
||||
" <ram:PayeePartyCreditorFinancialAccount>\n" +
|
||||
" <ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>\n" +
|
||||
" <ram:ProprietaryID>44421800</ram:ProprietaryID>\n" +
|
||||
" </ram:PayeePartyCreditorFinancialAccount>\n" +
|
||||
" <ram:PayeeSpecifiedCreditorFinancialInstitution>\n" +
|
||||
" <ram:BICID>COBADEFFXXX</ram:BICID>\n" +
|
||||
" <ram:GermanBankleitzahlID>41441604</ram:GermanBankleitzahlID>\n" +
|
||||
" <ram:Name>Commerzbank</ram:Name>\n" +
|
||||
" </ram:PayeeSpecifiedCreditorFinancialInstitution>\n" +
|
||||
" </ram:SpecifiedTradeSettlementPaymentMeans>\n" +
|
||||
" <ram:ApplicableTradeTax>\n" +
|
||||
" <ram:CalculatedAmount currencyID=\"EUR\">11.20</ram:CalculatedAmount>\n" +
|
||||
" <ram:TypeCode>VAT</ram:TypeCode>\n" +
|
||||
" <ram:BasisAmount currencyID=\"EUR\">160.00</ram:BasisAmount>\n" +
|
||||
" <ram:CategoryCode>S</ram:CategoryCode>\n" +
|
||||
" <ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>\n" +
|
||||
" </ram:ApplicableTradeTax>\n" +
|
||||
" <ram:ApplicableTradeTax>\n" +
|
||||
" <ram:CalculatedAmount currencyID=\"EUR\">63.84</ram:CalculatedAmount>\n" +
|
||||
" <ram:TypeCode>VAT</ram:TypeCode>\n" +
|
||||
" <ram:BasisAmount currencyID=\"EUR\">336.00</ram:BasisAmount>\n" +
|
||||
" <ram:CategoryCode>S</ram:CategoryCode>\n" +
|
||||
" <ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>\n" +
|
||||
" </ram:ApplicableTradeTax>\n" +
|
||||
" <ram:SpecifiedTradePaymentTerms>\n" +
|
||||
" <ram:Description>Zahlbar ohne Abzug bis 09.12.2017</ram:Description>\n" +
|
||||
" <ram:DueDateDateTime><udt:DateTimeString format=\"102\">20171209</udt:DateTimeString></ram:DueDateDateTime>\n" +
|
||||
" </ram:SpecifiedTradePaymentTerms>\n" +
|
||||
" <ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n" +
|
||||
" <ram:LineTotalAmount currencyID=\"EUR\">496.00</ram:LineTotalAmount>\n" +
|
||||
" <ram:ChargeTotalAmount currencyID=\"EUR\">0.00</ram:ChargeTotalAmount>\n" +
|
||||
" <ram:AllowanceTotalAmount currencyID=\"EUR\">0.00</ram:AllowanceTotalAmount>\n" +
|
||||
" <ram:TaxBasisTotalAmount currencyID=\"EUR\">496.00</ram:TaxBasisTotalAmount>\n" +
|
||||
" <ram:TaxTotalAmount currencyID=\"EUR\">75.04</ram:TaxTotalAmount>\n" +
|
||||
" <ram:GrandTotalAmount currencyID=\"EUR\">571.04</ram:GrandTotalAmount>\n" +
|
||||
" <ram:DuePayableAmount currencyID=\"EUR\">571.04</ram:DuePayableAmount>\n" +
|
||||
" </ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n" +
|
||||
" </ram:ApplicableHeaderTradeSettlement>\n" +
|
||||
" </rsm:SupplyChainTradeTransaction>\n" +
|
||||
"</rsm:CrossIndustryInvoice>";
|
||||
zea1.setZUGFeRDXMLData(ownZUGFeRDXML.getBytes("UTF-8"));
|
||||
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
zea1.disableAutoClose(true);
|
||||
zea1.export(TARGET_PDF);
|
||||
zea1.export(baos);
|
||||
zea1.close();
|
||||
String pdfContent = baos.toString("UTF-8");
|
||||
assertFalse(pdfContent.indexOf("(via mustangproject.org") == -1);
|
||||
assertFalse(pdfContent.indexOf("<zf:ConformanceLevel>EN 16931</zf:ConformanceLevel>") == -1);
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// now check the contents (like MustangReaderTest)
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(TARGET_PDF);
|
||||
|
||||
// Reading ZUGFeRD
|
||||
assertEquals(zi.getAmount(), "571.04");
|
||||
assertEquals(zi.getBLZ(), "41441604");
|
||||
assertEquals(zi.getBIC(), "COBADEFFXXX");
|
||||
assertEquals(zi.getIBAN(), "DE88 2008 0000 0970 3757 00");
|
||||
assertEquals(zi.getKTO(), "44421800");
|
||||
assertEquals(zi.getHolder(), "Bei Spiel GmbH");
|
||||
assertEquals(zi.getForeignReference(), "RE-20171118/506");
|
||||
}
|
||||
|
||||
/**
|
||||
* The exporter test bases on @{code
|
||||
* ./src/test/MustangGnuaccountingBeispielRE-20140703_502blanko.pdf}, adds
|
||||
* metadata, writes to @{code ./target/testout-*} and then imports to check the
|
||||
* values. It would not make sense to have it run before the less complex
|
||||
* importer test (which is probably redundant). As only Name Ascending is
|
||||
* supported for Test Unit sequence, I renamed the Exporter Test test-Z-Export
|
||||
*/
|
||||
public void testCustomZF1Export() {
|
||||
|
||||
final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20170509_505custom.pdf";
|
||||
// the writing part
|
||||
|
||||
try {
|
||||
InputStream SOURCE_PDF = this.getClass().getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505blanko.pdf");
|
||||
|
||||
ZUGFeRDExporter zea1 = new ZUGFeRDExporterFromA1Factory()
|
||||
.setProducer("My Application")
|
||||
.setCreator("Test")
|
||||
.setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel.BASIC)
|
||||
.load(SOURCE_PDF);
|
||||
/* we have much more information than just in the basic profile (comfort or extended) but it's perfectly valid to provide more information, just not less. */
|
||||
String ownZUGFeRDXML = "<rsm:CrossIndustryDocument xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15\" xmlns:rsm=\"urn:ferd:CrossIndustryDocument:invoice:1p0\">\n"
|
||||
+ "<rsm:SpecifiedExchangedDocumentContext>\n" + "<ram:TestIndicator>\n"
|
||||
+ "<udt:Indicator>false</udt:Indicator>\n" + "</ram:TestIndicator>\n"
|
||||
+ "<ram:GuidelineSpecifiedDocumentContextParameter>\n" + "<ram:ID>\n"
|
||||
+ "urn:ferd:CrossIndustryDocument:invoice:1p0:basic\n" + "</ram:ID>\n"
|
||||
+ "</ram:GuidelineSpecifiedDocumentContextParameter>\n"
|
||||
+ "</rsm:SpecifiedExchangedDocumentContext>\n" + "<rsm:HeaderExchangedDocument>\n"
|
||||
+ "<ram:ID>RE-20170509/505</ram:ID>\n" + "<ram:Name>RECHNUNG</ram:Name>\n"
|
||||
+ "<ram:TypeCode>380</ram:TypeCode>\n" + "<ram:IssueDateTime>\n"
|
||||
+ "<udt:DateTimeString format=\"102\">20170509</udt:DateTimeString>\n" + "</ram:IssueDateTime>\n"
|
||||
+ "</rsm:HeaderExchangedDocument>\n" + "<rsm:SpecifiedSupplyChainTradeTransaction>\n"
|
||||
+ "<ram:ApplicableSupplyChainTradeAgreement>\n" + "<ram:SellerTradeParty>\n"
|
||||
+ "<ram:Name>Bei Spiel GmbH</ram:Name>\n" + "<ram:PostalTradeAddress>\n"
|
||||
+ "<ram:PostcodeCode>12345</ram:PostcodeCode>\n" + "<ram:LineOne>Ecke 12</ram:LineOne>\n"
|
||||
+ "<ram:CityName>Stadthausen</ram:CityName>\n" + "<ram:CountryID>DE</ram:CountryID>\n"
|
||||
+ "</ram:PostalTradeAddress>\n" + "<ram:SpecifiedTaxRegistration>\n"
|
||||
+ "<ram:ID schemeID=\"FC\">22/815/0815/4</ram:ID>\n" + "</ram:SpecifiedTaxRegistration>\n"
|
||||
+ "<ram:SpecifiedTaxRegistration>\n" + "<ram:ID schemeID=\"VA\">DE136695976</ram:ID>\n"
|
||||
+ "</ram:SpecifiedTaxRegistration>\n" + "</ram:SellerTradeParty>\n" + "<ram:BuyerTradeParty>\n"
|
||||
+ "<ram:Name>Theodor Est</ram:Name>\n" + "<ram:PostalTradeAddress>\n"
|
||||
+ "<ram:PostcodeCode>88802</ram:PostcodeCode>\n" + "<ram:LineOne>Bahnstr. 42</ram:LineOne>\n"
|
||||
+ "<ram:CityName>Spielkreis</ram:CityName>\n" + "<ram:CountryID>DE</ram:CountryID>\n"
|
||||
+ "</ram:PostalTradeAddress>\n" + "<ram:SpecifiedTaxRegistration>\n"
|
||||
+ "<ram:ID schemeID=\"VA\">DE999999999</ram:ID>\n" + "</ram:SpecifiedTaxRegistration>\n"
|
||||
+ "</ram:BuyerTradeParty>\n" + "</ram:ApplicableSupplyChainTradeAgreement>\n"
|
||||
+ "<ram:ApplicableSupplyChainTradeDelivery>\n" + "<ram:ActualDeliverySupplyChainEvent>\n"
|
||||
+ "<ram:OccurrenceDateTime>\n"
|
||||
+ "<udt:DateTimeString format=\"102\">20170507</udt:DateTimeString>\n"
|
||||
+ "</ram:OccurrenceDateTime>\n" + "</ram:ActualDeliverySupplyChainEvent>\n"
|
||||
+ "</ram:ApplicableSupplyChainTradeDelivery>\n" + "<ram:ApplicableSupplyChainTradeSettlement>\n"
|
||||
+ "<ram:PaymentReference>RE-20170509/505</ram:PaymentReference>\n"
|
||||
+ "<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>\n"
|
||||
+ "<ram:SpecifiedTradeSettlementPaymentMeans>\n" + "<ram:TypeCode>42</ram:TypeCode>\n"
|
||||
+ "<ram:Information>Überweisung</ram:Information>\n" + "<ram:PayeePartyCreditorFinancialAccount>\n"
|
||||
+ "<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>\n"
|
||||
+ "<ram:ProprietaryID>44421800</ram:ProprietaryID>\n"
|
||||
+ "</ram:PayeePartyCreditorFinancialAccount>\n"
|
||||
+ "<ram:PayeeSpecifiedCreditorFinancialInstitution>\n"
|
||||
+ "<ram:BICID>COBADEFFXXX</ram:BICID>\n"
|
||||
+ "<ram:GermanBankleitzahlID>41441604</ram:GermanBankleitzahlID>\n"
|
||||
+ "<ram:Name>Commerzbank</ram:Name>\n"
|
||||
+ "</ram:PayeeSpecifiedCreditorFinancialInstitution>\n"
|
||||
+ "</ram:SpecifiedTradeSettlementPaymentMeans>\n" + "<ram:ApplicableTradeTax>\n"
|
||||
+ "<ram:CalculatedAmount currencyID=\"EUR\">11.20</ram:CalculatedAmount>\n"
|
||||
+ "<ram:TypeCode>VAT</ram:TypeCode>\n"
|
||||
+ "<ram:BasisAmount currencyID=\"EUR\">160.00</ram:BasisAmount>\n"
|
||||
+ "<ram:CategoryCode>S</ram:CategoryCode>\n"
|
||||
+ "<ram:ApplicablePercent>7.00</ram:ApplicablePercent>\n" + "</ram:ApplicableTradeTax>\n"
|
||||
+ "<ram:ApplicableTradeTax>\n"
|
||||
+ "<ram:CalculatedAmount currencyID=\"EUR\">63.84</ram:CalculatedAmount>\n"
|
||||
+ "<ram:TypeCode>VAT</ram:TypeCode>\n"
|
||||
+ "<ram:BasisAmount currencyID=\"EUR\">336.00</ram:BasisAmount>\n"
|
||||
+ "<ram:CategoryCode>S</ram:CategoryCode>\n"
|
||||
+ "<ram:ApplicablePercent>19.00</ram:ApplicablePercent>\n" + "</ram:ApplicableTradeTax>\n"
|
||||
+ "<ram:SpecifiedTradePaymentTerms>\n"
|
||||
+ "<ram:Description>Zahlbar ohne Abzug bis zum 30.05.2017</ram:Description>\n"
|
||||
+ "<ram:DueDateDateTime>\n" + "<udt:DateTimeString format=\"102\">20170530</udt:DateTimeString>\n"
|
||||
+ "</ram:DueDateDateTime>\n" + "</ram:SpecifiedTradePaymentTerms>\n"
|
||||
+ "<ram:SpecifiedTradeSettlementMonetarySummation>\n"
|
||||
+ "<ram:LineTotalAmount currencyID=\"EUR\">496.00</ram:LineTotalAmount>\n"
|
||||
+ "<ram:ChargeTotalAmount currencyID=\"EUR\">0.00</ram:ChargeTotalAmount>\n"
|
||||
+ "<ram:AllowanceTotalAmount currencyID=\"EUR\">0.00</ram:AllowanceTotalAmount>\n"
|
||||
+ "<ram:TaxBasisTotalAmount currencyID=\"EUR\">496.00</ram:TaxBasisTotalAmount>\n"
|
||||
+ "<ram:TaxTotalAmount currencyID=\"EUR\">75.04</ram:TaxTotalAmount>\n"
|
||||
+ "<ram:GrandTotalAmount currencyID=\"EUR\">571.04</ram:GrandTotalAmount>\n"
|
||||
+ "<ram:DuePayableAmount currencyID=\"EUR\">571.04</ram:DuePayableAmount>\n"
|
||||
+ "</ram:SpecifiedTradeSettlementMonetarySummation>\n"
|
||||
+ "</ram:ApplicableSupplyChainTradeSettlement>\n" + "<ram:IncludedSupplyChainTradeLineItem>\n"
|
||||
+ "<ram:AssociatedDocumentLineDocument>\n" + "<ram:LineID>1</ram:LineID>\n"
|
||||
+ "</ram:AssociatedDocumentLineDocument>\n" + "<ram:SpecifiedSupplyChainTradeAgreement>\n"
|
||||
+ "<ram:GrossPriceProductTradePrice>\n"
|
||||
+ "<ram:ChargeAmount currencyID=\"EUR\">160.0000</ram:ChargeAmount>\n"
|
||||
+ "<ram:BasisQuantity unitCode=\"HUR\">1.0000</ram:BasisQuantity>\n"
|
||||
+ "</ram:GrossPriceProductTradePrice>\n" + "<ram:NetPriceProductTradePrice>\n"
|
||||
+ "<ram:ChargeAmount currencyID=\"EUR\">160.0000</ram:ChargeAmount>\n"
|
||||
+ "<ram:BasisQuantity unitCode=\"HUR\">1.0000</ram:BasisQuantity>\n"
|
||||
+ "</ram:NetPriceProductTradePrice>\n" + "</ram:SpecifiedSupplyChainTradeAgreement>\n"
|
||||
+ "<ram:SpecifiedSupplyChainTradeDelivery>\n"
|
||||
+ "<ram:BilledQuantity unitCode=\"HUR\">1.0000</ram:BilledQuantity>\n"
|
||||
+ "</ram:SpecifiedSupplyChainTradeDelivery>\n" + "<ram:SpecifiedSupplyChainTradeSettlement>\n"
|
||||
+ "<ram:ApplicableTradeTax>\n" + "<ram:TypeCode>VAT</ram:TypeCode>\n"
|
||||
+ "<ram:CategoryCode>S</ram:CategoryCode>\n"
|
||||
+ "<ram:ApplicablePercent>7.00</ram:ApplicablePercent>\n" + "</ram:ApplicableTradeTax>\n"
|
||||
+ "<ram:SpecifiedTradeSettlementMonetarySummation>\n"
|
||||
+ "<ram:LineTotalAmount currencyID=\"EUR\">160.00</ram:LineTotalAmount>\n"
|
||||
+ "</ram:SpecifiedTradeSettlementMonetarySummation>\n"
|
||||
+ "</ram:SpecifiedSupplyChainTradeSettlement>\n" + "<ram:SpecifiedTradeProduct>\n" + "<ram:Name>\n"
|
||||
+ "Künstlerische Gestaltung (Stunde): Einer Beispielrechnung\n" + "</ram:Name>\n"
|
||||
+ "<ram:Description/>\n" + "</ram:SpecifiedTradeProduct>\n"
|
||||
+ "</ram:IncludedSupplyChainTradeLineItem>\n" + "<ram:IncludedSupplyChainTradeLineItem>\n"
|
||||
+ "<ram:AssociatedDocumentLineDocument>\n" + "<ram:LineID>2</ram:LineID>\n"
|
||||
+ "</ram:AssociatedDocumentLineDocument>\n" + "<ram:SpecifiedSupplyChainTradeAgreement>\n"
|
||||
+ "<ram:GrossPriceProductTradePrice>\n"
|
||||
+ "<ram:ChargeAmount currencyID=\"EUR\">0.7900</ram:ChargeAmount>\n"
|
||||
+ "<ram:BasisQuantity unitCode=\"C62\">1.0000</ram:BasisQuantity>\n"
|
||||
+ "</ram:GrossPriceProductTradePrice>\n" + "<ram:NetPriceProductTradePrice>\n"
|
||||
+ "<ram:ChargeAmount currencyID=\"EUR\">0.7900</ram:ChargeAmount>\n"
|
||||
+ "<ram:BasisQuantity unitCode=\"C62\">1.0000</ram:BasisQuantity>\n"
|
||||
+ "</ram:NetPriceProductTradePrice>\n" + "</ram:SpecifiedSupplyChainTradeAgreement>\n"
|
||||
+ "<ram:SpecifiedSupplyChainTradeDelivery>\n"
|
||||
+ "<ram:BilledQuantity unitCode=\"C62\">400.0000</ram:BilledQuantity>\n"
|
||||
+ "</ram:SpecifiedSupplyChainTradeDelivery>\n" + "<ram:SpecifiedSupplyChainTradeSettlement>\n"
|
||||
+ "<ram:ApplicableTradeTax>\n" + "<ram:TypeCode>VAT</ram:TypeCode>\n"
|
||||
+ "<ram:CategoryCode>S</ram:CategoryCode>\n"
|
||||
+ "<ram:ApplicablePercent>19.00</ram:ApplicablePercent>\n" + "</ram:ApplicableTradeTax>\n"
|
||||
+ "<ram:SpecifiedTradeSettlementMonetarySummation>\n"
|
||||
+ "<ram:LineTotalAmount currencyID=\"EUR\">316.00</ram:LineTotalAmount>\n"
|
||||
+ "</ram:SpecifiedTradeSettlementMonetarySummation>\n"
|
||||
+ "</ram:SpecifiedSupplyChainTradeSettlement>\n" + "<ram:SpecifiedTradeProduct>\n"
|
||||
+ "<ram:Name>Luftballon: Bunt, ca. 500ml</ram:Name>\n" + "<ram:Description/>\n"
|
||||
+ "</ram:SpecifiedTradeProduct>\n" + "</ram:IncludedSupplyChainTradeLineItem>\n"
|
||||
+ "<ram:IncludedSupplyChainTradeLineItem>\n" + "<ram:AssociatedDocumentLineDocument>\n"
|
||||
+ "<ram:LineID>3</ram:LineID>\n" + "</ram:AssociatedDocumentLineDocument>\n"
|
||||
+ "<ram:SpecifiedSupplyChainTradeAgreement>\n" + "<ram:GrossPriceProductTradePrice>\n"
|
||||
+ "<ram:ChargeAmount currencyID=\"EUR\">0.1000</ram:ChargeAmount>\n"
|
||||
+ "<ram:BasisQuantity unitCode=\"LTR\">1.0000</ram:BasisQuantity>\n"
|
||||
+ "</ram:GrossPriceProductTradePrice>\n" + "<ram:NetPriceProductTradePrice>\n"
|
||||
+ "<ram:ChargeAmount currencyID=\"EUR\">0.1000</ram:ChargeAmount>\n"
|
||||
+ "<ram:BasisQuantity unitCode=\"LTR\">1.0000</ram:BasisQuantity>\n"
|
||||
+ "</ram:NetPriceProductTradePrice>\n" + "</ram:SpecifiedSupplyChainTradeAgreement>\n"
|
||||
+ "<ram:SpecifiedSupplyChainTradeDelivery>\n"
|
||||
+ "<ram:BilledQuantity unitCode=\"LTR\">200.0000</ram:BilledQuantity>\n"
|
||||
+ "</ram:SpecifiedSupplyChainTradeDelivery>\n" + "<ram:SpecifiedSupplyChainTradeSettlement>\n"
|
||||
+ "<ram:ApplicableTradeTax>\n" + "<ram:TypeCode>VAT</ram:TypeCode>\n"
|
||||
+ "<ram:CategoryCode>S</ram:CategoryCode>\n"
|
||||
+ "<ram:ApplicablePercent>19.00</ram:ApplicablePercent>\n" + "</ram:ApplicableTradeTax>\n"
|
||||
+ "<ram:SpecifiedTradeSettlementMonetarySummation>\n"
|
||||
+ "<ram:LineTotalAmount currencyID=\"EUR\">20.00</ram:LineTotalAmount>\n"
|
||||
+ "</ram:SpecifiedTradeSettlementMonetarySummation>\n"
|
||||
+ "</ram:SpecifiedSupplyChainTradeSettlement>\n" + "<ram:SpecifiedTradeProduct>\n"
|
||||
+ "<ram:Name>Heiße Luft pro Liter</ram:Name>\n" + "<ram:Description/>\n"
|
||||
+ "</ram:SpecifiedTradeProduct>\n" + "</ram:IncludedSupplyChainTradeLineItem>\n"
|
||||
+ "</rsm:SpecifiedSupplyChainTradeTransaction>\n" + "</rsm:CrossIndustryDocument>";
|
||||
zea1.setZUGFeRDXMLData(ownZUGFeRDXML.getBytes("UTF-8"));
|
||||
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
zea1.disableAutoClose(true);
|
||||
zea1.export(TARGET_PDF);
|
||||
zea1.export(baos);
|
||||
zea1.close();
|
||||
String pdfContent = baos.toString("UTF-8");
|
||||
assertFalse(pdfContent.indexOf("(via mustangproject.org") == -1);
|
||||
assertFalse(pdfContent.indexOf("<zf:ConformanceLevel>BASIC</zf:ConformanceLevel>") == -1);
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// now check the contents (like MustangReaderTest)
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(TARGET_PDF);
|
||||
|
||||
// Reading ZUGFeRD
|
||||
assertEquals(zi.getAmount(), "571.04");
|
||||
assertEquals(zi.getBIC(), "COBADEFFXXX");
|
||||
assertEquals(zi.getBLZ(), "41441604");
|
||||
assertEquals(zi.getIBAN(), "DE88 2008 0000 0970 3757 00");
|
||||
assertEquals(zi.getKTO(), "44421800");
|
||||
assertEquals(zi.getHolder(), "Bei Spiel GmbH");
|
||||
assertEquals(zi.getForeignReference(), "RE-20170509/505");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* 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 junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
import org.junit.FixMethodOrder;
|
||||
import org.junit.runners.MethodSorters;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
public class MustangReaderWriterEdgeTest extends MustangReaderTestCase {
|
||||
|
||||
@Override
|
||||
public Date getDeliveryDate() {
|
||||
return new GregorianCalendar(2017, Calendar.MAY, 7).getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getDueDate() {
|
||||
return new GregorianCalendar(2017, Calendar.MAY, 30).getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getIssueDate() {
|
||||
return new GregorianCalendar(2017, Calendar.MAY, 9).getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNumber() {
|
||||
return "RE-20170509/505";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnCountry() {
|
||||
return "DE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnLocation() {
|
||||
return "Stadthausen";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnOrganisationName() {
|
||||
return "Bei Spiel GmbH";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnStreet() {
|
||||
return "Ecke 12";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableContact getOwnContact() {
|
||||
return new SenderContact();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnTaxID() {
|
||||
return "22/815/0815/4";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnVATID() {
|
||||
return "DE136695976";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnZIP() {
|
||||
return "12345";
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableContact getRecipient() {
|
||||
return new RecipientContact();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnOrganisationFullPlaintextInfo() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrency() {
|
||||
return "EUR";
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableItem[] getZFItems() {
|
||||
Item[] allItems = new Item[3];
|
||||
Product designProduct = new Product("", "Künstlerische Gestaltung (Stunde): Einer Beispielrechnung", "HUR", new BigDecimal("7.000000"));
|
||||
Product balloonProduct = new Product("", "Luftballon: Bunt, ca. 500ml", "C62", new BigDecimal("19.000000"));
|
||||
Product airProduct = new Product("", "Heiße Luft pro Liter", "LTR", new BigDecimal("19.000000"));
|
||||
|
||||
allItems[0] = new Item(new BigDecimal("160"), new BigDecimal("1"), designProduct);
|
||||
allItems[1] = new Item(new BigDecimal("0.79"), new BigDecimal("400"), balloonProduct);
|
||||
allItems[2] = new Item(new BigDecimal("0.10"), new BigDecimal("200"), airProduct);
|
||||
return allItems;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPaymentTermDescription() {
|
||||
SimpleDateFormat germanDateFormat = new SimpleDateFormat("dd.MM.yyyy");
|
||||
return "Zahlbar ohne Abzug bis zum " + germanDateFormat.format(getDueDate());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFAllowances() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFCharges() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFLogisticsServiceCharges() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getReferenceNumber() {
|
||||
return "AB321";
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public MustangReaderWriterEdgeTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite() {
|
||||
return new TestSuite(MustangReaderWriterEdgeTest.class);
|
||||
}
|
||||
|
||||
// //////// TESTS //////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* The importer test imports from ./src/test/MustangGnuaccountingBeispielRE-20170509_505.pdf to check the values.
|
||||
* As only Name Ascending is supported for Test Unit sequence, I renamed the this test-A-Import to run before
|
||||
* testZExport
|
||||
*/
|
||||
|
||||
public void testAImport() {
|
||||
InputStream inputStream = this.getClass().getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505.pdf");
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(inputStream);
|
||||
|
||||
// Reading ZUGFeRD
|
||||
assertEquals(zi.getAmount(), "571.04");
|
||||
assertEquals(zi.getBIC(), getTradeSettlementPayment()[0].getOwnBIC());
|
||||
assertEquals(zi.getBLZ(), getTradeSettlementPayment()[0].getOwnBLZ());
|
||||
assertEquals(zi.getIBAN(), getTradeSettlementPayment()[0].getOwnIBAN());
|
||||
assertEquals(zi.getKTO(), getTradeSettlementPayment()[0].getOwnKto());
|
||||
assertEquals(zi.getHolder(), getOwnOrganisationName());
|
||||
assertEquals(zi.getDueDate(), "20170530");
|
||||
assertEquals(zi.getForeignReference(), getNumber());
|
||||
assertEquals(zi.getDocumentCode(), "380");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The exporter test bases on @{code ./src/test/MustangGnuaccountingBeispielRE-20140703_502blanko.pdf}, adds metadata,
|
||||
* writes to @{code ./target/testout-*} and then imports to check the values.
|
||||
* It would not make sense to have it run before the less complex importer test (which is probably redundant).
|
||||
* As only Name Ascending is supported for Test Unit sequence, I renamed the Exporter Test test-Z-Export
|
||||
*/
|
||||
public void testEdgeExport() {
|
||||
|
||||
final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20170509_505newEdge.pdf";
|
||||
// the writing part
|
||||
|
||||
try (InputStream SOURCE_PDF =
|
||||
this.getClass().getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf");
|
||||
|
||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA3Factory()
|
||||
.setProducer("My Application")
|
||||
.setCreator(System.getProperty("user.name"))
|
||||
.setZUGFeRDVersion(1)
|
||||
.ignorePDFAErrors()
|
||||
.load(SOURCE_PDF)) {
|
||||
ze.PDFattachZugferdFile(this);
|
||||
String theXML = new String(ze.getProvider().getXML());
|
||||
assertTrue(theXML.contains("<rsm:CrossIndustryDocument"));
|
||||
ze.export(TARGET_PDF);
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not happen in testEdgeExport");
|
||||
}
|
||||
|
||||
// now check the contents (like MustangReaderTest)
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(TARGET_PDF);
|
||||
|
||||
// Reading ZUGFeRD
|
||||
assertEquals(zi.getAmount(), "571.04");
|
||||
assertEquals(zi.getBIC(), getTradeSettlementPayment()[0].getOwnBIC());
|
||||
assertEquals(zi.getBLZ(), getTradeSettlementPayment()[0].getOwnBLZ());
|
||||
assertEquals(zi.getIBAN(), getTradeSettlementPayment()[0].getOwnIBAN());
|
||||
assertEquals(zi.getKTO(), getTradeSettlementPayment()[0].getOwnKto());
|
||||
assertEquals(zi.getHolder(), getOwnOrganisationName());
|
||||
assertEquals(zi.getForeignReference(), getNumber());
|
||||
try {
|
||||
assertEquals(zi.getVersion(), 1);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,482 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* 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 junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||
import org.apache.pdfbox.pdmodel.common.PDMetadata;
|
||||
import org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException;
|
||||
import org.apache.xmpbox.XMPMetadata;
|
||||
import org.apache.xmpbox.schema.PDFAIdentificationSchema;
|
||||
import org.apache.xmpbox.xml.DomXmpParser;
|
||||
import org.apache.xmpbox.xml.XmpParsingException;
|
||||
import org.junit.FixMethodOrder;
|
||||
import org.junit.runners.MethodSorters;
|
||||
import org.mustangproject.ZUGFeRD.model.DocumentContextParameterTypeConstants;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
public class MustangReaderWriterTest extends MustangReaderTestCase {
|
||||
|
||||
@Override
|
||||
public Date getDeliveryDate() {
|
||||
return new GregorianCalendar(2019, Calendar.JUNE, 10).getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getDueDate() {
|
||||
return new GregorianCalendar(2019, Calendar.JULY, 1).getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getIssueDate() {
|
||||
return new GregorianCalendar(2019, Calendar.JUNE, 10).getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNumber() {
|
||||
return "RE-20190610/507";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnCountry() {
|
||||
return "DE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnLocation() {
|
||||
return "Stadthausen";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnOrganisationName() {
|
||||
return "Bei Spiel GmbH";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnStreet() {
|
||||
return "Ecke 12";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnTaxID() {
|
||||
return "22/815/0815/4";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnVATID() {
|
||||
return "DE136695976";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnZIP() {
|
||||
return "12345";
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableContact getRecipient() {
|
||||
return new RecipientContact();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableContact getOwnContact() {
|
||||
return new SenderContact();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnOrganisationFullPlaintextInfo() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrency() {
|
||||
return "EUR";
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableItem[] getZFItems() {
|
||||
Item[] allItems = new Item[3];
|
||||
Product designProduct = new Product("", "Design (hours): Of a sample invoice", "HUR",
|
||||
new BigDecimal("7.000000"));
|
||||
Product balloonProduct = new Product("", "Ballons: various colors, ~2000ml", "C62", new BigDecimal("19.000000"));
|
||||
Product airProduct = new Product("", "Hot air „heiße Luft“ (litres)", "LTR", new BigDecimal("19.000000"));
|
||||
|
||||
allItems[0] = new Item(new BigDecimal("160"), new BigDecimal("1"), designProduct);
|
||||
allItems[1] = new Item(new BigDecimal("0.79"), new BigDecimal("400"), balloonProduct);
|
||||
allItems[2] = new Item(new BigDecimal("0.025"), new BigDecimal("800"), airProduct);
|
||||
return allItems;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPaymentTermDescription() {
|
||||
SimpleDateFormat isoDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
return "Remit until " + isoDateFormat.format(getDueDate());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFAllowances() {
|
||||
return null;
|
||||
// throw new UnsupportedOperationException("Not supported yet."); //To change
|
||||
// body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFCharges() {
|
||||
return null;
|
||||
// throw new UnsupportedOperationException("Not supported yet."); //To change
|
||||
// body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFLogisticsServiceCharges() {
|
||||
return null;
|
||||
// throw new UnsupportedOperationException("Not supported yet."); //To change
|
||||
// body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getReferenceNumber() {
|
||||
return "AB321";
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public MustangReaderWriterTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite() {
|
||||
return new TestSuite(MustangReaderWriterTest.class);
|
||||
}
|
||||
|
||||
// //////// TESTS
|
||||
// //////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* The importer test imports from ./src/test/MustangGnuaccountingBeispielRE-20170509_505.pdf to check the
|
||||
* values. As only Name Ascending is supported for Test Unit sequence, I renamed the this testAImport
|
||||
* to run before testZExport
|
||||
*/
|
||||
|
||||
public void testAImport() {
|
||||
InputStream inputStream = this.getClass().getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505.pdf");
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(inputStream);
|
||||
|
||||
// Reading ZUGFeRD
|
||||
assertEquals(zi.getAmount(), "571.04");
|
||||
assertEquals(zi.getBLZ(), getTradeSettlementPayment()[0].getOwnBLZ());
|
||||
assertEquals(zi.getBIC(), getTradeSettlementPayment()[0].getOwnBIC());
|
||||
assertEquals(zi.getIBAN(),getTradeSettlementPayment()[0].getOwnIBAN());
|
||||
assertEquals(zi.getKTO(), getTradeSettlementPayment()[0].getOwnKto());
|
||||
assertEquals(zi.getHolder(), getOwnOrganisationName());
|
||||
assertEquals(zi.getForeignReference(), "RE-20170509/505");
|
||||
assertEquals(zi.getBankName(), "Commerzbank");
|
||||
}
|
||||
|
||||
public void testForeignImport() {
|
||||
InputStream inputStream = this.getClass().getResourceAsStream("/zugferd_invoice.pdf");
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(inputStream);
|
||||
|
||||
// Reading ZUGFeRD
|
||||
String amount = zi.getAmount();
|
||||
|
||||
assertEquals("<?xpacket begin=\"\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>\n" +
|
||||
" <x:xmpmeta xmlns:x=\"adobe:ns:meta/\">\n" +
|
||||
" <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n" +
|
||||
" <rdf:Description rdf:about=\"\" xmlns:xmpMM=\"http://ns.adobe.com/xap/1.0/mm/\">\n" +
|
||||
" <xmpMM:InstanceID>uuid:6776DD95-DAF6-768E-DAE6-2697750D95C5</xmpMM:InstanceID>\n" +
|
||||
" <xmpMM:DocumentID>uuid:47380404-5938-FE2C-8F0B-B505DCE43BF5</xmpMM:DocumentID>\n" +
|
||||
" </rdf:Description>\n" +
|
||||
" <rdf:Description rdf:about=\"\" xmlns:zf=\"urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#\">\n" +
|
||||
" <zf:ConformanceLevel>BASIC</zf:ConformanceLevel>\n" +
|
||||
" <zf:DocumentFileName>ZUGFeRD-invoice.xml</zf:DocumentFileName>\n" +
|
||||
" <zf:DocumentType>INVOICE</zf:DocumentType>\n" +
|
||||
" <zf:Version>1.0</zf:Version>\n" +
|
||||
" </rdf:Description>\n" +
|
||||
" <rdf:Description rdf:about=\"\" xmlns:pdfaExtension=\"http://www.aiim.org/pdfa/ns/extension/\" xmlns:pdfaSchema=\"http://www.aiim.org/pdfa/ns/schema#\" xmlns:pdfaProperty=\"http://www.aiim.org/pdfa/ns/property#\">\n" +
|
||||
" <pdfaExtension:schemas>\n" +
|
||||
" <rdf:Bag>\n" +
|
||||
" <rdf:li rdf:parseType=\"Resource\">\n" +
|
||||
" <pdfaSchema:schema>ZUGFeRD PDFA Extension Schema</pdfaSchema:schema>\n" +
|
||||
" <pdfaSchema:namespaceURI>urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#</pdfaSchema:namespaceURI>\n" +
|
||||
" <pdfaSchema:prefix>zf</pdfaSchema:prefix>\n" +
|
||||
" <pdfaSchema:property>\n" +
|
||||
" <rdf:Seq>\n" +
|
||||
" <rdf:li rdf:parseType=\"Resource\">\n" +
|
||||
" <pdfaProperty:name>DocumentFileName</pdfaProperty:name>\n" +
|
||||
" <pdfaProperty:valueType>Text</pdfaProperty:valueType>\n" +
|
||||
" <pdfaProperty:category>external</pdfaProperty:category>\n" +
|
||||
" <pdfaProperty:description>name of the embedded XML invoice file</pdfaProperty:description>\n" +
|
||||
" </rdf:li>\n" +
|
||||
" <rdf:li rdf:parseType=\"Resource\">\n" +
|
||||
" <pdfaProperty:name>DocumentType</pdfaProperty:name>\n" +
|
||||
" <pdfaProperty:valueType>Text</pdfaProperty:valueType>\n" +
|
||||
" <pdfaProperty:category>external</pdfaProperty:category>\n" +
|
||||
" <pdfaProperty:description>INVOICE</pdfaProperty:description>\n" +
|
||||
" </rdf:li>\n" +
|
||||
" <rdf:li rdf:parseType=\"Resource\">\n" +
|
||||
" <pdfaProperty:name>Version</pdfaProperty:name>\n" +
|
||||
" <pdfaProperty:valueType>Text</pdfaProperty:valueType>\n" +
|
||||
" <pdfaProperty:category>external</pdfaProperty:category>\n" +
|
||||
" <pdfaProperty:description>The actual version of the ZUGFeRD XML schema</pdfaProperty:description>\n" +
|
||||
" </rdf:li>\n" +
|
||||
" <rdf:li rdf:parseType=\"Resource\">\n" +
|
||||
" <pdfaProperty:name>ConformanceLevel</pdfaProperty:name>\n" +
|
||||
" <pdfaProperty:valueType>Text</pdfaProperty:valueType>\n" +
|
||||
" <pdfaProperty:category>external</pdfaProperty:category>\n" +
|
||||
" <pdfaProperty:description>The conformance level of the embedded ZUGFeRD data</pdfaProperty:description>\n" +
|
||||
" </rdf:li>\n" +
|
||||
" </rdf:Seq>\n" +
|
||||
" </pdfaSchema:property>\n" +
|
||||
" </rdf:li>\n" +
|
||||
" </rdf:Bag>\n" +
|
||||
" </pdfaExtension:schemas>\n" +
|
||||
" </rdf:Description>\n" +
|
||||
" <rdf:Description rdf:about=\"\" xmlns:pdfaid=\"http://www.aiim.org/pdfa/ns/id/\">\n" +
|
||||
" <pdfaid:part>3</pdfaid:part>\n" +
|
||||
" <pdfaid:conformance>B</pdfaid:conformance>\n" +
|
||||
" </rdf:Description>\n" +
|
||||
" <rdf:Description rdf:about=\"\" xmlns:xmp=\"http://ns.adobe.com/xap/1.0/\">\n" +
|
||||
" <xmp:CreateDate>2014-07-11T13:39:46+02:00</xmp:CreateDate>\n" +
|
||||
" <xmp:ModifyDate>2014-07-11T13:39:46+02:00</xmp:ModifyDate>\n" +
|
||||
" <xmp:CreatorTool>zugferd_invoice.java</xmp:CreatorTool>\n" +
|
||||
" <xmp:MetadataDate>2014-07-11T13:39:46+02:00</xmp:MetadataDate>\n" +
|
||||
" </rdf:Description>\n" +
|
||||
" <rdf:Description rdf:about=\"\" xmlns:pdf=\"http://ns.adobe.com/pdf/1.3/\">\n" +
|
||||
" <pdf:Producer>PDFlib Personalization Server 9.0.3 (JDK 1.6/Mac OS X-10.6 64)</pdf:Producer>\n" +
|
||||
" </rdf:Description>\n" +
|
||||
" <rdf:Description rdf:about=\"\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">\n" +
|
||||
" <dc:title>\n" +
|
||||
" <rdf:Alt>\n" +
|
||||
" <rdf:li xml:lang=\"x-default\">ZUGFeRD Rechnung $Revision: 1.13 $</rdf:li>\n" +
|
||||
" </rdf:Alt>\n" +
|
||||
" </dc:title>\n" +
|
||||
" </rdf:Description>\n" +
|
||||
" </rdf:RDF>\n" +
|
||||
" </x:xmpmeta>\n" +
|
||||
"<?xpacket end=\"r\"?>", zi.getXMP());
|
||||
// this resembles the data written in MustangReaderWriterCustomXMLTest
|
||||
assertEquals(amount, "1005.55");
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void testMigratePDFA1ToA3() throws IOException {
|
||||
// just make sure there is no Exception
|
||||
InputStream SOURCE_PDF = this.getClass()
|
||||
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20171118_506blanko.pdf");
|
||||
|
||||
|
||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().setAttachZUGFeRDHeaders(false).load(SOURCE_PDF);
|
||||
|
||||
File tempFile = File.createTempFile("ZUGFeRD-", "-test");
|
||||
ze.export(tempFile.getAbsolutePath());
|
||||
tempFile.deleteOnExit();
|
||||
checkPdfA3B(tempFile);
|
||||
}
|
||||
|
||||
public void testMigratePDFA1ToA3Stream() throws IOException {
|
||||
// just make sure there is no Exception
|
||||
InputStream SOURCE_PDF = this.getClass()
|
||||
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20171118_506blanko.pdf");
|
||||
|
||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().setAttachZUGFeRDHeaders(false).load(SOURCE_PDF);
|
||||
|
||||
File tempFile = File.createTempFile("ZUGFeRD-", "-test");
|
||||
tempFile.deleteOnExit();
|
||||
try (FileOutputStream fos = new FileOutputStream(tempFile)) {
|
||||
ze.export(fos);
|
||||
}
|
||||
checkPdfA3B(tempFile);
|
||||
}
|
||||
|
||||
private void checkPdfA3B(File tempFile) throws IOException, InvalidPasswordException {
|
||||
try (PDDocument doc = PDDocument.load(tempFile)) {
|
||||
PDMetadata metadata = doc.getDocumentCatalog().getMetadata();
|
||||
InputStream exportXMPMetadata = metadata.exportXMPMetadata();
|
||||
byte[] xmpBytes = new byte[exportXMPMetadata.available()];
|
||||
exportXMPMetadata.read(xmpBytes);
|
||||
final XMPMetadata xmp = new DomXmpParser().parse(xmpBytes);
|
||||
PDFAIdentificationSchema pdfaid = xmp.getPDFIdentificationSchema();
|
||||
assertEquals(pdfaid.getPart().intValue(), 3);
|
||||
assertEquals(pdfaid.getConformance(), "U");
|
||||
} catch (XmpParsingException e) {
|
||||
throw new IllegalStateException("Failed to read PDF", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The exporter test bases on @{code
|
||||
* ./src/test/MustangGnuaccountingBeispielRE-20140703_502blanko.pdf}, adds
|
||||
* metadata, writes to @{code ./target/testout-*} and then imports to check the
|
||||
* values. It would not make sense to have it run before the less complex
|
||||
* importer test (which is probably redundant). As only Name Ascending is
|
||||
* supported for Test Unit sequence, I renamed the Exporter Test test-Z-Export
|
||||
*/
|
||||
public void testZExport() {
|
||||
|
||||
final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20171118_506new.pdf";
|
||||
|
||||
// the writing part
|
||||
try (InputStream SOURCE_PDF = this.getClass()
|
||||
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20190610_507blanko.pdf");
|
||||
|
||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().setZUGFeRDVersion(2).setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel.EN16931).load(SOURCE_PDF)) {
|
||||
|
||||
ze.PDFattachZugferdFile(this);
|
||||
ze.disableAutoClose(true);
|
||||
ze.export(TARGET_PDF);
|
||||
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ze.export(baos);
|
||||
ze.close();
|
||||
String pdfContent = baos.toString("UTF-8");
|
||||
assertFalse(pdfContent.indexOf("(via mustangproject.org") == -1);
|
||||
// check for pdf-a schema extension
|
||||
// assertFalse(pdfContent.indexOf("<zf:ConformanceLevel>EN 16931</zf:ConformanceLevel>") == -1);
|
||||
// assertFalse(pdfContent.indexOf("<pdfaSchema:prefix>zf</pdfaSchema:prefix>") == -1);
|
||||
// assertFalse(pdfContent.indexOf("urn:zugferd:pdfa:CrossIndustryDocument:invoice:2p0#") == -1);
|
||||
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not happen in testZExport");
|
||||
}
|
||||
|
||||
// now check the contents (like MustangReaderTest)
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(TARGET_PDF);
|
||||
|
||||
// Reading ZUGFeRD
|
||||
assertEquals(zi.getAmount(), "571.04");
|
||||
assertEquals(zi.getBIC(), getTradeSettlementPayment()[0].getOwnBIC());
|
||||
assertEquals(zi.getReference(), getReferenceNumber());
|
||||
assertEquals(zi.getIBAN(), getTradeSettlementPayment()[0].getOwnIBAN());
|
||||
assertEquals(zi.getKTO(), getTradeSettlementPayment()[0].getOwnKto());
|
||||
assertEquals(zi.getHolder(), getOwnOrganisationName());
|
||||
assertEquals(zi.getForeignReference(), getNumber());
|
||||
}
|
||||
|
||||
/**
|
||||
* Quick and dirty copy of testZExport to check if v1 files contain
|
||||
* the correct profile string when the comfort profile is selected.
|
||||
*/
|
||||
public void testZExportv1Profile() {
|
||||
|
||||
final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20171118_506new.pdf";
|
||||
|
||||
// the writing part
|
||||
try (InputStream SOURCE_PDF = this.getClass()
|
||||
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20190610_507blanko.pdf");
|
||||
|
||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().setZUGFeRDVersion(1).setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel.COMFORT).load(SOURCE_PDF)) {
|
||||
|
||||
ze.PDFattachZugferdFile(this);
|
||||
ze.disableAutoClose(true);
|
||||
ze.export(TARGET_PDF);
|
||||
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ze.export(baos);
|
||||
ze.close();
|
||||
String pdfContent = baos.toString("UTF-8");
|
||||
assertFalse(pdfContent.indexOf(DocumentContextParameterTypeConstants.BASIC) >= 0);
|
||||
assertFalse(pdfContent.indexOf(DocumentContextParameterTypeConstants.EXTENDED) >= 0);
|
||||
assertTrue(pdfContent.indexOf(DocumentContextParameterTypeConstants.COMFORT) >= 0);
|
||||
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not happen in testZExport");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void testFXExport() throws Exception {
|
||||
|
||||
final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20171118_506fx.pdf";
|
||||
|
||||
// the writing part
|
||||
try (InputStream SOURCE_PDF = this.getClass()
|
||||
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20171118_506blanko.pdf");
|
||||
|
||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().setZUGFeRDVersion(2).setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel.EN16931).load(SOURCE_PDF)) {
|
||||
ze.setFacturX();
|
||||
ze.PDFattachZugferdFile(this);
|
||||
ze.disableAutoClose(true);
|
||||
ze.export(TARGET_PDF);
|
||||
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ze.export(baos);
|
||||
ze.close();
|
||||
String pdfContent = baos.toString("UTF-8");
|
||||
assertFalse(pdfContent.indexOf("(via mustangproject.org") == -1);
|
||||
// check for pdf-a schema extension
|
||||
assertFalse(pdfContent.indexOf("<fx:ConformanceLevel>EN 16931</fx:ConformanceLevel>") == -1);
|
||||
assertFalse(pdfContent.indexOf("<pdfaSchema:prefix>fx</pdfaSchema:prefix>") == -1);
|
||||
assertFalse(pdfContent.indexOf("urn:cen.eu:en16931:2017") == -1);
|
||||
}
|
||||
|
||||
// now check the contents (like MustangReaderTest)
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(TARGET_PDF);
|
||||
|
||||
// Reading ZUGFeRD
|
||||
assertEquals(zi.getAmount(), "571.04");
|
||||
assertEquals(zi.getBIC(), getTradeSettlementPayment()[0].getOwnBIC());
|
||||
assertEquals(zi.getIBAN(), getTradeSettlementPayment()[0].getOwnIBAN());
|
||||
assertEquals(zi.getKTO(), getTradeSettlementPayment()[0].getOwnKto());
|
||||
assertEquals(zi.getHolder(), getOwnOrganisationName());
|
||||
assertEquals(zi.getForeignReference(), getNumber());
|
||||
}
|
||||
|
||||
public void testExceptionOnPDF14() {
|
||||
|
||||
final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20170509_505new.pdf";
|
||||
|
||||
boolean exceptionThrown = false;
|
||||
// the writing part
|
||||
try (InputStream SOURCE_PDF = this.getClass()
|
||||
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505PDF14.pdf");
|
||||
|
||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().load(SOURCE_PDF)) {
|
||||
|
||||
ze.PDFattachZugferdFile(this);
|
||||
ze.export(TARGET_PDF);
|
||||
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ze.export(baos);
|
||||
} catch (IOException ex) {
|
||||
// should throw a java.io.IOException: File is not a valid PDF/A-1 input file
|
||||
exceptionThrown = true;
|
||||
}
|
||||
assertTrue(exceptionThrown);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,216 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* 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.io.*;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* This test utility class is providing usability functions for test file resources
|
||||
*/
|
||||
public class ResourceUtilities {
|
||||
private static final Logger LOG = Logger.getLogger(ResourceUtilities.class.getName());
|
||||
|
||||
/**
|
||||
* Loading a File into a String using a certain encoding and file path
|
||||
* @param encoding the charset used in the file
|
||||
* @param path the path to the file
|
||||
* @return the file contents as a String
|
||||
* @throws IOException if the file cannot be read
|
||||
*/
|
||||
public static String readFile(Charset encoding, String path) throws IOException {
|
||||
byte[] content = Files.readAllBytes(Paths.get(path));
|
||||
return new String(content, encoding);
|
||||
}
|
||||
|
||||
/**
|
||||
* Saving a String as a file to a certain file path
|
||||
* @param encoding the charset used in the file
|
||||
* @param path the path to the file
|
||||
* @param content the contents of the file
|
||||
* @throws FileNotFoundException if the file cannot be found
|
||||
*/
|
||||
public static void saveFile(Charset encoding, String path, String content) throws FileNotFoundException {
|
||||
|
||||
// resources will be released automatically
|
||||
try (PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(new File(path)), encoding), true)) {
|
||||
out.println(content);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The relative path of the test file will be resolved and the absolute will be returned
|
||||
*
|
||||
* @param relativeFilePath Path of the test resource relative to <code>src/test/resource/</code>.
|
||||
* @return the absolute path of the test file
|
||||
* @throws FileNotFoundException If the file could not be found
|
||||
*/
|
||||
public static String getAbsolutePath(String relativeFilePath) throws FileNotFoundException {
|
||||
URI uri = null;
|
||||
try {
|
||||
uri = ResourceUtilities.class.getClassLoader().getResource(relativeFilePath).toURI();
|
||||
uri = new URI(toExternalForm(uri));
|
||||
} catch (URISyntaxException ex) {
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
if (uri == null) {
|
||||
throw new FileNotFoundException("Could not find the file '" + relativeFilePath + "'!");
|
||||
}
|
||||
return uri.getPath();
|
||||
}
|
||||
|
||||
/**
|
||||
* The relative path of the test file will be resolved and the absolute will be returned
|
||||
*
|
||||
* @param relativeFilePath Path of the test resource relative to <code>src/test/resource/</code>.
|
||||
* @return the URI created based on the relativeFilePath
|
||||
* @throws URISyntaxException if no URI could be created from the given relative path
|
||||
*/
|
||||
public static URI getURI(String relativeFilePath) throws URISyntaxException {
|
||||
String filePath = "file:" + ResourceUtilities.class.getClassLoader().getResource(relativeFilePath).getPath();
|
||||
filePath = toExternalForm(new URI(filePath));
|
||||
return new URI(filePath);
|
||||
}
|
||||
|
||||
/**
|
||||
* The relative path of the test file will be used to determine an absolute
|
||||
* path to a temporary directory in the output directory.
|
||||
*
|
||||
* @param relativeFilePath Path of the test resource relative to <code>src/test/resource/</code>.
|
||||
* @return absolute path to a test output
|
||||
* @throws IOException if no absolute Path could be created.
|
||||
*/
|
||||
public static String getTestOutput(String relativeFilePath) throws IOException {
|
||||
File tempFile = File.createTempFile(relativeFilePath, null);
|
||||
tempFile.deleteOnExit();
|
||||
return tempFile.getAbsolutePath();
|
||||
}
|
||||
|
||||
/**
|
||||
* The Input of the test file will be resolved and the absolute will be returned
|
||||
*
|
||||
* @param relativeFilePath Path of the test resource relative to <code>src/test/resource/</code>.
|
||||
* @return the absolute path of the test file
|
||||
*/
|
||||
public static InputStream getTestResourceAsStream(String relativeFilePath) {
|
||||
return ResourceUtilities.class.getClassLoader().getResourceAsStream(relativeFilePath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Relative to the test output directory a test file will be returned dependent on the relativeFilePath provided.
|
||||
*
|
||||
* @param relativeFilePath Path of the test output resource relative to <code>target/test-classes/</code>.
|
||||
* @return the empty <code>File</code> of the test output (to be filled)
|
||||
*/
|
||||
public static File newTestOutputFile(String relativeFilePath) {
|
||||
String filepath = null;
|
||||
try {
|
||||
filepath = ResourceUtilities.class.getClassLoader().getResource("").toURI().getPath() + relativeFilePath;
|
||||
} catch (URISyntaxException ex) {
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
return new File(filepath);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the absolute path of the test output folder, which is usually <code>target/test-classes/</code>.
|
||||
*/
|
||||
public static String getTestOutputFolder() {
|
||||
String testFolder = null;
|
||||
try {
|
||||
testFolder = ResourceUtilities.class.getClassLoader().getResource("").toURI().getPath();
|
||||
} catch (URISyntaxException ex) {
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
return testFolder;
|
||||
}
|
||||
|
||||
public static File getTempTestDirectory() {
|
||||
File tempDir = new File(ResourceUtilities.getTestOutputFolder() + "temp");
|
||||
tempDir.mkdir(); //if it already exist no problem
|
||||
return tempDir;
|
||||
}
|
||||
|
||||
/**
|
||||
* To fix the 3 slashes bug for File URI: For example:
|
||||
* file:/C:/work/test.txt gives file:///C:/work/test.txt
|
||||
*
|
||||
* @param u - the File URI
|
||||
* @return the String of the URI
|
||||
*/
|
||||
public static String toExternalForm(URI u) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (u.getScheme() != null) {
|
||||
sb.append(u.getScheme());
|
||||
sb.append(':');
|
||||
}
|
||||
if (u.isOpaque()) {
|
||||
sb.append(u.getSchemeSpecificPart());
|
||||
} else {
|
||||
if (u.getHost() != null) {
|
||||
sb.append("//");
|
||||
if (u.getUserInfo() != null) {
|
||||
sb.append(u.getUserInfo());
|
||||
sb.append('@');
|
||||
}
|
||||
boolean needBrackets = ((u.getHost().indexOf(':') >= 0) && !u.getHost().startsWith("[") && !u.getHost().endsWith("]"));
|
||||
if (needBrackets)
|
||||
sb.append('[');
|
||||
sb.append(u.getHost());
|
||||
if (needBrackets)
|
||||
sb.append(']');
|
||||
if (u.getPort() != -1) {
|
||||
sb.append(':');
|
||||
sb.append(u.getPort());
|
||||
}
|
||||
} else if (u.getRawAuthority() != null) {
|
||||
sb.append("//");
|
||||
sb.append(u.getRawAuthority());
|
||||
} else {
|
||||
sb.append("//");
|
||||
}
|
||||
if (u.getRawPath() != null)
|
||||
sb.append(u.getRawPath());
|
||||
if (u.getRawQuery() != null) {
|
||||
sb.append('?');
|
||||
sb.append(u.getRawQuery());
|
||||
}
|
||||
}
|
||||
if (u.getFragment() != null) {
|
||||
sb.append('#');
|
||||
sb.append(u.getFragment());
|
||||
}
|
||||
String ret = null;
|
||||
try {
|
||||
ret = new URI(sb.toString()).toASCIIString();
|
||||
} catch (URISyntaxException ex) {
|
||||
LOG.log(Level.SEVERE, null, ex);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
private ResourceUtilities() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* 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 org.junit.Assert;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Parameterized;
|
||||
import org.xmlunit.builder.DiffBuilder;
|
||||
import org.xmlunit.diff.Diff;
|
||||
|
||||
import javax.xml.transform.TransformerException;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
||||
|
||||
/**
|
||||
* Every ZUGFeRD 1.0 XML file from <code>src/test/resources/migration/input</code>
|
||||
* will be migrated to <code>src/test/resources/migration/output</code>.
|
||||
* If there is a similar named file as test reference <code>src/test/resources/migration/reference</code> a test
|
||||
* will be triggered for every single file.
|
||||
*
|
||||
* Note: Any 'ZUGFeRD1' will be exchanged to 'ZUGFeRD2' during migration and adequate reference will be searched for.
|
||||
*/
|
||||
@RunWith(Parameterized.class)
|
||||
public class VersionMigrationTest {
|
||||
|
||||
private static final Logger LOG = Logger.getLogger(VersionMigrationTest.class.getName());
|
||||
|
||||
private static final String INPUT_DIR = "src" + File.separator + "test" + File.separator + "resources" + File.separator + "migration" + File.separator + "input" + File.separator;
|
||||
private static final String REFERENCE_DIR = "src" + File.separator + "test" + File.separator + "resources" + File.separator + "migration" + File.separator + "reference" + File.separator;
|
||||
private static final String OUTPUT_DIR = "target" + File.separator + "test-classes" + File.separator + "migration" + File.separator + "output" + File.separator;
|
||||
private File mTestFile = null;
|
||||
|
||||
@BeforeClass
|
||||
public static void setUpBeforeClass() throws Exception {
|
||||
// Creating the output directory for the tests
|
||||
new File(OUTPUT_DIR).mkdirs();
|
||||
}
|
||||
|
||||
public VersionMigrationTest(File testFile) {
|
||||
mTestFile = testFile;
|
||||
}
|
||||
|
||||
@Parameterized.Parameters(name = "Test# {index}: {0}")
|
||||
public static Collection<Object[]> data() {
|
||||
Collection<Object[]> testSuiteData = new ArrayList<Object[]>();
|
||||
addFilesFromFolder(new File(INPUT_DIR), testSuiteData);
|
||||
return testSuiteData;
|
||||
}
|
||||
|
||||
private static void addFilesFromFolder(final File folder, Collection<Object[]> testSuiteData) {
|
||||
for (final File fileEntry : folder.listFiles()) {
|
||||
String filePath = fileEntry.getAbsolutePath();
|
||||
if (fileEntry.isDirectory()) {
|
||||
LOG.log(Level.INFO, "*** testDirectory:{0}", filePath);
|
||||
addFilesFromFolder(fileEntry, testSuiteData);
|
||||
} else {
|
||||
LOG.log(Level.INFO, "*** testFile: {0}", filePath);
|
||||
Object[] testData = new Object[]{fileEntry};
|
||||
testSuiteData.add(testData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
/**
|
||||
* ZUGFeRD 1.0 to 2.0 migration test.
|
||||
* For more information see class description. */
|
||||
public void testFile() {
|
||||
testMigration(mTestFile.getName());
|
||||
}
|
||||
|
||||
private void testMigration(String fileName) {
|
||||
try {
|
||||
String tmp = new ZUGFeRDMigrator().migrateFromV1ToV2(INPUT_DIR + fileName);
|
||||
String newName = fileName.replace("ZUGFeRD1", "ZUGFeRD2");
|
||||
ResourceUtilities.saveFile(StandardCharsets.UTF_8, OUTPUT_DIR + newName, tmp);
|
||||
if (new File(REFERENCE_DIR + newName).exists()) {
|
||||
// we need to save the string and reload it otherwise two bytes are missing (likely EOF related)
|
||||
String outXML = ResourceUtilities.readFile(StandardCharsets.UTF_8, OUTPUT_DIR + newName);
|
||||
String refXML = ResourceUtilities.readFile(StandardCharsets.UTF_8, REFERENCE_DIR + newName);
|
||||
Diff myDiff = DiffBuilder.compare(refXML).withTest(outXML).checkForSimilar().ignoreComments().ignoreWhitespace().build();
|
||||
assertFalse(myDiff.toString(), myDiff.hasDifferences());
|
||||
} else {
|
||||
LOG.log(Level.INFO, "\n*** Migrated from ZUGFeRD 1.0 to 2.0 invoice: '" + newName + "'' ***\n", OUTPUT_DIR);
|
||||
}
|
||||
} catch (IOException | TransformerException t) {
|
||||
LOG.log(Level.SEVERE, t.getMessage(), t);
|
||||
Assert.fail("Failed with " + t.getClass().getName() + ": '" + t.getMessage() + "'");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,332 @@
|
||||
|
||||
/** **********************************************************************
|
||||
*
|
||||
* Copyright 2019 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.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
import org.junit.FixMethodOrder;
|
||||
import org.junit.runners.MethodSorters;
|
||||
import org.mustangproject.ZUGFeRD.MustangReaderTestCase.Item;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
public class ZF2EdgeTest extends MustangReaderTestCase implements IZUGFeRDExportableTransaction {
|
||||
final String TARGET_PDF = "./target/testout-ZF2newEdge.pdf";
|
||||
|
||||
protected class EdgeProduct implements IZUGFeRDExportableProduct {
|
||||
private String description, name, unit;
|
||||
|
||||
public EdgeProduct(String description, String name, String unit) {
|
||||
super();
|
||||
this.description = description;
|
||||
this.name = name;
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getVATPercent() {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isIntraCommunitySupply() {
|
||||
return true; // simulate intra community supply
|
||||
}
|
||||
}
|
||||
|
||||
protected class DebitPayment implements IZUGFeRDTradeSettlementDebit {
|
||||
|
||||
@Override
|
||||
public String getIBAN() {
|
||||
return "DE540815";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMandate() {
|
||||
return "DE99XX12345";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDTradeSettlementPayment[] getTradeSettlementPayment() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDTradeSettlement[] getTradeSettlement() {
|
||||
IZUGFeRDTradeSettlement[] payments = new DebitPayment[1];
|
||||
payments[0] = new DebitPayment();
|
||||
return payments;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getDeliveryDate() {
|
||||
return new GregorianCalendar(2017, Calendar.MAY, 7).getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getDueDate() {
|
||||
return new GregorianCalendar(2017, Calendar.MAY, 30).getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getIssueDate() {
|
||||
return new GregorianCalendar(2017, Calendar.MAY, 9).getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNumber() {
|
||||
return "RE-20170509/505";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnCountry() {
|
||||
return "DE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnLocation() {
|
||||
return "Stadthausen";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnOrganisationName() {
|
||||
return "Bei Spiel GmbH";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnStreet() {
|
||||
return "Ecke 12";
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableContact getOwnContact() {
|
||||
return new SenderContact();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnTaxID() {
|
||||
return "22/815/0815/4";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnVATID() {
|
||||
return "DE136695976";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnZIP() {
|
||||
return "12345";
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableContact getRecipient() {
|
||||
return new RecipientContact();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableContact getDeliveryAddress() {
|
||||
return new RecipientContact();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnOrganisationFullPlaintextInfo() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrency() {
|
||||
return "USD";
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableItem[] getZFItems() {
|
||||
Item[] allItems = new Item[3];
|
||||
EdgeProduct designProduct = new EdgeProduct("", "Künstlerische Gestaltung (Stunde): Einer Beispielrechnung",
|
||||
"HUR");
|
||||
EdgeProduct balloonProduct = new EdgeProduct("", "Bestellerweiterung für E&F Umbau", "C62");// test for issue
|
||||
// 103
|
||||
EdgeProduct airProduct = new EdgeProduct("", "Heiße Luft pro Liter", "LTR");
|
||||
|
||||
Item design=new Item(new BigDecimal("160"), new BigDecimal("1"), designProduct);
|
||||
design.setAddReference("1825");
|
||||
allItems[0] = design;
|
||||
allItems[1] = new Item(new BigDecimal("0.79"), new BigDecimal("400"), balloonProduct);
|
||||
allItems[2] = new Item(new BigDecimal("0.10"), new BigDecimal("200"), airProduct);
|
||||
return allItems;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPaymentTermDescription() {
|
||||
SimpleDateFormat germanDateFormat = new SimpleDateFormat("dd.MM.yyyy");
|
||||
return "Zahlbar ohne Abzug bis zum " + germanDateFormat.format(getDueDate());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFAllowances() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFCharges() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFLogisticsServiceCharges() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getReferenceNumber() {
|
||||
return "AB321";
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public ZF2EdgeTest(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite() {
|
||||
return new TestSuite(ZF2EdgeTest.class);
|
||||
}
|
||||
|
||||
// //////// TESTS
|
||||
// //////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* The exporter test bases on @{code
|
||||
* ./src/test/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf}, adds
|
||||
* metadata, writes to @{code ./target/testout-*} and then imports to check the
|
||||
* values.
|
||||
*/
|
||||
public void testEdgeExport() {
|
||||
|
||||
// the writing part
|
||||
|
||||
try (InputStream SOURCE_PDF = this.getClass()
|
||||
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf");
|
||||
|
||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA3Factory().setProducer("My Application")
|
||||
.setCreator(System.getProperty("user.name")).setZUGFeRDVersion(2).ignorePDFAErrors()
|
||||
.load(SOURCE_PDF)) {
|
||||
ze.PDFattachZugferdFile(this);
|
||||
String theXML = new String(ze.getProvider().getXML());
|
||||
assertTrue(theXML.contains("<rsm:CrossIndustryInvoice"));
|
||||
ze.export(TARGET_PDF);
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not be raised in testEdgeExport");
|
||||
}
|
||||
|
||||
// now check the contents (like MustangReaderTest)
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(TARGET_PDF);
|
||||
|
||||
assertTrue(zi.getUTF8().contains("<ram:TypeCode>59</ram:TypeCode>"));
|
||||
assertTrue(zi.getUTF8().contains("<ram:ShipToTradeParty>"));
|
||||
assertTrue(zi.getUTF8().contains("<ram:IBANID>DE540815</ram:IBANID>"));
|
||||
assertTrue(zi.getUTF8().contains("<ram:DirectDebitMandateID>DE99XX12345</ram:DirectDebitMandateID>"));
|
||||
assertFalse(zi.getUTF8().contains("<ram:DueDateDateTime>"));
|
||||
assertFalse(zi.getUTF8().contains("EUR"));
|
||||
assertTrue(zi.getUTF8().contains("USD"));//currency should be USD, test for #150
|
||||
|
||||
// Reading ZUGFeRD
|
||||
assertEquals("496.00", zi.getAmount());
|
||||
assertEquals(zi.getHolder(), getOwnOrganisationName());
|
||||
assertEquals(zi.getForeignReference(), getNumber());
|
||||
try {
|
||||
assertEquals(zi.getVersion(), 2);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The exporter test bases on @{code
|
||||
* ./src/test/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf}, adds
|
||||
* metadata, writes to @{code ./target/testout-*} and then imports to check the
|
||||
* values.
|
||||
*/
|
||||
public void testOutputStreamExport() {
|
||||
|
||||
// the writing part
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
try (InputStream SOURCE_PDF = this.getClass()
|
||||
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf");
|
||||
|
||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA3Factory().setProducer("My Application")
|
||||
.setCreator(System.getProperty("user.name")).setZUGFeRDVersion(2).ignorePDFAErrors()
|
||||
.load(SOURCE_PDF)) {
|
||||
ze.PDFattachZugferdFile(this);
|
||||
String theXML = new String(ze.getProvider().getXML());
|
||||
assertTrue(theXML.contains("<rsm:CrossIndustryInvoice"));
|
||||
ze.export(bos);
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not be raised in testEdgeExport");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
|
||||
/** **********************************************************************
|
||||
*
|
||||
* Copyright 2019 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 junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
import org.junit.FixMethodOrder;
|
||||
import org.junit.runners.MethodSorters;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
public class ZF2Test extends MustangReaderTestCase {
|
||||
final String TARGET_PDF = "./target/testout-ZF2new.pdf";
|
||||
|
||||
|
||||
@Override
|
||||
public Date getDeliveryDate() {
|
||||
return new GregorianCalendar(2017, Calendar.MAY, 7).getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getDueDate() {
|
||||
return new GregorianCalendar(2017, Calendar.MAY, 30).getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getIssueDate() {
|
||||
return new GregorianCalendar(2017, Calendar.MAY, 9).getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNumber() {
|
||||
return "RE-20170509/505";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnCountry() {
|
||||
return "DE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnLocation() {
|
||||
return "Stadthausen";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnOrganisationName() {
|
||||
return "Bei Spiel GmbH";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnStreet() {
|
||||
return "Ecke 12";
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableContact getOwnContact() {
|
||||
return new SenderContact();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnTaxID() {
|
||||
return "22/815/0815/4";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnVATID() {
|
||||
return "DE136695976";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnZIP() {
|
||||
return "12345";
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableContact getRecipient() {
|
||||
return new RecipientContact();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOwnOrganisationFullPlaintextInfo() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrency() {
|
||||
return "EUR";
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExportableItem[] getZFItems() {
|
||||
Item[] allItems = new Item[3];
|
||||
Product designProduct = new Product("", "Künstlerische Gestaltung (Stunde): Einer Beispielrechnung", "HUR",
|
||||
new BigDecimal("7.000000"));
|
||||
Product balloonProduct = new Product("", "Bestellerweiterung für E&F Umbau", "C62",
|
||||
new BigDecimal("19.000000"));// test for issue 103
|
||||
Product airProduct = new Product("", "Heiße Luft pro Liter", "LTR", new BigDecimal("19.000000"));
|
||||
|
||||
allItems[0] = new Item(new BigDecimal("160"), new BigDecimal("1"), designProduct);
|
||||
allItems[1] = new Item(new BigDecimal("0.79"), new BigDecimal("400"), balloonProduct);
|
||||
allItems[2] = new Item(new BigDecimal("0.10"), new BigDecimal("200"), airProduct);
|
||||
return allItems;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPaymentTermDescription() {
|
||||
SimpleDateFormat germanDateFormat = new SimpleDateFormat("dd.MM.yyyy");
|
||||
return "Zahlbar ohne Abzug bis zum " + germanDateFormat.format(getDueDate());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFAllowances() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFCharges() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDAllowanceCharge[] getZFLogisticsServiceCharges() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getReferenceNumber() {
|
||||
return "AB321";
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public ZF2Test(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite() {
|
||||
return new TestSuite(ZF2Test.class);
|
||||
}
|
||||
|
||||
// //////// TESTS
|
||||
// //////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* The exporter test bases on @{code
|
||||
* ./src/test/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf}, adds
|
||||
* metadata, writes to @{code ./target/testout-*} and then imports to check the
|
||||
* values.
|
||||
*/
|
||||
public void testExport() {
|
||||
|
||||
// the writing part
|
||||
|
||||
try (InputStream SOURCE_PDF = this.getClass()
|
||||
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf");
|
||||
|
||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA3Factory().setProducer("My Application")
|
||||
.setCreator(System.getProperty("user.name")).setZUGFeRDVersion(2).setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel.EN16931).ignorePDFAErrors()
|
||||
.load(SOURCE_PDF)) {
|
||||
|
||||
ze.PDFattachZugferdFile(this);
|
||||
String theXML = new String(ze.getProvider().getXML());
|
||||
assertTrue(theXML.contains("<rsm:CrossIndustryInvoice"));
|
||||
ze.export(TARGET_PDF);
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not be raised in testEdgeExport");
|
||||
}
|
||||
|
||||
// now check the contents (like MustangReaderTest)
|
||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(TARGET_PDF);
|
||||
|
||||
assertTrue(zi.getUTF8().contains("<ram:DueDateDateTime>"));
|
||||
|
||||
// Reading ZUGFeRD
|
||||
assertEquals(zi.getAmount(), "571.04");
|
||||
assertEquals(zi.getHolder(), getOwnOrganisationName());
|
||||
|
||||
assertEquals(zi.getAmount(), "571.04");
|
||||
assertEquals(zi.getBIC(), getTradeSettlementPayment()[0].getOwnBIC());
|
||||
assertEquals(zi.getIBAN(),getTradeSettlementPayment()[0].getOwnIBAN());
|
||||
assertEquals(zi.getHolder(), getOwnOrganisationName());
|
||||
assertEquals(zi.getForeignReference(), getNumber());
|
||||
|
||||
|
||||
try {
|
||||
assertEquals(zi.getVersion(), 2);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/** **********************************************************************
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
25085
libraryBasic/src/test/resources/ZUGFeRD_1p0.scmt
Normal file
25085
libraryBasic/src/test/resources/ZUGFeRD_1p0.scmt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<rsm:CrossIndustryDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12"
|
||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15"
|
||||
xmlns:rsm="urn:ferd:CrossIndustryDocument:invoice:1p0">
|
||||
<rsm:SpecifiedExchangedDocumentContext>
|
||||
<ram:TestIndicator>
|
||||
<udt:Indicator>false</udt:Indicator>
|
||||
</ram:TestIndicator>
|
||||
<ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
<ram:ID>urn:ferd:CrossIndustryDocument:invoice:1p0:extended</ram:ID>
|
||||
</ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
</rsm:SpecifiedExchangedDocumentContext>
|
||||
<rsm:HeaderExchangedDocument>
|
||||
<ram:ID>RE-20170509/506</ram:ID>
|
||||
<ram:Name>RECHNUNG2</ram:Name>
|
||||
<ram:TypeCode>380</ram:TypeCode>
|
||||
<ram:IssueDateTime>
|
||||
<udt:DateTimeString format="102">20170510</udt:DateTimeString>
|
||||
</ram:IssueDateTime>
|
||||
</rsm:HeaderExchangedDocument>
|
||||
<rsm:SpecifiedSupplyChainTradeTransaction>
|
||||
<ram:ApplicableSupplyChainTradeAgreement>
|
||||
<ram:SellerTradeParty>
|
||||
<ram:Name>Bei Spiel GmbH</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>12345</ram:PostcodeCode>
|
||||
<ram:LineOne>Ecke 12</ram:LineOne>
|
||||
<ram:CityName>Stadthausen</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="FC">22/815/0815/4</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">DE136695976</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:SellerTradeParty>
|
||||
<ram:BuyerTradeParty>
|
||||
<ram:Name>Theodor Est</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>88802</ram:PostcodeCode>
|
||||
<ram:LineOne>Bahnstr. 42</ram:LineOne>
|
||||
<ram:CityName>Spielkreis</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">DE999999999</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:BuyerTradeParty>
|
||||
</ram:ApplicableSupplyChainTradeAgreement>
|
||||
<ram:ApplicableSupplyChainTradeDelivery>
|
||||
<ram:ActualDeliverySupplyChainEvent>
|
||||
<ram:OccurrenceDateTime>
|
||||
<udt:DateTimeString format="102">20170507</udt:DateTimeString>
|
||||
</ram:OccurrenceDateTime>
|
||||
</ram:ActualDeliverySupplyChainEvent>
|
||||
</ram:ApplicableSupplyChainTradeDelivery>
|
||||
<ram:ApplicableSupplyChainTradeSettlement>
|
||||
<ram:PaymentReference>RE-20170509/505</ram:PaymentReference>
|
||||
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
|
||||
<ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:TypeCode>42</ram:TypeCode>
|
||||
<ram:Information>Überweisung</ram:Information>
|
||||
<ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>
|
||||
<ram:ProprietaryID>44421800</ram:ProprietaryID>
|
||||
</ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||
<ram:BICID>COBADEFFXXX</ram:BICID>
|
||||
<ram:GermanBankleitzahlID>41441604</ram:GermanBankleitzahlID>
|
||||
<ram:Name>Commerzbank</ram:Name>
|
||||
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||
</ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">11.20</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">160.00</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>7.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">63.84</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">336.00</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradePaymentTerms>
|
||||
<ram:Description>Zahlbar ohne Abzug bis zum 30.05.2017</ram:Description>
|
||||
<ram:DueDateDateTime>
|
||||
<udt:DateTimeString format="102">20170530</udt:DateTimeString>
|
||||
</ram:DueDateDateTime>
|
||||
</ram:SpecifiedTradePaymentTerms>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">496.00</ram:LineTotalAmount>
|
||||
<ram:ChargeTotalAmount currencyID="EUR">0.00</ram:ChargeTotalAmount>
|
||||
<ram:AllowanceTotalAmount currencyID="EUR">0.00</ram:AllowanceTotalAmount>
|
||||
<ram:TaxBasisTotalAmount currencyID="EUR">496.00</ram:TaxBasisTotalAmount>
|
||||
<ram:TaxTotalAmount currencyID="EUR">75.04</ram:TaxTotalAmount>
|
||||
<ram:GrandTotalAmount currencyID="EUR">571.04</ram:GrandTotalAmount>
|
||||
<ram:DuePayableAmount currencyID="EUR">571.04</ram:DuePayableAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:ApplicableSupplyChainTradeSettlement>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>1</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">160.0000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="HUR">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">160.0000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="HUR">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="HUR">1.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>7.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">160.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Künstlerische Gestaltung (Stunde): Einer weiteren Beispielrechnung</ram:Name>
|
||||
<ram:Description></ram:Description>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>2</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.7900</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="C62">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.7900</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="C62">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">400.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">316.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Luftballon: Bunt, ca. 500ml</ram:Name>
|
||||
<ram:Description></ram:Description>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>3</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.1000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="LTR">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.1000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="LTR">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="LTR">200.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">20.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Heiße Luft pro Liter</ram:Name>
|
||||
<ram:Description></ram:Description>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
</rsm:SpecifiedSupplyChainTradeTransaction>
|
||||
</rsm:CrossIndustryDocument>
|
||||
@@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<rsm:CrossIndustryDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12"
|
||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15"
|
||||
xmlns:rsm="urn:ferd:CrossIndustryDocument:invoice:1p0">
|
||||
<rsm:SpecifiedExchangedDocumentContext>
|
||||
<ram:TestIndicator>
|
||||
<udt:Indicator>false</udt:Indicator>
|
||||
</ram:TestIndicator>
|
||||
<ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
<ram:ID>urn:ferd:CrossIndustryDocument:invoice:1p0:extended</ram:ID>
|
||||
</ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
</rsm:SpecifiedExchangedDocumentContext>
|
||||
<rsm:HeaderExchangedDocument>
|
||||
<ram:ID>RE-20170509/505</ram:ID>
|
||||
<ram:Name>RECHNUNG</ram:Name>
|
||||
<ram:TypeCode>380</ram:TypeCode>
|
||||
<ram:IssueDateTime>
|
||||
<udt:DateTimeString format="102">20170509</udt:DateTimeString>
|
||||
</ram:IssueDateTime>
|
||||
</rsm:HeaderExchangedDocument>
|
||||
<rsm:SpecifiedSupplyChainTradeTransaction>
|
||||
<ram:ApplicableSupplyChainTradeAgreement>
|
||||
<ram:SellerTradeParty>
|
||||
<ram:Name>Bei Spiel GmbH</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>12345</ram:PostcodeCode>
|
||||
<ram:LineOne>Ecke 12</ram:LineOne>
|
||||
<ram:CityName>Stadthausen</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="FC">22/815/0815/4</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">DE136695976</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:SellerTradeParty>
|
||||
<ram:BuyerTradeParty>
|
||||
<ram:Name>Theodor Est</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>88802</ram:PostcodeCode>
|
||||
<ram:LineOne>Bahnstr. 42</ram:LineOne>
|
||||
<ram:CityName>Spielkreis</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">DE999999999</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:BuyerTradeParty>
|
||||
</ram:ApplicableSupplyChainTradeAgreement>
|
||||
<ram:ApplicableSupplyChainTradeDelivery>
|
||||
<ram:ActualDeliverySupplyChainEvent>
|
||||
<ram:OccurrenceDateTime>
|
||||
<udt:DateTimeString format="102">20170507</udt:DateTimeString>
|
||||
</ram:OccurrenceDateTime>
|
||||
</ram:ActualDeliverySupplyChainEvent>
|
||||
</ram:ApplicableSupplyChainTradeDelivery>
|
||||
<ram:ApplicableSupplyChainTradeSettlement>
|
||||
<ram:PaymentReference>RE-20170509/505</ram:PaymentReference>
|
||||
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
|
||||
<ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:TypeCode>42</ram:TypeCode>
|
||||
<ram:Information>Überweisung</ram:Information>
|
||||
<ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>
|
||||
<ram:ProprietaryID>44421800</ram:ProprietaryID>
|
||||
</ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||
<ram:BICID>COBADEFFXXX</ram:BICID>
|
||||
<ram:GermanBankleitzahlID>41441604</ram:GermanBankleitzahlID>
|
||||
<ram:Name>Commerzbank</ram:Name>
|
||||
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||
</ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">11.20</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">160.00</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>7.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">63.84</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">336.00</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradePaymentTerms>
|
||||
<ram:Description>Zahlbar ohne Abzug bis zum 30.05.2017</ram:Description>
|
||||
<ram:DueDateDateTime>
|
||||
<udt:DateTimeString format="102">20170530</udt:DateTimeString>
|
||||
</ram:DueDateDateTime>
|
||||
</ram:SpecifiedTradePaymentTerms>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">496.00</ram:LineTotalAmount>
|
||||
<ram:ChargeTotalAmount currencyID="EUR">0.00</ram:ChargeTotalAmount>
|
||||
<ram:AllowanceTotalAmount currencyID="EUR">0.00</ram:AllowanceTotalAmount>
|
||||
<ram:TaxBasisTotalAmount currencyID="EUR">496.00</ram:TaxBasisTotalAmount>
|
||||
<ram:TaxTotalAmount currencyID="EUR">75.04</ram:TaxTotalAmount>
|
||||
<ram:GrandTotalAmount currencyID="EUR">571.04</ram:GrandTotalAmount>
|
||||
<ram:DuePayableAmount currencyID="EUR">571.04</ram:DuePayableAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:ApplicableSupplyChainTradeSettlement>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>1</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">160.0000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="HUR">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">160.0000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="HUR">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="HUR">1.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>7.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">160.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Künstlerische Gestaltung (Stunde): Einer Beispielrechnung</ram:Name>
|
||||
<ram:Description></ram:Description>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>2</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.7900</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="C62">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.7900</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="C62">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">400.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">316.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Luftballon: Bunt, ca. 500ml</ram:Name>
|
||||
<ram:Description></ram:Description>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>3</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.1000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="LTR">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.1000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="LTR">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="LTR">200.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">20.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Heiße Luft pro Liter</ram:Name>
|
||||
<ram:Description></ram:Description>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
</rsm:SpecifiedSupplyChainTradeTransaction>
|
||||
</rsm:CrossIndustryDocument>
|
||||
@@ -0,0 +1,216 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Nutzungsrechte
|
||||
ZUGFeRD Datenformat Version 1.0, 25.6.2014
|
||||
Beispiel Version 29.09.2014
|
||||
|
||||
Zweck des Forums für elektronische Rechnungen bei der AWV e.V („FeRD“) ist u.a. die Schaffung und Spezifizierung
|
||||
eines offenen Datenformats für strukturierten elektronischen Datenaustausch auf der Grundlage offener und nicht
|
||||
diskriminierender, standardisierter Technologien („ZUGFeRD Datenformat“)
|
||||
|
||||
Das ZUGFeRD Datenformat wird nach Maßgabe des FeRD sowohl Unternehmen als auch der öffentlichen Verwaltung
|
||||
frei zugänglich gemacht. Hierfür bietet FeRD allen Unternehmen und Organisationen der öffentlichen Verwaltung eine
|
||||
Lizenz für die Nutzung des urheberrechtlich geschützten ZUGFeRD-Datenformats zu fairen, sachgerechten und nicht
|
||||
diskriminierenden Bedingungen an.
|
||||
|
||||
Die Spezifikation des FeRD zur Implementierung des ZUGFeRD Datenformats ist in ihrer jeweils geltenden Fassung
|
||||
abrufbar unter www.ferd-net.de.
|
||||
|
||||
Im Einzelnen schließt die Nutzungsgewährung ein:
|
||||
=====================================
|
||||
|
||||
FeRD räumt eine Lizenz für die Nutzung des urheberrechtlich geschützten ZUGFeRD Datenformats in der jeweils
|
||||
geltenden und akzeptierten Fassung (www.ferd-net.de) ein.
|
||||
Die Lizenz beinhaltet ein unwiderrufliches Nutzungsrecht einschließlich des Rechts der Weiterentwicklung,
|
||||
Weiterbearbeitung und Verbindung mit anderen Produkten.
|
||||
Die Lizenz gilt insbesondere für die Entwicklung, die Gestaltung, die Herstellung, den Verkauf, die Nutzung oder
|
||||
anderweitige Verwendung des ZUGFeRD Datenformats für Hardware- und/oder Softwareprodukte sowie sonstige
|
||||
Anwendungen und Dienste.
|
||||
Diese Lizenz schließt nicht die wesentlichen Patente der Mitglieder von FeRD ein. Als wesentliche Patente sind Patente
|
||||
und Patentanmeldungen weltweit zu verstehen, die einen oder mehrere Patentansprüche beinhalten, bei denen es sich um
|
||||
notwendige Ansprüche handelt. Notwendige Ansprüche sind lediglich jene Ansprüche der Wesentlichen Patente, die durch
|
||||
die Implementierung des ZUGFeRD Datenformats notwendigerweise verletzt würden.
|
||||
Der Lizenznehmer ist berechtigt, seinen jeweiligen Konzerngesellschaften ein unbefristetes, weltweites, nicht übertragbares,
|
||||
unwiderrufliches Nutzungsrecht einschließlich des Rechts der Weiterentwicklung, Weiterbearbeitung und Verbindung mit
|
||||
anderen Produkten einzuräumen.
|
||||
|
||||
Die Lizenz wird kostenfrei zur Verfügung gestellt.
|
||||
|
||||
Außer im Falle vorsätzlichen Verschuldens oder grober Fahrlässigkeit haftet FeRD weder für Nutzungsausfall, entgangenen
|
||||
Gewinn, Datenverlust, Kommunikationsverlust, Einnahmeausfall, Vertragseinbußen, Geschäftsausfall oder für Kosten,
|
||||
Schäden, Verluste oder Haftpflichten im Zusammenhang mit einer Unterbrechung der Geschäftstätigkeit, noch für konkrete,
|
||||
beiläufig entstandene, mittelbare Schäden, Straf- oder Folgeschäden und zwar auch dann nicht, wenn die Möglichkeit der
|
||||
Kosten, Verluste bzw. Schäden hätte normalerweise vorhergesehen werden können.
|
||||
|
||||
-->
|
||||
<rsm:CrossIndustryDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rsm="urn:ferd:CrossIndustryDocument:invoice:1p0" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15">
|
||||
<rsm:SpecifiedExchangedDocumentContext>
|
||||
<ram:TestIndicator><udt:Indicator>true</udt:Indicator></ram:TestIndicator><!-- Im Echtbetrieb muss der TestIndicator entweder vollständig entfallen oder auf false stehen. -->
|
||||
<ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
<ram:ID>urn:ferd:CrossIndustryDocument:invoice:1p0:comfort</ram:ID>
|
||||
</ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
</rsm:SpecifiedExchangedDocumentContext>
|
||||
<rsm:HeaderExchangedDocument>
|
||||
<ram:ID>471102</ram:ID>
|
||||
<ram:Name>RECHNUNG</ram:Name>
|
||||
<ram:TypeCode>380</ram:TypeCode>
|
||||
<ram:IssueDateTime><udt:DateTimeString format="102">20130305</udt:DateTimeString></ram:IssueDateTime>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>Rechnung gemäß Bestellung vom 01.03.2013.</ram:Content>
|
||||
</ram:IncludedNote>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>Lieferant GmbH
|
||||
Lieferantenstraße 20
|
||||
80333 München
|
||||
Deutschland
|
||||
Geschäftsführer: Hans Muster
|
||||
Handelsregisternummer: H A 123
|
||||
</ram:Content>
|
||||
<ram:SubjectCode>REG</ram:SubjectCode>
|
||||
</ram:IncludedNote>
|
||||
</rsm:HeaderExchangedDocument>
|
||||
<rsm:SpecifiedSupplyChainTradeTransaction>
|
||||
<ram:ApplicableSupplyChainTradeAgreement>
|
||||
<ram:SellerTradeParty>
|
||||
<ram:GlobalID schemeID="0088">4000001123452</ram:GlobalID>
|
||||
<ram:Name>Lieferant GmbH</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>80333</ram:PostcodeCode>
|
||||
<ram:LineOne>Lieferantenstraße 20</ram:LineOne>
|
||||
<ram:CityName>München</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="FC">201/113/40209</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">DE123456789</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:SellerTradeParty>
|
||||
<ram:BuyerTradeParty>
|
||||
<ram:ID>GE2020211</ram:ID>
|
||||
<ram:GlobalID schemeID="0088">4000001987658</ram:GlobalID>
|
||||
<ram:Name>Kunden AG Mitte</ram:Name>
|
||||
<ram:DefinedTradeContact>
|
||||
<ram:PersonName>Hans Muster</ram:PersonName>
|
||||
</ram:DefinedTradeContact>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>69876</ram:PostcodeCode>
|
||||
<ram:LineOne>Kundenstraße 15</ram:LineOne>
|
||||
<ram:CityName>Frankfurt</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
</ram:BuyerTradeParty>
|
||||
</ram:ApplicableSupplyChainTradeAgreement>
|
||||
<ram:ApplicableSupplyChainTradeDelivery>
|
||||
<ram:ActualDeliverySupplyChainEvent>
|
||||
<ram:OccurrenceDateTime><udt:DateTimeString format="102">20130305</udt:DateTimeString> </ram:OccurrenceDateTime>
|
||||
</ram:ActualDeliverySupplyChainEvent>
|
||||
</ram:ApplicableSupplyChainTradeDelivery>
|
||||
<ram:ApplicableSupplyChainTradeSettlement>
|
||||
<ram:PaymentReference>2013-471102</ram:PaymentReference>
|
||||
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
|
||||
<ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:TypeCode>31</ram:TypeCode>
|
||||
<ram:Information>Überweisung</ram:Information>
|
||||
<ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:IBANID>DE08700901001234567890</ram:IBANID>
|
||||
</ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||
<ram:BICID>GENODEF1M04</ram:BICID>
|
||||
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||
</ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">19.25</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">275.00</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>7.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">37.62</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">198.00</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradePaymentTerms>
|
||||
<ram:Description>Zahlbar innerhalb 30 Tagen netto bis 04.04.2013, 3% Skonto innerhalb 10 Tagen bis 15.03.2013</ram:Description>
|
||||
<ram:DueDateDateTime><udt:DateTimeString format="102">20130404</udt:DateTimeString></ram:DueDateDateTime>
|
||||
</ram:SpecifiedTradePaymentTerms>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">473.00</ram:LineTotalAmount>
|
||||
<ram:ChargeTotalAmount currencyID="EUR">0.00</ram:ChargeTotalAmount>
|
||||
<ram:AllowanceTotalAmount currencyID="EUR">0.00</ram:AllowanceTotalAmount>
|
||||
<ram:TaxBasisTotalAmount currencyID="EUR">473.00</ram:TaxBasisTotalAmount>
|
||||
<ram:TaxTotalAmount currencyID="EUR">56.87</ram:TaxTotalAmount>
|
||||
<ram:GrandTotalAmount currencyID="EUR">529.87</ram:GrandTotalAmount>
|
||||
<ram:TotalPrepaidAmount currencyID="EUR">0.00</ram:TotalPrepaidAmount>
|
||||
<ram:DuePayableAmount currencyID="EUR">529.87</ram:DuePayableAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:ApplicableSupplyChainTradeSettlement>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>1</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">9.9000</ram:ChargeAmount>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">9.9000</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">20.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">198.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0160">4012345001235</ram:GlobalID>
|
||||
<ram:SellerAssignedID>TB100A4</ram:SellerAssignedID>
|
||||
<ram:Name>Trennblätter A4</ram:Name>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>2</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">5.5000</ram:ChargeAmount>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">5.5000</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">50.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>7.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">275.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0160">4000050986428</ram:GlobalID>
|
||||
<ram:SellerAssignedID>ARNR2</ram:SellerAssignedID>
|
||||
<ram:Name>Joghurt Banane</ram:Name>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
</rsm:SpecifiedSupplyChainTradeTransaction>
|
||||
</rsm:CrossIndustryDocument>
|
||||
@@ -0,0 +1,520 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Nutzungsrechte
|
||||
ZUGFeRD Datenformat Version 1.0, 25.6.2014
|
||||
Beispiel Version 29.09.2014
|
||||
|
||||
Zweck des Forums für elektronische Rechnungen bei der AWV e.V („FeRD“) ist u.a. die Schaffung und Spezifizierung
|
||||
eines offenen Datenformats für strukturierten elektronischen Datenaustausch auf der Grundlage offener und nicht
|
||||
diskriminierender, standardisierter Technologien („ZUGFeRD Datenformat“)
|
||||
|
||||
Das ZUGFeRD Datenformat wird nach Maßgabe des FeRD sowohl Unternehmen als auch der öffentlichen Verwaltung
|
||||
frei zugänglich gemacht. Hierfür bietet FeRD allen Unternehmen und Organisationen der öffentlichen Verwaltung eine
|
||||
Lizenz für die Nutzung des urheberrechtlich geschützten ZUGFeRD-Datenformats zu fairen, sachgerechten und nicht
|
||||
diskriminierenden Bedingungen an.
|
||||
|
||||
Die Spezifikation des FeRD zur Implementierung des ZUGFeRD Datenformats ist in ihrer jeweils geltenden Fassung
|
||||
abrufbar unter www.ferd-net.de.
|
||||
|
||||
Im Einzelnen schließt die Nutzungsgewährung ein:
|
||||
=====================================
|
||||
|
||||
FeRD räumt eine Lizenz für die Nutzung des urheberrechtlich geschützten ZUGFeRD Datenformats in der jeweils
|
||||
geltenden und akzeptierten Fassung (www.ferd-net.de) ein.
|
||||
Die Lizenz beinhaltet ein unwiderrufliches Nutzungsrecht einschließlich des Rechts der Weiterentwicklung,
|
||||
Weiterbearbeitung und Verbindung mit anderen Produkten.
|
||||
Die Lizenz gilt insbesondere für die Entwicklung, die Gestaltung, die Herstellung, den Verkauf, die Nutzung oder
|
||||
anderweitige Verwendung des ZUGFeRD Datenformats für Hardware- und/oder Softwareprodukte sowie sonstige
|
||||
Anwendungen und Dienste.
|
||||
Diese Lizenz schließt nicht die wesentlichen Patente der Mitglieder von FeRD ein. Als wesentliche Patente sind Patente
|
||||
und Patentanmeldungen weltweit zu verstehen, die einen oder mehrere Patentansprüche beinhalten, bei denen es sich um
|
||||
notwendige Ansprüche handelt. Notwendige Ansprüche sind lediglich jene Ansprüche der Wesentlichen Patente, die durch
|
||||
die Implementierung des ZUGFeRD Datenformats notwendigerweise verletzt würden.
|
||||
Der Lizenznehmer ist berechtigt, seinen jeweiligen Konzerngesellschaften ein unbefristetes, weltweites, nicht übertragbares,
|
||||
unwiderrufliches Nutzungsrecht einschließlich des Rechts der Weiterentwicklung, Weiterbearbeitung und Verbindung mit
|
||||
anderen Produkten einzuräumen.
|
||||
|
||||
Die Lizenz wird kostenfrei zur Verfügung gestellt.
|
||||
|
||||
Außer im Falle vorsätzlichen Verschuldens oder grober Fahrlässigkeit haftet FeRD weder für Nutzungsausfall, entgangenen
|
||||
Gewinn, Datenverlust, Kommunikationsverlust, Einnahmeausfall, Vertragseinbußen, Geschäftsausfall oder für Kosten,
|
||||
Schäden, Verluste oder Haftpflichten im Zusammenhang mit einer Unterbrechung der Geschäftstätigkeit, noch für konkrete,
|
||||
beiläufig entstandene, mittelbare Schäden, Straf- oder Folgeschäden und zwar auch dann nicht, wenn die Möglichkeit der
|
||||
Kosten, Verluste bzw. Schäden hätte normalerweise vorhergesehen werden können.
|
||||
|
||||
-->
|
||||
|
||||
<rsm:CrossIndustryDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rsm="urn:ferd:CrossIndustryDocument:invoice:1p0" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15">
|
||||
<rsm:SpecifiedExchangedDocumentContext>
|
||||
<ram:TestIndicator><udt:Indicator>true</udt:Indicator></ram:TestIndicator><!-- Im Echtbetrieb muss der TestIndicator entweder vollständig entfallen oder auf false stehen. -->
|
||||
<ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
<ram:ID>urn:ferd:CrossIndustryDocument:invoice:1p0:extended</ram:ID>
|
||||
</ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
</rsm:SpecifiedExchangedDocumentContext>
|
||||
<rsm:HeaderExchangedDocument>
|
||||
<ram:ID>R87654321012345</ram:ID>
|
||||
<ram:Name>WARENRECHNUNG</ram:Name>
|
||||
<ram:TypeCode>380</ram:TypeCode>
|
||||
<ram:IssueDateTime>
|
||||
<udt:DateTimeString format="102">20130806</udt:DateTimeString>
|
||||
</ram:IssueDateTime>
|
||||
<ram:IncludedNote>
|
||||
<ram:ContentCode>ST3</ram:ContentCode>
|
||||
<ram:Content>Es bestehen Rabatt- oder Bonusvereinbarungen.</ram:Content>
|
||||
<ram:SubjectCode>AAK</ram:SubjectCode>
|
||||
</ram:IncludedNote>
|
||||
<ram:IncludedNote>
|
||||
<ram:ContentCode>EEV</ram:ContentCode>
|
||||
<ram:Content>Der Verkäufer bleibt Eigentümer der Waren bis zu vollständigen Erfüllung der Kaufpreisforderung.</ram:Content>
|
||||
<ram:SubjectCode>AAJ</ram:SubjectCode>
|
||||
</ram:IncludedNote>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>MUSTERLIEFERANT GMBH
|
||||
BAHNHOFSTRASSE 99
|
||||
99199 MUSTERHAUSEN
|
||||
Geschäftsführung:
|
||||
Max Mustermann
|
||||
USt-IdNr: DE123456789
|
||||
Telefon: +49 932 431 0
|
||||
www.musterlieferant.de
|
||||
HRB Nr. 372876
|
||||
Amtsgericht Musterstadt
|
||||
GLN 4304171000002
|
||||
WEEE-Reg-Nr.: DE87654321</ram:Content>
|
||||
<ram:SubjectCode>REG</ram:SubjectCode>
|
||||
</ram:IncludedNote>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>Leergutwert: 46,50</ram:Content>
|
||||
</ram:IncludedNote>
|
||||
</rsm:HeaderExchangedDocument>
|
||||
<rsm:SpecifiedSupplyChainTradeTransaction>
|
||||
<ram:ApplicableSupplyChainTradeAgreement>
|
||||
<ram:SellerTradeParty>
|
||||
<ram:ID>549910</ram:ID>
|
||||
<ram:GlobalID schemeID="0088">4333741000005</ram:GlobalID>
|
||||
<ram:Name>MUSTERLIEFERANT GMBH</ram:Name>
|
||||
<ram:DefinedTradeContact>
|
||||
<ram:TelephoneUniversalCommunication>
|
||||
<ram:CompleteNumber>+49 932 431 500</ram:CompleteNumber>
|
||||
</ram:TelephoneUniversalCommunication>
|
||||
<ram:EmailURIUniversalCommunication>
|
||||
<ram:URIID>max.mustermann@musterlieferant.de</ram:URIID>
|
||||
</ram:EmailURIUniversalCommunication>
|
||||
</ram:DefinedTradeContact>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>99199</ram:PostcodeCode>
|
||||
<ram:LineOne>BAHNHOFSTRASSE 99</ram:LineOne>
|
||||
<ram:CityName>MUSTERHAUSEN</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">DE123456789</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:SellerTradeParty>
|
||||
<ram:BuyerTradeParty>
|
||||
<ram:ID>009420</ram:ID>
|
||||
<ram:GlobalID schemeID="0088">4304171000002</ram:GlobalID>
|
||||
<ram:Name>MUSTER-KUNDE GMBH</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>40235</ram:PostcodeCode>
|
||||
<ram:LineOne>KUNDENWEG 88</ram:LineOne>
|
||||
<ram:CityName>DUESSELDORF</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
</ram:BuyerTradeParty>
|
||||
<ram:BuyerOrderReferencedDocument>
|
||||
<ram:IssueDateTime>2013-08-01T00:00:00</ram:IssueDateTime>
|
||||
<ram:ID>B123456789</ram:ID>
|
||||
</ram:BuyerOrderReferencedDocument>
|
||||
<ram:AdditionalReferencedDocument>
|
||||
<ram:IssueDateTime>2013-08-02T00:00:00</ram:IssueDateTime>
|
||||
<ram:TypeCode>VN</ram:TypeCode>
|
||||
<ram:ID>A456123</ram:ID>
|
||||
</ram:AdditionalReferencedDocument>
|
||||
</ram:ApplicableSupplyChainTradeAgreement>
|
||||
<ram:ApplicableSupplyChainTradeDelivery>
|
||||
<ram:ShipToTradeParty>
|
||||
<ram:GlobalID schemeID="0088">4304171088093</ram:GlobalID>
|
||||
<ram:Name>MUSTER-MARKT</ram:Name>
|
||||
<ram:DefinedTradeContact>
|
||||
<ram:DepartmentName>8211</ram:DepartmentName>
|
||||
</ram:DefinedTradeContact>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>31157</ram:PostcodeCode>
|
||||
<ram:LineOne>HAUPTSTRASSE 44</ram:LineOne>
|
||||
<ram:CityName>SARSTEDT</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
</ram:ShipToTradeParty>
|
||||
<ram:ActualDeliverySupplyChainEvent>
|
||||
<ram:OccurrenceDateTime>
|
||||
<udt:DateTimeString format="102">20130805</udt:DateTimeString>
|
||||
</ram:OccurrenceDateTime>
|
||||
</ram:ActualDeliverySupplyChainEvent>
|
||||
<ram:DeliveryNoteReferencedDocument>
|
||||
<ram:IssueDateTime>2013-08-05T00:00:00</ram:IssueDateTime>
|
||||
<ram:ID>L87654321012345</ram:ID>
|
||||
</ram:DeliveryNoteReferencedDocument>
|
||||
</ram:ApplicableSupplyChainTradeDelivery>
|
||||
<ram:ApplicableSupplyChainTradeSettlement>
|
||||
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
|
||||
<ram:InvoiceeTradeParty>
|
||||
<ram:ID>009420</ram:ID>
|
||||
<ram:GlobalID schemeID="0088">4304171000002</ram:GlobalID>
|
||||
<ram:Name>MUSTER-KUNDE GMBH</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>40235</ram:PostcodeCode>
|
||||
<ram:LineOne>KUNDENWEG 88</ram:LineOne>
|
||||
<ram:CityName>DUESSELDORF</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
</ram:InvoiceeTradeParty>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">61.07</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">321.40</ram:BasisAmount>
|
||||
<ram:LineTotalBasisAmount currencyID="EUR">326.50</ram:LineTotalBasisAmount>
|
||||
<ram:AllowanceChargeBasisAmount currencyID="EUR">-5.10</ram:AllowanceChargeBasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">8.93</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">127.59</ram:BasisAmount>
|
||||
<ram:LineTotalBasisAmount currencyID="EUR">130.70</ram:LineTotalBasisAmount>
|
||||
<ram:AllowanceChargeBasisAmount currencyID="EUR">-3.11</ram:AllowanceChargeBasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>7.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
|
||||
<ram:CalculationPercent>2.00</ram:CalculationPercent>
|
||||
<ram:BasisAmount currencyID="EUR">280.00</ram:BasisAmount>
|
||||
<ram:ActualAmount currencyID="EUR">5.60</ram:ActualAmount>
|
||||
<ram:Reason>Rechnungsrabatt 1</ram:Reason>
|
||||
<ram:CategoryTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:CategoryTradeTax>
|
||||
</ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
|
||||
<ram:CalculationPercent>2.00</ram:CalculationPercent>
|
||||
<ram:BasisAmount currencyID="EUR">130.70</ram:BasisAmount>
|
||||
<ram:ActualAmount currencyID="EUR">2.61</ram:ActualAmount>
|
||||
<ram:Reason>Rechnungsrabatt 1</ram:Reason>
|
||||
<ram:CategoryTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>7.00</ram:ApplicablePercent>
|
||||
</ram:CategoryTradeTax>
|
||||
</ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
|
||||
<ram:BasisAmount currencyID="EUR">280.00</ram:BasisAmount>
|
||||
<ram:ActualAmount currencyID="EUR">2.50</ram:ActualAmount>
|
||||
<ram:Reason>Rechnungsrabatt 2</ram:Reason>
|
||||
<ram:CategoryTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:CategoryTradeTax>
|
||||
</ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
|
||||
<ram:BasisAmount currencyID="EUR">130.70</ram:BasisAmount>
|
||||
<ram:ActualAmount currencyID="EUR">0.50</ram:ActualAmount>
|
||||
<ram:Reason>Rechnungsrabatt 2</ram:Reason>
|
||||
<ram:CategoryTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>7.00</ram:ApplicablePercent>
|
||||
</ram:CategoryTradeTax>
|
||||
</ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:SpecifiedLogisticsServiceCharge>
|
||||
<ram:Description>Transportkosten</ram:Description>
|
||||
<ram:AppliedAmount currencyID="EUR">3.00</ram:AppliedAmount>
|
||||
<ram:AppliedTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:AppliedTradeTax>
|
||||
</ram:SpecifiedLogisticsServiceCharge>
|
||||
<ram:SpecifiedTradePaymentTerms>
|
||||
<ram:Description>Bei Zahlung innerhalb 14 Tagen gewähren wir 2,0% Skonto.</ram:Description>
|
||||
<ram:ApplicableTradePaymentDiscountTerms>
|
||||
<ram:BasisPeriodMeasure unitCode="DAY">14</ram:BasisPeriodMeasure>
|
||||
<ram:CalculationPercent>2.00</ram:CalculationPercent>
|
||||
</ram:ApplicableTradePaymentDiscountTerms>
|
||||
</ram:SpecifiedTradePaymentTerms>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">457.20</ram:LineTotalAmount>
|
||||
<ram:ChargeTotalAmount currencyID="EUR">3.00</ram:ChargeTotalAmount>
|
||||
<ram:AllowanceTotalAmount currencyID="EUR">11.21</ram:AllowanceTotalAmount>
|
||||
<ram:TaxBasisTotalAmount currencyID="EUR">448.99</ram:TaxBasisTotalAmount>
|
||||
<ram:TaxTotalAmount currencyID="EUR">70.00</ram:TaxTotalAmount>
|
||||
<ram:GrandTotalAmount currencyID="EUR">518.99</ram:GrandTotalAmount>
|
||||
<ram:TotalPrepaidAmount currencyID="EUR">0.00</ram:TotalPrepaidAmount>
|
||||
<ram:DuePayableAmount currencyID="EUR">518.99</ram:DuePayableAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:ApplicableSupplyChainTradeSettlement>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>Wichtige Information: Bei Bestellungen bis zum 19.12. ist die Auslieferung bis spätestens 23.12. garantiert.</ram:Content>
|
||||
</ram:IncludedNote>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement />
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument />
|
||||
<ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">1.0000</ram:ChargeAmount>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">1.0000</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">100.0000</ram:BilledQuantity>
|
||||
<ram:PackageQuantity unitCode="CT">4.0000</ram:PackageQuantity>
|
||||
</ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">100.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0088">4123456000014</ram:GlobalID>
|
||||
<ram:SellerAssignedID>ZS997</ram:SellerAssignedID>
|
||||
<ram:Name>Zitronensäure 100ml</ram:Name>
|
||||
<ram:ApplicableProductCharacteristic>
|
||||
<ram:TypeCode>PACKAGING_TYPE</ram:TypeCode>
|
||||
<ram:Description>Verpackungsart</ram:Description>
|
||||
<ram:Value>BO</ram:Value>
|
||||
</ram:ApplicableProductCharacteristic>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument />
|
||||
<ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">1.5000</ram:ChargeAmount>
|
||||
<ram:AppliedTradeAllowanceCharge>
|
||||
<ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
|
||||
<ram:CalculationPercent>2.00</ram:CalculationPercent>
|
||||
<ram:BasisAmount currencyID="EUR">1.5000</ram:BasisAmount>
|
||||
<ram:ActualAmount currencyID="EUR">0.0300</ram:ActualAmount>
|
||||
<ram:Reason>Artikelrabatt 1</ram:Reason>
|
||||
</ram:AppliedTradeAllowanceCharge>
|
||||
<ram:AppliedTradeAllowanceCharge>
|
||||
<ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
|
||||
<ram:BasisQuantity unitCode="C62">1</ram:BasisQuantity>
|
||||
<ram:ActualAmount currencyID="EUR">0.0200</ram:ActualAmount>
|
||||
<ram:Reason>Artikelrabatt 2</ram:Reason>
|
||||
</ram:AppliedTradeAllowanceCharge>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">1.4500</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">50.0000</ram:BilledQuantity>
|
||||
<ram:PackageQuantity unitCode="CT">1.0000</ram:PackageQuantity>
|
||||
</ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>7.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">72.50</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0088">4123456000021</ram:GlobalID>
|
||||
<ram:SellerAssignedID>GZ250</ram:SellerAssignedID>
|
||||
<ram:Name>Gelierzucker Extra 250g</ram:Name>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument />
|
||||
<ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.0000</ram:ChargeAmount>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.0000</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">10.0000</ram:BilledQuantity>
|
||||
<ram:PackageQuantity unitCode="CT">1.0000</ram:PackageQuantity>
|
||||
</ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>7.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">0.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0088">4123456000021</ram:GlobalID>
|
||||
<ram:SellerAssignedID>GZ250</ram:SellerAssignedID>
|
||||
<ram:Name>Gelierzucker Extra 250g</ram:Name>
|
||||
<ram:Description>Artikel wie vereinbart ohne Berechnung</ram:Description>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>Öko-Kontroll-Nr.: DE-BW-006-987654321054</ram:Content>
|
||||
<ram:SubjectCode>AAY</ram:SubjectCode>
|
||||
</ram:IncludedNote>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">12.0000</ram:ChargeAmount>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">12.0000</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">15.0000</ram:BilledQuantity>
|
||||
<ram:PackageQuantity unitCode="BO">20.0000</ram:PackageQuantity>
|
||||
</ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">180.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0088">4100130013294</ram:GlobalID>
|
||||
<ram:SellerAssignedID>2031</ram:SellerAssignedID>
|
||||
<ram:BuyerAssignedID>K4321</ram:BuyerAssignedID>
|
||||
<ram:Name>Bierbrau Pils 20/0500</ram:Name>
|
||||
<ram:Description>EAN-VKE: 4100130913297</ram:Description>
|
||||
<ram:ApplicableProductCharacteristic>
|
||||
<ram:TypeCode>PACKAGING_MATERIAL</ram:TypeCode>
|
||||
<ram:Description>Verpackung</ram:Description>
|
||||
<ram:Value>Kiste</ram:Value>
|
||||
</ram:ApplicableProductCharacteristic>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument />
|
||||
<ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">3.1000</ram:ChargeAmount>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">3.1000</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">15.0000</ram:BilledQuantity>
|
||||
<ram:PackageQuantity unitCode="BC">1.0000</ram:PackageQuantity>
|
||||
</ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>19.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">46.50</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0088">2001015001325</ram:GlobalID>
|
||||
<ram:SellerAssignedID>1805</ram:SellerAssignedID>
|
||||
<ram:BuyerAssignedID>K4322</ram:BuyerAssignedID>
|
||||
<ram:Name>Leergutpfand 20 x 0,5l</ram:Name>
|
||||
<ram:ApplicableProductCharacteristic>
|
||||
<ram:TypeCode>PACKAGING_MATERIAL</ram:TypeCode>
|
||||
<ram:Description>Verpackung</ram:Description>
|
||||
<ram:Value>unverpackt</ram:Value>
|
||||
</ram:ApplicableProductCharacteristic>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument />
|
||||
<ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">30.0000</ram:ChargeAmount>
|
||||
<ram:AppliedTradeAllowanceCharge>
|
||||
<ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
|
||||
<ram:CalculationPercent>3.00</ram:CalculationPercent>
|
||||
<ram:BasisAmount currencyID="EUR">30.0000</ram:BasisAmount>
|
||||
<ram:ActualAmount currencyID="EUR">0.9000</ram:ActualAmount>
|
||||
<ram:Reason>Artikelrabatt 1</ram:Reason>
|
||||
</ram:AppliedTradeAllowanceCharge>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">29.1000</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedSupplyChainTradeAgreement>
|
||||
<ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">2.0000</ram:BilledQuantity>
|
||||
<ram:PackageQuantity unitCode="PX">1.0000</ram:PackageQuantity>
|
||||
</ram:SpecifiedSupplyChainTradeDelivery>
|
||||
<ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:ApplicablePercent>7.00</ram:ApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">58.20</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementMonetarySummation>
|
||||
</ram:SpecifiedSupplyChainTradeSettlement>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0088">4123456000038</ram:GlobalID>
|
||||
<ram:SellerAssignedID>MP107</ram:SellerAssignedID>
|
||||
<ram:Name>Mischpalette Joghurt Karton 3 x 20</ram:Name>
|
||||
<ram:ApplicableProductCharacteristic>
|
||||
<ram:TypeCode>PACKAGING_MATERIAL</ram:TypeCode>
|
||||
<ram:Description>Verpackung</ram:Description>
|
||||
<ram:Value>Karton</ram:Value>
|
||||
</ram:ApplicableProductCharacteristic>
|
||||
<ram:IncludedReferencedProduct>
|
||||
<ram:GlobalID schemeID="0088">4123456001035</ram:GlobalID>
|
||||
<ram:SellerAssignedID>JOG103</ram:SellerAssignedID>
|
||||
<ram:Name>Erdbeer 20 x 150g Becher</ram:Name>
|
||||
<ram:UnitQuantity unitCode="C62">20.0000</ram:UnitQuantity>
|
||||
</ram:IncludedReferencedProduct>
|
||||
<ram:IncludedReferencedProduct>
|
||||
<ram:GlobalID schemeID="0088">4123456002032</ram:GlobalID>
|
||||
<ram:SellerAssignedID>JOG203</ram:SellerAssignedID>
|
||||
<ram:Name>Banane 20 x 150g Becher</ram:Name>
|
||||
<ram:UnitQuantity unitCode="C62">20.0000</ram:UnitQuantity>
|
||||
</ram:IncludedReferencedProduct>
|
||||
<ram:IncludedReferencedProduct>
|
||||
<ram:GlobalID schemeID="0088">4123456003039</ram:GlobalID>
|
||||
<ram:SellerAssignedID>JOG303</ram:SellerAssignedID>
|
||||
<ram:Name>Schoko 20 x 150g Becher</ram:Name>
|
||||
<ram:UnitQuantity unitCode="C62">20.0000</ram:UnitQuantity>
|
||||
</ram:IncludedReferencedProduct>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
</rsm:SpecifiedSupplyChainTradeTransaction>
|
||||
</rsm:CrossIndustryDocument>
|
||||
@@ -0,0 +1,216 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
|
||||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
||||
xmlns:qdt="urn:un:unece:uncefact:data:Standard:QualifiedDataType:100"
|
||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"><!--
|
||||
Migrated by Mustangproject XSLT
|
||||
--><rsm:ExchangedDocumentContext>
|
||||
<ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
<ram:ID>urn:cen.eu:en16931:2017#conformant#urn:zugferd.de:2p0:extended</ram:ID>
|
||||
</ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
</rsm:ExchangedDocumentContext>
|
||||
<rsm:ExchangedDocument xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100">
|
||||
<ram:ID>RE-20170509/506</ram:ID>
|
||||
<ram:Name>RECHNUNG2</ram:Name>
|
||||
<ram:TypeCode>380</ram:TypeCode>
|
||||
<ram:IssueDateTime>
|
||||
<udt:DateTimeString format="102">20170510</udt:DateTimeString>
|
||||
</ram:IssueDateTime>
|
||||
</rsm:ExchangedDocument>
|
||||
<rsm:SupplyChainTradeTransaction xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100">
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>1</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Künstlerische Gestaltung (Stunde): Einer weiteren Beispielrechnung</ram:Name>
|
||||
<ram:Description/>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">160.0000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="HUR">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">160.0000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="HUR">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="HUR">1.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">160.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>2</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Luftballon: Bunt, ca. 500ml</ram:Name>
|
||||
<ram:Description/>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.7900</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="C62">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.7900</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="C62">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">400.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">316.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>3</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Heiße Luft pro Liter</ram:Name>
|
||||
<ram:Description/>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.1000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="LTR">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.1000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="LTR">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="LTR">200.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">20.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:ApplicableHeaderTradeAgreement>
|
||||
<ram:SellerTradeParty>
|
||||
<ram:Name>Bei Spiel GmbH</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>12345</ram:PostcodeCode>
|
||||
<ram:LineOne>Ecke 12</ram:LineOne>
|
||||
<ram:CityName>Stadthausen</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="FC">22/815/0815/4</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">DE136695976</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:SellerTradeParty>
|
||||
<ram:BuyerTradeParty>
|
||||
<ram:Name>Theodor Est</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>88802</ram:PostcodeCode>
|
||||
<ram:LineOne>Bahnstr. 42</ram:LineOne>
|
||||
<ram:CityName>Spielkreis</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">DE999999999</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:BuyerTradeParty>
|
||||
</ram:ApplicableHeaderTradeAgreement>
|
||||
<ram:ApplicableHeaderTradeDelivery>
|
||||
<ram:ActualDeliverySupplyChainEvent>
|
||||
<ram:OccurrenceDateTime>
|
||||
<udt:DateTimeString format="102">20170507</udt:DateTimeString>
|
||||
</ram:OccurrenceDateTime>
|
||||
</ram:ActualDeliverySupplyChainEvent>
|
||||
</ram:ApplicableHeaderTradeDelivery>
|
||||
<ram:ApplicableHeaderTradeSettlement>
|
||||
<ram:PaymentReference>RE-20170509/505</ram:PaymentReference>
|
||||
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
|
||||
<ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:TypeCode>42</ram:TypeCode>
|
||||
<ram:Information>Überweisung</ram:Information>
|
||||
<ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>
|
||||
<ram:ProprietaryID>44421800</ram:ProprietaryID>
|
||||
</ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||
<ram:BICID>COBADEFFXXX</ram:BICID>
|
||||
<ram:GermanBankleitzahlID>41441604</ram:GermanBankleitzahlID>
|
||||
<ram:Name>Commerzbank</ram:Name>
|
||||
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||
</ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">11.20</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">160.00</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">63.84</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">336.00</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradePaymentTerms>
|
||||
<ram:Description>Zahlbar ohne Abzug bis zum 30.05.2017</ram:Description>
|
||||
<ram:DueDateDateTime>
|
||||
<udt:DateTimeString format="102">20170530</udt:DateTimeString>
|
||||
</ram:DueDateDateTime>
|
||||
</ram:SpecifiedTradePaymentTerms>
|
||||
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">496.00</ram:LineTotalAmount>
|
||||
<ram:ChargeTotalAmount currencyID="EUR">0.00</ram:ChargeTotalAmount>
|
||||
<ram:AllowanceTotalAmount currencyID="EUR">0.00</ram:AllowanceTotalAmount>
|
||||
<ram:TaxBasisTotalAmount currencyID="EUR">496.00</ram:TaxBasisTotalAmount>
|
||||
<ram:TaxTotalAmount currencyID="EUR">75.04</ram:TaxTotalAmount>
|
||||
<ram:GrandTotalAmount currencyID="EUR">571.04</ram:GrandTotalAmount>
|
||||
<ram:DuePayableAmount currencyID="EUR">571.04</ram:DuePayableAmount>
|
||||
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
</ram:ApplicableHeaderTradeSettlement>
|
||||
</rsm:SupplyChainTradeTransaction>
|
||||
</rsm:CrossIndustryInvoice>
|
||||
@@ -0,0 +1,217 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
|
||||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
||||
xmlns:qdt="urn:un:unece:uncefact:data:Standard:QualifiedDataType:100"
|
||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
|
||||
<!--Migrated by Mustangproject XSLT-->
|
||||
<rsm:ExchangedDocumentContext>
|
||||
<ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
<ram:ID>urn:cen.eu:en16931:2017#conformant#urn:zugferd.de:2p0:extended</ram:ID>
|
||||
</ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
</rsm:ExchangedDocumentContext>
|
||||
<rsm:ExchangedDocument>
|
||||
<ram:ID>RE-20170509/505</ram:ID>
|
||||
<ram:Name>RECHNUNG</ram:Name>
|
||||
<ram:TypeCode>380</ram:TypeCode>
|
||||
<ram:IssueDateTime>
|
||||
<udt:DateTimeString format="102">20170509</udt:DateTimeString>
|
||||
</ram:IssueDateTime>
|
||||
</rsm:ExchangedDocument>
|
||||
<rsm:SupplyChainTradeTransaction>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>1</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Künstlerische Gestaltung (Stunde): Einer Beispielrechnung</ram:Name>
|
||||
<ram:Description/>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">160.0000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="HUR">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">160.0000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="HUR">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="HUR">1.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">160.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>2</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Luftballon: Bunt, ca. 500ml</ram:Name>
|
||||
<ram:Description/>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.7900</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="C62">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.7900</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="C62">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">400.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">316.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>3</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Heiße Luft pro Liter</ram:Name>
|
||||
<ram:Description/>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.1000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="LTR">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.1000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="LTR">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="LTR">200.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">20.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:ApplicableHeaderTradeAgreement>
|
||||
<ram:SellerTradeParty>
|
||||
<ram:Name>Bei Spiel GmbH</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>12345</ram:PostcodeCode>
|
||||
<ram:LineOne>Ecke 12</ram:LineOne>
|
||||
<ram:CityName>Stadthausen</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="FC">22/815/0815/4</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">DE136695976</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:SellerTradeParty>
|
||||
<ram:BuyerTradeParty>
|
||||
<ram:Name>Theodor Est</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>88802</ram:PostcodeCode>
|
||||
<ram:LineOne>Bahnstr. 42</ram:LineOne>
|
||||
<ram:CityName>Spielkreis</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">DE999999999</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:BuyerTradeParty>
|
||||
</ram:ApplicableHeaderTradeAgreement>
|
||||
<ram:ApplicableHeaderTradeDelivery>
|
||||
<ram:ActualDeliverySupplyChainEvent>
|
||||
<ram:OccurrenceDateTime>
|
||||
<udt:DateTimeString format="102">20170507</udt:DateTimeString>
|
||||
</ram:OccurrenceDateTime>
|
||||
</ram:ActualDeliverySupplyChainEvent>
|
||||
</ram:ApplicableHeaderTradeDelivery>
|
||||
<ram:ApplicableHeaderTradeSettlement>
|
||||
<ram:PaymentReference>RE-20170509/505</ram:PaymentReference>
|
||||
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
|
||||
<ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:TypeCode>42</ram:TypeCode>
|
||||
<ram:Information>Überweisung</ram:Information>
|
||||
<ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:IBANID>DE88 2008 0000 0970 3757 00</ram:IBANID>
|
||||
<ram:ProprietaryID>44421800</ram:ProprietaryID>
|
||||
</ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||
<ram:BICID>COBADEFFXXX</ram:BICID>
|
||||
<ram:GermanBankleitzahlID>41441604</ram:GermanBankleitzahlID>
|
||||
<ram:Name>Commerzbank</ram:Name>
|
||||
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||
</ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">11.20</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">160.00</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">63.84</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">336.00</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradePaymentTerms>
|
||||
<ram:Description>Zahlbar ohne Abzug bis zum 30.05.2017</ram:Description>
|
||||
<ram:DueDateDateTime>
|
||||
<udt:DateTimeString format="102">20170530</udt:DateTimeString>
|
||||
</ram:DueDateDateTime>
|
||||
</ram:SpecifiedTradePaymentTerms>
|
||||
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">496.00</ram:LineTotalAmount>
|
||||
<ram:ChargeTotalAmount currencyID="EUR">0.00</ram:ChargeTotalAmount>
|
||||
<ram:AllowanceTotalAmount currencyID="EUR">0.00</ram:AllowanceTotalAmount>
|
||||
<ram:TaxBasisTotalAmount currencyID="EUR">496.00</ram:TaxBasisTotalAmount>
|
||||
<ram:TaxTotalAmount currencyID="EUR">75.04</ram:TaxTotalAmount>
|
||||
<ram:GrandTotalAmount currencyID="EUR">571.04</ram:GrandTotalAmount>
|
||||
<ram:DuePayableAmount currencyID="EUR">571.04</ram:DuePayableAmount>
|
||||
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
</ram:ApplicableHeaderTradeSettlement>
|
||||
</rsm:SupplyChainTradeTransaction>
|
||||
</rsm:CrossIndustryInvoice>
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Nutzungsrechte
|
||||
ZUGFeRD Datenformat Version 1.0, 25.6.2014
|
||||
Beispiel Version 29.09.2014
|
||||
|
||||
Zweck des Forums für elektronische Rechnungen bei der AWV e.V („FeRD“) ist u.a. die Schaffung und Spezifizierung
|
||||
eines offenen Datenformats für strukturierten elektronischen Datenaustausch auf der Grundlage offener und nicht
|
||||
diskriminierender, standardisierter Technologien („ZUGFeRD Datenformat“)
|
||||
|
||||
Das ZUGFeRD Datenformat wird nach Maßgabe des FeRD sowohl Unternehmen als auch der öffentlichen Verwaltung
|
||||
frei zugänglich gemacht. Hierfür bietet FeRD allen Unternehmen und Organisationen der öffentlichen Verwaltung eine
|
||||
Lizenz für die Nutzung des urheberrechtlich geschützten ZUGFeRD-Datenformats zu fairen, sachgerechten und nicht
|
||||
diskriminierenden Bedingungen an.
|
||||
|
||||
Die Spezifikation des FeRD zur Implementierung des ZUGFeRD Datenformats ist in ihrer jeweils geltenden Fassung
|
||||
abrufbar unter www.ferd-net.de.
|
||||
|
||||
Im Einzelnen schließt die Nutzungsgewährung ein:
|
||||
=====================================
|
||||
|
||||
FeRD räumt eine Lizenz für die Nutzung des urheberrechtlich geschützten ZUGFeRD Datenformats in der jeweils
|
||||
geltenden und akzeptierten Fassung (www.ferd-net.de) ein.
|
||||
Die Lizenz beinhaltet ein unwiderrufliches Nutzungsrecht einschließlich des Rechts der Weiterentwicklung,
|
||||
Weiterbearbeitung und Verbindung mit anderen Produkten.
|
||||
Die Lizenz gilt insbesondere für die Entwicklung, die Gestaltung, die Herstellung, den Verkauf, die Nutzung oder
|
||||
anderweitige Verwendung des ZUGFeRD Datenformats für Hardware- und/oder Softwareprodukte sowie sonstige
|
||||
Anwendungen und Dienste.
|
||||
Diese Lizenz schließt nicht die wesentlichen Patente der Mitglieder von FeRD ein. Als wesentliche Patente sind Patente
|
||||
und Patentanmeldungen weltweit zu verstehen, die einen oder mehrere Patentansprüche beinhalten, bei denen es sich um
|
||||
notwendige Ansprüche handelt. Notwendige Ansprüche sind lediglich jene Ansprüche der Wesentlichen Patente, die durch
|
||||
die Implementierung des ZUGFeRD Datenformats notwendigerweise verletzt würden.
|
||||
Der Lizenznehmer ist berechtigt, seinen jeweiligen Konzerngesellschaften ein unbefristetes, weltweites, nicht übertragbares,
|
||||
unwiderrufliches Nutzungsrecht einschließlich des Rechts der Weiterentwicklung, Weiterbearbeitung und Verbindung mit
|
||||
anderen Produkten einzuräumen.
|
||||
|
||||
Die Lizenz wird kostenfrei zur Verfügung gestellt.
|
||||
|
||||
Außer im Falle vorsätzlichen Verschuldens oder grober Fahrlässigkeit haftet FeRD weder für Nutzungsausfall, entgangenen
|
||||
Gewinn, Datenverlust, Kommunikationsverlust, Einnahmeausfall, Vertragseinbußen, Geschäftsausfall oder für Kosten,
|
||||
Schäden, Verluste oder Haftpflichten im Zusammenhang mit einer Unterbrechung der Geschäftstätigkeit, noch für konkrete,
|
||||
beiläufig entstandene, mittelbare Schäden, Straf- oder Folgeschäden und zwar auch dann nicht, wenn die Möglichkeit der
|
||||
Kosten, Verluste bzw. Schäden hätte normalerweise vorhergesehen werden können.
|
||||
|
||||
-->
|
||||
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
|
||||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
||||
xmlns:qdt="urn:un:unece:uncefact:data:Standard:QualifiedDataType:100"
|
||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"><!--
|
||||
Migrated by Mustangproject XSLT
|
||||
--><rsm:ExchangedDocumentContext>
|
||||
<ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
<ram:ID>urn:cen.eu:en16931:2017</ram:ID>
|
||||
</ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
</rsm:ExchangedDocumentContext>
|
||||
<rsm:ExchangedDocument>
|
||||
<ram:ID>471102</ram:ID>
|
||||
<ram:Name>RECHNUNG</ram:Name>
|
||||
<ram:TypeCode>380</ram:TypeCode>
|
||||
<ram:IssueDateTime>
|
||||
<udt:DateTimeString format="102">20130305</udt:DateTimeString>
|
||||
</ram:IssueDateTime>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>Rechnung gemäß Bestellung vom 01.03.2013.</ram:Content>
|
||||
</ram:IncludedNote>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>Lieferant GmbH
|
||||
Lieferantenstraße 20
|
||||
80333 München
|
||||
Deutschland
|
||||
Geschäftsführer: Hans Muster
|
||||
Handelsregisternummer: H A 123
|
||||
</ram:Content>
|
||||
<ram:SubjectCode>REG</ram:SubjectCode>
|
||||
</ram:IncludedNote>
|
||||
</rsm:ExchangedDocument>
|
||||
<rsm:SupplyChainTradeTransaction>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>1</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0160">4012345001235</ram:GlobalID>
|
||||
<ram:SellerAssignedID>TB100A4</ram:SellerAssignedID>
|
||||
<ram:Name>Trennblätter A4</ram:Name>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">9.9000</ram:ChargeAmount>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">9.9000</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">20.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">198.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>2</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0160">4000050986428</ram:GlobalID>
|
||||
<ram:SellerAssignedID>ARNR2</ram:SellerAssignedID>
|
||||
<ram:Name>Joghurt Banane</ram:Name>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">5.5000</ram:ChargeAmount>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">5.5000</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">50.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">275.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:ApplicableHeaderTradeAgreement>
|
||||
<ram:SellerTradeParty>
|
||||
<ram:GlobalID schemeID="0088">4000001123452</ram:GlobalID>
|
||||
<ram:Name>Lieferant GmbH</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>80333</ram:PostcodeCode>
|
||||
<ram:LineOne>Lieferantenstraße 20</ram:LineOne>
|
||||
<ram:CityName>München</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="FC">201/113/40209</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">DE123456789</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:SellerTradeParty>
|
||||
<ram:BuyerTradeParty>
|
||||
<ram:ID>GE2020211</ram:ID>
|
||||
<ram:GlobalID schemeID="0088">4000001987658</ram:GlobalID>
|
||||
<ram:Name>Kunden AG Mitte</ram:Name>
|
||||
<ram:DefinedTradeContact>
|
||||
<ram:PersonName>Hans Muster</ram:PersonName>
|
||||
</ram:DefinedTradeContact>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>69876</ram:PostcodeCode>
|
||||
<ram:LineOne>Kundenstraße 15</ram:LineOne>
|
||||
<ram:CityName>Frankfurt</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
</ram:BuyerTradeParty>
|
||||
</ram:ApplicableHeaderTradeAgreement>
|
||||
<ram:ApplicableHeaderTradeDelivery>
|
||||
<ram:ActualDeliverySupplyChainEvent>
|
||||
<ram:OccurrenceDateTime>
|
||||
<udt:DateTimeString format="102">20130305</udt:DateTimeString>
|
||||
</ram:OccurrenceDateTime>
|
||||
</ram:ActualDeliverySupplyChainEvent>
|
||||
</ram:ApplicableHeaderTradeDelivery>
|
||||
<ram:ApplicableHeaderTradeSettlement>
|
||||
<ram:PaymentReference>2013-471102</ram:PaymentReference>
|
||||
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
|
||||
<ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:TypeCode>31</ram:TypeCode>
|
||||
<ram:Information>Überweisung</ram:Information>
|
||||
<ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:IBANID>DE08700901001234567890</ram:IBANID>
|
||||
</ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||
<ram:BICID>GENODEF1M04</ram:BICID>
|
||||
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||
</ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">19.25</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">275.00</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">37.62</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">198.00</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradePaymentTerms>
|
||||
<ram:Description>Zahlbar innerhalb 30 Tagen netto bis 04.04.2013, 3% Skonto innerhalb 10 Tagen bis 15.03.2013</ram:Description>
|
||||
<ram:DueDateDateTime>
|
||||
<udt:DateTimeString format="102">20130404</udt:DateTimeString>
|
||||
</ram:DueDateDateTime>
|
||||
</ram:SpecifiedTradePaymentTerms>
|
||||
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">473.00</ram:LineTotalAmount>
|
||||
<ram:ChargeTotalAmount currencyID="EUR">0.00</ram:ChargeTotalAmount>
|
||||
<ram:AllowanceTotalAmount currencyID="EUR">0.00</ram:AllowanceTotalAmount>
|
||||
<ram:TaxBasisTotalAmount currencyID="EUR">473.00</ram:TaxBasisTotalAmount>
|
||||
<ram:TaxTotalAmount currencyID="EUR">56.87</ram:TaxTotalAmount>
|
||||
<ram:GrandTotalAmount currencyID="EUR">529.87</ram:GrandTotalAmount>
|
||||
<ram:TotalPrepaidAmount currencyID="EUR">0.00</ram:TotalPrepaidAmount>
|
||||
<ram:DuePayableAmount currencyID="EUR">529.87</ram:DuePayableAmount>
|
||||
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
</ram:ApplicableHeaderTradeSettlement>
|
||||
</rsm:SupplyChainTradeTransaction>
|
||||
</rsm:CrossIndustryInvoice>
|
||||
@@ -0,0 +1,543 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Nutzungsrechte
|
||||
ZUGFeRD Datenformat Version 1.0, 25.6.2014
|
||||
Beispiel Version 29.09.2014
|
||||
|
||||
Zweck des Forums für elektronische Rechnungen bei der AWV e.V („FeRD“) ist u.a. die Schaffung und Spezifizierung
|
||||
eines offenen Datenformats für strukturierten elektronischen Datenaustausch auf der Grundlage offener und nicht
|
||||
diskriminierender, standardisierter Technologien („ZUGFeRD Datenformat“)
|
||||
|
||||
Das ZUGFeRD Datenformat wird nach Maßgabe des FeRD sowohl Unternehmen als auch der öffentlichen Verwaltung
|
||||
frei zugänglich gemacht. Hierfür bietet FeRD allen Unternehmen und Organisationen der öffentlichen Verwaltung eine
|
||||
Lizenz für die Nutzung des urheberrechtlich geschützten ZUGFeRD-Datenformats zu fairen, sachgerechten und nicht
|
||||
diskriminierenden Bedingungen an.
|
||||
|
||||
Die Spezifikation des FeRD zur Implementierung des ZUGFeRD Datenformats ist in ihrer jeweils geltenden Fassung
|
||||
abrufbar unter www.ferd-net.de.
|
||||
|
||||
Im Einzelnen schließt die Nutzungsgewährung ein:
|
||||
=====================================
|
||||
|
||||
FeRD räumt eine Lizenz für die Nutzung des urheberrechtlich geschützten ZUGFeRD Datenformats in der jeweils
|
||||
geltenden und akzeptierten Fassung (www.ferd-net.de) ein.
|
||||
Die Lizenz beinhaltet ein unwiderrufliches Nutzungsrecht einschließlich des Rechts der Weiterentwicklung,
|
||||
Weiterbearbeitung und Verbindung mit anderen Produkten.
|
||||
Die Lizenz gilt insbesondere für die Entwicklung, die Gestaltung, die Herstellung, den Verkauf, die Nutzung oder
|
||||
anderweitige Verwendung des ZUGFeRD Datenformats für Hardware- und/oder Softwareprodukte sowie sonstige
|
||||
Anwendungen und Dienste.
|
||||
Diese Lizenz schließt nicht die wesentlichen Patente der Mitglieder von FeRD ein. Als wesentliche Patente sind Patente
|
||||
und Patentanmeldungen weltweit zu verstehen, die einen oder mehrere Patentansprüche beinhalten, bei denen es sich um
|
||||
notwendige Ansprüche handelt. Notwendige Ansprüche sind lediglich jene Ansprüche der Wesentlichen Patente, die durch
|
||||
die Implementierung des ZUGFeRD Datenformats notwendigerweise verletzt würden.
|
||||
Der Lizenznehmer ist berechtigt, seinen jeweiligen Konzerngesellschaften ein unbefristetes, weltweites, nicht übertragbares,
|
||||
unwiderrufliches Nutzungsrecht einschließlich des Rechts der Weiterentwicklung, Weiterbearbeitung und Verbindung mit
|
||||
anderen Produkten einzuräumen.
|
||||
|
||||
Die Lizenz wird kostenfrei zur Verfügung gestellt.
|
||||
|
||||
Außer im Falle vorsätzlichen Verschuldens oder grober Fahrlässigkeit haftet FeRD weder für Nutzungsausfall, entgangenen
|
||||
Gewinn, Datenverlust, Kommunikationsverlust, Einnahmeausfall, Vertragseinbußen, Geschäftsausfall oder für Kosten,
|
||||
Schäden, Verluste oder Haftpflichten im Zusammenhang mit einer Unterbrechung der Geschäftstätigkeit, noch für konkrete,
|
||||
beiläufig entstandene, mittelbare Schäden, Straf- oder Folgeschäden und zwar auch dann nicht, wenn die Möglichkeit der
|
||||
Kosten, Verluste bzw. Schäden hätte normalerweise vorhergesehen werden können.
|
||||
|
||||
-->
|
||||
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
|
||||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
||||
xmlns:qdt="urn:un:unece:uncefact:data:Standard:QualifiedDataType:100"
|
||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"><!--
|
||||
Migrated by Mustangproject XSLT
|
||||
--><rsm:ExchangedDocumentContext>
|
||||
<!-- Im Echtbetrieb muss der TestIndicator entweder vollständig entfallen oder auf false stehen. -->
|
||||
<ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
<ram:ID>urn:cen.eu:en16931:2017#conformant#urn:zugferd.de:2p0:extended</ram:ID>
|
||||
</ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
</rsm:ExchangedDocumentContext>
|
||||
<rsm:ExchangedDocument>
|
||||
<ram:ID>R87654321012345</ram:ID>
|
||||
<ram:Name>WARENRECHNUNG</ram:Name>
|
||||
<ram:TypeCode>380</ram:TypeCode>
|
||||
<ram:IssueDateTime>
|
||||
<udt:DateTimeString format="102">20130806</udt:DateTimeString>
|
||||
</ram:IssueDateTime>
|
||||
<ram:IncludedNote>
|
||||
<ram:ContentCode>ST3</ram:ContentCode>
|
||||
<ram:Content>Es bestehen Rabatt- oder Bonusvereinbarungen.</ram:Content>
|
||||
<ram:SubjectCode>AAK</ram:SubjectCode>
|
||||
</ram:IncludedNote>
|
||||
<ram:IncludedNote>
|
||||
<ram:ContentCode>EEV</ram:ContentCode>
|
||||
<ram:Content>Der Verkäufer bleibt Eigentümer der Waren bis zu vollständigen Erfüllung der Kaufpreisforderung.</ram:Content>
|
||||
<ram:SubjectCode>AAJ</ram:SubjectCode>
|
||||
</ram:IncludedNote>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>MUSTERLIEFERANT GMBH
|
||||
BAHNHOFSTRASSE 99
|
||||
99199 MUSTERHAUSEN
|
||||
Geschäftsführung:
|
||||
Max Mustermann
|
||||
USt-IdNr: DE123456789
|
||||
Telefon: +49 932 431 0
|
||||
www.musterlieferant.de
|
||||
HRB Nr. 372876
|
||||
Amtsgericht Musterstadt
|
||||
GLN 4304171000002
|
||||
WEEE-Reg-Nr.: DE87654321</ram:Content>
|
||||
<ram:SubjectCode>REG</ram:SubjectCode>
|
||||
</ram:IncludedNote>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>Leergutwert: 46,50</ram:Content>
|
||||
</ram:IncludedNote>
|
||||
</rsm:ExchangedDocument>
|
||||
<rsm:SupplyChainTradeTransaction>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>Wichtige Information: Bei Bestellungen bis zum 19.12. ist die Auslieferung bis spätestens 23.12. garantiert.</ram:Content>
|
||||
</ram:IncludedNote>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedLineTradeSettlement/>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument/>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0088">4123456000014</ram:GlobalID>
|
||||
<ram:SellerAssignedID>ZS997</ram:SellerAssignedID>
|
||||
<ram:Name>Zitronensäure 100ml</ram:Name>
|
||||
<ram:ApplicableProductCharacteristic>
|
||||
<ram:TypeCode>PACKAGING_TYPE</ram:TypeCode>
|
||||
<ram:Description>Verpackungsart</ram:Description>
|
||||
<ram:Value>BO</ram:Value>
|
||||
</ram:ApplicableProductCharacteristic>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">1.0000</ram:ChargeAmount>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">1.0000</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">100.0000</ram:BilledQuantity>
|
||||
<ram:PackageQuantity unitCode="CT">4.0000</ram:PackageQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">100.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument/>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0088">4123456000021</ram:GlobalID>
|
||||
<ram:SellerAssignedID>GZ250</ram:SellerAssignedID>
|
||||
<ram:Name>Gelierzucker Extra 250g</ram:Name>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">1.5000</ram:ChargeAmount>
|
||||
<ram:AppliedTradeAllowanceCharge>
|
||||
<ram:ChargeIndicator>
|
||||
<udt:Indicator>false</udt:Indicator>
|
||||
</ram:ChargeIndicator>
|
||||
<ram:CalculationPercent>2.00</ram:CalculationPercent>
|
||||
<ram:BasisAmount currencyID="EUR">1.5000</ram:BasisAmount>
|
||||
<ram:ActualAmount currencyID="EUR">0.0300</ram:ActualAmount>
|
||||
<ram:Reason>Artikelrabatt 1</ram:Reason>
|
||||
</ram:AppliedTradeAllowanceCharge>
|
||||
<ram:AppliedTradeAllowanceCharge>
|
||||
<ram:ChargeIndicator>
|
||||
<udt:Indicator>false</udt:Indicator>
|
||||
</ram:ChargeIndicator>
|
||||
<ram:BasisQuantity unitCode="C62">1</ram:BasisQuantity>
|
||||
<ram:ActualAmount currencyID="EUR">0.0200</ram:ActualAmount>
|
||||
<ram:Reason>Artikelrabatt 2</ram:Reason>
|
||||
</ram:AppliedTradeAllowanceCharge>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">1.4500</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">50.0000</ram:BilledQuantity>
|
||||
<ram:PackageQuantity unitCode="CT">1.0000</ram:PackageQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">72.50</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument/>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0088">4123456000021</ram:GlobalID>
|
||||
<ram:SellerAssignedID>GZ250</ram:SellerAssignedID>
|
||||
<ram:Name>Gelierzucker Extra 250g</ram:Name>
|
||||
<ram:Description>Artikel wie vereinbart ohne Berechnung</ram:Description>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.0000</ram:ChargeAmount>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">0.0000</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">10.0000</ram:BilledQuantity>
|
||||
<ram:PackageQuantity unitCode="CT">1.0000</ram:PackageQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">0.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:IncludedNote>
|
||||
<ram:Content>Öko-Kontroll-Nr.: DE-BW-006-987654321054</ram:Content>
|
||||
<ram:SubjectCode>AAY</ram:SubjectCode>
|
||||
</ram:IncludedNote>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0088">4100130013294</ram:GlobalID>
|
||||
<ram:SellerAssignedID>2031</ram:SellerAssignedID>
|
||||
<ram:BuyerAssignedID>K4321</ram:BuyerAssignedID>
|
||||
<ram:Name>Bierbrau Pils 20/0500</ram:Name>
|
||||
<ram:Description>EAN-VKE: 4100130913297</ram:Description>
|
||||
<ram:ApplicableProductCharacteristic>
|
||||
<ram:TypeCode>PACKAGING_MATERIAL</ram:TypeCode>
|
||||
<ram:Description>Verpackung</ram:Description>
|
||||
<ram:Value>Kiste</ram:Value>
|
||||
</ram:ApplicableProductCharacteristic>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">12.0000</ram:ChargeAmount>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">12.0000</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">15.0000</ram:BilledQuantity>
|
||||
<ram:PackageQuantity unitCode="BO">20.0000</ram:PackageQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">180.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument/>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0088">2001015001325</ram:GlobalID>
|
||||
<ram:SellerAssignedID>1805</ram:SellerAssignedID>
|
||||
<ram:BuyerAssignedID>K4322</ram:BuyerAssignedID>
|
||||
<ram:Name>Leergutpfand 20 x 0,5l</ram:Name>
|
||||
<ram:ApplicableProductCharacteristic>
|
||||
<ram:TypeCode>PACKAGING_MATERIAL</ram:TypeCode>
|
||||
<ram:Description>Verpackung</ram:Description>
|
||||
<ram:Value>unverpackt</ram:Value>
|
||||
</ram:ApplicableProductCharacteristic>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">3.1000</ram:ChargeAmount>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">3.1000</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">15.0000</ram:BilledQuantity>
|
||||
<ram:PackageQuantity unitCode="BC">1.0000</ram:PackageQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">46.50</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument/>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:GlobalID schemeID="0088">4123456000038</ram:GlobalID>
|
||||
<ram:SellerAssignedID>MP107</ram:SellerAssignedID>
|
||||
<ram:Name>Mischpalette Joghurt Karton 3 x 20</ram:Name>
|
||||
<ram:ApplicableProductCharacteristic>
|
||||
<ram:TypeCode>PACKAGING_MATERIAL</ram:TypeCode>
|
||||
<ram:Description>Verpackung</ram:Description>
|
||||
<ram:Value>Karton</ram:Value>
|
||||
</ram:ApplicableProductCharacteristic>
|
||||
<ram:IncludedReferencedProduct>
|
||||
<ram:GlobalID schemeID="0088">4123456001035</ram:GlobalID>
|
||||
<ram:SellerAssignedID>JOG103</ram:SellerAssignedID>
|
||||
<ram:Name>Erdbeer 20 x 150g Becher</ram:Name>
|
||||
<ram:UnitQuantity unitCode="C62">20.0000</ram:UnitQuantity>
|
||||
</ram:IncludedReferencedProduct>
|
||||
<ram:IncludedReferencedProduct>
|
||||
<ram:GlobalID schemeID="0088">4123456002032</ram:GlobalID>
|
||||
<ram:SellerAssignedID>JOG203</ram:SellerAssignedID>
|
||||
<ram:Name>Banane 20 x 150g Becher</ram:Name>
|
||||
<ram:UnitQuantity unitCode="C62">20.0000</ram:UnitQuantity>
|
||||
</ram:IncludedReferencedProduct>
|
||||
<ram:IncludedReferencedProduct>
|
||||
<ram:GlobalID schemeID="0088">4123456003039</ram:GlobalID>
|
||||
<ram:SellerAssignedID>JOG303</ram:SellerAssignedID>
|
||||
<ram:Name>Schoko 20 x 150g Becher</ram:Name>
|
||||
<ram:UnitQuantity unitCode="C62">20.0000</ram:UnitQuantity>
|
||||
</ram:IncludedReferencedProduct>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">30.0000</ram:ChargeAmount>
|
||||
<ram:AppliedTradeAllowanceCharge>
|
||||
<ram:ChargeIndicator>
|
||||
<udt:Indicator>false</udt:Indicator>
|
||||
</ram:ChargeIndicator>
|
||||
<ram:CalculationPercent>3.00</ram:CalculationPercent>
|
||||
<ram:BasisAmount currencyID="EUR">30.0000</ram:BasisAmount>
|
||||
<ram:ActualAmount currencyID="EUR">0.9000</ram:ActualAmount>
|
||||
<ram:Reason>Artikelrabatt 1</ram:Reason>
|
||||
</ram:AppliedTradeAllowanceCharge>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount currencyID="EUR">29.1000</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">2.0000</ram:BilledQuantity>
|
||||
<ram:PackageQuantity unitCode="PX">1.0000</ram:PackageQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">58.20</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:ApplicableHeaderTradeAgreement>
|
||||
<ram:SellerTradeParty>
|
||||
<ram:ID>549910</ram:ID>
|
||||
<ram:GlobalID schemeID="0088">4333741000005</ram:GlobalID>
|
||||
<ram:Name>MUSTERLIEFERANT GMBH</ram:Name>
|
||||
<ram:DefinedTradeContact>
|
||||
<ram:TelephoneUniversalCommunication>
|
||||
<ram:CompleteNumber>+49 932 431 500</ram:CompleteNumber>
|
||||
</ram:TelephoneUniversalCommunication>
|
||||
<ram:EmailURIUniversalCommunication>
|
||||
<ram:URIID>max.mustermann@musterlieferant.de</ram:URIID>
|
||||
</ram:EmailURIUniversalCommunication>
|
||||
</ram:DefinedTradeContact>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>99199</ram:PostcodeCode>
|
||||
<ram:LineOne>BAHNHOFSTRASSE 99</ram:LineOne>
|
||||
<ram:CityName>MUSTERHAUSEN</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">DE123456789</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:SellerTradeParty>
|
||||
<ram:BuyerTradeParty>
|
||||
<ram:ID>009420</ram:ID>
|
||||
<ram:GlobalID schemeID="0088">4304171000002</ram:GlobalID>
|
||||
<ram:Name>MUSTER-KUNDE GMBH</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>40235</ram:PostcodeCode>
|
||||
<ram:LineOne>KUNDENWEG 88</ram:LineOne>
|
||||
<ram:CityName>DUESSELDORF</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
</ram:BuyerTradeParty>
|
||||
<ram:BuyerOrderReferencedDocument>
|
||||
<ram:IssuerAssignedID>B123456789</ram:IssuerAssignedID>
|
||||
<ram:FormattedIssueDateTime>
|
||||
<qdt:DateTimeString>2013-08-01T00:00:00</qdt:DateTimeString>
|
||||
</ram:FormattedIssueDateTime>
|
||||
</ram:BuyerOrderReferencedDocument>
|
||||
<ram:AdditionalReferencedDocument>
|
||||
<ram:IssuerAssignedID>A456123</ram:IssuerAssignedID>
|
||||
<ram:TypeCode>VN</ram:TypeCode>
|
||||
<ram:FormattedIssueDateTime>
|
||||
<qdt:DateTimeString>2013-08-02T00:00:00</qdt:DateTimeString>
|
||||
</ram:FormattedIssueDateTime>
|
||||
</ram:AdditionalReferencedDocument>
|
||||
</ram:ApplicableHeaderTradeAgreement>
|
||||
<ram:ApplicableHeaderTradeDelivery>
|
||||
<ram:ShipToTradeParty>
|
||||
<ram:GlobalID schemeID="0088">4304171088093</ram:GlobalID>
|
||||
<ram:Name>MUSTER-MARKT</ram:Name>
|
||||
<ram:DefinedTradeContact>
|
||||
<ram:DepartmentName>8211</ram:DepartmentName>
|
||||
</ram:DefinedTradeContact>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>31157</ram:PostcodeCode>
|
||||
<ram:LineOne>HAUPTSTRASSE 44</ram:LineOne>
|
||||
<ram:CityName>SARSTEDT</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
</ram:ShipToTradeParty>
|
||||
<ram:ActualDeliverySupplyChainEvent>
|
||||
<ram:OccurrenceDateTime>
|
||||
<udt:DateTimeString format="102">20130805</udt:DateTimeString>
|
||||
</ram:OccurrenceDateTime>
|
||||
</ram:ActualDeliverySupplyChainEvent>
|
||||
<ram:DeliveryNoteReferencedDocument>
|
||||
<ram:IssuerAssignedID>L87654321012345</ram:IssuerAssignedID>
|
||||
<ram:FormattedIssueDateTime>
|
||||
<qdt:DateTimeString>2013-08-05T00:00:00</qdt:DateTimeString>
|
||||
</ram:FormattedIssueDateTime>
|
||||
</ram:DeliveryNoteReferencedDocument>
|
||||
</ram:ApplicableHeaderTradeDelivery>
|
||||
<ram:ApplicableHeaderTradeSettlement>
|
||||
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
|
||||
<ram:InvoiceeTradeParty>
|
||||
<ram:ID>009420</ram:ID>
|
||||
<ram:GlobalID schemeID="0088">4304171000002</ram:GlobalID>
|
||||
<ram:Name>MUSTER-KUNDE GMBH</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>40235</ram:PostcodeCode>
|
||||
<ram:LineOne>KUNDENWEG 88</ram:LineOne>
|
||||
<ram:CityName>DUESSELDORF</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
</ram:InvoiceeTradeParty>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">61.07</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">321.40</ram:BasisAmount>
|
||||
<ram:LineTotalBasisAmount currencyID="EUR">326.50</ram:LineTotalBasisAmount>
|
||||
<ram:AllowanceChargeBasisAmount currencyID="EUR">-5.10</ram:AllowanceChargeBasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount currencyID="EUR">8.93</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount currencyID="EUR">127.59</ram:BasisAmount>
|
||||
<ram:LineTotalBasisAmount currencyID="EUR">130.70</ram:LineTotalBasisAmount>
|
||||
<ram:AllowanceChargeBasisAmount currencyID="EUR">-3.11</ram:AllowanceChargeBasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:ChargeIndicator>
|
||||
<udt:Indicator>false</udt:Indicator>
|
||||
</ram:ChargeIndicator>
|
||||
<ram:CalculationPercent>2.00</ram:CalculationPercent>
|
||||
<ram:BasisAmount currencyID="EUR">280.00</ram:BasisAmount>
|
||||
<ram:ActualAmount currencyID="EUR">5.60</ram:ActualAmount>
|
||||
<ram:Reason>Rechnungsrabatt 1</ram:Reason>
|
||||
<ram:CategoryTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:CategoryTradeTax>
|
||||
</ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:ChargeIndicator>
|
||||
<udt:Indicator>false</udt:Indicator>
|
||||
</ram:ChargeIndicator>
|
||||
<ram:CalculationPercent>2.00</ram:CalculationPercent>
|
||||
<ram:BasisAmount currencyID="EUR">130.70</ram:BasisAmount>
|
||||
<ram:ActualAmount currencyID="EUR">2.61</ram:ActualAmount>
|
||||
<ram:Reason>Rechnungsrabatt 1</ram:Reason>
|
||||
<ram:CategoryTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>
|
||||
</ram:CategoryTradeTax>
|
||||
</ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:ChargeIndicator>
|
||||
<udt:Indicator>false</udt:Indicator>
|
||||
</ram:ChargeIndicator>
|
||||
<ram:BasisAmount currencyID="EUR">280.00</ram:BasisAmount>
|
||||
<ram:ActualAmount currencyID="EUR">2.50</ram:ActualAmount>
|
||||
<ram:Reason>Rechnungsrabatt 2</ram:Reason>
|
||||
<ram:CategoryTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:CategoryTradeTax>
|
||||
</ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:ChargeIndicator>
|
||||
<udt:Indicator>false</udt:Indicator>
|
||||
</ram:ChargeIndicator>
|
||||
<ram:BasisAmount currencyID="EUR">130.70</ram:BasisAmount>
|
||||
<ram:ActualAmount currencyID="EUR">0.50</ram:ActualAmount>
|
||||
<ram:Reason>Rechnungsrabatt 2</ram:Reason>
|
||||
<ram:CategoryTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>
|
||||
</ram:CategoryTradeTax>
|
||||
</ram:SpecifiedTradeAllowanceCharge>
|
||||
<ram:SpecifiedLogisticsServiceCharge>
|
||||
<ram:Description>Transportkosten</ram:Description>
|
||||
<ram:AppliedAmount currencyID="EUR">3.00</ram:AppliedAmount>
|
||||
<ram:AppliedTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:AppliedTradeTax>
|
||||
</ram:SpecifiedLogisticsServiceCharge>
|
||||
<ram:SpecifiedTradePaymentTerms>
|
||||
<ram:Description>Bei Zahlung innerhalb 14 Tagen gewähren wir 2,0% Skonto.</ram:Description>
|
||||
<ram:ApplicableTradePaymentDiscountTerms>
|
||||
<ram:BasisPeriodMeasure unitCode="DAY">14</ram:BasisPeriodMeasure>
|
||||
<ram:CalculationPercent>2.00</ram:CalculationPercent>
|
||||
</ram:ApplicableTradePaymentDiscountTerms>
|
||||
</ram:SpecifiedTradePaymentTerms>
|
||||
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
<ram:LineTotalAmount currencyID="EUR">457.20</ram:LineTotalAmount>
|
||||
<ram:ChargeTotalAmount currencyID="EUR">3.00</ram:ChargeTotalAmount>
|
||||
<ram:AllowanceTotalAmount currencyID="EUR">11.21</ram:AllowanceTotalAmount>
|
||||
<ram:TaxBasisTotalAmount currencyID="EUR">448.99</ram:TaxBasisTotalAmount>
|
||||
<ram:TaxTotalAmount currencyID="EUR">70.00</ram:TaxTotalAmount>
|
||||
<ram:GrandTotalAmount currencyID="EUR">518.99</ram:GrandTotalAmount>
|
||||
<ram:TotalPrepaidAmount currencyID="EUR">0.00</ram:TotalPrepaidAmount>
|
||||
<ram:DuePayableAmount currencyID="EUR">518.99</ram:DuePayableAmount>
|
||||
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
</ram:ApplicableHeaderTradeSettlement>
|
||||
</rsm:SupplyChainTradeTransaction>
|
||||
</rsm:CrossIndustryInvoice>
|
||||
BIN
libraryBasic/src/test/resources/zugferd_invoice.pdf
Normal file
BIN
libraryBasic/src/test/resources/zugferd_invoice.pdf
Normal file
Binary file not shown.
Reference in New Issue
Block a user