Rules / IBR-004
An Invoice must have an Invoice type code / A Credit note must have a Credit note Type code
An Invoice must have an Invoice type code (ibt-003) / A Credit note must have a Credit note Type code (ibt-003).
Fails when this is false
normalize-space(cbc:InvoiceTypeCode) !='' or normalize-space(cbc:CreditNoteTypeCode) !=''The schematron test, verbatim. Context: /ubl:Invoice | /cn:CreditNote
Fix
Change the data so the condition below holds. It reads cbc:CreditNoteTypeCode, cbc:InvoiceTypeCode. Paste the invoice into the validator to see the exact element that fails.