I have tried to validate a credit note using SDK toolkit. We received the below error stating:
Schema validation failed; XML does not comply with UBL 2.1 standards in line with ZATCA specifications. ERROR: org.xml.sax.SAXParseException; lineNumber: 78; columnNumber: 24; cvc-complex-type.2.4.a: Invalid content was found starting with element ‘{“urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2”:InstructionNote}’. One of ‘{“urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2”:ID, “urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2”:PaymentMeansCode}’ is expected.
On adding the Payment means type code field along with a value in the XML file it successfully validates.
However, we understand that the Payment means type code is an optional field. Why are we still receiving this error?
Request you to kindly assist.