VRBL-INV-HR-CIUS-1p0-16

Basic Info

Rule The Invoice Line Order Reference Number and the Order Reference Number cannot coexist, either one of them or neither.
Context /ubl:Invoice/cac:InvoiceLine
Pattern vrbl-invoice-hr-cius-1p0
Severity fatal

Implementation

(
	boolean(cac:OrderLineReference/cac:OrderReference/cbc:ID)
	and
	not(boolean(/ubl:Invoice/cac:OrderReference/cbc:ID))
)
or
(
	boolean(/ubl:Invoice/cac:OrderReference/cbc:ID)
	and
	not(boolean(cac:OrderLineReference/cac:OrderReference/cbc:ID))
)
or
(
	not(boolean(cac:OrderLineReference/cac:OrderReference/cbc:ID))
	and
	not(boolean(/ubl:Invoice/cac:OrderReference/cbc:ID))
)