VRBL-INV-RS-1p0-9

Basic Info

Rule The Seller Party Legal Entity Registration Name and Seller Legal Registration ID must be provided. The Seller Legal Registration ID must be 8 digits.
Context /ubl:Invoice/cac:AccountingSupplierParty
Pattern vrbl-invoice-rs-1p0
Severity fatal

Implementation

not($RSSupplierCountry = 'RS')
or
(
	boolean(cac:Party/cac:PartyLegalEntity/cbc:RegistrationName)
	and
	boolean(cac:Party/cac:PartyLegalEntity/cbc:CompanyID)
	and
	string-length(cac:Party/cac:PartyLegalEntity/cbc:CompanyID) = 8
	and
	string-length(translate(cac:Party/cac:PartyLegalEntity/cbc:CompanyID, $Numerics, '')) = 0
)