ibr-004
An Invoice MUST have an Invoice type code (ibt-003) / A Credit note MUST have a Credit note Type code (ibt-003).
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
/ubl:Invoice | /cn:CreditNote
normalize-space(cbc:InvoiceTypeCode) !='' or normalize-space(cbc:CreditNoteTypeCode) !=''
Checked with PINT SG Invoice, PINT SG Credit Note, PINT JP Invoice, PINT A-NZ Invoice, PINT A-NZ Credit Note, PINT MY Invoice, PINT MY Credit Note