BR-29 The invoicing period runs from "2026-07-31" (BT-73) to "2026-07-01" (BT-74), which ends before it starts
The invoicing period runs from "2026-07-31" (BT-73) to "2026-07-01" (BT-74), which ends before it starts. EN 16931 requires the end date to be later than or equal to the start date; equal is allowed, because a single-day period is a real thing. An inverted period is almost always two fields transposed, and it is worth catching here rather than downstream: a consumer that computes a duration from it gets a negative number and either books the accrual to the wrong period or divides by it.
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-73 / BT-74- 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-29",
"field": [
"BT-73",
"BT-74"
],
"severity": "fatal",
"message": "The invoicing period runs from \"2026-07-31\" (BT-73) to \"2026-07-01\" (BT-74), which ends before it starts. EN 16931 requires the end date to be later than or equal to the start date; equal is allowed, because a single-day period is a real thing. An inverted period is almost always two fields transposed, and it is worth catching here rather than downstream: a consumer that computes a duration from it gets a negative number and either books the accrual to the wrong period or divides by it.",
"fix": "Swap invoicingPeriod.startDate and invoicingPeriod.endDate, or correct whichever of the two is wrong. Use the same date in both fields for a period of one day.",
"example": "\"invoicingPeriod\": { \"startDate\": \"2026-07-01\", \"endDate\": \"2026-07-31\" }",
"xpath": "/ubl:Invoice/cac:InvoicePeriod/cbc:EndDate",
"docsUrl": "https://attestwire.com/rules/BR-29"
}
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
"invoicingPeriod": { "startDate": "2026-07-01", "endDate": "2026-07-31" }The fix
Swap invoicingPeriod.startDate and invoicingPeriod.endDate, or correct whichever of the two is wrong. Use the same date in both fields for a period of one day.