Faktura

BR-29

fatalEN 16931EN 16931 business ruleCIIUBLBT-73BT-74

If both Invoicing period start date (BT-73) and Invoicing period end date (BT-74) are given then the Invoicing period end date (BT-74) shall be later or equal to the Invoicing period start date (BT-73).

Why it fails

The invoicing period end date (BT-74) is earlier than the start date (BT-73).

How to fix it

Swap or correct the dates so end >= start. A single-day period repeats the same date in both. In CII these are DateTimeString format="102" (YYYYMMDD) - comparing them as text is what usually hides an inverted period.

What the validator checks

CII — context $Invoice_Period

(ram:EndDateTime/udt:DateTimeString[@format = '102']) >= (ram:StartDateTime/udt:DateTimeString[@format = '102']) or not (ram:EndDateTime) or not (ram:StartDateTime)

UBL — context $Invoice_Period

(exists(cbc:EndDate) and exists(cbc:StartDate) and xs:date(cbc:EndDate) >= xs:date(cbc:StartDate)) or not(exists(cbc:StartDate)) or not(exists(cbc:EndDate))

Related rules

Part of BR — EN 16931 core business rules.

Validate an invoice against this rule →