VRBL-INV-MX-1p0-95

Basic Info

Rule For a Credit Note or Debit Note, the Invoice Document Reference must exist within the Invoice.
Context /ubl:Invoice
Pattern vrbl-invoice-mx-1p0
Severity fatal

Used Template: Exists

Parameter Value
probe = cac:BillingReference/cac:InvoiceDocumentReference

Implementation

(
	not(cbc:InvoiceTypeCode = '381' or cbc:InvoiceTypeCode = '383' or cbc:InvoiceTypeCode = concat($VRBL-MX-Prefix,'E'))
)
or
(
	boolean(cac:BillingReference/cac:InvoiceDocumentReference)
)