ibr-136-ae
Buyer legal registration identifier (IBT-047) must be present when Invoice type code [IBT-003] is 'Out of scope of VAT' or 'Credit note related to goods or services'
error: the document is invalid
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.
Context
/ubl:Invoice | /cn:CreditNote
Test
not(cbc:InvoiceTypeCode = "480" or cbc:CreditNoteTypeCode = "81") or exists(cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID)
Checked with PINT UAE Invoice, PINT UAE Credit Note