VRBL-INV-FR-CIUS-1p0-158

Basic Info

Rule The Due Date must generally be no earlier than the Issue Date, unless the Invoice Type Code represents advance payment or if the Invoice Subtype Code represents a prepaid invoice.
Context /ubl:Invoice/cbc:DueDate
Pattern vrbl-invoice-fr-cius-1p0
Severity warning

Implementation

contains($VRBL-CL-FR-InvoiceTypeCode-Prepayment, concat(' ',  ../cbc:InvoiceTypeCode, ' '))
or
contains($VRBL-CL-FR-InvoiceSubtypeCode-Prepaid, concat(' ', substring-after(../cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:InvoiceExtension/vrbl:InvoiceSubtypeCode, $VRBL-FR-Prefix), ' '))
or
number(concat(
	substring(., 1, 4),
	substring(., 6, 2),
	substring(., 9, 2)
))
>=
number(concat(
	substring(../cbc:IssueDate, 1, 4),
	substring(../cbc:IssueDate, 6, 2),
	substring(../cbc:IssueDate, 9, 2)
))