ibr-158-ae
Where the Invoice type code [IBT-003] is 'Credit note', Credit note reason code [BTAE-03] MUST be there .
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
not((cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode) = "381" and not(exists(cac:DiscrepancyResponse/cbc:ResponseCode)))
Checked with PINT UAE Invoice, PINT UAE Credit Note, PINT UAE Self-Billing Invoice, PINT UAE Self-Billing Credit Note