closes #601
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
595
|
||||||
|
591
|
||||||
|
577
|
||||||
|
575
|
||||||
|
573
|
||||||
|
601
|
||||||
|
|
||||||
2.15.1
|
2.15.1
|
||||||
=======
|
=======
|
||||||
- #566 Failed to parse PDF - Could not reproduce the invoice
|
- #566 Failed to parse PDF - Could not reproduce the invoice
|
||||||
|
|||||||
@@ -51,7 +51,9 @@ public class FileChecker {
|
|||||||
if ((!isPDF) && (!thisRun.shallIgnoreFileExt())) {
|
if ((!isPDF) && (!thisRun.shallIgnoreFileExt())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(filename);
|
ZUGFeRDImporter zi = new ZUGFeRDImporter();
|
||||||
|
zi.doIgnoreCalculationErrors();
|
||||||
|
zi.setPDFFilename(filename);
|
||||||
try {
|
try {
|
||||||
if (zi.canParse()) {
|
if (zi.canParse()) {
|
||||||
thisRun.incZUGFeRDCount(zi.getVersion());
|
thisRun.incZUGFeRDCount(zi.getVersion());
|
||||||
|
|||||||
@@ -106,7 +106,14 @@ public class NodeMap {
|
|||||||
* @return the text content of the matching node, converted to BigDecimal
|
* @return the text content of the matching node, converted to BigDecimal
|
||||||
*/
|
*/
|
||||||
public Optional<BigDecimal> getAsBigDecimal(String... localNames) {
|
public Optional<BigDecimal> getAsBigDecimal(String... localNames) {
|
||||||
return getNode(localNames).map(Node::getTextContent).map(s->new BigDecimal(s.trim()));
|
return getNode(localNames).map(Node::getTextContent).map(s->{
|
||||||
|
try {
|
||||||
|
return new BigDecimal(s.trim());
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user