VRBL-INV-PH-1p0-35

Basic Info

Rule When the Invoice Subtype Code is POS, the Billing Hardware Serial Number ID must exist within the Invoice.
Context /ubl:Invoice
Pattern vrbl-invoice-ph-1p0
Severity fatal

Used Template: Exists

Parameter Value
probe = cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:InvoiceExtension/vrbl:BillingHardware/cbc:SerialNumberID

Implementation

(
	not(normalize-space(/ubl:Invoice/cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:InvoiceExtension/vrbl:InvoiceSubtypeCode) = 'VRBL:PH:POS')
)
or
(
	boolean(cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:InvoiceExtension/vrbl:BillingHardware/cbc:SerialNumberID)
)