From 3675894dc575a784c08c75befad4872efe845b28 Mon Sep 17 00:00:00 2001 From: jstaerk Date: Fri, 25 Oct 2024 14:17:22 +0200 Subject: [PATCH] closes #523 --- History.md | 5 +++-- .../java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java | 2 +- .../org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java | 2 +- library/src/main/resources/stylesheets/xr-pdf.xsl | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/History.md b/History.md index beee2fe5..93461378 100644 --- a/History.md +++ b/History.md @@ -4,10 +4,11 @@ - 435 use invoiceimporter as common technical basis also for zugferdimporter - also import delivery address - 527 metrics raises errors -- 517 -- 380 +- 517 read product GlobalID +- 380 Added test for input stream validation - 518 corrently validate more XRechnung versions - make document charges and allowances serializable +- 523 2.14.2 diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java index d1dca813..e9c5f712 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java @@ -717,7 +717,7 @@ public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter { SchemedID globalId = new SchemedID() .setScheme(node.getAttributes() .getNamedItem("schemeID").getNodeValue()) - .setId(getNodeValue(node)); + .setId(XMLTools.getNodeValue(node)); lineItem.getProduct().addGlobalID(globalId); } node = getNodeByName(nn.getChildNodes(), "SellerAssignedID"); diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java index d599b023..ff8093ec 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java @@ -704,7 +704,7 @@ public class ZUGFeRDInvoiceImporter { && ((!expectedStringTotalGross.equals(XMLTools.nDigitFormat(expectedGrandTotal, 2))) && (!ignoreCalculationErrors))) { throw new ParseException( - "Could not reproduce the invoice, this could mean that it could not be read properly exp "+expectedStringTotalGross+" is "+XMLTools.nDigitFormat(expectedGrandTotal, 2), 0); + "Could not reproduce the invoice, this could mean that it could not be read properly", 0); } } return zpp; diff --git a/library/src/main/resources/stylesheets/xr-pdf.xsl b/library/src/main/resources/stylesheets/xr-pdf.xsl index 153dba41..406e4044 100644 --- a/library/src/main/resources/stylesheets/xr-pdf.xsl +++ b/library/src/main/resources/stylesheets/xr-pdf.xsl @@ -64,7 +64,7 @@ - +