Closed midran closed 3 years ago
@oriol the "DescriptionCode" element is a requirement from BT-8. You change for 1.3.3 somehow broke InvoicePeriod that contains StartDate, EndDate and DescriptionCode...
@sarafacchinettiIC
Reverting to the previous Xpath as it correctly implemented the rule plus the effect of mapping the DescriptionCode to BT-8.
exists(cbc:StartDate) or exists(cbc:EndDate) or (exists(cbc:DescriptionCode) and not(exists(cbc:StartDate)) and not(exists(cbc:EndDate)))
This checks positive when any of StartDate and EndDate are in the InvoicePeriod and the case where the InvoicePeriod is used just to carry information on the DescriptionCode to support BT-8
Did you test with the example above:
<cac:InvoicePeriod> </cac:InvoicePeriod>
Great thanks :)
The test case might also include as success test
<cac:InvoicePeriod>
<cbc:StartDate>2020-11-01</cbc:StartDate>
<cbc:EndDate>2020-11-30</cbc:EndDate>
<cbc:DescriptionCode>3</cbc:DescriptionCode>
</cac:InvoicePeriod>
Added the test
Requester name Henry Buck PEPPOL member company MBIE PEPPOL Area / components POACC (PostAward) Ex: e-Ordering, e-Invoicing Description
I have been creating test files to trigger the errors when a file fails the tests in the A-NZ schematron. Rule BR-CO-19 is a PEPPOL standard, and the only way I could trigger this error was to have nothing within the invoice period as follows:
The problem may be that the condition is missing parentheses and should read as follows:
Issue orignitated from Peppol https://openpeppol.atlassian.net/browse/PEPPOL-2857