VRBL-INV-TR-1p2-26

Basic Info

Rule The value of the Seller Party ID Scheme ID must be contained in Alıcı/Satıcı Numarası (PartyIdentification) [VRBL-CL-TR-PartyIdentificationIDType] (prefixed by 'VRBL:TR:').
Context /ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID
Pattern vrbl-invoice-tr-1p2
Severity fatal

Used Template: CodeList

Parameter Value
probe = @schemeID
codeList = $VRBL-TR-Prefix:$VRBL-CL-TR-PartyIdentificationIDType

Implementation

not(boolean(@schemeID))
or
(
	(
		substring(normalize-space(@schemeID), 1, string-length($VRBL-TR-Prefix)) = $VRBL-TR-Prefix
		and
		not(
			contains(
				substring-after(normalize-space(@schemeID), $VRBL-TR-Prefix),
				substring($VRBL-CL-TR-PartyIdentificationIDType, 1, 1)
			)
		)
		and
		contains(
			$VRBL-CL-TR-PartyIdentificationIDType,
			concat(
				substring($VRBL-CL-TR-PartyIdentificationIDType, 1, 1),
				substring-after(normalize-space(@schemeID), $VRBL-TR-Prefix),
				substring($VRBL-CL-TR-PartyIdentificationIDType, 1, 1)
			)
		)
	)
)