ram:BilledQuantity must be present

Error FX-SCH-A-000276 Factur-X

Element 'ram:BilledQuantity' 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:BilledQuantity is missing from ram:SpecifiedLineTradeDelivery or occurs more than once. Exactly one ram:BilledQuantity is required.

What the rule means

ram:BilledQuantity states the quantity billed for the invoice line. The rule requires exactly one quantity entry.

Please add the billed quantity for the invoice line

The billed quantity is missing from the invoice line’s delivery details or is entered more than once. Add exactly one ram:BilledQuantity.

What to do
  1. Locate ram:SpecifiedLineTradeDelivery for the affected invoice line.
  2. Make sure it contains exactly one ram:BilledQuantity.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedLineTradeDelivery/>
✓ Correct
<ram:SpecifiedLineTradeDelivery>
  <ram:BilledQuantity>1</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
Technical details

Within ram:SpecifiedLineTradeDelivery, the check is count(ram:BilledQuantity)=1.

Where the rule applies

The rule applies within ram:SpecifiedLineTradeDelivery of an invoice line.

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