End date of line period MUST be within invoice period.
The end of the invoice line period is after the end of the invoice period in the header. The test compares the line’s udt:DateTimeString with the header date and requires the line period to end no later.
An invoice line’s period must end within the billing period stated in the invoice header. This keeps the line’s time coverage consistent with the invoice period.
An invoice line period ends after the invoice period stated in the header. You can resolve this by aligning the two end dates.
- Compare the invoice line’s
ram:EndDateTimewithram:EndDateTimein the invoice header. - Make sure the invoice line period does not end after the invoice period.
- Generate the invoice again and validate it.
<ram:BillingSpecifiedPeriod> <ram:EndDateTime> <udt:DateTimeString>2026-02-28</udt:DateTimeString> </ram:EndDateTime> </ram:BillingSpecifiedPeriod> <ram:BillingSpecifiedPeriod> <ram:EndDateTime> <udt:DateTimeString>2026-03-01</udt:DateTimeString> </ram:EndDateTime> </ram:BillingSpecifiedPeriod>
<ram:BillingSpecifiedPeriod> <ram:EndDateTime> <udt:DateTimeString>2026-02-28</udt:DateTimeString> </ram:EndDateTime> </ram:BillingSpecifiedPeriod> <ram:BillingSpecifiedPeriod> <ram:EndDateTime> <udt:DateTimeString>2026-02-28</udt:DateTimeString> </ram:EndDateTime> </ram:BillingSpecifiedPeriod>
Technical details
The rule is evaluated for invoice lines when the invoice header contains a ram:EndDateTime. Under the XPath comparison, the line end value must be less than or equal to the header end value.
The rule applies to ram:EndDateTime in the ram:BillingSpecifiedPeriod of an invoice line when the invoice header also has a ram:BillingSpecifiedPeriod with an end date.
rule/@context)assert/@test)