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