VRBL-INV-SYSTEM-7

Basic Info

Rule If there is a value for Seller Tax ID used as DUNS, the allowed maximum number of characters is 100.
Context /ubl:Invoice
Pattern vrbl-invoice-system
Severity fatal

Used Template: SystemLengthLimit

Parameter Value
probe = cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID='DUNS']/cbc:CompanyID
displayName_probe = %{cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID} used as DUNS
length = 100

Implementation

not(boolean(cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID='DUNS']/cbc:CompanyID))
or
string-length(normalize-space((cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID='DUNS']/cbc:CompanyID)[1])) <= 100