You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently upgraded to org.mustangproject.validator 2.16.3 using maven. I'm not sure if this issue was also part of an earlier version, but I do remember this exception showing up once or twice when I was on an older version aswell (around 2.15 I think)
I encounter the following issue when I import a default PDF from ferd-net.de.
My Download might be a bit older, see XML comment:
Version of the File 2.3.0 - 18.09.2024.
ZUGFeRDImporter importer = new ZUGFeRDImporter(input.getAsInputStream());
and the following exception appears:
14:34:13,755 ERROR [org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter] (Debug-Thread-1) Failed to parse PDF: org.mustangproject.ZUGFeRD.ZUGFeRDExportException: org.mustangproject.Exceptions.ArithmetricException: Could not reproduce the invoice. Payable total in XML is 521.91, but calculated total is 581.41 with tax basis 908.75 and with positions 900.00 = 900.00
at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.setRawXML(ZUGFeRDInvoiceImporter.java:247)
at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.setRawXML(ZUGFeRDInvoiceImporter.java:258)
at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.extractFiles(ZUGFeRDInvoiceImporter.java:219)
at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.extractLowLevel(ZUGFeRDInvoiceImporter.java:154)
at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.setInputStream(ZUGFeRDInvoiceImporter.java:99)
at org.mustangproject.ZUGFeRD.ZUGFeRDInvoiceImporter.(ZUGFeRDInvoiceImporter.java:85)
at org.mustangproject.ZUGFeRD.ZUGFeRDImporter.(ZUGFeRDImporter.java:43)
as this is the last step of importing / parsing the XML, and the Exception is wrapped into a runtime exception, my code still works, as I do not use the Invoice class that could not have be created.
however, when I validate this PDF, I get no validation issues:
Code:
ZUGFeRDValidator validator = new ZUGFeRDValidator();
String validationResultXml = validator.validate(input.getAsInputStream(), config.getFileName());
a calculation issue, or a missed field for this calculation
a validation issue where this calculation is not executed / not checked
the XML in the PDF is actually faulty, and this exception is wanted - but why not part of the validator?
or something in between, or actually expected behavior. I don't know
For me, it would seems logical that if I get an exception for just importing the PDF, I should also get an Exception regarding the validation.
I hope the title and description is good enough, I tried to follow common sense and did not find any open or closed issue mentioning this exact problem. Like I said, maybe the input is actually wrong, but I'm not that familiar with all of the code and electronic invoice standards (yet)
The text was updated successfully, but these errors were encountered:
Hello everyone,
I recently upgraded to org.mustangproject.validator 2.16.3 using maven. I'm not sure if this issue was also part of an earlier version, but I do remember this exception showing up once or twice when I was on an older version aswell (around 2.15 I think)
I encounter the following issue when I import a default PDF from ferd-net.de.
My Download might be a bit older, see XML comment:
Version of the File 2.3.0 - 18.09.2024.
I basically just call
ZUGFeRDImporter importer = new ZUGFeRDImporter(input.getAsInputStream());
and the following exception appears:
as this is the last step of importing / parsing the XML, and the Exception is wrapped into a runtime exception, my code still works, as I do not use the Invoice class that could not have be created.
however, when I validate this PDF, I get no validation issues:
Code:
Result:
So know I'm curious if there is
For me, it would seems logical that if I get an exception for just importing the PDF, I should also get an Exception regarding the validation.
I hope the title and description is good enough, I tried to follow common sense and did not find any open or closed issue mentioning this exact problem. Like I said, maybe the input is actually wrong, but I'm not that familiar with all of the code and electronic invoice standards (yet)
The text was updated successfully, but these errors were encountered: