Rules
VRBL-INV-DK-1p0-12
Basic Info
| Rule | If the Buyer Tax ID is marked as a Danish DIGSTORG, it must consist of an optional "DK" prefix, followed by 8 digits. |
| Context |
/ubl:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID
|
| Pattern | vrbl-invoice-dk-1p0 |
| Severity | fatal |
Used Template: VRBL-DK-schemeID-0184
Implementation
not(@schemeID = '0184')
or
(
string-length(normalize-space(.)) = 10
and
substring(normalize-space(.), 1, 2) = 'DK'
and
string-length(translate(substring(normalize-space(.), 3, 8), $Numerics, '')) = 0
)
or
(
string-length(normalize-space(.)) = 8
and
string-length(translate(normalize-space(.), $Numerics, '')) = 0
)