diff --git a/ZUGFeRD-invoice.xml b/ZUGFeRD-invoice.xml
deleted file mode 100644
index e69de29b..00000000
diff --git a/pom.xml b/pom.xml
index 650c1728..8f16a2dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
org.mustangproject.ZUGFeRD
mustang
- 1.6.1-SNAPSHOT
+ 1.6.2-SNAPSHOT
jar
Mustang
The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs
diff --git a/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDMigrator.java b/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDMigrator.java
index 3b232c17..bdc78ea3 100644
--- a/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDMigrator.java
+++ b/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDMigrator.java
@@ -63,8 +63,16 @@ public class ZUGFeRDMigrator {
*/
ByteArrayOutputStream baos = new ByteArrayOutputStream();
applySchematronXsl(new FileInputStream(xmlFilename), baos);
+
String res = null;
res = baos.toString("UTF-8");
+
+ //somehow the XML parser seems to insert erreneous XML namespaces, depending on which one it is, saxon seems to be cleaner.
+ //nevertheless, remove them manually
+ res=res.replace("", "");
+ res=res.replace("", "");
+
+
return res;
}
diff --git a/src/main/java/org/mustangproject/toecount/Toecount.java b/src/main/java/org/mustangproject/toecount/Toecount.java
index 2cf1c3b3..c1143fc2 100755
--- a/src/main/java/org/mustangproject/toecount/Toecount.java
+++ b/src/main/java/org/mustangproject/toecount/Toecount.java
@@ -69,8 +69,9 @@ public class Toecount {
+ " [--source ]: set input PDF file\n"
+ " [--source-xml ]: set input XML file\n"
+ " [--out ]: set output PDF file\n"
- + " [--zugferd-version <1|2>]: set ZUGFeRD version\n"
- + " [--zugferd-profile <...>]: set ZUGFeRD profile\n"
+ + " [--format ]: set ZUGFeRD or FacturX\n"
+ + " [--version <1|2>]: set ZUGFeRD version\n"
+ + " [--profile <...>]: set ZUGFeRD profile\n"
+ " For ZUGFeRD v1: ASIC, OMFORT or XTENDED\n"
+ " For ZUGFeRD v2: INIMUM, BASIC L, ASIC, IUS, N16931, ETENDED ";
}
@@ -102,8 +103,9 @@ public class Toecount {
+ "\t\t[--source ]: set input PDF file\r\n"
+ "\t\t[--source-xml ]: set input XML file\r\n"
+ "\t\t[--out ]: set output PDF file\r\n"
- + "\t\t[--zugferd-version <1|2>]: set ZUGFeRD version\r\n"
- + "\t\t[--zugferd-profile <...>]: set ZUGFeRD profile\r\n"
+ + "\t\t[--format ]: enable factur-x or ZUGFeRD\r\n"
+ + "\t\t[--version <1|2>]: set ZUGFeRD version\r\n"
+ + "\t\t[--profile <...>]: set ZUGFeRD profile\r\n"
+ "\t\t\tFor ZUGFeRD v1: ASIC, OMFORT or XTENDED\r\n"
+ "\t\t\tFor ZUGFeRD v2: INIMUM, BASIC L, ASIC, IUS, N16931, ETENDED\r\n");
}
@@ -264,12 +266,13 @@ public class Toecount {
// (--source: input PDF file)
// (--source-xml: input XML file)
// (--out: output PDF file)
- // (--zugferd-version: ZUGFeRD version)
- // (--zugferd-profile: ZUGFeRD profile)
+ // (--version: ZUGFeRD version)
+ // (--profile: ZUGFeRD profile)
Option combineOption = parser.addBooleanOption('c', "combine");
Option sourceXmlOption = parser.addStringOption("source-xml");
- Option zugferdVersionOption = parser.addStringOption("zugferd-version");
- Option zugferdProfileOption = parser.addStringOption("zugferd-profile");
+ Option formatOption = parser.addStringOption('f', "format");
+ Option zugferdVersionOption = parser.addStringOption("version");
+ Option zugferdProfileOption = parser.addStringOption("profile");
// Command: Show metrics in dir
// --directory
@@ -301,6 +304,7 @@ public class Toecount {
String sourceName = parser.getOptionValue(sourceOption);
String sourceXMLName = parser.getOptionValue(sourceXmlOption);
String outName = parser.getOptionValue(outOption);
+ String format = parser.getOptionValue(formatOption);
String zugferdVersion = parser.getOptionValue(zugferdVersionOption);
String zugferdProfile = parser.getOptionValue(zugferdProfileOption);
@@ -309,7 +313,7 @@ public class Toecount {
} else if (((directoryName != null) && (directoryName.length() > 0)) || filesFromStdIn.booleanValue()) {
performMetrics(directoryName, filesFromStdIn, ignoreFileExt);
} else if (combineRequested) {
- performCombine(sourceName, sourceXMLName, outName, zugferdVersion, zugferdProfile);
+ performCombine(sourceName, sourceXMLName, outName, format, zugferdVersion, zugferdProfile);
} else if (extractRequested) {
performExtract(sourceName, outName);
} else if (a3only) {
@@ -417,7 +421,7 @@ public class Toecount {
}
}
- private static void performCombine(String pdfName, String xmlName, String outName, String zfVersion,
+ private static void performCombine(String pdfName, String xmlName, String outName, String format, String zfVersion,
String zfProfile) throws Exception {
/*
* ZUGFeRDExporter ze= new ZUGFeRDExporterFromA1Factory()
@@ -425,7 +429,7 @@ public class Toecount {
* .loadFromPDFA1("invoice.pdf");
*/
try {
- int zfIntVersion = 1;
+ int zfIntVersion = ZUGFeRDExporter.DefaultZUGFeRDVersion;
ZUGFeRDConformanceLevel zfConformanceLevelProfile = ZUGFeRDConformanceLevel.EXTENDED;
if (pdfName == null) {
@@ -446,27 +450,38 @@ public class Toecount {
System.out.println("Ouput PDF set to " + outName);
}
- if (zfVersion == null) {
+ if (format == null) {
try {
- zfVersion = getStringFromUser("ZUGFeRD version (1 or 2)", "1", "1|2");
+ format = getStringFromUser("Format (fx=Factur-X, zf=ZUGFeRD,)", "zf", "fx|zf");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else {
- System.out.println("ZUGFeRD version set to " + zfVersion);
+ System.out.println("Format set to " + format);
}
+
+ if (zfVersion == null) {
+ try {
+ zfVersion = getStringFromUser("Version (1 or 2)", "1", "1|2");
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ } else {
+ System.out.println("Version set to " + zfVersion);
+ }
zfIntVersion = Integer.valueOf(zfVersion);
if (zfProfile == null) {
try {
- if (zfIntVersion == 1) {
- zfProfile = getStringFromUser("ZUGFeRD profile b)asic, c)omfort or e)xtended", "e",
+ if (format.equals("zf")&&(zfIntVersion == 1)) {
+ zfProfile = getStringFromUser("Profile b)asic, c)omfort or e)xtended", "e",
"B|b|C|c|E|e");
} else {
zfProfile = getStringFromUser(
- "ZUGFeRD profile [M]INIMUM, BASIC [W]L, [B]ASIC,\n" + "[C]IUS, [E]N16931, E[X]TENDED",
+ "Profile [M]INIMUM, BASIC [W]L, [B]ASIC,\n" + "[C]IUS, [E]N16931, E[X]TENDED",
"E", "M|m|W|w|B|b|C|c|E|e|X|x|");
}
} catch (Exception e) {
@@ -474,7 +489,7 @@ public class Toecount {
e.printStackTrace();
}
} else {
- System.out.println("ZUGFeRD profile set to " + zfProfile);
+ System.out.println("Profile set to " + zfProfile);
}
zfProfile = zfProfile.toLowerCase();
@@ -482,8 +497,12 @@ public class Toecount {
ensureFileExists(pdfName);
ensureFileExists(xmlName);
ensureFileNotExists(outName);
+
+ if ((format.equals("fx"))&&(zfIntVersion>1)) {
+ throw new Exception("Factur-X is only available in version 1 (roughly corresponding to ZF2)");
+ }
- if (zfIntVersion == 1) {
+ if ((format.equals("zf"))&&(zfIntVersion == 1)) {
if (zfProfile.equals("b")) {
zfConformanceLevelProfile = ZUGFeRDConformanceLevel.BASIC;
} else if (zfProfile.equals("c")) {
@@ -493,7 +512,7 @@ public class Toecount {
} else {
throw new Exception(String.format("Unknown ZUGFeRD profile '%s'", zfProfile));
}
- } else if (zfIntVersion == 2) {
+ } else if (((format.equals("zf"))&&(zfIntVersion == 2))||(format.equals("fx"))) {
if (zfProfile.equals("m")) {
zfConformanceLevelProfile = ZUGFeRDConformanceLevel.MINIMUM;
} else if (zfProfile.equals("w")) {
@@ -510,7 +529,7 @@ public class Toecount {
throw new Exception(String.format("Unknown ZUGFeRD profile '%s'", zfProfile));
}
} else {
- throw new Exception(String.format("Unknown ZUGFeRD version '%i'", zfIntVersion));
+ throw new Exception(String.format("Unknown version '%i'", zfIntVersion));
}
// All params are good! continue...
@@ -519,6 +538,10 @@ public class Toecount {
.load(pdfName);
ze.setZUGFeRDVersion(zfIntVersion);
+ if (format.equals("fx")) {
+ ze.setFacturX();
+ }
+
ze.setZUGFeRDXMLData(Files.readAllBytes(Paths.get(xmlName)));
diff --git a/src/test/resources/migration/input/ZUGFeRD1_COMFORT_Einfach.xml b/src/test/resources/migration/input/ZUGFeRD1_COMFORT_Einfach.xml
new file mode 100644
index 00000000..db6672dd
--- /dev/null
+++ b/src/test/resources/migration/input/ZUGFeRD1_COMFORT_Einfach.xml
@@ -0,0 +1,216 @@
+
+
+
+
+ true
+
+ urn:ferd:CrossIndustryDocument:invoice:1p0:comfort
+
+
+
+ 471102
+ RECHNUNG
+ 380
+ 20130305
+
+ Rechnung gemäß Bestellung vom 01.03.2013.
+
+
+ Lieferant GmbH
+Lieferantenstraße 20
+80333 München
+Deutschland
+Geschäftsführer: Hans Muster
+Handelsregisternummer: H A 123
+
+REG
+
+
+
+
+
+ 4000001123452
+ Lieferant GmbH
+
+ 80333
+ Lieferantenstraße 20
+ München
+ DE
+
+
+ 201/113/40209
+
+
+ DE123456789
+
+
+
+ GE2020211
+ 4000001987658
+ Kunden AG Mitte
+
+ Hans Muster
+
+
+ 69876
+ Kundenstraße 15
+ Frankfurt
+ DE
+
+
+
+
+
+ 20130305
+
+
+
+ 2013-471102
+ EUR
+
+ 31
+ Überweisung
+
+ DE08700901001234567890
+
+
+ GENODEF1M04
+
+
+
+ 19.25
+ VAT
+ 275.00
+ S
+ 7.00
+
+
+ 37.62
+ VAT
+ 198.00
+ S
+ 19.00
+
+
+ Zahlbar innerhalb 30 Tagen netto bis 04.04.2013, 3% Skonto innerhalb 10 Tagen bis 15.03.2013
+ 20130404
+
+
+ 473.00
+ 0.00
+ 0.00
+ 473.00
+ 56.87
+ 529.87
+ 0.00
+ 529.87
+
+
+
+
+ 1
+
+
+
+ 9.9000
+
+
+ 9.9000
+
+
+
+ 20.0000
+
+
+
+ VAT
+ S
+ 19.00
+
+
+ 198.00
+
+
+
+ 4012345001235
+ TB100A4
+ Trennblätter A4
+
+
+
+
+ 2
+
+
+
+ 5.5000
+
+
+ 5.5000
+
+
+
+ 50.0000
+
+
+
+ VAT
+ S
+ 7.00
+
+
+ 275.00
+
+
+
+ 4000050986428
+ ARNR2
+ Joghurt Banane
+
+
+
+
\ No newline at end of file
diff --git a/src/test/resources/migration/input/ZUGFeRD1_EXTENDED_Warenrechnung.xml b/src/test/resources/migration/input/ZUGFeRD1_EXTENDED_Warenrechnung.xml
new file mode 100644
index 00000000..0f26d3ea
--- /dev/null
+++ b/src/test/resources/migration/input/ZUGFeRD1_EXTENDED_Warenrechnung.xml
@@ -0,0 +1,520 @@
+
+
+
+
+
+ true
+
+ urn:ferd:CrossIndustryDocument:invoice:1p0:extended
+
+
+
+ R87654321012345
+ WARENRECHNUNG
+ 380
+
+ 20130806
+
+
+ ST3
+ Es bestehen Rabatt- oder Bonusvereinbarungen.
+ AAK
+
+
+ EEV
+ Der Verkäufer bleibt Eigentümer der Waren bis zu vollständigen Erfüllung der Kaufpreisforderung.
+ AAJ
+
+
+ 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
+ REG
+
+
+ Leergutwert: 46,50
+
+
+
+
+
+ 549910
+ 4333741000005
+ MUSTERLIEFERANT GMBH
+
+
+ +49 932 431 500
+
+
+ max.mustermann@musterlieferant.de
+
+
+
+ 99199
+ BAHNHOFSTRASSE 99
+ MUSTERHAUSEN
+ DE
+
+
+ DE123456789
+
+
+
+ 009420
+ 4304171000002
+ MUSTER-KUNDE GMBH
+
+ 40235
+ KUNDENWEG 88
+ DUESSELDORF
+ DE
+
+
+
+ 2013-08-01T00:00:00
+ B123456789
+
+
+ 2013-08-02T00:00:00
+ VN
+ A456123
+
+
+
+
+ 4304171088093
+ MUSTER-MARKT
+
+ 8211
+
+
+ 31157
+ HAUPTSTRASSE 44
+ SARSTEDT
+ DE
+
+
+
+
+ 20130805
+
+
+
+ 2013-08-05T00:00:00
+ L87654321012345
+
+
+
+ EUR
+
+ 009420
+ 4304171000002
+ MUSTER-KUNDE GMBH
+
+ 40235
+ KUNDENWEG 88
+ DUESSELDORF
+ DE
+
+
+
+ 61.07
+ VAT
+ 321.40
+ 326.50
+ -5.10
+ S
+ 19.00
+
+
+ 8.93
+ VAT
+ 127.59
+ 130.70
+ -3.11
+ S
+ 7.00
+
+
+ false
+ 2.00
+ 280.00
+ 5.60
+ Rechnungsrabatt 1
+
+ VAT
+ S
+ 19.00
+
+
+
+ false
+ 2.00
+ 130.70
+ 2.61
+ Rechnungsrabatt 1
+
+ VAT
+ S
+ 7.00
+
+
+
+ false
+ 280.00
+ 2.50
+ Rechnungsrabatt 2
+
+ VAT
+ S
+ 19.00
+
+
+
+ false
+ 130.70
+ 0.50
+ Rechnungsrabatt 2
+
+ VAT
+ S
+ 7.00
+
+
+
+ Transportkosten
+ 3.00
+
+ VAT
+ S
+ 19.00
+
+
+
+ Bei Zahlung innerhalb 14 Tagen gewähren wir 2,0% Skonto.
+
+ 14
+ 2.00
+
+
+
+ 457.20
+ 3.00
+ 11.21
+ 448.99
+ 70.00
+ 518.99
+ 0.00
+ 518.99
+
+
+
+
+
+ Wichtige Information: Bei Bestellungen bis zum 19.12. ist die Auslieferung bis spätestens 23.12. garantiert.
+
+
+
+
+
+
+
+
+ 1.0000
+
+
+ 1.0000
+
+
+
+ 100.0000
+ 4.0000
+
+
+
+ VAT
+ S
+ 19.00
+
+
+ 100.00
+
+
+
+ 4123456000014
+ ZS997
+ Zitronensäure 100ml
+
+ PACKAGING_TYPE
+ Verpackungsart
+ BO
+
+
+
+
+
+
+
+ 1.5000
+
+ false
+ 2.00
+ 1.5000
+ 0.0300
+ Artikelrabatt 1
+
+
+ false
+ 1
+ 0.0200
+ Artikelrabatt 2
+
+
+
+ 1.4500
+
+
+
+ 50.0000
+ 1.0000
+
+
+
+ VAT
+ S
+ 7.00
+
+
+ 72.50
+
+
+
+ 4123456000021
+ GZ250
+ Gelierzucker Extra 250g
+
+
+
+
+
+
+ 0.0000
+
+
+ 0.0000
+
+
+
+ 10.0000
+ 1.0000
+
+
+
+ VAT
+ S
+ 7.00
+
+
+ 0.00
+
+
+
+ 4123456000021
+ GZ250
+ Gelierzucker Extra 250g
+ Artikel wie vereinbart ohne Berechnung
+
+
+
+
+
+ Öko-Kontroll-Nr.: DE-BW-006-987654321054
+ AAY
+
+
+
+
+ 12.0000
+
+
+ 12.0000
+
+
+
+ 15.0000
+ 20.0000
+
+
+
+ VAT
+ S
+ 19.00
+
+
+ 180.00
+
+
+
+ 4100130013294
+ 2031
+ K4321
+ Bierbrau Pils 20/0500
+ EAN-VKE: 4100130913297
+
+ PACKAGING_MATERIAL
+ Verpackung
+ Kiste
+
+
+
+
+
+
+
+ 3.1000
+
+
+ 3.1000
+
+
+
+ 15.0000
+ 1.0000
+
+
+
+ VAT
+ S
+ 19.00
+
+
+ 46.50
+
+
+
+ 2001015001325
+ 1805
+ K4322
+ Leergutpfand 20 x 0,5l
+
+ PACKAGING_MATERIAL
+ Verpackung
+ unverpackt
+
+
+
+
+
+
+
+ 30.0000
+
+ false
+ 3.00
+ 30.0000
+ 0.9000
+ Artikelrabatt 1
+
+
+
+ 29.1000
+
+
+
+ 2.0000
+ 1.0000
+
+
+
+ VAT
+ S
+ 7.00
+
+
+ 58.20
+
+
+
+ 4123456000038
+ MP107
+ Mischpalette Joghurt Karton 3 x 20
+
+ PACKAGING_MATERIAL
+ Verpackung
+ Karton
+
+
+ 4123456001035
+ JOG103
+ Erdbeer 20 x 150g Becher
+ 20.0000
+
+
+ 4123456002032
+ JOG203
+ Banane 20 x 150g Becher
+ 20.0000
+
+
+ 4123456003039
+ JOG303
+ Schoko 20 x 150g Becher
+ 20.0000
+
+
+
+
+
diff --git a/src/test/resources/migration/reference/ZUGFeRD2-invoice-adjusted.xml b/src/test/resources/migration/reference/ZUGFeRD2-invoice-adjusted.xml
new file mode 100644
index 00000000..bb9ba7a4
--- /dev/null
+++ b/src/test/resources/migration/reference/ZUGFeRD2-invoice-adjusted.xml
@@ -0,0 +1,219 @@
+
+
+
+
+ false
+
+
+ urn:ferd:CrossIndustryDocument:invoice:1p0:extended
+
+
+
+ RE-20170509/506
+ RECHNUNG2
+ 380
+
+ 20170510
+
+
+
+
+
+ 1
+
+
+ Künstlerische Gestaltung (Stunde): Einer weiteren Beispielrechnung
+
+
+
+
+ 160.0000
+ 1.0000
+
+
+ 160.0000
+ 1.0000
+
+
+
+ 1.0000
+
+
+
+ VAT
+ S
+ 7.00
+
+
+ 160.00
+
+
+
+
+
+ 2
+
+
+ Luftballon: Bunt, ca. 500ml
+
+
+
+
+ 0.7900
+ 1.0000
+
+
+ 0.7900
+ 1.0000
+
+
+
+ 400.0000
+
+
+
+ VAT
+ S
+ 19.00
+
+
+ 316.00
+
+
+
+
+
+ 3
+
+
+ Heiße Luft pro Liter
+
+
+
+
+ 0.1000
+ 1.0000
+
+
+ 0.1000
+ 1.0000
+
+
+
+ 200.0000
+
+
+
+ VAT
+ S
+ 19.00
+
+
+ 20.00
+
+
+
+
+
+ Bei Spiel GmbH
+
+ 12345
+ Ecke 12
+ Stadthausen
+ DE
+
+
+ 22/815/0815/4
+
+
+ DE136695976
+
+
+
+ Theodor Est
+
+ 88802
+ Bahnstr. 42
+ Spielkreis
+ DE
+
+
+ DE999999999
+
+
+
+
+
+
+ 20170507
+
+
+
+
+ RE-20170509/505
+ EUR
+
+ 42
+ Überweisung
+
+ DE88 2008 0000 0970 3757 00
+ 44421800
+
+
+ COBADEFFXXX
+ 41441604
+ Commerzbank
+
+
+
+ 11.20
+ VAT
+ 160.00
+ S
+ 7.00
+
+
+ 63.84
+ VAT
+ 336.00
+ S
+ 19.00
+
+
+ Zahlbar ohne Abzug bis zum 30.05.2017
+
+ 20170530
+
+
+
+ 496.00
+ 0.00
+ 0.00
+ 496.00
+ 75.04
+ 571.04
+ 571.04
+
+
+
+
diff --git a/src/test/resources/migration/reference/ZUGFeRD2-invoice.xml b/src/test/resources/migration/reference/ZUGFeRD2-invoice.xml
index b0a390e8..cbaf1829 100644
--- a/src/test/resources/migration/reference/ZUGFeRD2-invoice.xml
+++ b/src/test/resources/migration/reference/ZUGFeRD2-invoice.xml
@@ -28,7 +28,7 @@
urn:ferd:CrossIndustryDocument:invoice:1p0:extended
-
+
RE-20170509/505
RECHNUNG
380
@@ -36,7 +36,7 @@
20170509
-
+
1
diff --git a/src/test/resources/migration/reference/ZUGFeRD2_COMFORT_Einfach.xml b/src/test/resources/migration/reference/ZUGFeRD2_COMFORT_Einfach.xml
new file mode 100644
index 00000000..250b7565
--- /dev/null
+++ b/src/test/resources/migration/reference/ZUGFeRD2_COMFORT_Einfach.xml
@@ -0,0 +1,229 @@
+
+
+
+
+ true
+
+
+
+ urn:ferd:CrossIndustryDocument:invoice:1p0:comfort
+
+
+
+ 471102
+ RECHNUNG
+ 380
+
+ 20130305
+
+
+ Rechnung gemäß Bestellung vom 01.03.2013.
+
+
+ Lieferant GmbH
+Lieferantenstraße 20
+80333 München
+Deutschland
+Geschäftsführer: Hans Muster
+Handelsregisternummer: H A 123
+
+ REG
+
+
+
+
+
+ 1
+
+
+ 4012345001235
+ TB100A4
+ Trennblätter A4
+
+
+
+ 9.9000
+
+
+ 9.9000
+
+
+
+ 20.0000
+
+
+
+ VAT
+ S
+ 19.00
+
+
+ 198.00
+
+
+
+
+
+ 2
+
+
+ 4000050986428
+ ARNR2
+ Joghurt Banane
+
+
+
+ 5.5000
+
+
+ 5.5000
+
+
+
+ 50.0000
+
+
+
+ VAT
+ S
+ 7.00
+
+
+ 275.00
+
+
+
+
+
+ 4000001123452
+ Lieferant GmbH
+
+ 80333
+ Lieferantenstraße 20
+ München
+ DE
+
+
+ 201/113/40209
+
+
+ DE123456789
+
+
+
+ GE2020211
+ 4000001987658
+ Kunden AG Mitte
+
+ Hans Muster
+
+
+ 69876
+ Kundenstraße 15
+ Frankfurt
+ DE
+
+
+
+
+
+
+ 20130305
+
+
+
+
+ 2013-471102
+ EUR
+
+ 31
+ Überweisung
+
+ DE08700901001234567890
+
+
+ GENODEF1M04
+
+
+
+ 19.25
+ VAT
+ 275.00
+ S
+ 7.00
+
+
+ 37.62
+ VAT
+ 198.00
+ S
+ 19.00
+
+
+ Zahlbar innerhalb 30 Tagen netto bis 04.04.2013, 3% Skonto innerhalb 10 Tagen bis 15.03.2013
+
+ 20130404
+
+
+
+ 473.00
+ 0.00
+ 0.00
+ 473.00
+ 56.87
+ 529.87
+ 0.00
+ 529.87
+
+
+
+
diff --git a/src/test/resources/migration/reference/ZUGFeRD2_EXTENDED_Warenrechnung.xml b/src/test/resources/migration/reference/ZUGFeRD2_EXTENDED_Warenrechnung.xml
new file mode 100644
index 00000000..44468bdd
--- /dev/null
+++ b/src/test/resources/migration/reference/ZUGFeRD2_EXTENDED_Warenrechnung.xml
@@ -0,0 +1,546 @@
+
+
+
+
+ true
+
+
+
+ urn:ferd:CrossIndustryDocument:invoice:1p0:extended
+
+
+
+ R87654321012345
+ WARENRECHNUNG
+ 380
+
+ 20130806
+
+
+ ST3
+ Es bestehen Rabatt- oder Bonusvereinbarungen.
+ AAK
+
+
+ EEV
+ Der Verkäufer bleibt Eigentümer der Waren bis zu vollständigen Erfüllung der Kaufpreisforderung.
+ AAJ
+
+
+ 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
+ REG
+
+
+ Leergutwert: 46,50
+
+
+
+
+
+
+ Wichtige Information: Bei Bestellungen bis zum 19.12. ist die Auslieferung bis spätestens 23.12. garantiert.
+
+
+
+
+
+
+
+ 4123456000014
+ ZS997
+ Zitronensäure 100ml
+
+ PACKAGING_TYPE
+ Verpackungsart
+ BO
+
+
+
+
+ 1.0000
+
+
+ 1.0000
+
+
+
+ 100.0000
+ 4.0000
+
+
+
+ VAT
+ S
+ 19.00
+
+
+ 100.00
+
+
+
+
+
+
+ 4123456000021
+ GZ250
+ Gelierzucker Extra 250g
+
+
+
+ 1.5000
+
+
+ false
+
+ 2.00
+ 1.5000
+ 0.0300
+ Artikelrabatt 1
+
+
+
+ false
+
+ 1
+ 0.0200
+ Artikelrabatt 2
+
+
+
+ 1.4500
+
+
+
+ 50.0000
+ 1.0000
+
+
+
+ VAT
+ S
+ 7.00
+
+
+ 72.50
+
+
+
+
+
+
+ 4123456000021
+ GZ250
+ Gelierzucker Extra 250g
+ Artikel wie vereinbart ohne Berechnung
+
+
+
+ 0.0000
+
+
+ 0.0000
+
+
+
+ 10.0000
+ 1.0000
+
+
+
+ VAT
+ S
+ 7.00
+
+
+ 0.00
+
+
+
+
+
+
+ Öko-Kontroll-Nr.: DE-BW-006-987654321054
+ AAY
+
+
+
+ 4100130013294
+ 2031
+ K4321
+ Bierbrau Pils 20/0500
+ EAN-VKE: 4100130913297
+
+ PACKAGING_MATERIAL
+ Verpackung
+ Kiste
+
+
+
+
+ 12.0000
+
+
+ 12.0000
+
+
+
+ 15.0000
+ 20.0000
+
+
+
+ VAT
+ S
+ 19.00
+
+
+ 180.00
+
+
+
+
+
+
+ 2001015001325
+ 1805
+ K4322
+ Leergutpfand 20 x 0,5l
+
+ PACKAGING_MATERIAL
+ Verpackung
+ unverpackt
+
+
+
+
+ 3.1000
+
+
+ 3.1000
+
+
+
+ 15.0000
+ 1.0000
+
+
+
+ VAT
+ S
+ 19.00
+
+
+ 46.50
+
+
+
+
+
+
+ 4123456000038
+ MP107
+ Mischpalette Joghurt Karton 3 x 20
+
+ PACKAGING_MATERIAL
+ Verpackung
+ Karton
+
+
+ 4123456001035
+ JOG103
+ Erdbeer 20 x 150g Becher
+ 20.0000
+
+
+ 4123456002032
+ JOG203
+ Banane 20 x 150g Becher
+ 20.0000
+
+
+ 4123456003039
+ JOG303
+ Schoko 20 x 150g Becher
+ 20.0000
+
+
+
+
+ 30.0000
+
+
+ false
+
+ 3.00
+ 30.0000
+ 0.9000
+ Artikelrabatt 1
+
+
+
+ 29.1000
+
+
+
+ 2.0000
+ 1.0000
+
+
+
+ VAT
+ S
+ 7.00
+
+
+ 58.20
+
+
+
+
+
+ 549910
+ 4333741000005
+ MUSTERLIEFERANT GMBH
+
+
+ +49 932 431 500
+
+
+ max.mustermann@musterlieferant.de
+
+
+
+ 99199
+ BAHNHOFSTRASSE 99
+ MUSTERHAUSEN
+ DE
+
+
+ DE123456789
+
+
+
+ 009420
+ 4304171000002
+ MUSTER-KUNDE GMBH
+
+ 40235
+ KUNDENWEG 88
+ DUESSELDORF
+ DE
+
+
+
+ B123456789
+
+ 2013-08-01T00:00:00
+
+
+
+ A456123
+ VN
+
+ 2013-08-02T00:00:00
+
+
+
+
+
+ 4304171088093
+ MUSTER-MARKT
+
+ 8211
+
+
+ 31157
+ HAUPTSTRASSE 44
+ SARSTEDT
+ DE
+
+
+
+
+ 20130805
+
+
+
+ L87654321012345
+
+ 2013-08-05T00:00:00
+
+
+
+
+ EUR
+
+ 009420
+ 4304171000002
+ MUSTER-KUNDE GMBH
+
+ 40235
+ KUNDENWEG 88
+ DUESSELDORF
+ DE
+
+
+
+ 61.07
+ VAT
+ 321.40
+ 326.50
+ -5.10
+ S
+ 19.00
+
+
+ 8.93
+ VAT
+ 127.59
+ 130.70
+ -3.11
+ S
+ 7.00
+
+
+
+ false
+
+ 2.00
+ 280.00
+ 5.60
+ Rechnungsrabatt 1
+
+ VAT
+ S
+ 19.00
+
+
+
+
+ false
+
+ 2.00
+ 130.70
+ 2.61
+ Rechnungsrabatt 1
+
+ VAT
+ S
+ 7.00
+
+
+
+
+ false
+
+ 280.00
+ 2.50
+ Rechnungsrabatt 2
+
+ VAT
+ S
+ 19.00
+
+
+
+
+ false
+
+ 130.70
+ 0.50
+ Rechnungsrabatt 2
+
+ VAT
+ S
+ 7.00
+
+
+
+ Transportkosten
+ 3.00
+
+ VAT
+ S
+ 19.00
+
+
+
+ Bei Zahlung innerhalb 14 Tagen gewähren wir 2,0% Skonto.
+
+ 14
+ 2.00
+
+
+
+ 457.20
+ 3.00
+ 11.21
+ 448.99
+ 70.00
+ 518.99
+ 0.00
+ 518.99
+
+
+
+