closes #926
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
- added JSONIgnore for Products intra community supply, reverse charge and invoice's isValid (which rather means isComplete, by the way)
|
- added JSONIgnore for Products intra community supply, reverse charge and invoice's isValid (which rather means isComplete, by the way)
|
||||||
- #917
|
- #917
|
||||||
|
- #915
|
||||||
|
- #921
|
||||||
|
- #926
|
||||||
|
-
|
||||||
2.19.0
|
2.19.0
|
||||||
=======
|
=======
|
||||||
2025-08-12
|
2025-08-12
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ public class ValidationContext {
|
|||||||
private String profile = null;
|
private String profile = null;
|
||||||
private String signature = null;
|
private String signature = null;
|
||||||
private boolean isValid = true;
|
private boolean isValid = true;
|
||||||
|
private boolean hasPDF = false;
|
||||||
protected Logger logger;
|
protected Logger logger;
|
||||||
private String filename;
|
private String filename;
|
||||||
|
|
||||||
@@ -22,6 +23,14 @@ public class ValidationContext {
|
|||||||
results = new Vector<>();
|
results = new Vector<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setHasPDF() {
|
||||||
|
hasPDF=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasPDF() {
|
||||||
|
return hasPDF;
|
||||||
|
}
|
||||||
|
|
||||||
public void addResultItem(ValidationResultItem vr) throws IrrecoverableValidationError {
|
public void addResultItem(ValidationResultItem vr) throws IrrecoverableValidationError {
|
||||||
results.add(vr);
|
results.add(vr);
|
||||||
|
|
||||||
|
|||||||
@@ -374,6 +374,14 @@ public class XMLValidator extends Validator {
|
|||||||
addUnsupportedProfileResultItem();
|
addUnsupportedProfileResultItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// no CII -> has to be UBL
|
||||||
|
if (context.hasPDF()) {
|
||||||
|
final ValidationResultItem vri = new ValidationResultItem(ESeverity.error, "Factur-X/ZUGFeRD and Order-X are always strictly CII only, no UBL allowed.").setSection(17)
|
||||||
|
.setPart(EPart.fx);
|
||||||
|
context.addResultItem(vri);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xsltFilename != null) {
|
if (xsltFilename != null) {
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ public class ZUGFeRDValidator {
|
|||||||
// Avoid reading again from file
|
// Avoid reading again from file
|
||||||
pdfv.setFilenameAndContents(contextFilename, content);
|
pdfv.setFilenameAndContents(contextFilename, content);
|
||||||
|
|
||||||
|
context.setHasPDF();
|
||||||
optionsRecognized = true;
|
optionsRecognized = true;
|
||||||
finalStringResult.append("<pdf>");
|
finalStringResult.append("<pdf>");
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user