corrected ZF2 version number in RDF metadata

This commit is contained in:
Jochen Stärk
2019-10-17 19:49:40 +02:00
parent 01dbff93b5
commit 60156b1561
3 changed files with 9 additions and 3 deletions

View File

@@ -5,6 +5,8 @@
- support Sepa Direct Debit
- closes #134 ZUGFeRD2PullProvider uses NetPrice for GrossPrice
- support intra community supply (=vat category codes)
- Support different Date formats #136
- corrected RDF metadata for ZF2
1.7.4
=====

View File

@@ -39,7 +39,7 @@ public class XMPSchemaZugferd extends XMPSchema {
* @param prefix the xml namespace prefix for the XMP, zf for ZUGFeRD, fx for Factur-X
* @param filename the filename of the invoice
*/
public XMPSchemaZugferd(XMPMetadata metadata, ZUGFeRDConformanceLevel conformanceLevel, String URN, String prefix, String filename) {
public XMPSchemaZugferd(XMPMetadata metadata, int zfVersion, boolean isFacturX, ZUGFeRDConformanceLevel conformanceLevel, String URN, String prefix, String filename) {
super(metadata, URN, prefix, "ZUGFeRD Schema");
setAboutAsSimple("");
@@ -53,6 +53,10 @@ public class XMPSchemaZugferd extends XMPSchema {
setTextPropertyValue("ConformanceLevel", conformanceLevelValue);
setTextPropertyValue("DocumentType", "INVOICE");
setTextPropertyValue("DocumentFileName", filename);
setTextPropertyValue("Version", "1.0");
String version="1.0";
if ((zfVersion==2)&&(!isFacturX)) {
version="2p0";
}
setTextPropertyValue("Version", version);
}
}

View File

@@ -584,7 +584,7 @@ public class ZUGFeRDExporter implements Closeable {
protected void addXMP(XMPMetadata metadata) {
if (attachZUGFeRDHeaders) {
XMPSchemaZugferd zf = new XMPSchemaZugferd(metadata, profile,
XMPSchemaZugferd zf = new XMPSchemaZugferd(metadata, ZFVersion, isFacturX, profile,
getNamespaceForVersion(ZFVersion), getPrefixForVersion(ZFVersion),
getFilenameForVersion(ZFVersion));