VRBL-INV-MY-1p0-3

Basic Info

Rule When Invoice Type Code is a credit note, the Invoice Document Reference ID must exist within the Invoice.
Context /ubl:Invoice
Pattern vrbl-invoice-my-1p0
Severity fatal

Used Template: Exists

Parameter Value
probe = cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID

Implementation

(
	not(cbc:InvoiceTypeCode = concat($VRBL-MY-Prefix, '02'))
)
or
(
	boolean(cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID)
)