closes #555
This commit is contained in:
@@ -54,15 +54,6 @@ public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter {
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* Wrapper for protected method extractString
|
||||
* @param xpathStr the xpath expression to be evaluated
|
||||
* @return the extracted String for the specific path in the document
|
||||
*/
|
||||
public String wExtractString(String xpathStr) {
|
||||
return extractString(xpathStr);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ import org.apache.pdfbox.pdmodel.common.PDNameTreeNode;
|
||||
import org.apache.pdfbox.pdmodel.common.filespecification.PDComplexFileSpecification;
|
||||
import org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile;
|
||||
import org.mustangproject.*;
|
||||
import org.mustangproject.Exceptions.ArithmetricException;
|
||||
import org.mustangproject.Exceptions.StructureException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.w3c.dom.Document;
|
||||
@@ -701,15 +703,13 @@ public class ZUGFeRDInvoiceImporter {
|
||||
try {
|
||||
whichType = getStandard();
|
||||
} catch (Exception e) {
|
||||
throw new ParseException("Could not find out if it's an invoice, order, or delivery advice", 0);
|
||||
|
||||
throw new StructureException("Could not find out if it's an invoice, order, or delivery advice", 0);
|
||||
}
|
||||
|
||||
if ((whichType != EStandard.despatchadvice)
|
||||
&& ((!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", 0);
|
||||
throw new ArithmetricException();
|
||||
}
|
||||
}
|
||||
return zpp;
|
||||
|
||||
Reference in New Issue
Block a user