VRBL-PAY-FR-1p0-63

Basic Info

Rule If both Statement Period Start Date and Statement Issue Date are given then the Statement Issue Date must be later or equal to the Statement Period Start Date.
Context /ubl:Statement/cac:StatementPeriod/cbc:StartDate
Pattern vrbl-payments-fr-1p0
Severity fatal

Used Template: EndDateEqualOrLaterStartDate

Parameter Value
StartDate = .
EndDate = /ubl:Statement/cbc:IssueDate

Implementation

not(boolean(.)) 
or 
not(boolean(/ubl:Statement/cbc:IssueDate))
or 
number(
	concat(
		substring(/ubl:Statement/cbc:IssueDate, 1, 4),
		substring(/ubl:Statement/cbc:IssueDate, 6, 2),
		substring(/ubl:Statement/cbc:IssueDate, 9, 2)
	)
)
>=
number(
	concat(
		substring(., 1, 4),
		substring(., 6, 2),
		substring(., 9, 2)
	)
)