diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java index 184aefce..739b313e 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java @@ -78,13 +78,6 @@ public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter { - /*** - * do not raise ParseExceptions even if the reproduced invoice total does not match the given value - */ - public void doIgnoreCalculationErrors() { - ignoreCalculationErrors = true; - } - //////////////////////////////////// /** @@ -435,7 +428,7 @@ public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter { * @return the Issue Date() */ public String getIssueDate() { - SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMdd"); return sdf.format(importedInvoice.getIssueDate()); } diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java index 344184c4..c86741b6 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java @@ -183,6 +183,14 @@ public class ZUGFeRDInvoiceImporter { } + /*** + * do not raise ParseExceptions even if the reproduced invoice total does not match the given value + */ + public void doIgnoreCalculationErrors() { + ignoreCalculationErrors = true; + } + + /*** * sets th pdf attachments, and if a file is recognized (e.g. a factur-x.xml) triggers processing * @param names the Hashmap of String, PDComplexFileSpecification diff --git a/library/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterTest.java b/library/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterTest.java index 5cec1518..b7fbede6 100644 --- a/library/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterTest.java +++ b/library/src/test/java/org/mustangproject/ZUGFeRD/MustangReaderWriterTest.java @@ -216,6 +216,7 @@ public class MustangReaderWriterTest extends MustangReaderTestCase { InputStream inputStream = this.getClass().getResourceAsStream("/zugferd_invoice.pdf"); ZUGFeRDImporter zi = new ZUGFeRDImporter(); zi.doRecalculateItemPricesFromLineTotals(); + zi.doIgnoreCalculationErrors(); zi.setInputStream(inputStream); // Reading ZUGFeRD String amount = zi.getAmount();