Message

Coded allowance reasons MUST belong to the UNCL 5189 code list

Context
cac:AllowanceCharge[cbc:ChargeIndicator = false()]/cbc:AllowanceChargeReasonCode
Test
((not(contains(normalize-space(.), ' ')) and contains(' 41 42 60 62 63 64 65 66 67 68 70 71 88 95 100 102 103 104 105 ', concat(' ', normalize-space(.), ' '))))
Usage
/ ubl:Invoice / cac:AllowanceCharge / cbc:AllowanceChargeReasonCode
/ ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:AllowanceChargeReasonCode
/ ubl:CreditNote / cac:AllowanceCharge / cbc:AllowanceChargeReasonCode
/ ubl:CreditNote / cac:CreditNoteLine / cac:AllowanceCharge / cbc:AllowanceChargeReasonCode