VRBL-INV-DK-OIOUBL-2p0-51
Basic Info
|
Rule
|
If both Invoice Start Date and Invoice End Date are given then the Invoice End Date must be later or equal to the Invoice Start Date. |
|
Context
|
/ubl:Invoice/cac:InvoicePeriod
|
|
Pattern
|
vrbl-invoice-dk-oioubl-2p0 |
|
Severity
|
fatal |
Used Template: EndDateEqualOrLaterStartDate
| Parameter |
|
Value |
| DeactivateWhen |
= |
boolean(cbc:StartTime) and boolean(cbc:EndTime)
|
| StartDate |
= |
cbc:StartDate
|
| EndDate |
= |
cbc:EndDate
|
Implementation
not(boolean(cbc:StartDate))
or
not(boolean(cbc:EndDate))
or
number(
concat(
substring(cbc:EndDate, 1, 4),
substring(cbc:EndDate, 6, 2),
substring(cbc:EndDate, 9, 2)
)
)
>=
number(
concat(
substring(cbc:StartDate, 1, 4),
substring(cbc:StartDate, 6, 2),
substring(cbc:StartDate, 9, 2)
)
)