SchemaGuard by Ironbark Digital · EN 16931 / Peppol / XRechnung Reference
← All 294 EN 16931 / Peppol Rules & Live Validator
FATAL Official EN 16931 / Peppol / CIUS Rule BT/BG Fields: BT-134, BT-135

BR-30 — E-Invoice Validation Rule & Fix

Fixture ID: invertedLinePeriod · XPath: /ubl:Invoice/cac:InvoiceLine[1]/cac:InvoicePeriod/cbc:EndDate

1. Why This Rule Triggers (Diagnostic Message)

Line 1 has an invoice line period running from "2026-07-31" (BT-134) to "2026-07-01" (BT-135), which ends before it starts. The end must be later than or equal to the start; a single-day period with both dates equal is fine. Line periods are the field most often built by slicing a billing run programmatically, which is exactly the code path where an off-by-one on the boundary produces an inverted period rather than an obviously wrong one.

2. How to Fix BR-30

Swap line.period.startDate and line.period.endDate, or correct whichever is wrong. Check the loop that generates the slice if several lines are affected.

3. Valid Code / Payload Example

"period": { "startDate": "2026-07-01", "endDate": "2026-07-15" }
Test & Validate XML / JSON in Live SchemaGuard Validator →