Closed monze closed 6 years ago
Hi! I've made a pull request 9 days ago about this: https://github.com/difi/vefa-ehf-postaward/pull/259
Please provide a use case where cbc:BaseQuantity is expected to be "0".
Same answer as in issue 244.
We have received this document in the production enviroment, from one of our norwegian customers, and we tranmit the document to another of our norwegian customers.
The issue is, that the Schematron validation crash, and thereby don't complete the validation.
Due to this issue (SYSTEM-008) validation cannot ever trigger NONAT-T10-R033 or NONAT-T14-R033.
Please make sure this box is checked before submitting your issue - thank you!
Issues related to PEPPOL BIS or rules part of PEPPOL BIS must be sent to rfc@peppol.eu.
Your issue here: Reported the issue in 244, but the work performed did not resolved the problem. Have just confirmed it used the validator for the upcomming version: https://vefa.difi.no/ehf/standard/ehf-invoice-and-creditnote-2.0.13/
It can be validated by taking a Invoice, and set the value of the xPath to 0 Invoice/cac:InvoiceLine/cac:Price/cbc:BaseQuantity
The issue can be seen in this file https://github.com/difi/vefa-ehf-postaward/blob/master/rules/ehf-invoice-2.0/sch/NONAT-UBL-T10.sch
line 107 and 108
The problem is, that in line 107 the variable 'baseQuantity' get the value of the cbc:BaseQuantity from the document, which is 0. On the next line, the variable 'baseQuantity' (which is 0) is used in a division, which result in a 'Division by zero' exception.
To correct the problem line 107 must be change to something like this:
The problem might also exist for CreditNote.
Jacob Mogensen mySupply ApS Denmark