# ibr-158-ae

Source: https://xmlvalid.com/rules/ibr-158-ae

> Where the Invoice type code [IBT-003] is 'Credit note', Credit note reason code [BTAE-03] MUST be there .

- Level: error
- Rule sets: PINT AE rules (United Arab Emirates) 1.0.4
- Context: `/ubl:Invoice | /cn:CreditNote`
- Test: `not((cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode) = "381" and not(exists(cac:DiscrepancyResponse/cbc:ResponseCode)))`

Validate a document against these rules: https://xmlvalid.com/validate
