Rules
VRBL-DET-PL-2
Basic Info
| Rule | The Statement %{cbc:UUID} MUST be a valid 35-character Collective Identifier (e.g., 9999999999-IZ202602-FFFFFFFFFFFF-FF). |
| Context |
/ubl:Statement/cac:StatementLine
|
| Pattern | vrbl-statement-pl-invoicedetailsrequest-1p0 |
| Severity | fatal |
Implementation
cbc:UUID
and string-length(cbc:UUID) = 35
and translate(substring(cbc:UUID, 1, 10), $Numerics, '') = ''
and substring(cbc:UUID, 11, 1) = '-'
and substring(cbc:UUID, 12, 2) = 'IZ'
and translate(substring(cbc:UUID, 14, 6), $Numerics, '') = ''
and number(substring(cbc:UUID, 14, 4)) >= 2020
and number(substring(cbc:UUID, 18, 2)) >= 1
and number(substring(cbc:UUID, 18, 2)) <= 12
and substring(cbc:UUID, 20, 1) = '-'
and translate(substring(cbc:UUID, 21, 12), concat($AlphabetLowerCase, $AlphaNumerics), '') = ''
and substring(cbc:UUID, 33, 1) = '-'
and translate(substring(cbc:UUID, 34, 2), concat($AlphabetLowerCase, $AlphaNumerics), '') = ''