VRBL-INV-BE-1p0-11
Basic Info
|
Rule
|
If the Tax Representative Tax Company ID is marked as a Belgian Enterprise Number, it must be 10 digits, with the last 2 digits being the check-digits for the previous 8 digits. |
|
Context
|
/ubl:Invoice/cac:TaxRepresentativeParty/cac:PartyTaxScheme/cbc:CompanyID
|
|
Pattern
|
vrbl-invoice-be-1p0 |
|
Severity
|
fatal |
Used Template: VRBL-BE-schemeID-0208
Implementation
not(@schemeID = '0208')
or
(
string-length(translate(normalize-space(.), $Numerics, '')) = 0
and
string-length(normalize-space(.)) = 10
and
format-number(97 - (number(substring(normalize-space(.), 1, 8)) mod 97), '00') = substring(normalize-space(.), 9, 2)
)