This commit is contained in:
Jochen Stärk
2018-10-18 12:02:56 +02:00
parent 1534e0c8be
commit 56894a5cb5

View File

@@ -322,8 +322,11 @@ public class ZUGFeRDExporter implements Closeable {
"Invoice metadata conforming to ZUGFeRD standard (http://www.ferd-net.de/front_content.php?idcat=231&lang=4)", "Invoice metadata conforming to ZUGFeRD standard (http://www.ferd-net.de/front_content.php?idcat=231&lang=4)",
"text/xml", xmlProvider.getXML()); "text/xml", xmlProvider.getXML());
if (ZFVersion>1) { if ((ZFVersion>1)&&(trans!=null)) {
// Also attach a ZF1 file for backward compatibility /*
* Also attach a ZF1 file for backward compatibility, but only in case
* if we do not e.g. embed custom XML (in which case, if its v2, the v1 provider won't be able to deliver data)
*/
setZUGFeRDVersion(1); setZUGFeRDVersion(1);
xmlProvider.generateXML(trans); xmlProvider.generateXML(trans);
filename = getFilenameForVersion(ZFVersion); filename = getFilenameForVersion(ZFVersion);
@@ -331,6 +334,7 @@ public class ZUGFeRDExporter implements Closeable {
"Invoice metadata conforming to ZUGFeRD standard (http://www.ferd-net.de/front_content.php?idcat=231&lang=4)", "Invoice metadata conforming to ZUGFeRD standard (http://www.ferd-net.de/front_content.php?idcat=231&lang=4)",
"text/xml", xmlProvider.getXML()); "text/xml", xmlProvider.getXML());
} }
} }