End date must not precede the start date

Error BR-29 EN 16931

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).

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

When both StartDateTime and EndDateTime are provided, the date in EndDateTime is earlier than the date in StartDateTime. The end date must be the same or later.

What the rule means

The invoicing period must be in chronological order. An end date before the start date does not describe a valid period.

Affected fields BT-73 BT-74
Please put the invoicing period dates in order

The invoicing period end date is earlier than its start date. Update the dates so that the period is in chronological order.

What to do
  1. Review BillingPeriodStart and BillingPeriodEnd.
  2. Make sure BillingPeriodEnd is on the same day as or later than BillingPeriodStart.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:BillingSpecifiedPeriod>
  <ram:StartDateTime>
    <udt:DateTimeString format="102">20250115</udt:DateTimeString>
  </ram:StartDateTime>
  <ram:EndDateTime>
    <udt:DateTimeString format="102">20250114</udt:DateTimeString>
  </ram:EndDateTime>
</ram:BillingSpecifiedPeriod>
✓ Correct
<ram:BillingSpecifiedPeriod>
  <ram:StartDateTime>
    <udt:DateTimeString format="102">20250115</udt:DateTimeString>
  </ram:StartDateTime>
  <ram:EndDateTime>
    <udt:DateTimeString format="102">20250115</udt:DateTimeString>
  </ram:EndDateTime>
</ram:BillingSpecifiedPeriod>
Check in FactoorSharp
  • FacturXInvoice.BillingPeriodStart (BT-73)
  • FacturXInvoice.BillingPeriodEnd (BT-74)
Technical details

The test compares the date values in EndDateTime and StartDateTime in format 102. It also passes when either element is absent.

Where the rule applies

The rule applies to the invoice period BillingSpecifiedPeriod and compares its StartDateTime and EndDateTime.

Context (rule/@context)
//ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod
Test expression (assert/@test)
(ram:EndDateTime/udt:DateTimeString[@format = '102']) >= (ram:StartDateTime/ udt:DateTimeString[@format = '102']) or not (ram:EndDateTime) or not (ram:StartDateTime)