VRBL-INV-FR-CIUS-1p0-153

Basic Info

Rule When the Invoice Type Code represents a credit and no Invoice Line Billing Reference Group is provided, the Invoice Document Reference Issue Date must exist within the Invoice.
Context /ubl:Invoice
Pattern vrbl-invoice-fr-cius-1p0
Severity warning

Used Template: Exists

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

Implementation

(
	not(contains($VRBL-CL-FR-InvoiceTypeCode-Credit, concat(' ', cbc:InvoiceTypeCode, ' '))) or not(boolean(cac:InvoiceLine/cac:BillingReference/cac:InvoiceDocumentReference[cbc:ID and cbc:IssueDate])) or not(boolean(cac:InvoiceLine/cac:SubInvoiceLine/cac:BillingReference/cac:InvoiceDocumentReference[cbc:ID and cbc:IssueDate]))
)
or
(
	boolean(cac:BillingReference/cac:InvoiceDocumentReference/cbc:IssueDate)
)