Delivery details per invoice line

Error FX-SCH-A-000269 Factur-X

Element 'ram:SpecifiedLineTradeDelivery' must occur exactly 1 times.

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

ram:SpecifiedLineTradeDelivery does not occur exactly once in the invoice line. The element is either missing or present more than once.

What the rule means

ram:SpecifiedLineTradeDelivery contains the delivery details for the invoice line. Each line must have exactly one such delivery section.

Please provide exactly one delivery section for the invoice line

The invoice line’s delivery section is missing or appears more than once. Each invoice line needs exactly one such section.

What to do
  1. Find the affected ram:IncludedSupplyChainTradeLineItem.
  2. Check that it contains exactly one ram:SpecifiedLineTradeDelivery.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:IncludedSupplyChainTradeLineItem/>
✓ Correct
<ram:IncludedSupplyChainTradeLineItem>
  <ram:SpecifiedLineTradeDelivery/>
</ram:IncludedSupplyChainTradeLineItem>
Technical details

In the invoice-line context, the rule checks whether the number of direct ram:SpecifiedLineTradeDelivery elements equals 1.

Where the rule applies

The rule applies within each invoice line (ram:IncludedSupplyChainTradeLineItem).

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem
Test expression (assert/@test)
count(ram:SpecifiedLineTradeDelivery)=1