{
  "id": "BR-30",
  "country": "EU",
  "syntax": "ubl",
  "group": "document",
  "severity": "fatal",
  "severity_note": "fatal, from the Flag column of the Peppol BIS Billing 3.0 UBL rules index retrieved 2026-10-18.",
  "spec": "Peppol BIS Billing 3.0, May 2026 release, EN 16931 model bound to UBL",
  "statement": "If both Invoice line period start date (BT-134) and Invoice line period end date (BT-135) are given then the Invoice line period end date (BT-135) shall be later or equal to the Invoice line period start date (BT-134).",
  "statement_lang": "en",
  "context": "cac:InvoiceLine/cac:InvoicePeriod | cac:CreditNoteLine/cac:InvoicePeriod",
  "test": "(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))",
  "meaning": "If both the invoice line period start date (BT-134) and the invoice line period end date (BT-135) are given, the invoice line period end date (BT-135) must be later or equal to the invoice line period start date (BT-134). The message says \"Invoice line period\", not \"Invoicing period\". The context is the invoice line period or the credit note line period. The published test compares the two dates with xs:date and passes when either date is absent. The comparison has spaces around >=. Both absent branches call exists.",
  "fix": "When both invoice line period dates are present, set the end date (BT-135) on or after the start date (BT-134).",
  "example_fail": "Both invoice line period dates are present, and the end date is before the start date.",
  "example_pass": "The end date is on or after the start date, or at least one of the two dates is absent.",
  "example_note": "Illustration of the condition in the official statement. Not an example published by the source.",
  "source_url": "https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/BR-30/",
  "source_retrieved": "2026-10-18",
  "last_verified": "2026-10-18"
}
