DT-CIUS-PT-079.2
The BT-81 must be coded using UNCL4461 code list or the following values: CC, CD, CH, CI, CO, CS, DE, LC, MB, NU, OU, PR, TB, TR.
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/cac:PaymentMeans/cbc:PaymentMeansCode | //cn:CreditNote/cac:PaymentMeans/cbc:PaymentMeansCode
not(starts-with(normalize-space(.),'#ENTITY@ATMPAYMENT#')) and (contains(normalize-space(.),' ') or not(contains( ' 30 48 49 57 58 59 CC CD CH CI CO CS DE LC MB NU OU PR TB TR ',concat(' ',normalize-space(.),' '))))
Checked with Portugal CIUS-PT Invoice (UBL), Portugal CIUS-PT Credit Note (UBL)