VRBL-INV-PEPPOL-RS-21
Basic Info
|
Rule
|
If both Invoice Start Date and Invoice Line Invoice Start Date are given then the Invoice Line Invoice Start Date must be later or equal to the Invoice Start Date. |
|
Context
|
/ubl:Invoice/cac:InvoiceLine/cac:InvoicePeriod
|
|
Pattern
|
vrbl-invoice-peppol-bis3p0-reduced-syntax |
|
Severity
|
fatal |
Used Template: EndDateEqualOrLaterStartDate
| Parameter |
|
Value |
| StartDate |
= |
/ubl:Invoice/cac:InvoicePeriod/cbc:StartDate
|
| EndDate |
= |
cbc:StartDate
|
Implementation
not(boolean(/ubl:Invoice/cac:InvoicePeriod/cbc:StartDate))
or
not(boolean(cbc:StartDate))
or
number(
concat(
substring(cbc:StartDate, 1, 4),
substring(cbc:StartDate, 6, 2),
substring(cbc:StartDate, 9, 2)
)
)
>=
number(
concat(
substring(/ubl:Invoice/cac:InvoicePeriod/cbc:StartDate, 1, 4),
substring(/ubl:Invoice/cac:InvoicePeriod/cbc:StartDate, 6, 2),
substring(/ubl:Invoice/cac:InvoicePeriod/cbc:StartDate, 9, 2)
)
)