From 2edcec3f9494ef31e6650f068c54f2769032089f Mon Sep 17 00:00:00 2001 From: jstaerk Date: Wed, 13 Sep 2023 13:26:54 +0200 Subject: [PATCH] doc corrections --- .../ZUGFeRD/ZUGFeRDExporterFromA3.java | 1 + .../ZUGFeRD/ZUGFeRDInvoiceImporter.java | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3.java index 0a0099e9..eb4dbcfb 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3.java @@ -789,6 +789,7 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte /** * Adds an OutputIntent and the sRGB color profile if no OutputIntent exist + * @throws IOException if the ICC file cannot be read or attached to doc */ protected void addSRGBOutputIntend() throws IOException diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java index 8a7884dd..6c939908 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDInvoiceImporter.java @@ -57,6 +57,14 @@ public class ZUGFeRDInvoiceImporter extends ZUGFeRDImporter { } } + + /*** + * This will parse a XML into the given invoice object + * @param zpp the invoice to be altered + * @return the parsed invoice object + * @throws XPathExpressionException if xpath could not be evaluated + * @throws ParseException if the grand total of the parsed invoice could not be replicated with the new invoice + */ public Invoice extractInto(Invoice zpp) throws XPathExpressionException, ParseException { String number = ""; @@ -357,6 +365,8 @@ public class ZUGFeRDInvoiceImporter extends ZUGFeRDImporter { * This will parse a XML into a invoice object * * @return the parsed invoice object + * @throws XPathExpressionException if internal xpath expressions were wrong + * @throws ParseException if the grand total of the parsed invoice could not be replicated with the new invoice */ public Invoice extractInvoice() throws XPathExpressionException, ParseException { Invoice i = new Invoice(); @@ -365,10 +375,17 @@ public class ZUGFeRDInvoiceImporter extends ZUGFeRDImporter { } + /*** + * have the item prices be determined from the line total. + * That's a workaround for some invoices which just put 0 as item price + */ public void doRecalculateItemPricesFromLineTotals() { recalcPrice = true; } + /*** + * do not raise ParseExceptions even if the reproduced invoice total does not match the given value + */ public void doIgnoreCalculationErrors() { ignoreCalculationErrors = true; }