VRBL-INV-SA-1p2-23

Basic Info

Rule The Invoice must contain the Issue Time. This value must be in the format: hh:mm:ss for time expressed in local time (eg 19:20:30) or hh:mm:ssZ for time expressed in UTC (eg 19:20:30Z).
Context /ubl:Invoice/cbc:IssueTime
Pattern vrbl-invoice-sa-1p2
Severity fatal

Implementation

(string-length(.) = 8 or (string-length(.) = 9 and substring(., 9, 1) = 'Z')) and substring(., 3, 1) = ':' and substring(., 6, 1) = ':' and number(substring(., 1, 2)) >= 0 and number(substring(., 1, 2)) < 24 and number(substring(., 4, 2)) >= 0 and number(substring(., 4, 2)) < 60 and number(substring(., 7, 2)) >= 0 and number(substring(., 7, 2)) < 60