VRBL-INV-DK-1p0-23

Basic Info

Rule The Payee Financial Account ID is mandatory and MUST start with 01#, 04# or 15# (Kortartkode), and Payee Financial Account ID (Giro kontonummer) is mandatory and must be 7 characters long, when Payment Means Code equals 50 (Giro)
Context /ubl:Invoice/cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID
Pattern vrbl-invoice-dk-1p0
Severity fatal

Implementation

not($DKSupplierCountry = 'DK')
or
not(normalize-space(../../cbc:PaymentMeansCode) = '50')
or
(
	(
		substring(normalize-space(../../cbc:PaymentID), 1, 2) = '01'
		or
		substring(normalize-space(../../cbc:PaymentID), 1, 2) = '04'
		or
		substring(normalize-space(../../cbc:PaymentID), 1, 2) = '15'
	)
	and 
	string-length(normalize-space(.)) = 7
)