BR-30 A line has an invoice line period running from "2026-07-31" (BT-134) to "2026-07-01" (BT-135), which ends before it starts
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.
This rule is implemented and its error payload below is real, but the long-form write-up — normative text, worked example, divergence note — is not written yet. Everything the library knows about this rule is on this page. Ask and we will prioritise it.
- Business term
BT-134 / BT-135- Severity
fatal
What the library returns
The exact object in result.errors when this rule fires.
Generated by running @attestwire/en16931, not transcribed:
{
"rule": "BR-30",
"field": [
"BT-134",
"BT-135"
],
"severity": "fatal",
"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.",
"fix": "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.",
"example": "\"period\": { \"startDate\": \"2026-07-01\", \"endDate\": \"2026-07-15\" }",
"xpath": "/ubl:Invoice/cac:InvoiceLine[1]/cac:InvoicePeriod/cbc:EndDate",
"docsUrl": "https://attestwire.com/rules/BR-30"
}
xpath locates the element in the generated UBL document,
which is where a KoSIT or Peppol validator will report the same problem.
A passing value
"period": { "startDate": "2026-07-01", "endDate": "2026-07-15" }The fix
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.